Skip to content

Commit

Permalink
Two quick fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Dec 22, 2024
1 parent 61bcdc7 commit ace163b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/EnergyPlus/ChillerIndirectAbsorption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,9 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state)
0.0,
this->SteamFluidIndex,
std::string{SizeChillerAbsorptionIndirect} + this->Name);
Real64 CpWater = this->water->getSpecificHeat(state, GeneratorOutletTemp, RoutineName);

auto *water = FluidProperties::GetWater(state);
Real64 CpWater = water->getSpecificHeat(state, GeneratorOutletTemp, RoutineName);
Real64 HfgSteam = EnthSteamOutDry - EnthSteamOutWet;
// calculate the mass flow rate through the generator
Real64 SteamMassFlowRate = (tmpNomCap * SteamInputRatNom) / ((HfgSteam) + (SteamDeltaT * CpWater));
Expand Down Expand Up @@ -2057,7 +2059,7 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool

// heat of vaporization of steam
Real64 HfgSteam = EnthSteamOutDry - EnthSteamOutWet;
CpFluid = this->water->getSpecificHeat(state, SteamOutletTemp, std::string{calcChillerAbsorptionIndirect} + this->Name);
CpFluid = FluidProperties::GetWater(state)->getSpecificHeat(state, SteamOutletTemp, std::string{calcChillerAbsorptionIndirect} + this->Name);
this->GenMassFlowRate = this->QGenerator / (HfgSteam + CpFluid * SteamDeltaT);
PlantUtilities::SetComponentFlowRate(
state, this->GenMassFlowRate, this->GeneratorInletNodeNum, this->GeneratorOutletNodeNum, this->GenPlantLoc);
Expand All @@ -2073,7 +2075,7 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool
0.0,
this->SteamFluidIndex,
std::string{LoopLossesChillerAbsorptionIndirect} + this->Name);
CpFluid = this->water->getSpecificHeat(state, state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp, std::string{calcChillerAbsorptionIndirect} + this->Name);
CpFluid = FluidProperties::GetWater(state)->getSpecificHeat(state, state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp, std::string{calcChillerAbsorptionIndirect} + this->Name);

this->SteamOutletEnthalpy -= CpFluid * SteamDeltaT;

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/SingleDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3591,7 +3591,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state)
SteamDensity =
FluidProperties::GetSatDensityRefrig(state, fluidNameSteam, TempSteamIn, 1.0, this->FluidIndex, RoutineNameFull);

Cp = state.dataSingleDuct->water->getSpecificHeat(state, state.dataSize->PlantSizData(PltSizHeatNum).ExitTemp, RoutineName);
Cp = FluidProperties::GetWater(state)->getSpecificHeat(state, state.dataSize->PlantSizData(PltSizHeatNum).ExitTemp, RoutineName);
MaxReheatSteamVolFlowDes = state.dataSingleDuct->DesCoilLoadSS /
(SteamDensity * (LatentHeatSteam + state.dataSize->PlantSizData(PltSizHeatNum).DeltaT * Cp));
} else {
Expand Down

3 comments on commit ace163b

@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.

FluidAPI2 (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.3: OK (2918 of 2918 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.

FluidAPI2 (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-UnitTestsCoverage-RelWithDebInfo: OK (2100 of 2100 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@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.

FluidAPI2 (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-IntegrationCoverage-RelWithDebInfo: OK (801 of 801 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.