diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index 3c87f87a536..d3bf4998909 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -889,11 +889,7 @@ namespace AirLoopHVACDOAS { if (Util::SameString(CompType, "COIL:HEATING:WATER")) { WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_HeatCoilNum); Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", CompName, ErrorsFound); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->HWPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->HWPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->HWPlantLoc.loopNum).glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName); PlantUtilities::InitComponentNodes(state, 0.0, CoilMaxVolFlowRate * rho, @@ -903,11 +899,7 @@ namespace AirLoopHVACDOAS { if (Util::SameString(CompType, "COIL:COOLING:WATER")) { WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum); Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water", CompName, ErrorsFound); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, Constant::CWInitConvTemp, RoutineName); PlantUtilities::InitComponentNodes(state, 0.0, CoilMaxVolFlowRate * rho, @@ -918,11 +910,7 @@ namespace AirLoopHVACDOAS { WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum); Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water:DetailedGeometry", CompName, ErrorsFound); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, Constant::CWInitConvTemp, RoutineName); PlantUtilities::InitComponentNodes(state, 0.0, CoilMaxVolFlowRate * rho, diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc index 5afba936626..4f7c9afa7f2 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc @@ -66,16 +66,12 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or this->autoSizedValue = _originalValue; } else { if (this->termUnitIU) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + this->callingRoutine); + Real64 rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + this->callingRoutine); Real64 DesCoilLoad = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizCoolDeltaT * Cp * rho; Real64 T1Out = this->dataDesInletAirTemp - DesCoilLoad / (state.dataEnvrn->StdRhoAir * Psychrometrics::PsyCpAirFnW(this->dataDesInletAirHumRat) * diff --git a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc index 4725b24c5d1..8cf967d96a2 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc @@ -88,16 +88,12 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, if (DesCoilLoad >= HVAC::SmallLoad) { if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)state.dataPlnt->PlantLoop.size() && this->dataWaterCoilSizCoolDeltaT > 0.0) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + this->callingRoutine); + Real64 rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + this->callingRoutine); this->autoSizedValue = DesCoilLoad / (CoilDesWaterDeltaT * Cp * rho); } else { this->autoSizedValue = 0.0; @@ -120,16 +116,12 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, if (this->curOASysNum > 0) CoilDesWaterDeltaT *= 0.5; if (this->dataCapacityUsedForSizing >= HVAC::SmallLoad) { if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)state.dataPlnt->PlantLoop.size() && CoilDesWaterDeltaT > 0.0) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + this->callingRoutine); + Real64 rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + this->callingRoutine); this->autoSizedValue = this->dataCapacityUsedForSizing / (CoilDesWaterDeltaT * Cp * rho); } else { this->autoSizedValue = 0.0; diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc index 336dc37c5d3..27d003821bd 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc @@ -69,42 +69,30 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64 this->autoSizedValue = _originalValue; } else { if (this->termUnitSingDuct && (this->curTermUnitSizingNum > 0)) { - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 const Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + this->callingRoutine); + Real64 const rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + this->callingRoutine); this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho; state.dataRptCoilSelection->coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0); } else if ((this->termUnitPIU || this->termUnitIU) && (this->curTermUnitSizingNum > 0)) { - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 const Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + this->callingRoutine); + Real64 const rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + this->callingRoutine); this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho * this->termUnitSizing(this->curTermUnitSizingNum).ReheatLoadMult; } else if (this->zoneEqFanCoil || this->zoneEqUnitHeater) { - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 const Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + this->callingRoutine); + Real64 const rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + this->callingRoutine); this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho; state.dataRptCoilSelection->coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0); } else { diff --git a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc index 823f2c00aa3..f88a8a8560d 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc @@ -93,16 +93,12 @@ Real64 HeatingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, if (DesCoilLoad >= HVAC::SmallLoad) { if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)state.dataPlnt->PlantLoop.size() && this->dataWaterCoilSizHeatDeltaT > 0.0) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + this->callingRoutine); + Real64 rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + this->callingRoutine); this->autoSizedValue = DesCoilLoad / (this->dataWaterCoilSizHeatDeltaT * Cp * rho); } else { std::string msg = "Developer Error: For autosizing of " + this->compType + ' ' + this->compName + @@ -123,16 +119,12 @@ Real64 HeatingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, if (this->dataCapacityUsedForSizing >= HVAC::SmallLoad) { if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)state.dataPlnt->PlantLoop.size() && this->dataWaterCoilSizHeatDeltaT > 0.0) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + this->callingRoutine); + Real64 rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + this->callingRoutine); this->autoSizedValue = this->dataCapacityUsedForSizing / (this->dataWaterCoilSizHeatDeltaT * Cp * rho); } else { this->autoSizedValue = 0.0; diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc index 342293b358a..4e40aec146b 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc @@ -72,29 +72,21 @@ Real64 WaterHeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalVa Real64 CoilOutHumRat = 0.0; if ((this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU) && (this->curTermUnitSizingNum > 0)) { DesMassFlow = this->termUnitSizing(this->curTermUnitSizingNum).MaxHWVolFlow; - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + this->callingRoutine); + Real64 rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + this->callingRoutine); NominalCapacityDes = DesMassFlow * this->dataWaterCoilSizHeatDeltaT * Cp * rho; } else if (this->zoneEqFanCoil || this->zoneEqUnitHeater) { DesMassFlow = this->zoneEqSizing(this->curZoneEqNum).MaxHWVolFlow; - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex, - this->callingRoutine); + Real64 Cp = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + this->callingRoutine); + Real64 rho = state.dataPlnt->PlantLoop(this->dataWaterLoopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + this->callingRoutine); NominalCapacityDes = DesMassFlow * this->dataWaterCoilSizHeatDeltaT * Cp * rho; // if coil is part of a zonal unit, calc coil load to get hot water flow rate } else { diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index d2875bdbe37..4f8d2348c02 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -543,19 +543,15 @@ namespace BaseboardRadiator { // Do the Begin Environment initializations if (state.dataGlobal->BeginEnvrnFlag && this->MyEnvrnFlag && !this->SetLoopIndexFlag) { int WaterInletNode = this->WaterInletNode; - Real64 rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); this->WaterMassFlowRateMax = rho * this->WaterVolFlowRateMax; PlantUtilities::InitComponentNodes(state, 0.0, this->WaterMassFlowRateMax, this->WaterInletNode, this->WaterOutletNode); state.dataLoopNodes->Node(WaterInletNode).Temp = Constant::HWInitConvTemp; - Real64 Cp = GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(WaterInletNode).Temp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(WaterInletNode).Temp, + RoutineName); state.dataLoopNodes->Node(WaterInletNode).Enthalpy = Cp * state.dataLoopNodes->Node(WaterInletNode).Temp; state.dataLoopNodes->Node(WaterInletNode).Quality = 0.0; state.dataLoopNodes->Node(WaterInletNode).Press = 0.0; @@ -685,16 +681,12 @@ namespace BaseboardRadiator { } if (DesCoilLoad >= SmallLoad) { - Cp = GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); WaterVolFlowRateMaxDes = DesCoilLoad / (state.dataSize->PlantSizData(PltSizHeatNum).DeltaT * Cp * rho); } else { WaterVolFlowRateMaxDes = 0.0; @@ -753,11 +745,9 @@ namespace BaseboardRadiator { this->WaterInletTemp = state.dataSize->PlantSizData(PltSizHeatNum).ExitTemp; this->AirInletTemp = finalZoneSizing.ZoneTempAtHeatPeak; this->AirInletHumRat = finalZoneSizing.ZoneHumRatAtHeatPeak; - rho = GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); state.dataLoopNodes->Node(this->WaterInletNode).MassFlowRate = rho * this->WaterVolFlowRateMax; std::string_view const CompType = cCMO_BBRadiator_Water; @@ -1003,42 +993,40 @@ namespace BaseboardRadiator { Real64 CC; Real64 QZnReq; - auto &baseboard = state.dataBaseboardRadiator; + auto &baseboard = state.dataBaseboardRadiator->baseboards(BaseboardNum); - ZoneNum = baseboard->baseboards(BaseboardNum).ZonePtr; + ZoneNum = baseboard.ZonePtr; QZnReq = state.dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; - if (baseboard->baseboards(BaseboardNum).MySizeFlag) + if (baseboard.MySizeFlag) QZnReq = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).NonAirSysDesHeatLoad; // If in sizing, assign design condition - WaterInletTemp = baseboard->baseboards(BaseboardNum).WaterInletTemp; - AirInletTemp = baseboard->baseboards(BaseboardNum).AirInletTemp; + WaterInletTemp = baseboard.WaterInletTemp; + AirInletTemp = baseboard.AirInletTemp; - CpWater = GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(baseboard->baseboards(BaseboardNum).plantLoc.loopNum).FluidName, - WaterInletTemp, - state.dataPlnt->PlantLoop(baseboard->baseboards(BaseboardNum).plantLoc.loopNum).FluidIndex, - RoutineName); - CpAir = PsyCpAirFnW(baseboard->baseboards(BaseboardNum).AirInletHumRat); + CpWater = state.dataPlnt->PlantLoop(baseboard.plantLoc.loopNum).glycol->getSpecificHeat(state, + WaterInletTemp, + RoutineName); + CpAir = PsyCpAirFnW(baseboard.AirInletHumRat); - if (baseboard->baseboards(BaseboardNum).DesAirMassFlowRate > 0.0) { // If UA is autosized, assign design condition - AirMassFlowRate = baseboard->baseboards(BaseboardNum).DesAirMassFlowRate; + if (baseboard.DesAirMassFlowRate > 0.0) { // If UA is autosized, assign design condition + AirMassFlowRate = baseboard.DesAirMassFlowRate; } else { - AirMassFlowRate = baseboard->baseboards(BaseboardNum).AirMassFlowRate; + AirMassFlowRate = baseboard.AirMassFlowRate; // pick a mass flow rate that depends on the max water mass flow rate. CR 8842 changed to factor of 2.0 - if (AirMassFlowRate <= 0.0) AirMassFlowRate = 2.0 * baseboard->baseboards(BaseboardNum).WaterMassFlowRateMax; + if (AirMassFlowRate <= 0.0) AirMassFlowRate = 2.0 * baseboard.WaterMassFlowRateMax; } - WaterMassFlowRate = state.dataLoopNodes->Node(baseboard->baseboards(BaseboardNum).WaterInletNode).MassFlowRate; + WaterMassFlowRate = state.dataLoopNodes->Node(baseboard.WaterInletNode).MassFlowRate; CapacitanceAir = CpAir * AirMassFlowRate; - if (QZnReq > SmallLoad && (!state.dataZoneEnergyDemand->CurDeadBandOrSetback(ZoneNum) || baseboard->baseboards(BaseboardNum).MySizeFlag) && - (GetCurrentScheduleValue(state, baseboard->baseboards(BaseboardNum).SchedPtr) > 0 || baseboard->baseboards(BaseboardNum).MySizeFlag) && + if (QZnReq > SmallLoad && (!state.dataZoneEnergyDemand->CurDeadBandOrSetback(ZoneNum) || baseboard.MySizeFlag) && + (GetCurrentScheduleValue(state, baseboard.SchedPtr) > 0 || baseboard.MySizeFlag) && (WaterMassFlowRate > 0.0)) { CapacitanceWater = CpWater * WaterMassFlowRate; CapacitanceMax = max(CapacitanceAir, CapacitanceWater); CapacitanceMin = min(CapacitanceAir, CapacitanceWater); CapacityRatio = CapacitanceMin / CapacitanceMax; - NTU = baseboard->baseboards(BaseboardNum).UA / CapacitanceMin; + NTU = baseboard.UA / CapacitanceMin; // The effectiveness is given by the following formula: // Effectiveness = 1. - EXP((1./CapacityRatio)*(NTU)**0.22*(EXP(-CapacityRatio*(NTU)**0.78)-1.)) // To prevent possible underflows (numbers smaller than the computer can handle) we must break @@ -1058,25 +1046,25 @@ namespace BaseboardRadiator { AirOutletTemp = AirInletTemp + Effectiveness * CapacitanceMin * (WaterInletTemp - AirInletTemp) / CapacitanceAir; WaterOutletTemp = WaterInletTemp - CapacitanceAir * (AirOutletTemp - AirInletTemp) / CapacitanceWater; LoadMet = CapacitanceWater * (WaterInletTemp - WaterOutletTemp); - baseboard->baseboards(BaseboardNum).WaterOutletEnthalpy = - baseboard->baseboards(BaseboardNum).WaterInletEnthalpy - LoadMet / WaterMassFlowRate; + baseboard.WaterOutletEnthalpy = + baseboard.WaterInletEnthalpy - LoadMet / WaterMassFlowRate; } else { AirOutletTemp = AirInletTemp; WaterOutletTemp = WaterInletTemp; LoadMet = 0.0; - baseboard->baseboards(BaseboardNum).WaterOutletEnthalpy = baseboard->baseboards(BaseboardNum).WaterInletEnthalpy; + baseboard.WaterOutletEnthalpy = baseboard.WaterInletEnthalpy; WaterMassFlowRate = 0.0; SetActuatedBranchFlowRate( - state, WaterMassFlowRate, baseboard->baseboards(BaseboardNum).WaterInletNode, baseboard->baseboards(BaseboardNum).plantLoc, false); + state, WaterMassFlowRate, baseboard.WaterInletNode, baseboard.plantLoc, false); AirMassFlowRate = 0.0; } - baseboard->baseboards(BaseboardNum).WaterOutletTemp = WaterOutletTemp; - baseboard->baseboards(BaseboardNum).AirOutletTemp = AirOutletTemp; - baseboard->baseboards(BaseboardNum).Power = LoadMet; - baseboard->baseboards(BaseboardNum).WaterMassFlowRate = WaterMassFlowRate; - baseboard->baseboards(BaseboardNum).AirMassFlowRate = AirMassFlowRate; + baseboard.WaterOutletTemp = WaterOutletTemp; + baseboard.AirOutletTemp = AirOutletTemp; + baseboard.Power = LoadMet; + baseboard.WaterMassFlowRate = WaterMassFlowRate; + baseboard.AirMassFlowRate = AirMassFlowRate; } void UpdateBaseboard(EnergyPlusData &state, int &BaseboardNum) diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index dd0e9e9d5a0..654606b3803 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -507,11 +507,9 @@ void BoilerSpecs::oneTimeInit(EnergyPlusData &state) void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) { static constexpr std::string_view RoutineName("BoilerSpecs::initEachEnvironment"); - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); this->DesMassFlowRate = this->VolFlowRate * rho; PlantUtilities::InitComponentNodes(state, 0.0, this->DesMassFlowRate, this->BoilerInletNodeNum, this->BoilerOutletNodeNum); @@ -624,16 +622,12 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) if (PltSizNum > 0) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + RoutineName); tmpNomCap = Cp * rho * this->SizFac * state.dataSize->PlantSizData(PltSizNum).DeltaT * state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate; } else { @@ -815,11 +809,9 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, Real64 const TempUpLimitBout = this->TempUpLimitBoilerOut; // C - boiler high temperature limit Real64 const BoilerMassFlowRateMax = this->DesMassFlowRate; // Max Design Boiler Mass Flow Rate converted from Volume Flow Rate - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(BoilerInletNode).Temp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(BoilerInletNode).Temp, + RoutineName); // If the specified load is 0.0 or the boiler should not run then we leave this subroutine. Before leaving // if the component control is SERIESACTIVE we set the component flow to inlet flow so that flow resolver diff --git a/src/EnergyPlus/CTElectricGenerator.cc b/src/EnergyPlus/CTElectricGenerator.cc index db8b1b92d94..ed3e90050cc 100644 --- a/src/EnergyPlus/CTElectricGenerator.cc +++ b/src/EnergyPlus/CTElectricGenerator.cc @@ -555,11 +555,9 @@ namespace CTElectricGenerator { int heatRecInNode = this->HeatRecInletNodeNum; heatRecInTemp = state.dataLoopNodes->Node(heatRecInNode).Temp; - heatRecCp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidName, - heatRecInTemp, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidIndex, - RoutineName); + heatRecCp = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getSpecificHeat(state, + heatRecInTemp, + RoutineName); if (FirstHVACIteration && RunFlag) { heatRecMdot = this->DesignHeatRecMassFlowRate; } else { @@ -810,11 +808,9 @@ namespace CTElectricGenerator { int HeatRecOutletNode = this->HeatRecOutletNodeNum; // size mass flow rate - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.cc b/src/EnergyPlus/ChilledCeilingPanelSimple.cc index 07502f83899..ffd1700340f 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.cc +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.cc @@ -830,11 +830,9 @@ void InitCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum, int cons // set design mass flow rates if (thisCP.WaterInletNode > 0) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); thisCP.WaterMassFlowRateMax = rho * thisCP.WaterVolFlowRateMax; PlantUtilities::InitComponentNodes(state, 0.0, thisCP.WaterMassFlowRateMax, thisCP.WaterInletNode, thisCP.WaterOutletNode); } @@ -845,11 +843,9 @@ void InitCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum, int cons if (state.dataGlobal->BeginEnvrnFlag && thisCP.MyEnvrnFlag) { // Initialize - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); thisCP.WaterMassFlowRateMax = rho * thisCP.WaterVolFlowRateMax; @@ -857,11 +853,9 @@ void InitCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum, int cons ThisInNode.Temp = 7.0; - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidName, - ThisInNode.Temp, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).glycol->getSpecificHeat(state, + ThisInNode.Temp, + RoutineName); ThisInNode.Enthalpy = Cp * ThisInNode.Temp; ThisInNode.Quality = 0.0; @@ -1032,16 +1026,12 @@ void SizeCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum) PlantUtilities::MyPlantSizingIndex(state, CompType, thisCP.Name, thisCP.WaterInletNode, thisCP.WaterOutletNode, ErrorsFound); if (PltSizCoolNum > 0) { if (DesCoilLoad >= HVAC::SmallLoad) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidName, - 5., - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidName, - 5.0, - state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).glycol->getDensity(state, + 5., + RoutineName); + Cp = state.dataPlnt->PlantLoop(thisCP.plantLoc.loopNum).glycol->getSpecificHeat(state, + 5.0, + RoutineName); WaterVolFlowMaxCoolDes = DesCoilLoad / (state.dataSize->PlantSizData(PltSizCoolNum).DeltaT * Cp * rho); } else { WaterVolFlowMaxCoolDes = 0.0; @@ -1290,11 +1280,9 @@ void CoolingPanelParams::CalcCoolingPanel(EnergyPlusData &state, int const Cooli if (QZnReq < -HVAC::SmallLoad && !state.dataZoneEnergyDemand->CurDeadBandOrSetback(ZoneNum) && (CoolingPanelOn)) { - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - waterInletTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + waterInletTemp, + RoutineName); // Find the actual load: this parameter modifies what the response of the system should be. For total load control, the system tries // to meet the QZnReq. For convective load control, the convective output of the device equals QZnReq which means that the load on @@ -1375,11 +1363,9 @@ void CoolingPanelParams::CalcCoolingPanel(EnergyPlusData &state, int const Cooli if (CoolingPanelOn) { // Now simulate the system... - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - waterInletTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + waterInletTemp, + RoutineName); Effectiveness = 1.0 - exp(-this->UA / (waterMassFlowRate * Cp)); if (Effectiveness <= 0.0) { Effectiveness = 0.0; diff --git a/src/EnergyPlus/ChillerAbsorption.cc b/src/EnergyPlus/ChillerAbsorption.cc index f4cbabb951f..c0bea372b40 100644 --- a/src/EnergyPlus/ChillerAbsorption.cc +++ b/src/EnergyPlus/ChillerAbsorption.cc @@ -750,21 +750,17 @@ void BLASTAbsorberSpecs::initEachEnvironment(EnergyPlusData &state) { constexpr std::string_view RoutineName("BLASTAbsorberSpecs::initEachEnvironment"); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->EvapMassFlowRateMax = this->EvapVolFlowRate * rho; PlantUtilities::InitComponentNodes(state, 0.0, this->EvapMassFlowRateMax, this->EvapInletNodeNum, this->EvapOutletNodeNum); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->CondMassFlowRateMax = rho * this->CondVolFlowRate; @@ -774,11 +770,9 @@ void BLASTAbsorberSpecs::initEachEnvironment(EnergyPlusData &state) if (this->GeneratorInletNodeNum > 0) { if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); this->GenMassFlowRateMax = rho * this->GeneratorVolFlowRate; } else if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Steam) { @@ -937,17 +931,13 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (PltSizNum > 0) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); - - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpNomCap = Cp * rho * state.dataSize->PlantSizData(PltSizNum).DeltaT * state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; if (!this->NomCapWasAutoSized) tmpNomCap = this->NomCap; @@ -1105,17 +1095,13 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (this->EvapVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { // QCondenser = QEvaporator + QGenerator + PumpingPower - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempDesCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); - - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->TempDesCondIn, + RoutineName); + + Real64 rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpCondVolFlowRate = tmpNomCap * (1.0 + SteamInputRatNom + tmpNomPumpPower / tmpNomCap) / (state.dataSize->PlantSizData(PltSizCondNum).DeltaT * Cp * rho); if (!this->CondVolFlowRateWasAutoSized) tmpCondVolFlowRate = this->CondVolFlowRate; @@ -1183,17 +1169,13 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) (PltSizHeatingNum > 0 && this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water)) { if (this->EvapVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - Real64 CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpWater = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp, + RoutineName); Real64 SteamDeltaT = max(0.5, state.dataSize->PlantSizData(PltSizHeatingNum).DeltaT); - Real64 RhoWater = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - (state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp - SteamDeltaT), - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 RhoWater = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getDensity(state, + (state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp - SteamDeltaT), + RoutineName); tmpGeneratorVolFlowRate = (this->NomCap * SteamInputRatNom) / (CpWater * SteamDeltaT * RhoWater); if (!this->GeneratorVolFlowRateWasAutoSized) tmpGeneratorVolFlowRate = this->GeneratorVolFlowRate; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -1341,16 +1323,12 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) this->GeneratorDeltaTemp = max(0.5, state.dataSize->PlantSizData(PltSizHeatingNum).DeltaT); } else if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::HWInitConvTemp, + RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); this->GeneratorDeltaTemp = (SteamInputRatNom * this->NomCap) / (Cp * rho * this->GeneratorVolFlowRate); } @@ -1460,11 +1438,9 @@ void BLASTAbsorberSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, bool R Real64 TempEvapOut = state.dataLoopNodes->Node(this->EvapOutletNodeNum).Temp; - Real64 CpFluid = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpFluid = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, + RoutineName); // If there is a fault of Chiller SWT Sensor if (this->FaultyChillerSWTFlag && (!state.dataGlobal->WarmupFlag) && (!state.dataGlobal->DoingSizing) && (!state.dataGlobal->KickOffSimulation)) { @@ -1690,11 +1666,9 @@ void BLASTAbsorberSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, bool R this->QCondenser = this->QEvaporator + this->QGenerator + this->PumpingPower; - CpFluid = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + CpFluid = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + RoutineName); if (this->CondMassFlowRate > DataBranchAirLoopPlant::MassFlowTolerance) { this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpFluid + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; @@ -1714,11 +1688,9 @@ void BLASTAbsorberSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, bool R if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { Real64 GenMassFlowRate = 0.0; // Hot water plant is used for the generator - CpFluid = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp, - state.dataPlnt->PlantLoop(GenPlantLoc.loopNum).FluidIndex, - RoutineName); + CpFluid = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp, + RoutineName); if (state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).LoopSide(this->GenPlantLoc.loopSideNum).FlowLock == DataPlant::FlowLock::Unlocked) { if ((this->FlowMode == DataPlant::FlowMode::Constant) || (this->FlowMode == DataPlant::FlowMode::NotModulated)) { diff --git a/src/EnergyPlus/ChillerElectricASHRAE205.cc b/src/EnergyPlus/ChillerElectricASHRAE205.cc index 2ceb1f9278c..fc13bf302cc 100644 --- a/src/EnergyPlus/ChillerElectricASHRAE205.cc +++ b/src/EnergyPlus/ChillerElectricASHRAE205.cc @@ -597,41 +597,33 @@ void ASHRAE205ChillerSpecs::initialize(EnergyPlusData &state, bool const RunFlag this->EquipFlowCtrl = DataPlant::CompData::getPlantComponent(state, this->CWPlantLoc).FlowCtrl; if (this->MyEnvrnFlag && state.dataGlobal->BeginEnvrnFlag && (state.dataPlnt->PlantFirstSizesOkayToFinalize)) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->EvapMassFlowRateMax = rho * this->EvapVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->EvapMassFlowRateMax, this->EvapInletNodeNum, this->EvapOutletNodeNum); if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondIn, + RoutineName); this->CondMassFlowRateMax = rho * this->CondVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->CondMassFlowRateMax, this->CondInletNodeNum, this->CondOutletNodeNum); state.dataLoopNodes->Node(this->CondInletNodeNum).Temp = this->TempRefCondIn; } // Set mass flow rates at Oil Cooler and Aux Equipment nodes if (this->OilCoolerInletNode) { - Real64 rho_oil_cooler = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->OCPlantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->OCPlantLoc.loopNum).FluidIndex, + Real64 rho_oil_cooler = state.dataPlnt->PlantLoop(this->OCPlantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, RoutineName); this->OilCoolerMassFlowRate = rho_oil_cooler * this->OilCoolerVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->OilCoolerMassFlowRate, this->OilCoolerInletNode, this->OilCoolerOutletNode); } if (this->AuxiliaryHeatInletNode) { - Real64 rho_aux = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->AHPlantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->AHPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho_aux = state.dataPlnt->PlantLoop(this->AHPlantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); this->AuxiliaryMassFlowRate = rho_aux * this->AuxiliaryVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->AuxiliaryMassFlowRate, this->AuxiliaryHeatInletNode, this->AuxiliaryHeatOutletNode); } @@ -772,16 +764,12 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) if (PltSizCondNum > 0 && PltSizNum > 0) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->TempRefCondIn, + RoutineName); tmpCondVolFlowRate = tmpNomCap * (1.0 + (1.0 / this->RefCOP) * this->CompPowerToCondenserFrac) / (state.dataSize->PlantSizData(PltSizCondNum).DeltaT * Cp * rho); @@ -879,17 +867,13 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) if (PltSizNum > 0) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); - - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpNomCap = Cp * rho * state.dataSize->PlantSizData(PltSizNum).DeltaT * tmpEvapVolFlowRate; } else { tmpNomCap = 0.0; @@ -1257,11 +1241,9 @@ void ASHRAE205ChillerSpecs::findEvaporatorMassFlowRate(EnergyPlusData &state, Re } } // This is the end of the FlowLock Block - const Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + const Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->EvapVolFlowRate = this->EvapMassFlowRate / rho; } @@ -1399,11 +1381,9 @@ void ASHRAE205ChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, boo return; } - Real64 CpEvap = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpEvap = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, + RoutineName); // Calculate mass flow rate based on MyLoad (TODO: then adjust it after determining if chiller can meet the load) this->findEvaporatorMassFlowRate(state, MyLoad, CpEvap); @@ -1516,11 +1496,9 @@ void ASHRAE205ChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, boo // Energy balance on the chiller system gives the amount of heat lost to the ambient zone this->AmbientZoneGain = this->QEvaporator + this->Power - (this->QCondenser + QExternallyCooled); - Real64 CpCond = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - condInletTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpCond = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + condInletTemp, + RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; // Oil cooler and Auxiliary Heat delta-T calculations @@ -1529,11 +1507,9 @@ void ASHRAE205ChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, boo PlantUtilities::SetComponentFlowRate( state, this->OilCoolerMassFlowRate, this->OilCoolerInletNode, this->OilCoolerOutletNode, this->OCPlantLoc); - Real64 CpOilCooler = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->OCPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->OilCoolerInletNode).Temp, - state.dataPlnt->PlantLoop(this->OCPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpOilCooler = state.dataPlnt->PlantLoop(this->OCPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->OilCoolerInletNode).Temp, + RoutineName); if (this->OilCoolerMassFlowRate != 0.0) { oilCoolerDeltaTemp = this->QOilCooler / (this->OilCoolerMassFlowRate * CpOilCooler); @@ -1547,11 +1523,9 @@ void ASHRAE205ChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, boo PlantUtilities::SetComponentFlowRate( state, this->AuxiliaryMassFlowRate, this->AuxiliaryHeatInletNode, this->AuxiliaryHeatOutletNode, this->AHPlantLoc); - Real64 CpAux = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->AHPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->AuxiliaryHeatInletNode).Temp, - state.dataPlnt->PlantLoop(this->AHPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpAux = state.dataPlnt->PlantLoop(this->AHPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->AuxiliaryHeatInletNode).Temp, + RoutineName); if (this->AuxiliaryMassFlowRate != 0.0) { auxiliaryDeltaTemp = this->QAuxiliary / (this->AuxiliaryMassFlowRate * CpAux); diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 0f301bfe2a3..6455ac11d88 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -1212,11 +1212,9 @@ void ElectricEIRChillerSpecs::initEachEnvironment(EnergyPlusData &state) static constexpr std::string_view RoutineName("ElectricEIRChillerSpecs::initEachEnvironment"); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->EvapMassFlowRateMax = this->EvapVolFlowRate * rho; @@ -1224,11 +1222,9 @@ void ElectricEIRChillerSpecs::initEachEnvironment(EnergyPlusData &state) if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondIn, + RoutineName); this->CondMassFlowRateMax = rho * this->CondVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->CondMassFlowRateMax, this->CondInletNodeNum, this->CondOutletNodeNum); state.dataLoopNodes->Node(this->CondInletNodeNum).Temp = this->TempRefCondIn; @@ -1250,11 +1246,9 @@ void ElectricEIRChillerSpecs::initEachEnvironment(EnergyPlusData &state) } if (this->HeatRecActive) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->DesignHeatRecMassFlowRate, this->HeatRecInletNodeNum, this->HeatRecOutletNodeNum); @@ -1468,17 +1462,13 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (PltSizNum > 0) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); - - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpNomCap = Cp * rho * state.dataSize->PlantSizData(PltSizNum).DeltaT * tmpEvapVolFlowRate; } else { tmpNomCap = 0.0; @@ -1531,16 +1521,12 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (PltSizCondNum > 0 && PltSizNum > 0) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondIn, + RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->TempRefCondIn, + RoutineName); tmpCondVolFlowRate = tmpNomCap * (1.0 + (1.0 / this->RefCOP) * this->CompPowerToCondenserFrac) / (state.dataSize->PlantSizData(PltSizCondNum).DeltaT * Cp * rho); @@ -2060,11 +2046,9 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b if (DataPlant::CompData::getPlantComponent(state, this->CWPlantLoc).CurOpSchemeType == DataPlant::OpScheme::CompSetPtBased) { // Calculate water side load - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, + RoutineName); this->EvapMassFlowRate = state.dataLoopNodes->Node(this->EvapInletNodeNum).MassFlowRate; switch (state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopDemandCalcScheme) { case DataPlant::LoopDemandCalcScheme::SingleSetPoint: { @@ -2093,11 +2077,9 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b PartLoadRat = max(0.0, min(std::abs(MyLoad) / AvailChillerCap, this->MaxPartLoadRat)); } - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, + RoutineName); if (DataPlant::CompData::getPlantComponent(state, this->CWPlantLoc).CurOpSchemeType == DataPlant::OpScheme::CompSetPtBased) { this->PossibleSubcooling = false; @@ -2385,11 +2367,9 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b Real64 condWaterFlowFrac = Curve::CurveValue(state, this->ChillerCondLoopFlowFLoopPLRIndex, cwhLoopPLR); Real64 cwLoopDesVolFlowRate = state.dataSize->PlantSizData(CondPltSizNum).DesVolFlowRate; Real64 cwLoopVolFlowRate = condWaterFlowFrac * cwLoopDesVolFlowRate; - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondIn, + RoutineName); if (chwLoopDemand > 0) { this->CondMassFlowRate = cwLoopVolFlowRate * rho * this->QEvaporator / chwLoopDemand; } else { @@ -2403,11 +2383,9 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b } } break; case DataPlant::CondenserFlowControl::ModulatedDeltaTemperature: { - Real64 CpCond = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - this->CondInletTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpCond = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->CondInletTemp, + RoutineName); Real64 condDT = 0.0; if (this->CondDTScheduleNum > 0) { condDT = ScheduleManager::GetCurrentScheduleValue(state, this->CondDTScheduleNum); @@ -2431,11 +2409,9 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b if (this->CondMassFlowRate > DataBranchAirLoopPlant::MassFlowTolerance) { // If Heat Recovery specified for this vapor compression chiller, then Qcondenser will be adjusted by this subroutine if (this->HeatRecActive) this->calcHeatRecovery(state, this->QCondenser, this->CondMassFlowRate, condInletTemp, this->QHeatRecovered); - Real64 CpCond = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - condInletTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpCond = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + condInletTemp, + RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { @@ -2500,18 +2476,14 @@ void ElectricEIRChillerSpecs::calcHeatRecovery(EnergyPlusData &state, Real64 heatRecInletTemp = state.dataLoopNodes->Node(this->HeatRecInletNodeNum).Temp; Real64 HeatRecMassFlowRate = state.dataLoopNodes->Node(this->HeatRecInletNodeNum).MassFlowRate; - Real64 CpHeatRec = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidName, - heatRecInletTemp, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpHeatRec = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getSpecificHeat(state, + heatRecInletTemp, + RoutineName); Real64 CpCond; if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { - CpCond = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - condInletTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + CpCond = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + condInletTemp, + RoutineName); } else { CpCond = Psychrometrics::PsyCpAirFnW(state.dataLoopNodes->Node(this->HeatRecInletNodeNum).HumRat); } diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.cc b/src/EnergyPlus/ChillerExhaustAbsorption.cc index acd74c9cd8a..38667240ac2 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.cc +++ b/src/EnergyPlus/ChillerExhaustAbsorption.cc @@ -949,11 +949,9 @@ void ExhaustAbsorberSpecs::initialize(EnergyPlusData &state) if (this->isWaterCooled) { // init max available condenser water flow rate if (this->CDPlantLoc.loopNum > 0) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); } else { rho = Psychrometrics::RhoH2O(Constant::InitConvTemp); } @@ -963,11 +961,9 @@ void ExhaustAbsorberSpecs::initialize(EnergyPlusData &state) } if (this->HWPlantLoc.loopNum > 0) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->HWPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->HWPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->HWPlantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); } else { rho = Psychrometrics::RhoH2O(Constant::InitConvTemp); } @@ -976,11 +972,9 @@ void ExhaustAbsorberSpecs::initialize(EnergyPlusData &state) PlantUtilities::InitComponentNodes(state, 0.0, this->DesHeatMassFlowRate, HeatInletNode, HeatOutletNode); if (this->CWPlantLoc.loopNum > 0) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); } else { rho = Psychrometrics::RhoH2O(Constant::InitConvTemp); } @@ -1066,16 +1060,12 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if (PltSizCoolNum > 0) { if (state.dataSize->PlantSizData(PltSizCoolNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpNomCap = Cp * rho * state.dataSize->PlantSizData(PltSizCoolNum).DeltaT * state.dataSize->PlantSizData(PltSizCoolNum).DesVolFlowRate * this->SizFac; if (!this->NomCoolingCapWasAutoSized) tmpNomCap = this->NomCoolingCap; @@ -1296,16 +1286,12 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if (PltSizCondNum > 0 && PltSizCoolNum > 0) { if (state.dataSize->PlantSizData(PltSizCoolNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempDesCondReturn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempDesCondReturn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->TempDesCondReturn, + RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempDesCondReturn, + RoutineName); tmpCondVolFlowRate = tmpNomCap * (1.0 + this->ThermalEnergyCoolRatio) / (state.dataSize->PlantSizData(PltSizCondNum).DeltaT * Cp * rho); if (!this->CondVolFlowRateWasAutoSized) tmpCondVolFlowRate = this->CondVolFlowRate; @@ -1542,17 +1528,13 @@ void ExhaustAbsorberSpecs::calcChiller(EnergyPlusData &state, Real64 &MyLoad) Real64 lExhaustInFlow = state.dataLoopNodes->Node(lExhaustAirInletNodeNum).MassFlowRate; Real64 lExhaustAirHumRat = state.dataLoopNodes->Node(lExhaustAirInletNodeNum).HumRat; - Real64 Cp_CW = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - lChillReturnTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp_CW = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + lChillReturnTemp, + RoutineName); if (this->CDPlantLoc.loopNum > 0) { - Cp_CD = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - lChillReturnTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Cp_CD = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + lChillReturnTemp, + RoutineName); } // If no loop demand or Absorber OFF, return @@ -1905,8 +1887,7 @@ void ExhaustAbsorberSpecs::calcHeater(EnergyPlusData &state, Real64 &MyLoad, boo lFractionOfPeriodRunning = min(1.0, max(lHeatPartLoadRatio, this->CoolPartLoadRatio) / this->MinPartLoadRat); } else { - Real64 const Cp_HW = - FluidProperties::GetSpecificHeatGlycol(state, hwPlantLoop.FluidName, heatReturnNode.Temp, hwPlantLoop.FluidIndex, RoutineName); + Real64 const Cp_HW = hwPlantLoop.glycol->getSpecificHeat(state, heatReturnNode.Temp, RoutineName); // Determine available heating capacity using the current cooling load lAvailableHeatingCapacity = this->NomHeatCoolRatio * this->NomCoolingCap * diff --git a/src/EnergyPlus/ChillerGasAbsorption.cc b/src/EnergyPlus/ChillerGasAbsorption.cc index 6cb26c946db..3c493286496 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.cc +++ b/src/EnergyPlus/ChillerGasAbsorption.cc @@ -948,11 +948,9 @@ void GasAbsorberSpecs::initialize(EnergyPlusData &state) if (this->isWaterCooled) { // init max available condenser water flow rate if (this->CDplantLoc.loopNum > 0) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); } else { rho = Psychrometrics::RhoH2O(Constant::InitConvTemp); } @@ -962,11 +960,9 @@ void GasAbsorberSpecs::initialize(EnergyPlusData &state) } if (this->HWplantLoc.loopNum > 0) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->HWplantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->HWplantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->HWplantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); } else { rho = Psychrometrics::RhoH2O(Constant::InitConvTemp); } @@ -975,11 +971,9 @@ void GasAbsorberSpecs::initialize(EnergyPlusData &state) PlantUtilities::InitComponentNodes(state, 0.0, this->DesHeatMassFlowRate, HeatInletNode, HeatOutletNode); if (this->CWplantLoc.loopNum > 0) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); } else { rho = Psychrometrics::RhoH2O(Constant::InitConvTemp); } @@ -1059,16 +1053,12 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if (PltSizCoolNum > 0) { if (state.dataSize->PlantSizData(PltSizCoolNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidIndex, - RoutineName); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + rho = state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpNomCap = Cp * rho * state.dataSize->PlantSizData(PltSizCoolNum).DeltaT * state.dataSize->PlantSizData(PltSizCoolNum).DesVolFlowRate * this->SizFac; if (!this->NomCoolingCapWasAutoSized) tmpNomCap = this->NomCoolingCap; @@ -1288,16 +1278,12 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if (PltSizCondNum > 0 && PltSizCoolNum > 0) { if (state.dataSize->PlantSizData(PltSizCoolNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidName, - this->TempDesCondReturn, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidIndex, - RoutineName); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidName, - this->TempDesCondReturn, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).glycol->getSpecificHeat(state, + this->TempDesCondReturn, + RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).glycol->getDensity(state, + this->TempDesCondReturn, + RoutineName); tmpCondVolFlowRate = tmpNomCap * (1.0 + this->FuelCoolRatio) / (state.dataSize->PlantSizData(PltSizCondNum).DeltaT * Cp * rho); if (!this->CondVolFlowRateWasAutoSized) tmpCondVolFlowRate = this->CondVolFlowRate; // IF (PlantFirstSizesOkayToFinalize) GasAbsorber(ChillNum)%CondVolFlowRate = tmpCondVolFlowRate @@ -1532,19 +1518,15 @@ void GasAbsorberSpecs::calculateChiller(EnergyPlusData &state, Real64 &MyLoad) Real64 ChillDeltaTemp = std::abs(lChillReturnTemp - ChillSupplySetPointTemp); // local fluid specific heat for chilled water - Real64 Cp_CW = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidName, - lChillReturnTemp, - state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp_CW = state.dataPlnt->PlantLoop(this->CWplantLoc.loopNum).glycol->getSpecificHeat(state, + lChillReturnTemp, + RoutineName); // local fluid specific heat for condenser water Real64 Cp_CD = 0; // putting this here as a dummy initialization to hush the compiler warning, in real runs this value should never be used if (this->CDplantLoc.loopNum > 0) { - Cp_CD = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidName, - lChillReturnTemp, - state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).FluidIndex, - RoutineName); + Cp_CD = state.dataPlnt->PlantLoop(this->CDplantLoc.loopNum).glycol->getSpecificHeat(state, + lChillReturnTemp, + RoutineName); } // If no loop demand or Absorber OFF, return @@ -1854,8 +1836,7 @@ void GasAbsorberSpecs::calculateHeater(EnergyPlusData &state, Real64 &MyLoad, bo LoopNum = this->HWplantLoc.loopNum; LoopSideNum = this->HWplantLoc.loopSideNum; - Cp_HW = FluidProperties::GetSpecificHeatGlycol( - state, state.dataPlnt->PlantLoop(LoopNum).FluidName, lHotWaterReturnTemp, state.dataPlnt->PlantLoop(LoopNum).FluidIndex, RoutineName); + Cp_HW = state.dataPlnt->PlantLoop(LoopNum).glycol->getSpecificHeat(state, lHotWaterReturnTemp, RoutineName); lCoolElectricPower = this->CoolElectricPower; lCoolFuelUseRate = this->CoolFuelUseRate; diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.cc b/src/EnergyPlus/ChillerIndirectAbsorption.cc index c3d58bcbc19..bba47d8db94 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.cc +++ b/src/EnergyPlus/ChillerIndirectAbsorption.cc @@ -894,21 +894,17 @@ void IndirectAbsorberSpecs::initialize(EnergyPlusData &state, bool RunFlag, Real // Initialize Supply Side Variables if (this->MyEnvrnFlag && state.dataGlobal->BeginEnvrnFlag && (state.dataPlnt->PlantFirstSizesOkayToFinalize)) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); - + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); + this->EvapMassFlowRateMax = this->EvapVolFlowRate * rho; PlantUtilities::InitComponentNodes(state, 0.0, this->EvapMassFlowRateMax, this->EvapInletNodeNum, this->EvapOutletNodeNum); - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->CondMassFlowRateMax = rho * this->CondVolFlowRate; @@ -920,11 +916,9 @@ void IndirectAbsorberSpecs::initialize(EnergyPlusData &state, bool RunFlag, Real if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); this->GenMassFlowRateMax = rho * this->GeneratorVolFlowRate; } else { @@ -1051,17 +1045,13 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (PltSizNum > 0) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); - - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpNomCap = Cp * rho * state.dataSize->PlantSizData(PltSizNum).DeltaT * state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; if (!this->NomCapWasAutoSized) tmpNomCap = this->NomCap; @@ -1239,17 +1229,13 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (this->EvapVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { // QCondenser = QEvaporator + QGenerator + PumpingPower - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); - - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + + Real64 rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); tmpCondVolFlowRate = tmpNomCap * (1.0 + SteamInputRatNom + tmpNomPumpPower / tmpNomCap) / (state.dataSize->PlantSizData(PltSizCondNum).DeltaT * Cp * rho); if (!this->CondVolFlowRateWasAutoSized) tmpCondVolFlowRate = this->CondVolFlowRate; @@ -1330,18 +1316,14 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) (PltSizHeatingNum > 0 && this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water)) { if (this->EvapVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - Real64 CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpWater = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp, + RoutineName); Real64 SteamDeltaT = max(0.5, state.dataSize->PlantSizData(PltSizHeatingNum).DeltaT); - Real64 RhoWater = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - (state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp - SteamDeltaT), - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 RhoWater = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getDensity(state, + (state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp - SteamDeltaT), + RoutineName); tmpGeneratorVolFlowRate = (tmpNomCap * SteamInputRatNom) / (CpWater * SteamDeltaT * RhoWater); if (!this->GeneratorVolFlowRateWasAutoSized) tmpGeneratorVolFlowRate = this->GeneratorVolFlowRate; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -1507,16 +1489,12 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (PltSizHeatingNum > 0 && this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { this->GeneratorDeltaTemp = max(0.5, state.dataSize->PlantSizData(PltSizHeatingNum).DeltaT); } else if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); - Real64 CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); + Real64 CpWater = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataSize->PlantSizData(PltSizHeatingNum).ExitTemp, + RoutineName); if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->GeneratorDeltaTemp = (SteamInputRatNom * this->NomCap) / (CpWater * rho * this->GeneratorVolFlowRate); } @@ -1705,11 +1683,9 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool // C - Evaporator low temp. limit cut off Real64 TempLowLimitEout = this->TempLowLimitEvapOut; - Real64 CpFluid = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - EvapInletTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpFluid = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + EvapInletTemp, + RoutineName); // If there is a fault of Chiller SWT Sensor if (this->FaultyChillerSWTFlag && (!state.dataGlobal->WarmupFlag) && (!state.dataGlobal->DoingSizing) && (!state.dataGlobal->KickOffSimulation)) { @@ -1975,11 +1951,9 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool this->QCondenser = this->QEvaporator + this->QGenerator + this->PumpingPower; - CpFluid = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - CondInletTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + CpFluid = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + CondInletTemp, + RoutineName); if (this->CondMassFlowRate > DataBranchAirLoopPlant::MassFlowTolerance) { this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpFluid + CondInletTemp; @@ -1998,11 +1972,9 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool // Hot water plant is used for the generator if (this->GenHeatSourceType == DataLoopNode::NodeFluidType::Water) { - CpFluid = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).FluidIndex, - RoutineName); + CpFluid = state.dataPlnt->PlantLoop(this->GenPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->GeneratorInletNodeNum).Temp, + RoutineName); if ((this->FlowMode == DataPlant::FlowMode::Constant) || (this->FlowMode == DataPlant::FlowMode::NotModulated)) { this->GenMassFlowRate = this->GenMassFlowRateMax; } else { diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index 29b41dc6e17..88c66b15009 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -1050,11 +1050,9 @@ void ReformulatedEIRChillerSpecs::initialize(EnergyPlusData &state, bool const R if (this->MyEnvrnFlag && state.dataGlobal->BeginEnvrnFlag && (state.dataPlnt->PlantFirstSizesOkayToFinalize)) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); this->EvapMassFlowRateMax = this->EvapVolFlowRate * rho; @@ -1062,11 +1060,9 @@ void ReformulatedEIRChillerSpecs::initialize(EnergyPlusData &state, bool const R if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondIn, + RoutineName); this->CondMassFlowRateMax = rho * this->CondVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->CondMassFlowRateMax, this->CondInletNodeNum, this->CondOutletNodeNum); state.dataLoopNodes->Node(this->CondInletNodeNum).Temp = this->TempRefCondIn; @@ -1090,11 +1086,9 @@ void ReformulatedEIRChillerSpecs::initialize(EnergyPlusData &state, bool const R } if (this->HeatRecActive) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; PlantUtilities::InitComponentNodes(state, 0.0, this->DesignHeatRecMassFlowRate, this->HeatRecInletNodeNum, this->HeatRecOutletNodeNum); // overall capacity limit @@ -1260,16 +1254,12 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) SizingEvapOutletTemp = state.dataSize->PlantSizData(PltSizNum).ExitTemp; SizingCondOutletTemp = state.dataSize->PlantSizData(PltSizCondNum).ExitTemp + state.dataSize->PlantSizData(PltSizCondNum).DeltaT; } - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - Constant::CWInitConvTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::CWInitConvTemp, + RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, + Constant::CWInitConvTemp, + RoutineName); Real64 RefCapFT = Curve::CurveValue(state, this->ChillerCapFTIndex, SizingEvapOutletTemp, SizingCondOutletTemp); tmpNomCap = (Cp * rho * state.dataSize->PlantSizData(PltSizNum).DeltaT * tmpEvapVolFlowRate) / RefCapFT; } else { @@ -1326,16 +1316,12 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if (PltSizCondNum > 0 && PltSizNum > 0 && this->CondenserType == DataPlant::CondenserType::WaterCooled) { if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow && tmpNomCap > 0.0) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondIn, + RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->TempRefCondIn, + RoutineName); tmpCondVolFlowRate = tmpNomCap * (1.0 + (1.0 / this->RefCOP) * this->CompPowerToCondenserFrac) / (state.dataSize->PlantSizData(PltSizCondNum).DeltaT * Cp * rho); // IF (DataPlant::PlantFirstSizesOkayToFinalize) ElecReformEIRChiller(EIRChillNum)%CondVolFlowRate = tmpCondVolFlowRate @@ -1670,17 +1656,13 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) } // Initialize condenser reference inlet temperature (not a user input) - Real64 Density = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondOut, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); - - Real64 SpecificHeat = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondOut, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Density = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondOut, + RoutineName); + + Real64 SpecificHeat = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->TempRefCondOut, + RoutineName); Real64 CondenserCapacity = this->RefCap * (1.0 + (1.0 / this->RefCOP) * this->CompPowerToCondenserFrac); Real64 DeltaTCond = (CondenserCapacity) / (this->CondVolFlowRate * Density * SpecificHeat); this->TempRefCondIn = this->TempRefCondOut - DeltaTCond; @@ -1909,18 +1891,14 @@ void ReformulatedEIRChillerSpecs::calcHeatRecovery(EnergyPlusData &state, Real64 heatRecInletTemp = state.dataLoopNodes->Node(this->HeatRecInletNodeNum).Temp; Real64 HeatRecMassFlowRate = state.dataLoopNodes->Node(this->HeatRecInletNodeNum).MassFlowRate; - Real64 CpHeatRec = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidName, - heatRecInletTemp, - state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpHeatRec = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getSpecificHeat(state, + heatRecInletTemp, + RoutineName); Real64 CpCond; if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { - CpCond = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - condInletTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + CpCond = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + condInletTemp, + RoutineName); } else { CpCond = Psychrometrics::PsyCpAirFnW(state.dataLoopNodes->Node(this->HeatRecInletNodeNum).HumRat); } @@ -2227,11 +2205,9 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa // This chiller is currently has only a water-cooled condenser // Calculate water side load - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 Cp = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, + RoutineName); // actual load to be met by chiller. This value is compared to MyLoad // and reset when necessary since this chiller can cycle, the load passed @@ -2532,11 +2508,9 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa Real64 condWaterFlowFrac = Curve::CurveValue(state, this->ChillerCondLoopFlowFLoopPLRIndex, cwhLoopPLR); Real64 cwLoopDesVolFlowRate = state.dataSize->PlantSizData(CondPltSizNum).DesVolFlowRate; Real64 cwLoopVolFlowRate = condWaterFlowFrac * cwLoopDesVolFlowRate; - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - this->TempRefCondIn, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getDensity(state, + this->TempRefCondIn, + RoutineName); if (chwLoopDemand > 0) { this->CondMassFlowRate = cwLoopVolFlowRate * rho * this->QEvaporator / chwLoopDemand; } else { @@ -2550,11 +2524,9 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa } } break; case DataPlant::CondenserFlowControl::ModulatedDeltaTemperature: { - Real64 CpCond = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName, - this->CondInletTemp, - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpCond = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getSpecificHeat(state, + this->CondInletTemp, + RoutineName); Real64 condDT = 0.0; if (this->CondDTScheduleNum > 0) { condDT = ScheduleManager::GetCurrentScheduleValue(state, this->CondDTScheduleNum); @@ -2578,11 +2550,9 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa if (this->CondMassFlowRate > DataBranchAirLoopPlant::MassFlowTolerance) { // If Heat Recovery specified for this vapor compression chiller, then Qcondenser will be adjusted by this subroutine if (this->HeatRecActive) this->calcHeatRecovery(state, this->QCondenser, this->CondMassFlowRate, condInletTemp, this->QHeatRecovery); - Real64 CpCond = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidName, - condInletTemp, - state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).FluidIndex, - RoutineName); + Real64 CpCond = state.dataPlnt->PlantLoop(this->CDPlantLoc.loopNum).glycol->getSpecificHeat(state, + condInletTemp, + RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { ShowSevereError(state, format("ControlReformEIRChillerModel: Condenser flow = 0, for ElecReformEIRChiller={}", this->Name)); diff --git a/src/EnergyPlus/CondenserLoopTowers.cc b/src/EnergyPlus/CondenserLoopTowers.cc index 9e91dcfd5ba..0fabc4bbdad 100644 --- a/src/EnergyPlus/CondenserLoopTowers.cc +++ b/src/EnergyPlus/CondenserLoopTowers.cc @@ -1788,11 +1788,9 @@ namespace CondenserLoopTowers { void CoolingTower::initEachEnvironment(EnergyPlusData &state) { static constexpr std::string_view RoutineName("CoolingTower::initEachEnvironment"); - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); this->DesWaterMassFlowRate = this->DesignWaterFlowRate * rho; this->DesWaterMassFlowRatePerCell = this->DesWaterMassFlowRate / this->NumCell; PlantUtilities::InitComponentNodes(state, 0.0, this->DesWaterMassFlowRate, this->WaterInletNodeNum, this->WaterOutletNodeNum); @@ -2480,16 +2478,12 @@ namespace CondenserLoopTowers { if (this->PerformanceInputMethod_Num == PIM::UFactor && (!this->HighSpeedTowerUAWasAutoSized)) { if (PltSizCondNum > 0) { - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + DesTowerExitWaterTemp, + RoutineName); + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * this->DesignWaterFlowRate * DesTowerWaterDeltaT; this->TowerNominalCapacity = DesTowerLoad / this->HeatRejectCapNomCapSizingRatio; @@ -2497,15 +2491,11 @@ namespace CondenserLoopTowers { Real64 AssumedDeltaT = DesTowerWaterDeltaT; Real64 AssumedExitTemp = DesTowerExitWaterTemp; - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - AssumedExitTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + AssumedExitTemp, + RoutineName); + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, AssumedExitTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, RoutineName); DesTowerLoad = rho * Cp * this->DesignWaterFlowRate * AssumedDeltaT; @@ -2591,16 +2581,12 @@ namespace CondenserLoopTowers { } else { if (PltSizCondNum > 0) { if (PlantSizData(PltSizCondNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * tmpDesignWaterFlowRate * DesTowerWaterDeltaT; tmpHighSpeedFanPower = 0.0105 * DesTowerLoad; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) this->HighSpeedFanPower = tmpHighSpeedFanPower; @@ -2691,16 +2677,12 @@ namespace CondenserLoopTowers { if (this->HighSpeedTowerUAWasAutoSized) { if (PltSizCondNum > 0) { if (PlantSizData(PltSizCondNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * tmpDesignWaterFlowRate * DesTowerWaterDeltaT; // This conditional statement is to trap when the user specified condenser/tower water design setpoint // temperature is less than design inlet air wet bulb temperature @@ -2790,16 +2772,12 @@ namespace CondenserLoopTowers { } else { if (this->DesignWaterFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * tmpDesignWaterFlowRate * DesTowerWaterDeltaT; // This conditional statement is to trap when the user specified condenser/tower water design setpoint // temperature is less than design inlet air wet bulb temperature @@ -2910,16 +2888,12 @@ namespace CondenserLoopTowers { if (this->DesignWaterFlowRate >= HVAC::SmallWaterVolFlow) { // nominal capacity doesn't include compressor heat; predefined factor was 1.25 W heat rejection per W of delivered cooling but now is // a user input - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - 29.44, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); // 85F design exiting water temp - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - 29.44, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); // 85F design exiting water temp + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + 29.44, + RoutineName); // 85F design exiting water temp + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + 29.44, + RoutineName); // 85F design exiting water temp DesTowerLoad = this->TowerNominalCapacity * this->HeatRejectCapNomCapSizingRatio; Real64 const solveWaterFlowRate = rho * tmpDesignWaterFlowRate; // design water mass flow rate @@ -3093,16 +3067,12 @@ namespace CondenserLoopTowers { // nominal capacity doesn't include compressor heat; predefined factor was 1.25 W heat rejection per W of evap cooling but now is a // user input - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - 29.44, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); // 85F design exiting water temp - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - 29.44, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); // 85F design exiting water temp + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + 29.44, + RoutineName); // 85F design exiting water temp + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + 29.44, + RoutineName); // 85F design exiting water temp DesTowerLoad = this->TowerLowSpeedNomCap * this->HeatRejectCapNomCapSizingRatio; Real64 const solveWaterFlow = rho * tmpDesignWaterFlowRate; // design water mass flow rate UA0 = 0.0001 * DesTowerLoad; // Assume deltaT = 10000K (limit) @@ -3192,16 +3162,12 @@ namespace CondenserLoopTowers { if (this->DesignWaterFlowRate >= HVAC::SmallWaterVolFlow && this->TowerFreeConvNomCap > 0.0) { // nominal capacity doesn't include compressor heat; predefined factor was 1.25 W heat rejection per W of evap cooling but now user // input - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - 29.44, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); // 85F design exiting water temp - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - 29.44, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); // 85F design exiting water temp + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + 29.44, + RoutineName); // 85F design exiting water temp + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + 29.44, + RoutineName); // 85F design exiting water temp DesTowerLoad = this->TowerFreeConvNomCap * this->HeatRejectCapNomCapSizingRatio; Real64 const solveWaterFlow = rho * this->DesignWaterFlowRate; // design water mass flow rate UA0 = 0.0001 * DesTowerLoad; // Assume deltaT = 10000K (limit) @@ -3337,16 +3303,12 @@ namespace CondenserLoopTowers { this->MaxWaterFlowRatio)); } - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - (this->DesignInletWB + this->DesignApproach + this->DesignRange), - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - (this->DesignInletWB + this->DesignApproach + this->DesignRange), - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + (this->DesignInletWB + this->DesignApproach + this->DesignRange), + RoutineName); + Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + (this->DesignInletWB + this->DesignApproach + this->DesignRange), + RoutineName); this->TowerNominalCapacity = ((rho * tmpDesignWaterFlowRate) * Cp * this->DesignRange); if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -3420,7 +3382,7 @@ namespace CondenserLoopTowers { state, state.dataOutRptPredefined->pdchCTFCFluidType, this->Name, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName); // Fluid Name more reasonable than FluidType + state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->Name); // Fluid Name more reasonable than FluidType OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchCTFCRange, this->Name, this->DesignRange); OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchCTFCApproach, this->Name, this->DesignApproach); OutputReportPredefined::PreDefTableEntry( @@ -3584,16 +3546,12 @@ namespace CondenserLoopTowers { if (PltSizCondNum > 0) { // get nominal capacity from PlantSizData(PltSizCondNum)%DeltaT and PlantSizData(PltSizCondNum)%DesVolFlowRate if (PlantSizData(PltSizCondNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + DesTowerExitWaterTemp, + RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * PlantSizData(PltSizCondNum).DesVolFlowRate * DesTowerWaterDeltaT * this->SizFac; tmpNomTowerCap = DesTowerLoad / this->HeatRejectCapNomCapSizingRatio; } else { @@ -3602,16 +3560,12 @@ namespace CondenserLoopTowers { } else { // PltSizCondNum = 0 if (!this->TowerInletCondsAutoSize) { // can use design data entered into tower object if (this->DesignWaterFlowRate >= HVAC::SmallWaterVolFlow) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + DesTowerExitWaterTemp, + RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * this->DesignWaterFlowRate * DesTowerWaterDeltaT * this->SizFac; tmpNomTowerCap = DesTowerLoad / this->HeatRejectCapNomCapSizingRatio; } else { @@ -3865,25 +3819,19 @@ namespace CondenserLoopTowers { // now calculate UA values from nominal capacities and flow rates if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { if (PltSizCondNum > 0) { // user has a plant sizing object - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); this->WaterTemp = DesTowerInletWaterTemp; } else { // probably no plant sizing object - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + Constant::InitConvTemp, + RoutineName); this->WaterTemp = DesTowerInletWaterTemp; // 35.0; // design condition } - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); // full speed fan tower UA Real64 const solveLoad = tmpNomTowerCap * this->HeatRejectCapNomCapSizingRatio; @@ -4028,16 +3976,12 @@ namespace CondenserLoopTowers { // get nominal capacity from PlantSizData(PltSizCondNum)%DeltaT and PlantSizData(PltSizCondNum)%DesVolFlowRate if (PltSizCondNum > 0) { if (PlantSizData(PltSizCondNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + DesTowerExitWaterTemp, + RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * PlantSizData(PltSizCondNum).DesVolFlowRate * DesTowerWaterDeltaT * this->SizFac; tmpNomTowerCap = DesTowerLoad / this->HeatRejectCapNomCapSizingRatio; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -4080,16 +4024,12 @@ namespace CondenserLoopTowers { } else { if (!this->TowerInletCondsAutoSize) { if (this->DesignWaterFlowRate >= HVAC::SmallWaterVolFlow) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + DesTowerExitWaterTemp, + RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * this->DesignWaterFlowRate * DesTowerWaterDeltaT * this->SizFac; tmpNomTowerCap = DesTowerLoad / this->HeatRejectCapNomCapSizingRatio; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -4202,16 +4142,12 @@ namespace CondenserLoopTowers { } // now calculate UA values from nominal capacities and flow rates if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); // full speed fan tower UA Real64 const solveLoad = tmpNomTowerCap * this->HeatRejectCapNomCapSizingRatio; Real64 const solveWaterFlow = rho * tmpDesignWaterFlowRate; // design water mass flow rate @@ -4317,16 +4253,12 @@ namespace CondenserLoopTowers { // get nominal capacity from PlantSizData(PltSizCondNum)%DeltaT and PlantSizData(PltSizCondNum)%DesVolFlowRate if (PltSizCondNum > 0) { if (PlantSizData(PltSizCondNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + DesTowerExitWaterTemp, + RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); DesTowerLoad = rho * Cp * PlantSizData(PltSizCondNum).DesVolFlowRate * DesTowerWaterDeltaT; tmpNomTowerCap = DesTowerLoad / this->HeatRejectCapNomCapSizingRatio; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -4400,16 +4332,12 @@ namespace CondenserLoopTowers { } else { // UA and Air flow rate given, so find Nominal Cap from running model - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - DesTowerExitWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + DesTowerExitWaterTemp, + RoutineName); + Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + DesTowerExitWaterTemp, + RoutineName); this->WaterTemp = DesTowerInletWaterTemp; this->AirTemp = DesTowerInletAirDBTemp; // 35.0; @@ -4828,11 +4756,9 @@ namespace CondenserLoopTowers { // output the fraction of the time step the fan is ON this->FanCyclingRatio = FanModeFrac; // Should this be water inlet node num????? - Real64 const CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const CpWater = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, + RoutineName); this->Qactual = this->WaterMassFlowRate * CpWater * (state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp - this->OutletWaterTemp); this->airFlowRateRatio = (AirFlowRate * this->NumCell) / this->HighSpeedAirFlowRate; @@ -5068,11 +4994,9 @@ namespace CondenserLoopTowers { this->FanCyclingRatio = FanModeFrac; this->SpeedSelected = SpeedSel; - Real64 const CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const CpWater = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, + RoutineName); this->Qactual = this->WaterMassFlowRate * CpWater * (state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp - this->OutletWaterTemp); this->airFlowRateRatio = (AirFlowRate * this->NumCell) / this->HighSpeedAirFlowRate; } @@ -5213,11 +5137,9 @@ namespace CondenserLoopTowers { while (IncrNumCellFlag) { IncrNumCellFlag = false; // Initialize inlet node water properties - Real64 const WaterDensity = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const WaterDensity = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, + RoutineName); Real64 const WaterFlowRateRatio = WaterMassFlowRatePerCell / (WaterDensity * this->CalibratedWaterFlowRate / this->NumCell); // check independent inputs with respect to model boundaries @@ -5346,11 +5268,9 @@ namespace CondenserLoopTowers { } } - Real64 const CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const CpWater = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, + RoutineName); this->Qactual = this->WaterMassFlowRate * CpWater * (state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp - this->OutletWaterTemp); // calculate end time of current time step @@ -5432,11 +5352,9 @@ namespace CondenserLoopTowers { Real64 constexpr Acc(1.e-3); // Accuracy of solver result static constexpr std::string_view RoutineName("calculateMerkelVariableSpeedTower"); - Real64 const CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const CpWater = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp, + RoutineName); this->Qactual = 0.0; this->FanPower = 0.0; this->OutletWaterTemp = state.dataLoopNodes->Node(this->WaterInletNodeNum).Temp; @@ -5712,11 +5630,9 @@ namespace CondenserLoopTowers { Real64 AirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(state, this->AirPress, InletAirTemp, this->AirHumRat); // Density of air [kg/m3] Real64 AirMassFlowRate = AirFlowRate * AirDensity; // Mass flow rate of air [kg/s] Real64 CpAir = Psychrometrics::PsyCpAirFnW(this->AirHumRat); // Heat capacity of air [J/kg/K] - Real64 CpWater = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - this->WaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); // Heat capacity of water [J/kg/K] + Real64 CpWater = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + this->WaterTemp, + RoutineName); // Heat capacity of water [J/kg/K] Real64 InletAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(state, this->AirWetBulb, 1.0, this->AirPress); // Enthalpy of entering moist air [J/kg] @@ -6223,11 +6139,9 @@ namespace CondenserLoopTowers { Real64 const TairAvg = (this->AirTemp + OutletAirTSat) / 2.0; // Amount of water evaporated, get density water at air temp or 4 C if too cold - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - max(TairAvg, 4.0), - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + max(TairAvg, 4.0), + RoutineName); EvapVdot = (AirMassFlowRate * (OutSpecificHumRat - InSpecificHumRat)) / rho; // [m3/s] if (EvapVdot < 0.0) EvapVdot = 0.0; @@ -6236,11 +6150,9 @@ namespace CondenserLoopTowers { } } else if (this->EvapLossMode == EvapLoss::UserFactor) { - Real64 const rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - AverageWaterTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + AverageWaterTemp, + RoutineName); EvapVdot = this->UserEvapLossFactor * (this->InletWaterTemp - this->OutletWaterTemp) * (this->WaterMassFlowRate / rho); if (EvapVdot < 0.0) EvapVdot = 0.0; diff --git a/src/EnergyPlus/DesiccantDehumidifiers.cc b/src/EnergyPlus/DesiccantDehumidifiers.cc index 9f1a9d3449d..e5c1aa857b5 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.cc +++ b/src/EnergyPlus/DesiccantDehumidifiers.cc @@ -1647,11 +1647,9 @@ namespace DesiccantDehumidifiers { desicDehum.MaxCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", desicDehum.RegenCoilName, ErrorFlag); if (desicDehum.MaxCoilFluidFlow > 0.0) { - Real64 FluidDensity = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(desicDehum.plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(desicDehum.plantLoc.loopNum).FluidIndex, - initCBVAV); + Real64 FluidDensity = state.dataPlnt->PlantLoop(desicDehum.plantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + initCBVAV); desicDehum.MaxCoilFluidFlow *= FluidDensity; } @@ -1762,11 +1760,9 @@ namespace DesiccantDehumidifiers { //} if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 FluidDensity = - FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(desicDehum.plantLoc.loopNum).FluidName, - Constant::HWInitConvTemp, - state.dataPlnt->PlantLoop(desicDehum.plantLoc.loopNum).FluidIndex, - RoutineName); + state.dataPlnt->PlantLoop(desicDehum.plantLoc.loopNum).glycol->getDensity(state, + Constant::HWInitConvTemp, + RoutineName); desicDehum.MaxCoilFluidFlow = CoilMaxVolFlowRate * FluidDensity; } } diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.cc b/src/EnergyPlus/EvaporativeFluidCoolers.cc index d3627083a06..bb455dfc3c8 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.cc +++ b/src/EnergyPlus/EvaporativeFluidCoolers.cc @@ -1277,11 +1277,9 @@ namespace EvaporativeFluidCoolers { // Begin environment initializations if (this->MyEnvrnFlag && state.dataGlobal->BeginEnvrnFlag && (state.dataPlnt->PlantFirstSizesOkayToFinalize)) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - RoutineName); + Real64 rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + RoutineName); this->DesWaterMassFlowRate = this->DesignWaterFlowRate * rho; PlantUtilities::InitComponentNodes(state, 0.0, this->DesWaterMassFlowRate, this->WaterInletNodeNum, this->WaterOutletNodeNum); this->MyEnvrnFlag = false; @@ -1406,16 +1404,12 @@ namespace EvaporativeFluidCoolers { if (this->PerformanceInputMethod_Num == PIM::UFactor && !this->HighSpeedEvapFluidCoolerUAWasAutoSized) { if (PltSizCondNum > 0) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); + Real64 rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + CalledFrom); + Real64 Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, + CalledFrom); DesEvapFluidCoolerLoad = rho * Cp * tmpDesignWaterFlowRate * state.dataSize->PlantSizData(PltSizCondNum).DeltaT; this->HighSpeedStandardDesignCapacity = DesEvapFluidCoolerLoad / this->HeatRejectCapNomCapSizingRatio; } else { @@ -1481,16 +1475,12 @@ namespace EvaporativeFluidCoolers { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) this->HighSpeedFanPower = tmpHighSpeedFanPower; } else if (PltSizCondNum > 0) { if (state.dataSize->PlantSizData(PltSizCondNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); + Real64 rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + CalledFrom); + Real64 Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, + CalledFrom); DesEvapFluidCoolerLoad = rho * Cp * tmpDesignWaterFlowRate * state.dataSize->PlantSizData(PltSizCondNum).DeltaT; tmpHighSpeedFanPower = 0.0105 * DesEvapFluidCoolerLoad; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) this->HighSpeedFanPower = tmpHighSpeedFanPower; @@ -1586,16 +1576,12 @@ namespace EvaporativeFluidCoolers { "must be > 25.6 C if autosizing the Evaporative Fluid Cooler."); ShowFatalError(state, "Review and revise design input values as appropriate."); } - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); + Real64 rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + CalledFrom); + Real64 Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, + CalledFrom); DesEvapFluidCoolerLoad = rho * Cp * tmpDesignWaterFlowRate * state.dataSize->PlantSizData(PltSizCondNum).DeltaT; Real64 const par1 = rho * tmpDesignWaterFlowRate; // Design water mass flow rate Real64 const par2 = tmpHighSpeedAirFlowRate; // Design air volume flow rate @@ -1714,16 +1700,12 @@ namespace EvaporativeFluidCoolers { if (this->DesignWaterFlowRate >= HVAC::SmallWaterVolFlow) { // Standard Design Capacity doesn't include compressor heat; // predefined factor was 1.25 W heat rejection per W of delivered cooling, now a user input with 1.25 default - Real64 rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName, - 35.0, - state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex, - CalledFrom); + Real64 rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, + Constant::InitConvTemp, + CalledFrom); + Real64 Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, + 35.0, + CalledFrom); DesEvapFluidCoolerLoad = this->HighSpeedStandardDesignCapacity * this->HeatRejectCapNomCapSizingRatio; Real64 const par1 = rho * this->DesignWaterFlowRate; // Design water mass flow rate Real64 const par2 = this->HighSpeedAirFlowRate; // Design air volume flow rate diff --git a/src/EnergyPlus/Plant/Loop.hh b/src/EnergyPlus/Plant/Loop.hh index b47883626f6..9e53f46a868 100644 --- a/src/EnergyPlus/Plant/Loop.hh +++ b/src/EnergyPlus/Plant/Loop.hh @@ -48,6 +48,7 @@ #ifndef PlantTopologyLoop_hh_INCLUDED #define PlantTopologyLoop_hh_INCLUDED +#include #include #include @@ -90,6 +91,10 @@ namespace DataPlant { std::string FluidName; // Name of the fluid specified for this loop DataLoopNode::NodeFluidType FluidType; // Type of fluid in the loop int FluidIndex; // Index for Fluid in FluidProperties + + FluidProperties::GlycolProps *glycol = nullptr; + FluidProperties::RefrigProps *steam = nullptr; + int MFErrIndex; // for recurring mass flow errors int MFErrIndex1; // for recurring mass flow errors int MFErrIndex2; // for recurring mass flow errors @@ -149,7 +154,7 @@ namespace DataPlant { // Default Constructor PlantLoopData() - : FluidType(DataLoopNode::NodeFluidType::Blank), FluidIndex(1), // default to water + : FluidType(DataLoopNode::NodeFluidType::Blank), FluidIndex(1), // default to water MFErrIndex(0), MFErrIndex1(0), MFErrIndex2(0), TempSetPointNodeNum(0), MaxBranch(0), MinTemp(0.0), MaxTemp(0.0), MinTempErrIndex(0), MaxTempErrIndex(0), MinVolFlowRate(0.0), MaxVolFlowRate(0.0), MaxVolFlowRateWasAutoSized(false), MinMassFlowRate(0.0), MaxMassFlowRate(0.0), Volume(0.0), VolumeWasAutoSized(false), CirculationTime(2.0), Mass(0.0), EMSCtrl(false), EMSValue(0.0), diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index d045c74a3e1..b743337a7a2 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -291,6 +291,7 @@ void GetPlantLoopData(EnergyPlusData &state) // SUBROUTINE PARAMETER DEFINITIONS: static constexpr std::string_view RoutineName("GetPlant/CondenserLoopData: "); + static constexpr std::string_view routineName = "GetPlant/CondenserLoopData"; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int LoopNum; // DO loop counter for loops @@ -334,6 +335,10 @@ void GetPlantLoopData(EnergyPlusData &state) auto &this_loop(state.dataPlnt->PlantLoop(LoopNum)); auto &this_demand_side(this_loop.LoopSide(DataPlant::LoopSideLocation::Demand)); auto &this_supply_side(this_loop.LoopSide(DataPlant::LoopSideLocation::Supply)); + + ErrorObjectHeader eoh; + eoh.routineName = routineName; + DataLoopNode::ConnectionObjectType objType; if (LoopNum <= state.dataHVACGlobal->NumPlantLoops) { PlantLoopNum = LoopNum; @@ -352,6 +357,9 @@ void GetPlantLoopData(EnergyPlusData &state) state.dataIPShortCut->lAlphaFieldBlanks, state.dataIPShortCut->cAlphaFieldNames, state.dataIPShortCut->cNumericFieldNames); + + eoh.objectType = CurrentModuleObject; + eoh.objectName = Alpha(1); } else { CondLoopNum = LoopNum - state.dataHVACGlobal->NumPlantLoops; this_loop.TypeOfLoop = LoopType::Condenser; @@ -369,31 +377,30 @@ void GetPlantLoopData(EnergyPlusData &state) _, state.dataIPShortCut->cAlphaFieldNames, state.dataIPShortCut->cNumericFieldNames); + eoh.objectType = CurrentModuleObject; + eoh.objectName = Alpha(1); } + Util::IsNameEmpty(state, Alpha(1), CurrentModuleObject, ErrorsFound); this_loop.Name = Alpha(1); // Load the Plant Loop Name if (Util::SameString(Alpha(2), "STEAM")) { this_loop.FluidType = DataLoopNode::NodeFluidType::Steam; this_loop.FluidName = Alpha(2); + this_loop.steam = FluidProperties::GetSteam(state); } else if (Util::SameString(Alpha(2), "WATER")) { this_loop.FluidType = DataLoopNode::NodeFluidType::Water; this_loop.FluidName = Alpha(2); this_loop.FluidIndex = FluidProperties::GetGlycolNum(state, Alpha(2)); + this_loop.glycol = FluidProperties::GetWater(state); } else if (Util::SameString(Alpha(2), "USERDEFINEDFLUIDTYPE")) { this_loop.FluidType = DataLoopNode::NodeFluidType::Water; - this_loop.FluidName = Alpha(3); + // this_loop.FluidName = Alpha(3); // check for valid fluid name - NumFluids = FluidProperties::CheckFluidPropertyName(state, Alpha(3)); - if (NumFluids == 0) { - ShowSevereError(state, CurrentModuleObject + "=\"" + Alpha(1) + "\", missing fluid data for Plant loop."); + 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 = FluidProperties::GetGlycolNum(state, Alpha(3)); - if (this_loop.FluidIndex == 0) { - ShowSevereError(state, CurrentModuleObject + "=\"" + Alpha(1) + "\", invalid glycol fluid data for Plant loop."); - ErrorsFound = true; - } } } else { ShowWarningError(state, @@ -404,6 +411,7 @@ void GetPlantLoopData(EnergyPlusData &state) this_loop.FluidType = DataLoopNode::NodeFluidType::Water; this_loop.FluidName = "WATER"; this_loop.FluidIndex = FluidProperties::GetGlycolNum(state, "WATER"); + this_loop.glycol = FluidProperties::GetWater(state); } this_loop.OperationScheme = Alpha(4); // Load the Plant Control Scheme Priority List @@ -2614,20 +2622,16 @@ void ReInitPlantLoopsAtFirstHVACIteration(EnergyPlusData &state) state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).OutletNode.MassFlowRateHistory = 0.0; if (state.dataPlnt->PlantLoop(LoopNum).FluidType != DataLoopNode::NodeFluidType::Steam) { - Cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(LoopNum).FluidName, - LoopSetPointTemp, - state.dataPlnt->PlantLoop(LoopNum).FluidIndex, - RoutineNameAlt); + Cp = state.dataPlnt->PlantLoop(LoopNum).glycol->getSpecificHeat(state, + LoopSetPointTemp, + RoutineNameAlt); StartEnthalpy = Cp * LoopSetPointTemp; } // Use Min/Max flow rates to initialize loop if (state.dataPlnt->PlantLoop(LoopNum).FluidType == DataLoopNode::NodeFluidType::Water) { - rho = FluidProperties::GetDensityGlycol(state, - state.dataPlnt->PlantLoop(LoopNum).FluidName, - LoopSetPointTemp, - state.dataPlnt->PlantLoop(LoopNum).FluidIndex, - RoutineNameAlt); + rho = state.dataPlnt->PlantLoop(LoopNum).glycol->getDensity(state, + LoopSetPointTemp, + RoutineNameAlt); LoopMaxMassFlowRate = state.dataPlnt->PlantLoop(LoopNum).MaxVolFlowRate * rho; LoopMinMassFlowRate = state.dataPlnt->PlantLoop(LoopNum).MinVolFlowRate * rho; @@ -3332,14 +3336,11 @@ void SizePlantLoop(EnergyPlusData &state, // should now have plant volume, calculate plant volume's mass for fluid type if (state.dataPlnt->PlantLoop(LoopNum).FluidType == DataLoopNode::NodeFluidType::Water) { - FluidDensity = FluidProperties::GetDensityGlycol( - state, state.dataPlnt->PlantLoop(LoopNum).FluidName, Constant::InitConvTemp, state.dataPlnt->PlantLoop(LoopNum).FluidIndex, RoutineName); + FluidDensity = state.dataPlnt->PlantLoop(LoopNum).glycol->getDensity(state, Constant::InitConvTemp, RoutineName); if (PlantSizNum > 0 && allocated(state.dataSize->PlantSizData)) { // method only works if sizing delta T is available - Real64 cp = FluidProperties::GetSpecificHeatGlycol(state, - state.dataPlnt->PlantLoop(LoopNum).FluidName, - Constant::InitConvTemp, - state.dataPlnt->PlantLoop(LoopNum).FluidIndex, - RoutineName); + Real64 cp = state.dataPlnt->PlantLoop(LoopNum).glycol->getSpecificHeat(state, + Constant::InitConvTemp, + RoutineName); Real64 DesignPlantCapacity = cp * FluidDensity * state.dataSize->PlantSizData(PlantSizNum).DesVolFlowRate * state.dataSize->PlantSizData(PlantSizNum).DeltaT; state.dataSize->PlantSizData(PlantSizNum).DesCapacity = DesignPlantCapacity; // store it for later use in scaling @@ -3477,8 +3478,7 @@ void ResizePlantLoopLevelSizes(EnergyPlusData &state, int const LoopNum // Suppl // should now have plant volume, calculate plant volume's mass for fluid type if (state.dataPlnt->PlantLoop(LoopNum).FluidType == DataLoopNode::NodeFluidType::Water) { - FluidDensity = FluidProperties::GetDensityGlycol( - state, state.dataPlnt->PlantLoop(LoopNum).FluidName, Constant::InitConvTemp, state.dataPlnt->PlantLoop(LoopNum).FluidIndex, RoutineName); + FluidDensity = state.dataPlnt->PlantLoop(LoopNum).glycol->getDensity(state, Constant::InitConvTemp, RoutineName); } else if (state.dataPlnt->PlantLoop(LoopNum).FluidType == DataLoopNode::NodeFluidType::Steam) { FluidDensity = FluidProperties::GetSteam(state)->getSatDensity(state, 100.0, 1.0, RoutineName); } else { diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc index 752ccc73f3b..e88ebb264e8 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc @@ -7768,9 +7768,9 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimFCU_ATMInletSideTest) // chilled water plant loop auto &CWLoop(state->dataPlnt->PlantLoop(2)); CWLoop.Name = "ChilledWaterLoop"; - CWLoop.FluidName = "Water"; CWLoop.FluidIndex = 1; CWLoop.FluidName = "WATER"; + CWLoop.glycol = FluidProperties::GetWater(*state); CWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = CWCoil.Name; CWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; CWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = CWCoil.WaterInletNodeNum; @@ -7785,9 +7785,9 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimFCU_ATMInletSideTest) // hot water plant loop auto &HWLoop(state->dataPlnt->PlantLoop(1)); HWLoop.Name = "HotWaterLoop"; - HWLoop.FluidName = "Water"; HWLoop.FluidIndex = 1; HWLoop.FluidName = "WATER"; + HWLoop.glycol = FluidProperties::GetWater(*state); HWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = HWCoil.Name; HWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; HWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = HWCoil.WaterInletNodeNum; @@ -8200,9 +8200,9 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_FCU_NightCycleTest) // chilled water plant loop auto &CWLoop(state->dataPlnt->PlantLoop(2)); CWLoop.Name = "ChilledWaterLoop"; - CWLoop.FluidName = "Water"; CWLoop.FluidIndex = 1; CWLoop.FluidName = "WATER"; + CWLoop.glycol = FluidProperties::GetWater(*state); CWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = CWCoil.Name; CWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; CWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = CWCoil.WaterInletNodeNum; @@ -8217,9 +8217,9 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_FCU_NightCycleTest) // hot water plant loop auto &HWLoop(state->dataPlnt->PlantLoop(1)); HWLoop.Name = "HotWaterLoop"; - HWLoop.FluidName = "Water"; HWLoop.FluidIndex = 1; HWLoop.FluidName = "WATER"; + HWLoop.glycol = FluidProperties::GetWater(*state); HWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = HWCoil.Name; HWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; HWLoop.LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = HWCoil.WaterInletNodeNum; diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc index 993b0e623c1..0f850dc96c3 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterDesAirOutletTempSizing.unit.cc @@ -119,6 +119,7 @@ TEST_F(AutoSizingFixture, CoolingWaterDesAirOutletTempSizingGauntlet) state->dataSize->FinalZoneSizing.allocate(1); state->dataSize->ZoneEqSizing.allocate(1); state->dataPlnt->PlantLoop.allocate(1); + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataSize->PlantSizData.allocate(1); state->dataSize->PlantSizData(1).ExitTemp = 7.0; state->dataSize->DataPltSizCoolNum = 1; diff --git a/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc index 08fe992af31..83538aa1a6a 100644 --- a/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/CoolingWaterflowSizing.unit.cc @@ -97,6 +97,7 @@ TEST_F(AutoSizingFixture, CoolingWaterflowSizingGauntlet) // Test #2 - Zone Equipment, no autosizing, has input data state->dataSize->DataWaterLoopNum = 1; state->dataPlnt->PlantLoop.allocate(1); + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataSize->DataWaterCoilSizCoolDeltaT = 10.0; sizer.initializeWithinEP(*this->state, HVAC::cAllCoilTypes(HVAC::Coil_CoolingWater), "MyWaterCoil", printFlag, routineName); sizedValue = sizer.size(*this->state, inputValue, errorsFound); diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc index ca2acf8aebc..ba3e5fe7b2c 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.unit.cc @@ -134,6 +134,7 @@ TEST_F(AutoSizingFixture, HeatingWaterDesCoilLoadUsedForUASizingGauntlet) state->dataSize->ZoneEqSizing(1).ATMixerHeatPriDryBulb = 28.0; state->dataSize->ZoneEqSizing(1).ATMixerHeatPriHumRat = 0.0045; state->dataPlnt->PlantLoop.allocate(1); + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataSize->DataWaterLoopNum = 1; state->dataSize->DataWaterCoilSizHeatDeltaT = 5.0; state->dataSize->DataWaterFlowUsedForSizing = 0.0002; diff --git a/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc index a7369eee5c8..653575db3f5 100644 --- a/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/HeatingWaterflowSizing.unit.cc @@ -266,6 +266,7 @@ TEST_F(AutoSizingFixture, HeatingWaterflowSizingGauntlet) state->dataSize->DataWaterCoilSizHeatDeltaT = 10.0; state->dataPlnt->PlantLoop.allocate(1); state->dataPlnt->PlantLoop(1).FluidName = "Water"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // start with an auto-sized value as the user input inputValue = DataSizing::AutoSize; // do sizing diff --git a/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc b/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc index e7901625036..e32c06f6115 100644 --- a/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc +++ b/tst/EnergyPlus/unit/Autosizing/WaterHeatingCapacitySizing.unit.cc @@ -133,6 +133,7 @@ TEST_F(AutoSizingFixture, WaterHeatingCapacitySizingGauntlet) state->dataSize->ZoneEqSizing(1).ATMixerHeatPriDryBulb = 28.0; state->dataSize->ZoneEqSizing(1).ATMixerHeatPriHumRat = 0.0045; state->dataPlnt->PlantLoop.allocate(1); + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataSize->DataWaterLoopNum = 1; state->dataSize->DataWaterCoilSizHeatDeltaT = 5.0; diff --git a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc index 1416366a8b5..00fcfe2d80d 100644 --- a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc @@ -380,6 +380,7 @@ TEST_F(EnergyPlusFixture, BaseboardConvWater_SizingTest) auto &loop(state->dataPlnt->PlantLoop(l)); loop.PlantSizNum = 1; loop.FluidName = "WATER"; + loop.glycol = FluidProperties::GetWater(*state); auto &loopside(state->dataPlnt->PlantLoop(l).LoopSide(DataPlant::LoopSideLocation::Demand)); loopside.TotalBranches = 1; loopside.Branch.allocate(1); diff --git a/tst/EnergyPlus/unit/BoilerHotWater.unit.cc b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc index 0073f22d5b1..c5782477a25 100644 --- a/tst/EnergyPlus/unit/BoilerHotWater.unit.cc +++ b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc @@ -88,6 +88,8 @@ TEST_F(EnergyPlusFixture, Boiler_HotWaterSizingTest) state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); + state->dataSize->PlantSizData(1).DesVolFlowRate = 1.0; state->dataSize->PlantSizData(1).DeltaT = 10.0; state->dataPlnt->PlantFirstSizesOkayToFinalize = true; @@ -134,6 +136,7 @@ TEST_F(EnergyPlusFixture, Boiler_HotWaterAutoSizeTempTest) state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataSize->PlantSizData(1).DesVolFlowRate = 1.0; state->dataSize->PlantSizData(1).DeltaT = 10.0; state->dataPlnt->PlantFirstSizesOkayToFinalize = true; @@ -254,10 +257,10 @@ TEST_F(EnergyPlusFixture, Boiler_HotWater_BoilerEfficiency) auto &thisBoiler = state->dataBoilers->Boiler(1); state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = thisBoiler.Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::Boiler_Simple; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = thisBoiler.BoilerInletNodeNum; diff --git a/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc index 7bd0003246a..0f9bfa368bf 100644 --- a/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc @@ -1946,6 +1946,7 @@ TEST_F(EnergyPlusFixture, ChillerAbsorption_Autosize) thisLoop.Name = "ChilledWaterLoop"; thisLoop.FluidIndex = 1; thisLoop.FluidName = "WATER"; + thisLoop.glycol = FluidProperties::GetWater(*state); thisLoop.PlantSizNum = chwLoopNum; auto &loopside = thisLoop.LoopSide(DataPlant::LoopSideLocation::Supply); loopside.TotalBranches = 1; @@ -1972,6 +1973,7 @@ TEST_F(EnergyPlusFixture, ChillerAbsorption_Autosize) thisLoop.Name = "CondenserWaterLoop"; thisLoop.FluidIndex = 1; thisLoop.FluidName = "WATER"; + thisLoop.glycol = FluidProperties::GetWater(*state); thisLoop.PlantSizNum = cndLoopNum; auto &loopside = thisLoop.LoopSide(DataPlant::LoopSideLocation::Demand); loopside.TotalBranches = 1; @@ -1998,6 +2000,7 @@ TEST_F(EnergyPlusFixture, ChillerAbsorption_Autosize) thisLoop.Name = "Generator HW Loop"; thisLoop.FluidIndex = 1; thisLoop.FluidName = "WATER"; + thisLoop.glycol = FluidProperties::GetWater(*state); thisLoop.PlantSizNum = genLoopNum; auto &loopside = thisLoop.LoopSide(DataPlant::LoopSideLocation::Demand); loopside.TotalBranches = 1; diff --git a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc index f87f43084e5..263567139c9 100644 --- a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc +++ b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc @@ -118,12 +118,14 @@ TEST_F(EnergyPlusFixture, ElectricEIRChiller_HeatRecoveryAutosizeTest) state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataSize->PlantSizData(1).DesVolFlowRate = 1.0; state->dataSize->PlantSizData(1).DeltaT = 5.0; // condenser water loop state->dataPlnt->PlantLoop(2).PlantSizNum = 2; state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataSize->PlantSizData(2).DesVolFlowRate = 1.0; state->dataSize->PlantSizData(2).DeltaT = 5.0; @@ -220,6 +222,7 @@ TEST_F(EnergyPlusFixture, ChillerElectricEIR_AirCooledChiller) state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = thisEIR.Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::Chiller_ElectricEIR; @@ -357,6 +360,7 @@ TEST_F(EnergyPlusFixture, ChillerElectricEIR_EvaporativelyCooled_Calculate) state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = thisEIRChiller.Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::Chiller_ElectricEIR; @@ -497,6 +501,7 @@ TEST_F(EnergyPlusFixture, ChillerElectricEIR_WaterCooledChillerVariableSpeedCond state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).TempSetPointNodeNum = 10; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = thisChiller.Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = @@ -514,6 +519,7 @@ TEST_F(EnergyPlusFixture, ChillerElectricEIR_WaterCooledChillerVariableSpeedCond state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).PlantSizNum = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = thisChiller.Name; state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::Chiller_ElectricEIR; diff --git a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc index 1aaeb633ec5..28d643c6929 100644 --- a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc @@ -648,6 +648,7 @@ TEST_F(EnergyPlusFixture, ExhAbsorption_calcHeater_Fix_Test) auto &hwPlantLoop = state->dataPlnt->PlantLoop(1); hwPlantLoop.FluidName = "WATER"; hwPlantLoop.FluidIndex = 1; + hwPlantLoop.glycol = FluidProperties::GetWater(*state); hwPlantLoop.LoopDemandCalcScheme = DataPlant::LoopDemandCalcScheme::SingleSetPoint; hwPlantLoop.LoopSide(DataPlant::LoopSideLocation::Demand).FlowLock = DataPlant::FlowLock::Locked; @@ -1446,6 +1447,7 @@ TEST_F(EnergyPlusFixture, ExhAbsorption_calcChiller_Err_Msg_Test) state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopDemandCalcScheme = DataPlant::LoopDemandCalcScheme::SingleSetPoint; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).FlowLock = DataPlant::FlowLock::Locked; state->dataLoopNodes->Node(3).Temp = 60.0; diff --git a/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc index f2cf123a9e9..78a75f5805f 100644 --- a/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc @@ -334,6 +334,7 @@ TEST_F(EnergyPlusFixture, GasAbsorption_calculateHeater_Fix_Test) thisChillerHeater.HWplantLoc.loopSideNum = DataPlant::LoopSideLocation::Demand; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopDemandCalcScheme = DataPlant::LoopDemandCalcScheme::SingleSetPoint; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).FlowLock = DataPlant::FlowLock::Locked; state->dataLoopNodes->Node(3).Temp = 60.0; diff --git a/tst/EnergyPlus/unit/ChillerReformulatedEIR.unit.cc b/tst/EnergyPlus/unit/ChillerReformulatedEIR.unit.cc index f3c9696983f..4644ad1447c 100644 --- a/tst/EnergyPlus/unit/ChillerReformulatedEIR.unit.cc +++ b/tst/EnergyPlus/unit/ChillerReformulatedEIR.unit.cc @@ -153,6 +153,7 @@ TEST_F(EnergyPlusFixture, ChillerElectricReformulatedEIR_WaterCooledChillerVaria state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).PlantSizNum = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).TempSetPointNodeNum = 10; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = thisChiller.Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = @@ -171,6 +172,7 @@ TEST_F(EnergyPlusFixture, ChillerElectricReformulatedEIR_WaterCooledChillerVaria state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).PlantSizNum = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = thisChiller.Name; state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::Chiller_ElectricReformEIR; @@ -209,11 +211,9 @@ TEST_F(EnergyPlusFixture, ChillerElectricReformulatedEIR_WaterCooledChillerVaria EXPECT_NEAR(thisChiller.CondMassFlowRate, thisChiller.CondMassFlowRateMax / 2, 0.00001); thisChiller.CondenserFlowControl = DataPlant::CondenserFlowControl::ModulatedDeltaTemperature; - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(*state, - state->dataPlnt->PlantLoop(thisChiller.CWPlantLoc.loopNum).FluidName, - thisChiller.CondInletTemp, - state->dataPlnt->PlantLoop(thisChiller.CWPlantLoc.loopNum).FluidIndex, - "ChillerElectricEIR_WaterCooledChillerVariableSpeedCondenser"); + Real64 Cp = state->dataPlnt->PlantLoop(thisChiller.CWPlantLoc.loopNum).glycol->getSpecificHeat(*state, + thisChiller.CondInletTemp, + "ChillerElectricEIR_WaterCooledChillerVariableSpeedCondenser"); thisChiller.control(*state, MyLoad, RunFlag, false); Real64 ActualCondFlow = 3.0 * std::abs(MyLoad) / (Cp * 10.0); EXPECT_NEAR(thisChiller.CondMassFlowRate, ActualCondFlow, 0.00001); diff --git a/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc b/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc index 1238b47808c..04242906c8e 100644 --- a/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc +++ b/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc @@ -127,6 +127,7 @@ TEST_F(EnergyPlusFixture, EvapFluidCoolerSpecs_getDesignCapacitiesTest) state->dataSize->PlantSizData.allocate(1); state->dataSize->PlantSizData(1).DeltaT = 5.0; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataSize->PlantSizData(1).ExitTemp = 20.0; // Now set the specific data for the actual test diff --git a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc index 0bbc692731a..5d692fc6bd5 100644 --- a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc +++ b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc @@ -612,6 +612,7 @@ TEST_F(EnergyPlusFixture, OutdoorAirUnit_WaterCoolingCoilAutoSizeTest) state->dataPlnt->PlantLoop(1).Name = "ChilledWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -925,6 +926,7 @@ TEST_F(EnergyPlusFixture, OutdoorAirUnit_SteamHeatingCoilAutoSizeTest) state->dataPlnt->PlantLoop(1).Name = "SteamLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 0; state->dataPlnt->PlantLoop(1).FluidName = "STEAM"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataSteamCoils->SteamCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilSteamAirHeating; diff --git a/tst/EnergyPlus/unit/PlantManager.unit.cc b/tst/EnergyPlus/unit/PlantManager.unit.cc index 354af3d518d..1c48fe9df5d 100644 --- a/tst/EnergyPlus/unit/PlantManager.unit.cc +++ b/tst/EnergyPlus/unit/PlantManager.unit.cc @@ -82,6 +82,7 @@ namespace PlantManager { state->dataPlnt->PlantLoop(1).CirculationTime = 2; state->dataPlnt->PlantLoop(1).FluidType = DataLoopNode::NodeFluidType::Water; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); SizePlantLoop(*state, 1, true); int TestVolume = 600; EXPECT_EQ(TestVolume, state->dataPlnt->PlantLoop(1).Volume); diff --git a/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc b/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc index fb749b85c57..29aaf26ddef 100644 --- a/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc +++ b/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc @@ -258,9 +258,9 @@ TEST_F(EnergyPlusFixture, TestSizingRoutineForHotWaterCoils1) state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.branchNum = 1; state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.compNum = 1; state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -511,9 +511,9 @@ TEST_F(EnergyPlusFixture, TestSizingRoutineForHotWaterCoils2) state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.branchNum = 1; state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.compNum = 1; state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -763,9 +763,9 @@ TEST_F(EnergyPlusFixture, TestSizingRoutineForHotWaterCoils3) state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.branchNum = 1; state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.compNum = 1; state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -1015,9 +1015,9 @@ TEST_F(EnergyPlusFixture, TestSizingRoutineForHotWaterCoils4) state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.branchNum = 1; state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.compNum = 1; state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -1225,9 +1225,9 @@ TEST_F(EnergyPlusFixture, TestSizingRoutineForHotWaterCoils5) state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.branchNum = 1; state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.compNum = 1; state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -1443,9 +1443,9 @@ TEST_F(EnergyPlusFixture, TestSizingRoutineForHotWaterCoils6) state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.branchNum = 1; state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.compNum = 1; state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; diff --git a/tst/EnergyPlus/unit/UnitarySystem.unit.cc b/tst/EnergyPlus/unit/UnitarySystem.unit.cc index 9483baea27f..3ec55d79873 100644 --- a/tst/EnergyPlus/unit/UnitarySystem.unit.cc +++ b/tst/EnergyPlus/unit/UnitarySystem.unit.cc @@ -209,13 +209,19 @@ class ZoneUnitarySysTest : public EnergyPlusFixture loopsidebranch.TotalComponents = 2; loopsidebranch.Comp.allocate(2); } + + // Need to initialize FluidProperties, do that here + state->dataFluidProps->init_state(*state); + state->dataPlnt->PlantLoop(1).Name = "Hot Water Loop"; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).Name = "Chilled Water Loop"; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; state->dataPlnt->PlantLoop(2).FluidIndex = 1; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataSize->PlantSizData(1).PlantLoopName = "Hot Water Loop"; state->dataSize->PlantSizData(1).ExitTemp = 80.0; @@ -323,16 +329,14 @@ TEST_F(AirloopUnitarySysTest, MultipleWaterCoolingCoilSizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "ColdWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(2).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; state->dataPlnt->PlantLoop(2).FluidIndex = 1; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).MixTempAtCoolPeak = 20.0; @@ -773,7 +777,8 @@ TEST_F(ZoneUnitarySysTest, Test_UnitarySystemModel_factory) )IDF"; ASSERT_TRUE(process_idf(idf_objects)); - + state->init_state(*state); + // call the UnitarySystem factory std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; @@ -5597,9 +5602,9 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_CalcUnitaryHeatingSystem) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -5752,9 +5757,9 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_CalcUnitaryCoolingSystem) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -9706,18 +9711,18 @@ Curve:QuadLinear, loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "ChilledWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = "SYS 1 HEAT PUMP COOLING MODE"; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWAHPCoolingEquationFit; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = 6; state->dataPlnt->PlantLoop(2).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(2).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = "SYS 1 HEAT PUMP HEATING MODE"; state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWAHPHeatingEquationFit; @@ -10048,9 +10053,9 @@ Schedule:Compact, loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "ChilledWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = "WATER COOLING COIL"; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -10058,9 +10063,9 @@ Schedule:Compact, state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumOut = 10; state->dataPlnt->PlantLoop(2).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(2).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = "WATER HEATING COIL"; state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -13984,6 +13989,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FractionOfAutoSizedCoolingValueTes state->dataSize->ZoneSizingRunDone = true; // DataSizing::NumPltSizInput = 2; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -13992,6 +13998,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FractionOfAutoSizedCoolingValueTes state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumOut = state->dataWaterCoils->WaterCoil(1).WaterOutletNodeNum; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(2).Name; state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -14132,6 +14139,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FlowPerCoolingCapacityTest) OutputReportPredefined::SetPredefinedTables(*state); state->dataSize->ZoneSizingRunDone = true; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating; @@ -14140,6 +14148,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FlowPerCoolingCapacityTest) state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumOut = state->dataWaterCoils->WaterCoil(1).WaterOutletNodeNum; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(2).Name; state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -19555,9 +19564,9 @@ TEST_F(EnergyPlusFixture, CoilSystemCoolingWater_ControlStatusTest) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -19807,9 +19816,9 @@ TEST_F(EnergyPlusFixture, CoilSystemCoolingWater_CalcTest) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -20078,9 +20087,9 @@ TEST_F(EnergyPlusFixture, CoilSystemCoolingWater_HeatRecoveryLoop) loopsidebranch.Comp.allocate(loopsidebranch.TotalComponents); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -20211,15 +20220,13 @@ TEST_F(AirloopUnitarySysTest, WSHPVariableSpeedCoilSizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "ColdWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(2).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; state->dataPlnt->PlantLoop(2).FluidIndex = 1; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).OutTempAtCoolPeak = 0.0; diff --git a/tst/EnergyPlus/unit/WaterCoils.unit.cc b/tst/EnergyPlus/unit/WaterCoils.unit.cc index e11cbf8fe26..ab894ac553e 100644 --- a/tst/EnergyPlus/unit/WaterCoils.unit.cc +++ b/tst/EnergyPlus/unit/WaterCoils.unit.cc @@ -188,10 +188,9 @@ TEST_F(WaterCoilsTest, WaterCoolingCoilSizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).MixTempAtCoolPeak = 20.0; @@ -424,10 +423,9 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterUASizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).DesMainVolFlow = 1.00; @@ -491,10 +489,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterUASizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, Constant::HWInitConvTemp, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, Constant::HWInitConvTemp, "Unit Test"); DesWaterFlowRate = state->dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (10.0 * Cp * rho); // check heating coil design water flow rate @@ -580,10 +576,9 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterLowAirFlowUASizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).DesMainVolFlow = 1.00; @@ -647,10 +642,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterLowAirFlowUASizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, Constant::HWInitConvTemp, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, Constant::HWInitConvTemp, "Unit Test"); DesWaterFlowRate = state->dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (10.0 * Cp * rho); // check heating coil design water flow rate @@ -739,10 +732,9 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterUASizingLowHwaterInletTemp) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).DesMainVolFlow = 1.00; @@ -807,10 +799,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterUASizingLowHwaterInletTemp) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, Constant::HWInitConvTemp, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, Constant::HWInitConvTemp, "Unit Test"); DesWaterFlowRate = state->dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (10.0 * Cp * rho); // check heating coil design water flow rate @@ -855,10 +845,9 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterSimpleSizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).MixTempAtCoolPeak = 20.0; @@ -921,10 +910,8 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterSimpleSizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::CWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::CWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, Constant::CWInitConvTemp, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, Constant::CWInitConvTemp, "Unit Test"); DesWaterFlowRate = state->dataWaterCoils->WaterCoil(CoilNum).DesWaterCoolingCoilRate / (state->dataWaterCoils->WaterCoil(CoilNum).DesignWaterDeltaTemp * Cp * rho); @@ -958,10 +945,9 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailedSizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).MixTempAtCoolPeak = 20.0; @@ -1038,10 +1024,8 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailedSizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::CWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::CWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, Constant::CWInitConvTemp, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, Constant::CWInitConvTemp, "Unit Test"); DesWaterFlowRate = state->dataWaterCoils->WaterCoil(CoilNum).DesWaterCoolingCoilRate / (6.67 * Cp * rho); // check cooling coil design water flow rate EXPECT_DOUBLE_EQ(DesWaterFlowRate, state->dataWaterCoils->WaterCoil(CoilNum).MaxWaterVolFlowRate); @@ -1071,10 +1055,9 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailed_WarningMath) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).MixTempAtCoolPeak = 20.0; @@ -1165,10 +1148,8 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailed_WarningMath) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::CWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::CWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, Constant::CWInitConvTemp, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, Constant::CWInitConvTemp, "Unit Test"); DesWaterFlowRate = state->dataWaterCoils->WaterCoil(CoilNum).DesWaterCoolingCoilRate / (6.67 * Cp * rho); // check cooling coil design water flow rate EXPECT_DOUBLE_EQ(DesWaterFlowRate, state->dataWaterCoils->WaterCoil(CoilNum).MaxWaterVolFlowRate); @@ -1256,10 +1237,9 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterSimpleSizing) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "WaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).DesMainVolFlow = 1.00; @@ -1320,10 +1300,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterSimpleSizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, Constant::HWInitConvTemp, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, Constant::HWInitConvTemp, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, Constant::HWInitConvTemp, "Unit Test"); DesWaterFlowRate = state->dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (11.0 * Cp * rho); // check heating coil design water flow rate @@ -1354,10 +1332,9 @@ TEST_F(WaterCoilsTest, HotWaterHeatingCoilAutoSizeTempTest) loopsidebranch.Comp.allocate(1); } state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "FluidWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); // set up sizing data state->dataSize->FinalSysSizing(1).DesMainVolFlow = 1.00; @@ -1422,10 +1399,8 @@ TEST_F(WaterCoilsTest, HotWaterHeatingCoilAutoSizeTempTest) Real64 DesWaterFlowRate(0.0); // now size heating coil hot water flow rate at 60.0C - Cp = FluidProperties::GetSpecificHeatGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, 60.0, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); - rho = FluidProperties::GetDensityGlycol( - *state, state->dataPlnt->PlantLoop(1).FluidName, 60.0, state->dataPlnt->PlantLoop(1).FluidIndex, "Unit Test"); + Cp = state->dataPlnt->PlantLoop(1).glycol->getSpecificHeat(*state, 60.0, "Unit Test"); + rho = state->dataPlnt->PlantLoop(1).glycol->getDensity(*state, 60.0, "Unit Test"); DesWaterFlowRate = DesCoilHeatingLoad / (state->dataSize->PlantSizData(1).DeltaT * Cp * rho); // check heating coil design water flow rate calculated here and sizing results are identical @@ -1710,9 +1685,9 @@ TEST_F(WaterCoilsTest, FanCoilCoolingWaterFlowTest) state->dataWaterCoils->WaterCoil(1).WaterPlantLoc.compNum = 1; state->dataPlnt->PlantLoop(2).Name = "ChilledWaterLoop"; - state->dataPlnt->PlantLoop(2).FluidName = "ChilledWater"; state->dataPlnt->PlantLoop(2).FluidIndex = 1; state->dataPlnt->PlantLoop(2).FluidName = "WATER"; + state->dataPlnt->PlantLoop(2).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(2).Name; state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterCooling; @@ -1723,9 +1698,9 @@ TEST_F(WaterCoilsTest, FanCoilCoolingWaterFlowTest) state->dataPlnt->PlantLoop(2).LoopSide(DataPlant::LoopSideLocation::Demand).FlowLock = DataPlant::FlowLock::Unlocked; state->dataPlnt->PlantLoop(1).Name = "HotWaterLoop"; - state->dataPlnt->PlantLoop(1).FluidName = "HotWater"; state->dataPlnt->PlantLoop(1).FluidIndex = 1; state->dataPlnt->PlantLoop(1).FluidName = "WATER"; + state->dataPlnt->PlantLoop(1).glycol = FluidProperties::GetWater(*state); state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = state->dataWaterCoils->WaterCoil(1).Name; state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type = DataPlant::PlantEquipmentType::CoilWaterSimpleHeating;