Skip to content

Commit

Permalink
Negative index correction
Browse files Browse the repository at this point in the history
Found a problem with one of the loops in the vertical algorithm, resulted from bad job moving stuff around.  Xcode was very forgiving, Ubuntu not so much.  This should make them both happy.
  • Loading branch information
RKStrand committed Aug 9, 2023
1 parent 1a7b1b2 commit a445934
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EnergyPlus/EarthTube.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,8 @@ void EarthTubeData::calcVerticalEarthTube(EnergyPlusData &state, Real64 airFlowT
this->cPrime[nodeNum] = this->cPrime0[nodeNum];
}
} else { // there is positive flow so calculate cPrime
for (int nodeNum = 0; nodeNum <= nodeLast; ++nodeNum) {
this->cPrime[0] = this->cCoeff[0] / this->bCoeff[0];
for (int nodeNum = 1; nodeNum <= nodeLast; ++nodeNum) {
Real64 addTerm = 0.0;
if (nodeNum == nodeET) addTerm = airFlowTerm;
this->cPrime[nodeNum] = this->cCoeff[nodeNum] / (this->bCoeff[nodeNum] + addTerm - this->aCoeff[nodeNum] * this->cPrime[nodeNum - 1]);
Expand Down

5 comments on commit a445934

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5114327-EarthTube1DVerticalEnhancement (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3491 of 3491 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5114327-EarthTube1DVerticalEnhancement (RKStrand) - Win64-Windows-10-VisualStudio-16: OK (2676 of 2676 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5114327-EarthTube1DVerticalEnhancement (RKStrand) - x86_64-MacOS-10.17-clang-13.0.0: OK (3450 of 3450 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5114327-EarthTube1DVerticalEnhancement (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1902 of 1902 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5114327-EarthTube1DVerticalEnhancement (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (777 of 777 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.