Skip to content

Commit

Permalink
Fix a few issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Roth committed Jan 7, 2025
1 parent a812f38 commit 6eba628
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/EnergyPlus/FluidProperties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4002,6 +4002,7 @@ namespace FluidProperties {
cTsh.sh = this->getSpecificHeat_raw(state, Temperature, CalledFrom);
}

// print(state.files.eio, "SH,{},{},{}\n", this->Num, CalledFrom, cTsh.sh);
return cTsh.sh; // saturation pressure {Pascals}
}

Expand Down Expand Up @@ -4235,6 +4236,7 @@ namespace FluidProperties {
}
}

// print(state.files.eio, "D,{},{},{}\n", this->Num, CalledFrom, Rho);
return Rho;
}

Expand Down
7 changes: 4 additions & 3 deletions src/EnergyPlus/IceThermalStorage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1680,9 +1680,10 @@ namespace IceThermalStorage {
//----------------------------
int loopNum = this->plantLoc.loopNum;

Real64 CpFluid = state.dataPlnt->PlantLoop(loopNum).glycol->getSpecificHeat(state,
state.dataLoopNodes->Node(this->PltInletNodeNum).Temp,
RoutineName);
// BUG? I think this is supposed to be getSpecificHeat, not getDensity
Real64 CpFluid = state.dataPlnt->PlantLoop(loopNum).glycol->getDensity(state,
state.dataLoopNodes->Node(this->PltInletNodeNum).Temp,
RoutineName);

// Calculate Umyload based on MyLoad from E+
Real64 Umyload = -myLoad * TimeInterval / this->ITSNomCap;
Expand Down
3 changes: 2 additions & 1 deletion src/EnergyPlus/Plant/PlantManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,13 @@ void GetPlantLoopData(EnergyPlusData &state)
} else if (Util::SameString(Alpha(2), "USERDEFINEDFLUIDTYPE")) {
this_loop.FluidType = DataLoopNode::NodeFluidType::Water;
this_loop.FluidName = Alpha(3);
this_loop.FluidIndex = 0;
// check for valid fluid name
this_loop.glycol = FluidProperties::GetGlycol(state, Alpha(3));
if (this_loop.glycol == nullptr) {
ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(3), Alpha(3));
ErrorsFound = true;
} else {
this_loop.FluidIndex = this_loop.glycol->Num;
}

} else {
Expand Down

3 comments on commit 6eba628

@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 (Unknown) - x86_64-Linux-Ubuntu-24.04-gcc-13.3: OK (2919 of 2919 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 (Unknown) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-UnitTestsCoverage-RelWithDebInfo: OK (2101 of 2101 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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 (Unknown) - 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.