diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index 96b54a0cdf9..32cc4b9d1b0 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -814,7 +814,7 @@ namespace AirLoopHVACDOAS { Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", CompName, ErrorsFound); rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HWLoopNum).FluidIndex, RoutineName); PlantUtilities::InitComponentNodes(0.0, @@ -831,7 +831,7 @@ namespace AirLoopHVACDOAS { Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water", CompName, ErrorsFound); rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); PlantUtilities::InitComponentNodes(0.0, @@ -848,7 +848,7 @@ namespace AirLoopHVACDOAS { Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water:DetailedGeometry", CompName, ErrorsFound); rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); PlantUtilities::InitComponentNodes(0.0, diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp index 1385fac3e3f..cc313cb1625 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp @@ -64,7 +64,7 @@ #ifndef TOKELVIN #include "../../../DataGlobals.hh" -#define TOKELVIN(T) (T + DataGlobals::KelvinConv) +#define TOKELVIN(T) (T + DataGlobalConstants::KelvinConv()) #else // Need a fallback #endif diff --git a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp index d8843a0bd1b..1555accff00 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp @@ -100,7 +100,6 @@ namespace AirflowNetwork { using DataEnvironment::OutDryBulbTemp; using DataEnvironment::OutHumRat; using DataEnvironment::StdBaroPress; - using DataGlobals::KelvinConv; using DataSurfaces::Surface; //std::vector properties; @@ -1110,11 +1109,11 @@ namespace AirflowNetwork { if (LFLAG) { // Initialization by linear relation. if (PDROP >= 0.0) { - RhoCor = (propN.temperature + KelvinConv) / (Tave + KelvinConv); + RhoCor = (propN.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv()); Ctl = std::pow(RhozNorm / propN.density / RhoCor, expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0); DF[0] = coef * propN.density / propN.viscosity * Ctl; } else { - RhoCor = (propM.temperature + KelvinConv) / (Tave + KelvinConv); + RhoCor = (propM.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv()); Ctl = std::pow(RhozNorm / propM.density / RhoCor, expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0); DF[0] = coef * propM.density / propM.viscosity * Ctl; } @@ -1124,7 +1123,7 @@ namespace AirflowNetwork { if (PDROP >= 0.0) { // Flow in positive direction. // Laminar flow. - RhoCor = (propN.temperature + KelvinConv) / (Tave + KelvinConv); + RhoCor = (propN.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv()); Ctl = std::pow(RhozNorm / propN.density / RhoCor, expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0); CDM = coef * propN.density / propN.viscosity * Ctl; FL = CDM * PDROP; @@ -1137,7 +1136,7 @@ namespace AirflowNetwork { } else { // Flow in negative direction. // Laminar flow. - RhoCor = (propM.temperature + KelvinConv) / (Tave + KelvinConv); + RhoCor = (propM.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv()); Ctl = std::pow(RhozNorm / propM.density / RhoCor, 2.0 * expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0); CDM = coef * propM.density / propM.viscosity * Ctl; FL = CDM * PDROP; diff --git a/src/EnergyPlus/AirflowNetworkBalanceManager.cc b/src/EnergyPlus/AirflowNetworkBalanceManager.cc index db54adc6b34..b83541bcaa7 100644 --- a/src/EnergyPlus/AirflowNetworkBalanceManager.cc +++ b/src/EnergyPlus/AirflowNetworkBalanceManager.cc @@ -6598,8 +6598,6 @@ namespace AirflowNetworkBalanceManager { // ASTM C1340 using DataEnvironment::WindSpeed; - using DataGlobals::KelvinConv; - Real64 k = airThermConductivity(Ts); Real64 hOut_final = 0; @@ -6609,7 +6607,7 @@ namespace AirflowNetworkBalanceManager { // Free convection Real64 Pr = airPrandtl((Ts + Tamb) / 2, Wamb, Pamb); Real64 KinVisc = airKinematicVisc((Ts + Tamb) / 2, Wamb, Pamb); - Real64 Beta = 2.0 / ((Tamb + KelvinConv) + (Ts + KelvinConv)); + Real64 Beta = 2.0 / ((Tamb + DataGlobalConstants::KelvinConv()) + (Ts + DataGlobalConstants::KelvinConv())); Real64 Gr = DataGlobalConstants::GravityConstant() * Beta * std::abs(Ts - Tamb) * pow_3(Dh) / pow_2(KinVisc); Real64 Ra = Gr * Pr; Real64 Nu_free(0); @@ -6681,8 +6679,6 @@ namespace AirflowNetworkBalanceManager { // USE STATEMENTS: using DataEnvironment::OutBaroPress; using DataEnvironment::OutHumRat; - using DataGlobals::KelvinConv; - using DataGlobals::StefanBoltzmann; using DataHeatBalFanSys::QRadSurfAFNDuct; using DataHeatBalSurface::TH; using DataHVACGlobals::TimeStepSys; @@ -6771,10 +6767,10 @@ namespace AirflowNetworkBalanceManager { Real64 UThermal(10); // Initialize. This will get updated. Real64 UThermal_iter = 0; Real64 Tsurr = Tamb; - Real64 Tsurr_K = Tsurr + KelvinConv; + Real64 Tsurr_K = Tsurr + DataGlobalConstants::KelvinConv(); Real64 Tin = AirflowNetworkNodeSimu(LF).TZ; Real64 TDuctSurf = (Tamb + Tin) / 2.0; - Real64 TDuctSurf_K = TDuctSurf + KelvinConv; + Real64 TDuctSurf_K = TDuctSurf + DataGlobalConstants::KelvinConv(); Real64 DuctSurfArea = DisSysCompDuctData(TypeNum).L * DisSysCompDuctData(TypeNum).hydraulicDiameter * DataGlobalConstants::Pi(); // If user defined view factors not present, calculate air-to-air heat transfer @@ -6866,7 +6862,7 @@ namespace AirflowNetworkBalanceManager { int ZoneSurfNum = VFObj.LinkageSurfaceData(j).SurfaceNum; Real64 TSurfj = TH(1, 1, ZoneSurfNum); - Real64 TSurfj_K = TSurfj + KelvinConv; + Real64 TSurfj_K = TSurfj + DataGlobalConstants::KelvinConv(); Real64 ZoneSurfEmissivity = state.dataConstruction->Construct(Surface(ZoneSurfNum).Construction).InsideAbsorpThermal; Real64 ZoneSurfArea = Surface(ZoneSurfNum).Area; @@ -6880,7 +6876,7 @@ namespace AirflowNetworkBalanceManager { Real64 ZoneSurfResistance = (1 - ZoneSurfEmissivity) / (ZoneSurfArea * ZoneSurfEmissivity); VFObj.LinkageSurfaceData(j).SurfaceResistanceFactor = - StefanBoltzmann / (DuctSurfResistance + SpaceResistance + ZoneSurfResistance); + DataGlobalConstants::StefanBoltzmann() / (DuctSurfResistance + SpaceResistance + ZoneSurfResistance); Real64 hrj = VFObj.LinkageSurfaceData(j).SurfaceResistanceFactor * (TDuctSurf_K + TSurfj_K) * (pow_2(TDuctSurf_K) + pow_2(TSurfj_K)) / DuctSurfArea; @@ -6890,7 +6886,7 @@ namespace AirflowNetworkBalanceManager { } Tsurr = (hOut * Tamb + hrjTj_sum) / (hOut + hrj_sum); // Surroundings temperature [C] - Tsurr_K = Tsurr + KelvinConv; + Tsurr_K = Tsurr + DataGlobalConstants::KelvinConv(); Real64 RThermTotal = RThermConvIn + RThermConduct + 1 / (hOut + hrj_sum); UThermal = pow(RThermTotal, -1); @@ -6899,13 +6895,13 @@ namespace AirflowNetworkBalanceManager { Tin_ave = Tsurr + (Tin - Tsurr) * (1 / NTU) * (1 - exp(-NTU)); TDuctSurf = Tin_ave - UThermal * (RThermConvIn + RThermConduct) * (Tin_ave - Tsurr); - TDuctSurf_K = TDuctSurf + KelvinConv; + TDuctSurf_K = TDuctSurf + DataGlobalConstants::KelvinConv(); } for (int j = 1; j <= VFObj.LinkageSurfaceData.u(); ++j) { int ZoneSurfNum = VFObj.LinkageSurfaceData(j).SurfaceNum; Real64 TSurfj = TH(1, 1, ZoneSurfNum); - Real64 TSurfj_K = TSurfj + KelvinConv; + Real64 TSurfj_K = TSurfj + DataGlobalConstants::KelvinConv(); VFObj.LinkageSurfaceData(j).SurfaceRadLoad = VFObj.LinkageSurfaceData(j).SurfaceResistanceFactor * (pow_4(TDuctSurf_K) - pow_4(TSurfj_K)); // Radiant load for this surface [W] int SurfNum = VFObj.LinkageSurfaceData(j).SurfaceNum; diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc index dc5a45ed694..fe8ea00d7e6 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc @@ -68,12 +68,12 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or if (this->termUnitIU) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 DesCoilLoad = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizCoolDeltaT * Cp * rho; diff --git a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc index ed14cf4d13e..2e1fcade21e 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc @@ -90,12 +90,12 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, this->dataWaterCoilSizCoolDeltaT > 0.0) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); this->autoSizedValue = DesCoilLoad / (CoilDesWaterDeltaT * Cp * rho); @@ -122,12 +122,12 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)DataPlant::PlantLoop.size() && CoilDesWaterDeltaT > 0.0) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); this->autoSizedValue = this->dataCapacityUsedForSizing / (CoilDesWaterDeltaT * Cp * rho); @@ -168,8 +168,8 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, coilSelectionReportObj->setCoilEntWaterTemp(this->compName, this->compType, this->dataDesInletWaterTemp); coilSelectionReportObj->setCoilLvgWaterTemp(this->compName, this->compType, this->dataDesInletWaterTemp + CoilDesWaterDeltaT); } else { - coilSelectionReportObj->setCoilEntWaterTemp(this->compName, this->compType, DataGlobals::CWInitConvTemp); - coilSelectionReportObj->setCoilLvgWaterTemp(this->compName, this->compType, DataGlobals::CWInitConvTemp + CoilDesWaterDeltaT); + coilSelectionReportObj->setCoilEntWaterTemp(this->compName, this->compType, DataGlobalConstants::CWInitConvTemp()); + coilSelectionReportObj->setCoilLvgWaterTemp(this->compName, this->compType, DataGlobalConstants::CWInitConvTemp() + CoilDesWaterDeltaT); } } return this->autoSizedValue; diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc index a19825514f0..d25e59d55e9 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc @@ -71,12 +71,12 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64 if (this->termUnitSingDuct && (this->curTermUnitSizingNum > 0)) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho; @@ -84,12 +84,12 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64 } else if ((this->termUnitPIU || this->termUnitIU) && (this->curTermUnitSizingNum > 0)) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho * @@ -97,12 +97,12 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64 } else if (this->zoneEqFanCoil || this->zoneEqUnitHeater) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho; diff --git a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc index d12acef334b..6f704b4d2e9 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc @@ -95,12 +95,12 @@ Real64 HeatingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, this->dataWaterCoilSizHeatDeltaT > 0.0) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); this->autoSizedValue = DesCoilLoad / (this->dataWaterCoilSizHeatDeltaT * Cp * rho); @@ -125,12 +125,12 @@ Real64 HeatingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, this->dataWaterCoilSizHeatDeltaT > 0.0) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); this->autoSizedValue = this->dataCapacityUsedForSizing / (this->dataWaterCoilSizHeatDeltaT * Cp * rho); @@ -157,11 +157,11 @@ Real64 HeatingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue, if (this->isCoilReportObject) { coilSelectionReportObj->setCoilWaterFlowPltSizNum( state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized, this->dataPltSizHeatNum, this->dataWaterLoopNum); - coilSelectionReportObj->setCoilEntWaterTemp(this->compName, this->compType, DataGlobals::HWInitConvTemp); + coilSelectionReportObj->setCoilEntWaterTemp(this->compName, this->compType, DataGlobalConstants::HWInitConvTemp()); if (this->plantSizData.size() > 0 && this->dataPltSizHeatNum > 0) { coilSelectionReportObj->setCoilWaterDeltaT(this->compName, this->compType, this->plantSizData(this->dataPltSizHeatNum).DeltaT); coilSelectionReportObj->setCoilLvgWaterTemp( - this->compName, this->compType, DataGlobals::HWInitConvTemp - this->plantSizData(this->dataPltSizHeatNum).DeltaT); + this->compName, this->compType, DataGlobalConstants::HWInitConvTemp() - this->plantSizData(this->dataPltSizHeatNum).DeltaT); } } return this->autoSizedValue; diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc index 7bf80aa8f52..820409f6acf 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc @@ -74,12 +74,12 @@ Real64 WaterHeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalVa DesMassFlow = this->termUnitSizing(this->curTermUnitSizingNum).MaxHWVolFlow; Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); NominalCapacityDes = DesMassFlow * this->dataWaterCoilSizHeatDeltaT * Cp * rho; @@ -87,12 +87,12 @@ Real64 WaterHeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalVa DesMassFlow = this->zoneEqSizing(this->curZoneEqNum).MaxHWVolFlow; Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex, this->callingRoutine); NominalCapacityDes = DesMassFlow * this->dataWaterCoilSizHeatDeltaT * Cp * rho; diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index e74093c4b08..527e87adb18 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -576,7 +576,7 @@ namespace BaseboardRadiator { WaterInletNode = baseboard->Baseboard(BaseboardNum).WaterInletNode; rho = GetDensityGlycol(state, PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidIndex, RoutineName); baseboard->Baseboard(BaseboardNum).WaterMassFlowRateMax = rho * baseboard->Baseboard(BaseboardNum).WaterVolFlowRateMax; @@ -588,7 +588,7 @@ namespace BaseboardRadiator { baseboard->Baseboard(BaseboardNum).LoopSideNum, baseboard->Baseboard(BaseboardNum).BranchNum, baseboard->Baseboard(BaseboardNum).CompNum); - Node(WaterInletNode).Temp = DataGlobals::HWInitConvTemp; + Node(WaterInletNode).Temp = DataGlobalConstants::HWInitConvTemp(); Cp = GetSpecificHeatGlycol(state, PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidName, Node(WaterInletNode).Temp, @@ -752,12 +752,12 @@ namespace BaseboardRadiator { if (DesCoilLoad >= SmallLoad) { Cp = GetSpecificHeatGlycol(state, PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidIndex, RoutineName); rho = GetDensityGlycol(state, PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidIndex, RoutineName); WaterVolFlowRateMaxDes = DesCoilLoad / (PlantSizData(PltSizHeatNum).DeltaT * Cp * rho); @@ -820,7 +820,7 @@ namespace BaseboardRadiator { WaterInletNode = baseboard->Baseboard(BaseboardNum).WaterInletNode; rho = GetDensityGlycol(state, PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(baseboard->Baseboard(BaseboardNum).LoopNum).FluidIndex, RoutineName); Node(WaterInletNode).MassFlowRate = rho * baseboard->Baseboard(BaseboardNum).WaterVolFlowRateMax; diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index a9d25a44c19..644fc37885c 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -460,7 +460,7 @@ namespace Boilers { // if ( ! PlantFirstSizeCompleted ) SizeBoiler( BoilerNum ); Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); this->DesMassFlowRate = this->VolFlowRate * rho; @@ -561,12 +561,12 @@ namespace Boilers { Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * this->SizFac * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate; diff --git a/src/EnergyPlus/CTElectricGenerator.cc b/src/EnergyPlus/CTElectricGenerator.cc index 2abfbcfa50e..047e39ae9d0 100644 --- a/src/EnergyPlus/CTElectricGenerator.cc +++ b/src/EnergyPlus/CTElectricGenerator.cc @@ -700,7 +700,7 @@ namespace CTElectricGenerator { // size mass flow rate Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.cc b/src/EnergyPlus/ChilledCeilingPanelSimple.cc index 485a37340ac..a2dec5188a4 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.cc +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.cc @@ -793,7 +793,7 @@ namespace CoolingPanelSimple { // set design mass flow rates if (ThisCP.WaterInletNode > 0) { rho = GetDensityGlycol( - state, PlantLoop(ThisCP.LoopNum).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(ThisCP.LoopNum).FluidIndex, RoutineName); + state, PlantLoop(ThisCP.LoopNum).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(ThisCP.LoopNum).FluidIndex, RoutineName); ThisCP.WaterMassFlowRateMax = rho * ThisCP.WaterVolFlowRateMax; InitComponentNodes(0.0, ThisCP.WaterMassFlowRateMax, @@ -811,7 +811,7 @@ namespace CoolingPanelSimple { if (BeginEnvrnFlag && MyEnvrnFlag(CoolingPanelNum)) { // Initialize - rho = GetDensityGlycol(state, PlantLoop(ThisCP.LoopNum).FluidName, InitConvTemp, PlantLoop(ThisCP.LoopNum).FluidIndex, RoutineName); + rho = GetDensityGlycol(state, PlantLoop(ThisCP.LoopNum).FluidName, DataGlobalConstants::InitConvTemp(), PlantLoop(ThisCP.LoopNum).FluidIndex, RoutineName); ThisCP.WaterMassFlowRateMax = rho * ThisCP.WaterVolFlowRateMax; diff --git a/src/EnergyPlus/ChillerAbsorption.cc b/src/EnergyPlus/ChillerAbsorption.cc index d8e0ece619e..adc63b43736 100644 --- a/src/EnergyPlus/ChillerAbsorption.cc +++ b/src/EnergyPlus/ChillerAbsorption.cc @@ -719,7 +719,7 @@ namespace ChillerAbsorption { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -736,7 +736,7 @@ namespace ChillerAbsorption { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); @@ -757,7 +757,7 @@ namespace ChillerAbsorption { if (this->GenHeatSourceType == DataLoopNode::NodeType_Water) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->GenLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->GenLoopNum).FluidIndex, RoutineName); @@ -926,13 +926,13 @@ namespace ChillerAbsorption { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; @@ -1099,7 +1099,7 @@ namespace ChillerAbsorption { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); tmpCondVolFlowRate = @@ -1319,12 +1319,12 @@ namespace ChillerAbsorption { if (DataPlant::PlantFirstSizesOkayToFinalize) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->GenLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->GenLoopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->GenLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->GenLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 8cee53b7a2c..76a056ba4d1 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -1051,7 +1051,7 @@ namespace ChillerElectricEIR { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -1103,7 +1103,7 @@ namespace ChillerElectricEIR { if (this->HeatRecActive) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; @@ -1310,13 +1310,13 @@ namespace ChillerElectricEIR { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * tmpEvapVolFlowRate; @@ -1374,7 +1374,7 @@ namespace ChillerElectricEIR { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -2170,7 +2170,7 @@ namespace ChillerElectricEIR { } if (this->CondenserType == DataPlant::CondenserType::EVAPCOOLED) { - Real64 const RhoWater = Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + Real64 const RhoWater = Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); // CondMassFlowRate is already multiplied by PLR, convert to water use rate this->EvapWaterConsumpRate = ((this->CondOutletHumRat - DataLoopNode::Node(this->CondInletNodeNum).HumRat) * this->CondMassFlowRate) / RhoWater; diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.cc b/src/EnergyPlus/ChillerExhaustAbsorption.cc index d81ff048664..d209dfd694b 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.cc +++ b/src/EnergyPlus/ChillerExhaustAbsorption.cc @@ -794,11 +794,11 @@ namespace ChillerExhaustAbsorption { if (this->CDLoopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); } else { - rho = Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + rho = Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } this->DesCondMassFlowRate = rho * this->CondVolFlowRate; @@ -815,11 +815,11 @@ namespace ChillerExhaustAbsorption { if (this->HWLoopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HWLoopNum).FluidIndex, RoutineName); } else { - rho = Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + rho = Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } this->DesHeatMassFlowRate = rho * this->HeatVolFlowRate; // init available hot water flow rate @@ -835,11 +835,11 @@ namespace ChillerExhaustAbsorption { if (this->CWLoopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); } else { - rho = Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + rho = Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } this->DesEvapMassFlowRate = rho * this->EvapVolFlowRate; // init available hot water flow rate @@ -940,12 +940,12 @@ namespace ChillerExhaustAbsorption { if (DataSizing::PlantSizData(PltSizCoolNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = diff --git a/src/EnergyPlus/ChillerGasAbsorption.cc b/src/EnergyPlus/ChillerGasAbsorption.cc index 3e37e10c437..1aef67686c7 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.cc +++ b/src/EnergyPlus/ChillerGasAbsorption.cc @@ -788,11 +788,11 @@ namespace ChillerGasAbsorption { if (this->CDLoopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); } else { - rho = Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + rho = Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } this->DesCondMassFlowRate = rho * this->CondVolFlowRate; @@ -809,11 +809,11 @@ namespace ChillerGasAbsorption { if (this->HWLoopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HWLoopNum).FluidIndex, RoutineName); } else { - rho = Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + rho = Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } this->DesHeatMassFlowRate = rho * this->HeatVolFlowRate; // init available hot water flow rate @@ -829,11 +829,11 @@ namespace ChillerGasAbsorption { if (this->CWLoopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); } else { - rho = Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + rho = Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } this->DesEvapMassFlowRate = rho * this->EvapVolFlowRate; // init available hot water flow rate @@ -933,12 +933,12 @@ namespace ChillerGasAbsorption { if (DataSizing::PlantSizData(PltSizCoolNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.cc b/src/EnergyPlus/ChillerIndirectAbsorption.cc index c7a3e310ba0..9a225c0cfb4 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.cc +++ b/src/EnergyPlus/ChillerIndirectAbsorption.cc @@ -813,7 +813,7 @@ namespace ChillerIndirectAbsorption { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -830,7 +830,7 @@ namespace ChillerIndirectAbsorption { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); @@ -853,7 +853,7 @@ namespace ChillerIndirectAbsorption { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->GenLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->GenLoopNum).FluidIndex, RoutineName); this->GenMassFlowRateMax = rho * this->GeneratorVolFlowRate; @@ -1010,13 +1010,13 @@ namespace ChillerIndirectAbsorption { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; @@ -1193,13 +1193,13 @@ namespace ChillerIndirectAbsorption { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); tmpCondVolFlowRate = @@ -1454,7 +1454,7 @@ namespace ChillerIndirectAbsorption { } else if (this->GenHeatSourceType == DataLoopNode::NodeType_Water) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->GenLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->GenLoopNum).FluidIndex, RoutineName); Real64 CpWater = FluidProperties::GetSpecificHeatGlycol(state, diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index a889c611aab..e6c8a14401c 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -858,7 +858,7 @@ namespace ChillerReformulatedEIR { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -908,7 +908,7 @@ namespace ChillerReformulatedEIR { if (this->HeatRecActive) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; @@ -1098,12 +1098,12 @@ namespace ChillerReformulatedEIR { } Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 RefCapFT = CurveManager::CurveValue(state, this->ChillerCapFTIndex, SizingEvapOutletTemp, SizingCondOutletTemp); @@ -1163,7 +1163,7 @@ namespace ChillerReformulatedEIR { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow && tmpNomCap > 0.0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, diff --git a/src/EnergyPlus/CondenserLoopTowers.cc b/src/EnergyPlus/CondenserLoopTowers.cc index 1470b5b27d8..00443e0b030 100644 --- a/src/EnergyPlus/CondenserLoopTowers.cc +++ b/src/EnergyPlus/CondenserLoopTowers.cc @@ -1870,7 +1870,7 @@ namespace CondenserLoopTowers { Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); @@ -2372,7 +2372,7 @@ namespace CondenserLoopTowers { if (DataSizing::PlantSizData(PltSizCondNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -2444,7 +2444,7 @@ namespace CondenserLoopTowers { if (DataSizing::PlantSizData(PltSizCondNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -2525,7 +2525,7 @@ namespace CondenserLoopTowers { Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -3424,14 +3424,14 @@ namespace CondenserLoopTowers { } else { // probably no plant sizing object Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); this->WaterTemp = DesTowerInletWaterTemp; // 35.0; // design condition } rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); @@ -3689,7 +3689,7 @@ namespace CondenserLoopTowers { if (DataPlant::PlantFirstSizesOkayToFinalize) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -5236,7 +5236,7 @@ namespace CondenserLoopTowers { DeltaTwb = std::abs(OutletAirWetBulb - InletAirWetBulb); // Add KelvinConv to denominator below convert OutletAirWetBulbLast to Kelvin to avoid divide by zero. // Wet bulb error units are delta K/K - WetBulbError = std::abs((OutletAirWetBulb - OutletAirWetBulbLast) / (OutletAirWetBulbLast + DataGlobals::KelvinConv)); + WetBulbError = std::abs((OutletAirWetBulb - OutletAirWetBulbLast) / (OutletAirWetBulbLast + DataGlobalConstants::KelvinConv())); } if (QactualLocal >= 0.0) { diff --git a/src/EnergyPlus/ConvectionCoefficients.cc b/src/EnergyPlus/ConvectionCoefficients.cc index e4ff59e6271..c1ad3174bfc 100644 --- a/src/EnergyPlus/ConvectionCoefficients.cc +++ b/src/EnergyPlus/ConvectionCoefficients.cc @@ -383,18 +383,18 @@ namespace ConvectionCoefficients { state.dataConvectionCoefficient->GetUserSuppliedConvectionCoeffs = false; } - TAir = Surface(SurfNum).OutDryBulbTemp + KelvinConv; - TSurf = TempExt + KelvinConv; + TAir = Surface(SurfNum).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); + TSurf = TempExt + DataGlobalConstants::KelvinConv(); TSky = SkyTempKelvin; TGround = TAir; if (Surface(SurfNum).HasSurroundingSurfProperties) { SrdSurfsNum = Surface(SurfNum).SurroundingSurfacesNum; if (SurroundingSurfsProperty(SrdSurfsNum).SkyTempSchNum != 0) { - TSky = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SkyTempSchNum) + KelvinConv; + TSky = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SkyTempSchNum) + DataGlobalConstants::KelvinConv(); } if (SurroundingSurfsProperty(SrdSurfsNum).GroundTempSchNum != 0) { - TGround = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).GroundTempSchNum) + KelvinConv; + TGround = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).GroundTempSchNum) + DataGlobalConstants::KelvinConv(); } } @@ -602,7 +602,7 @@ namespace ConvectionCoefficients { } else { // Compute sky radiation coefficient HSky = - StefanBoltzmann * AbsExt * Surface(SurfNum).ViewFactorSkyIR * AirSkyRadSplit(SurfNum) * (pow_4(TSurf) - pow_4(TSky)) / (TSurf - TSky); + DataGlobalConstants::StefanBoltzmann() * AbsExt * Surface(SurfNum).ViewFactorSkyIR * AirSkyRadSplit(SurfNum) * (pow_4(TSurf) - pow_4(TSky)) / (TSurf - TSky); } if (TSurf == TAir || algoNum == ASHRAESimple) { @@ -610,10 +610,10 @@ namespace ConvectionCoefficients { HAir = 0.0; } else { // Compute ground radiation coefficient - HGround = StefanBoltzmann * AbsExt * Surface(SurfNum).ViewFactorGroundIR * (pow_4(TSurf) - pow_4(TGround)) / (TSurf - TGround); + HGround = DataGlobalConstants::StefanBoltzmann() * AbsExt * Surface(SurfNum).ViewFactorGroundIR * (pow_4(TSurf) - pow_4(TGround)) / (TSurf - TGround); // Compute air radiation coefficient - HAir = StefanBoltzmann * AbsExt * Surface(SurfNum).ViewFactorSkyIR * (1.0 - AirSkyRadSplit(SurfNum)) * (pow_4(TSurf) - pow_4(TAir)) / + HAir = DataGlobalConstants::StefanBoltzmann() * AbsExt * Surface(SurfNum).ViewFactorSkyIR * (1.0 - AirSkyRadSplit(SurfNum)) * (pow_4(TSurf) - pow_4(TAir)) / (TSurf - TAir); } } @@ -2970,11 +2970,11 @@ namespace ConvectionCoefficients { // make sure inside surface is hot, outside is cold // NOTE: this is not ideal. could have circumstances that reverse this? if (SurfaceTemperatures(Surf1) > SurfaceTemperatures(Surf2)) { - Tsi = SurfaceTemperatures(Surf1) + KelvinConv; - Tso = SurfaceTemperatures(Surf2) + KelvinConv; + Tsi = SurfaceTemperatures(Surf1) + DataGlobalConstants::KelvinConv(); + Tso = SurfaceTemperatures(Surf2) + DataGlobalConstants::KelvinConv(); } else { - Tso = SurfaceTemperatures(Surf1) + KelvinConv; - Tsi = SurfaceTemperatures(Surf2) + KelvinConv; + Tso = SurfaceTemperatures(Surf1) + DataGlobalConstants::KelvinConv(); + Tsi = SurfaceTemperatures(Surf2) + DataGlobalConstants::KelvinConv(); } beta = 2.0 / (Tso + Tsi); @@ -4563,7 +4563,7 @@ namespace ConvectionCoefficients { HnFn = [=](double Tsurf, double Tamb, double, double, double) -> double { return CalcFohannoPolidoriVerticalWall(Tsurf - Tamb, Surface(SurfNum).IntConvZoneWallHeight, - Tsurf - KelvinConv, // Kiva already uses Kelvin, but algorithm expects C + Tsurf - DataGlobalConstants::KelvinConv(), // Kiva already uses Kelvin, but algorithm expects C -QdotConvInRepPerArea(SurfNum)); }; } else { @@ -5279,7 +5279,7 @@ namespace ConvectionCoefficients { // Grashof for zone air based on largest delta T between surfaces and zone height Tmin = minval(TH(2, 1, {Zone(ZoneNum).SurfaceFirst, Zone(ZoneNum).SurfaceLast})); Tmax = maxval(TH(2, 1, {Zone(ZoneNum).SurfaceFirst, Zone(ZoneNum).SurfaceLast})); - GrH = (g * (Tmax - Tmin) * pow_3(Zone(ZoneNum).CeilingHeight)) / ((MAT(ZoneNum) + KelvinConv) * pow_2(v)); + GrH = (g * (Tmax - Tmin) * pow_3(Zone(ZoneNum).CeilingHeight)) / ((MAT(ZoneNum) + DataGlobalConstants::KelvinConv()) * pow_2(v)); // Reynolds number = Vdot supply / v * cube root of zone volume (Goldstein and Noveselac 2010) if (Node(ZoneNode).MassFlowRate > 0.0) { @@ -7309,7 +7309,7 @@ namespace ConvectionCoefficients { Real64 RaH(0.0); Real64 BetaFilm(0.0); - BetaFilm = 1.0 / (KelvinConv + SurfTemp + 0.5 * DeltaTemp); // TODO check sign on DeltaTemp + BetaFilm = 1.0 / (DataGlobalConstants::KelvinConv() + SurfTemp + 0.5 * DeltaTemp); // TODO check sign on DeltaTemp RaH = (g * BetaFilm * QdotConv * pow_4(Height) * Pr) / (k * pow_2(v)); if (RaH <= 6.3e09) { @@ -8112,7 +8112,7 @@ namespace ConvectionCoefficients { Ln = std::sqrt(RoofArea); } DeltaTemp = SurfTemp - AirTemp; - BetaFilm = 1.0 / (KelvinConv + SurfTemp + 0.5 * DeltaTemp); + BetaFilm = 1.0 / (DataGlobalConstants::KelvinConv() + SurfTemp + 0.5 * DeltaTemp); AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress, AirTemp, OutHumRat); GrLn = g * pow_2(AirDensity) * pow_3(Ln) * std::abs(DeltaTemp) * BetaFilm / pow_2(v); diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 1bbc9abdc19..9d88020d636 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -3021,7 +3021,7 @@ namespace DXCoils { } DXCoil(DXCoilNum).RatedAirVolFlowRate(1) = Numbers(7); - if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) != AutoCalculate) { + if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) != DataGlobalConstants::AutoCalculate()) { if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) <= 0.0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + DXCoil(DXCoilNum).Name + "\", invalid"); ShowContinueError("..." + cNumericFields(7) + " must be > 0.0. entered value=[" + TrimSigDigits(Numbers(7), 3) + "]."); @@ -3031,7 +3031,7 @@ namespace DXCoils { DXCoil(DXCoilNum).RatedHPWHCondWaterFlow = Numbers(8); // move to init - if (DXCoil(DXCoilNum).RatedHPWHCondWaterFlow != AutoCalculate) { + if (DXCoil(DXCoilNum).RatedHPWHCondWaterFlow != DataGlobalConstants::AutoCalculate()) { if (DXCoil(DXCoilNum).RatedHPWHCondWaterFlow <= 0.0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + DXCoil(DXCoilNum).Name + "\", invalid"); ShowContinueError("..." + cNumericFields(8) + " must be > 0.0 entered value=[" + TrimSigDigits(Numbers(8), 3) + "]."); @@ -3467,7 +3467,7 @@ namespace DXCoils { } DXCoil(DXCoilNum).RatedAirVolFlowRate(1) = Numbers(7); - if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) != AutoCalculate) { + if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) != DataGlobalConstants::AutoCalculate()) { if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) <= 0.0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + DXCoil(DXCoilNum).Name + "\", invalid"); ShowContinueError("..." + cNumericFields(7) + " must be > 0.0. entered value=[" + TrimSigDigits(Numbers(7), 3) + "]."); @@ -6776,7 +6776,7 @@ namespace DXCoils { Mode = DehumidModeNum * 2 + CapacityStageNum; if (DXCoil(DXCoilNum).DXCoilType_Num == CoilDX_HeatPumpWaterHeaterPumped || DXCoil(DXCoilNum).DXCoilType_Num == CoilDX_HeatPumpWaterHeaterWrapped) { - if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) == AutoCalculate) { + if (DXCoil(DXCoilNum).RatedAirVolFlowRate(1) == DataGlobalConstants::AutoCalculate()) { // report autocalculated sizing PrintFlag = true; CompName = DXCoil(DXCoilNum).Name; @@ -6794,7 +6794,7 @@ namespace DXCoils { PrintFlag = false; } - if (DXCoil(DXCoilNum).RatedHPWHCondWaterFlow == AutoCalculate) { + if (DXCoil(DXCoilNum).RatedHPWHCondWaterFlow == DataGlobalConstants::AutoCalculate()) { // report autocalculated sizing PrintFlag = true; CompName = DXCoil(DXCoilNum).Name; diff --git a/src/EnergyPlus/DataContaminantBalance.cc b/src/EnergyPlus/DataContaminantBalance.cc index fe53798ef50..d84900f7b16 100644 --- a/src/EnergyPlus/DataContaminantBalance.cc +++ b/src/EnergyPlus/DataContaminantBalance.cc @@ -66,7 +66,6 @@ namespace DataContaminantBalance { // Using/Aliasing using namespace DataPrecisionGlobals; - using DataGlobals::AutoCalculate; using DataSurfaces::MaxSlatAngs; // Data diff --git a/src/EnergyPlus/DataEnvironment.cc b/src/EnergyPlus/DataEnvironment.cc index 0c6cf0d3638..6d4eec92df0 100644 --- a/src/EnergyPlus/DataEnvironment.cc +++ b/src/EnergyPlus/DataEnvironment.cc @@ -82,8 +82,6 @@ namespace DataEnvironment { // Using/Aliasing using namespace DataPrecisionGlobals; - using DataGlobals::KelvinConv; - // Data // -only module should be available to other modules and routines. // Thus, all variables in this module must be PUBLIC. @@ -308,7 +306,7 @@ namespace DataEnvironment { SkyClearness = Real64(); SkyBrightness = Real64(); TotalCloudCover = 0.0; - OpaqueCloudCover = 0.0; + OpaqueCloudCover = 0.0; StdBaroPress = 101325.0; StdRhoAir = Real64(); TimeZoneNumber = Real64(); @@ -575,7 +573,7 @@ namespace DataEnvironment { // FUNCTION LOCAL VARIABLE DECLARATIONS: Real64 BaseTemp; // Base temperature at Z - BaseTemp = OutDryBulbTempAt(Z) + KelvinConv; + BaseTemp = OutDryBulbTempAt(Z) + DataGlobalConstants::KelvinConv(); if (Z <= 0.0) { LocalAirPressure = 0.0; diff --git a/src/EnergyPlus/DataGlobalConstants.hh b/src/EnergyPlus/DataGlobalConstants.hh index aa74b446996..36d17d36af6 100644 --- a/src/EnergyPlus/DataGlobalConstants.hh +++ b/src/EnergyPlus/DataGlobalConstants.hh @@ -271,6 +271,15 @@ namespace DataGlobalConstants { Real64 constexpr BigNumber () { return std::numeric_limits< Real64 >::max(); } // Max Number real used for initializations Real64 constexpr rTinyValue () { return std::numeric_limits< Real64 >::epsilon(); } // Tiny value to replace use of TINY(x) std::string::size_type constexpr MaxNameLength () { return 100; } // Maximum Name Length in Characters -- should be the same as MaxAlphaArgLength in InputProcessor module + Real64 constexpr KelvinConv () { return 273.15; } // Conversion factor for C to K and K to C + Real64 constexpr InitConvTemp () { return 5.05; } // [deg C], standard init vol to mass flow conversion temp + Real64 constexpr AutoCalculate () { return -99999.0; } // automatically calculate some fields. + Real64 constexpr CWInitConvTemp () { return 5.05; } // [deg C], standard init chilled water vol to mass flow conversion temp + Real64 constexpr HWInitConvTemp () { return 60.0; } // [deg C], standard init hot water vol to mass flow conversion temp + Real64 constexpr SteamInitConvTemp () { return 100.0; } // [deg C], standard init steam vol to mass flow conversion temp + Real64 constexpr StefanBoltzmann () { return 5.6697E-8; } // Stefan-Boltzmann constant in W/(m2*K4) + Real64 constexpr UniversalGasConst () { return 8314.462175; } // (J/mol*K) + Real64 constexpr convertJtoGJ () { return 1.0E-9; } // Conversion factor for J to GJ int AssignResourceTypeNum(std::string const &ResourceTypeChar); std::string GetResourceTypeChar(int ResourceTypeNum); diff --git a/src/EnergyPlus/DataGlobals.cc b/src/EnergyPlus/DataGlobals.cc index e5f9267fdfd..915405ffb46 100644 --- a/src/EnergyPlus/DataGlobals.cc +++ b/src/EnergyPlus/DataGlobals.cc @@ -72,18 +72,6 @@ namespace DataGlobals { // This data-only module is a repository for all variables which are considered // to be "global" in nature in EnergyPlus. - Real64 const KelvinConv(273.15); // Conversion factor for C to K and K to C - Real64 const InitConvTemp(5.05); // [deg C], standard init vol to mass flow conversion temp - Real64 const AutoCalculate(-99999.0); // automatically calculate some fields. - Real64 const CWInitConvTemp(5.05); // [deg C], standard init chilled water vol to mass flow conversion temp - Real64 const HWInitConvTemp(60.0); // [deg C], standard init hot water vol to mass flow conversion temp - Real64 const SteamInitConvTemp(100.0); // [deg C], standard init steam vol to mass flow conversion temp - - Real64 const StefanBoltzmann(5.6697E-8); // Stefan-Boltzmann constant in W/(m2*K4) - Real64 const UniversalGasConst(8314.462175); // (J/mol*K) - - Real64 const convertJtoGJ(1.0E-9); // Conversion factor for J to GJ - // Parameters for EMS Calling Points int const emsCallFromZoneSizing(1); // Identity where EMS called from int const emsCallFromSystemSizing(2); // Identity where EMS called from diff --git a/src/EnergyPlus/DataGlobals.hh b/src/EnergyPlus/DataGlobals.hh index 9f58573bd52..3b33a17bf2e 100644 --- a/src/EnergyPlus/DataGlobals.hh +++ b/src/EnergyPlus/DataGlobals.hh @@ -66,22 +66,6 @@ struct EnergyPlusData; namespace DataGlobals { - // Data - // -only module should be available to other modules and routines. - // Thus, all variables in this module must be PUBLIC. - - extern Real64 const KelvinConv; // Conversion factor for C to K and K to C - extern Real64 const InitConvTemp; // [deg C], standard init vol to mass flow conversion temp - extern Real64 const AutoCalculate; // automatically calculate some fields. - extern Real64 const CWInitConvTemp; // [deg C], standard init chilled water vol to mass flow conversion temp - extern Real64 const HWInitConvTemp; // [deg C], standard init hot water vol to mass flow conversion temp - extern Real64 const SteamInitConvTemp; // [deg C], standard init steam vol to mass flow conversion temp - - extern Real64 const StefanBoltzmann; // Stefan-Boltzmann constant in W/(m2*K4) - extern Real64 const UniversalGasConst; // (J/mol*K) - - extern Real64 const convertJtoGJ; // Conversion factor for J to GJ - // Parameters for EMS Calling Points extern int const emsCallFromZoneSizing; // Identity where EMS called from extern int const emsCallFromSystemSizing; // Identity where EMS called from diff --git a/src/EnergyPlus/DataHeatBalance.cc b/src/EnergyPlus/DataHeatBalance.cc index 70e85b380e5..bb6d240d51e 100644 --- a/src/EnergyPlus/DataHeatBalance.cc +++ b/src/EnergyPlus/DataHeatBalance.cc @@ -92,7 +92,6 @@ namespace DataHeatBalance { // SolarShading, etc. Modules. // Using/Aliasing - using DataGlobals::AutoCalculate; using DataSurfaces::MaxSlatAngs; using namespace DataVectorTypes; using DataBSDFWindow::BSDFLayerAbsorpStruct; diff --git a/src/EnergyPlus/DataHeatBalance.hh b/src/EnergyPlus/DataHeatBalance.hh index da7b7dee390..4b32e9c1895 100644 --- a/src/EnergyPlus/DataHeatBalance.hh +++ b/src/EnergyPlus/DataHeatBalance.hh @@ -79,7 +79,6 @@ namespace DataHeatBalance { using DataComplexFenestration::GapSupportPillar; using DataComplexFenestration::WindowComplexShade; using DataComplexFenestration::WindowThermalModelParams; - using DataGlobals::AutoCalculate; using DataSurfaces::MaxSlatAngs; using DataVectorTypes::Vector; @@ -787,8 +786,8 @@ namespace DataHeatBalance { // Default Constructor ZoneData() - : Multiplier(1), ListMultiplier(1), ListGroup(0), RelNorth(0.0), OriginX(0.0), OriginY(0.0), OriginZ(0.0), CeilingHeight(AutoCalculate), - Volume(AutoCalculate), OfType(1), UserEnteredFloorArea(AutoCalculate), FloorArea(0.0), CalcFloorArea(0.0), CeilingArea(0.0), + : Multiplier(1), ListMultiplier(1), ListGroup(0), RelNorth(0.0), OriginX(0.0), OriginY(0.0), OriginZ(0.0), CeilingHeight(DataGlobalConstants::AutoCalculate()), + Volume(DataGlobalConstants::AutoCalculate()), OfType(1), UserEnteredFloorArea(DataGlobalConstants::AutoCalculate()), FloorArea(0.0), CalcFloorArea(0.0), CeilingArea(0.0), HasFloor(false), HasRoof(false), HasInterZoneWindow(false), HasWindow(false), AirCapacity(0.0), ExtWindowArea(0.0), ExtGrossWallArea(0.0), ExtWindowArea_Multiplied(0.0), ExtGrossWallArea_Multiplied(0.0), ExtNetWallArea(0.0), TotalSurfArea(0.0), ExteriorTotalSurfArea(0.0), ExteriorTotalGroundSurfArea(0.0), ExtGrossGroundWallArea(0.0), ExtGrossGroundWallArea_Multiplied(0.0), diff --git a/src/EnergyPlus/DataSurfaces.cc b/src/EnergyPlus/DataSurfaces.cc index ac8659e4692..c743a18dfdc 100644 --- a/src/EnergyPlus/DataSurfaces.cc +++ b/src/EnergyPlus/DataSurfaces.cc @@ -961,7 +961,7 @@ namespace DataSurfaces { value = SurfWinIRfromParentZone(ExtBoundCond) + QHTRadSysSurf(ExtBoundCond) + QHWBaseboardSurf(ExtBoundCond) + QSteamBaseboardSurf(ExtBoundCond) + QElecBaseboardSurf(ExtBoundCond); } else { - Real64 tout = getOutsideAirTemperature(t_SurfNum) + KelvinConv; + Real64 tout = getOutsideAirTemperature(t_SurfNum) + DataGlobalConstants::KelvinConv(); value = state.dataWindowManager->sigma * pow_4(tout); value = ViewFactorSkyIR * (AirSkyRadSplit(t_SurfNum) * state.dataWindowManager->sigma * pow_4(SkyTempKelvin) + (1.0 - AirSkyRadSplit(t_SurfNum)) * value) + ViewFactorGroundIR * value; diff --git a/src/EnergyPlus/DesiccantDehumidifiers.cc b/src/EnergyPlus/DesiccantDehumidifiers.cc index fc1f8622609..ccb71b088a1 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.cc +++ b/src/EnergyPlus/DesiccantDehumidifiers.cc @@ -1789,7 +1789,7 @@ namespace DesiccantDehumidifiers { if (DesicDehum(DesicDehumNum).MaxCoilFluidFlow > 0.0) { FluidDensity = GetDensityGlycol(state, PlantLoop(DesicDehum(DesicDehumNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(DesicDehum(DesicDehumNum).LoopNum).FluidIndex, initCBVAV); DesicDehum(DesicDehumNum).MaxCoilFluidFlow *= FluidDensity; @@ -1914,7 +1914,7 @@ namespace DesiccantDehumidifiers { if (CoilMaxVolFlowRate != AutoSize) { FluidDensity = GetDensityGlycol(state, PlantLoop(DesicDehum(DesicDehumNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(DesicDehum(DesicDehumNum).LoopNum).FluidIndex, RoutineName); DesicDehum(DesicDehumNum).MaxCoilFluidFlow = CoilMaxVolFlowRate * FluidDensity; diff --git a/src/EnergyPlus/EcoRoofManager.cc b/src/EnergyPlus/EcoRoofManager.cc index 6435a1e2e64..23c009f8f43 100644 --- a/src/EnergyPlus/EcoRoofManager.cc +++ b/src/EnergyPlus/EcoRoofManager.cc @@ -465,8 +465,8 @@ namespace EcoRoofManager { Qsoilpart2 = state.dataConstruction->Construct(ConstrNum).CTFOutside(0) - F1temp * state.dataConstruction->Construct(ConstrNum).CTFCross(0); Pa = StdBaroPress; // standard atmospheric pressure (apparently in Pascals) - Tgk = Tg + KelvinConv; - Tak = Ta + KelvinConv; + Tgk = Tg + DataGlobalConstants::KelvinConv(); + Tak = Ta + DataGlobalConstants::KelvinConv(); sigmaf = 0.9 - 0.7 * std::exp(-0.75 * LAI); // Fractional veg cover based on (2) from FASST TR-04-25 // Formula for grasses modified to incorporate limits from @@ -481,9 +481,9 @@ namespace EcoRoofManager { // Air Temperature within the canopy is given as // (Deardorff (1987)). Kelvin. based of the previous temperatures - Tafk = (1.0 - sigmaf) * Tak + sigmaf * (0.3 * Tak + 0.6 * (Tif + KelvinConv) + 0.1 * Tgk); + Tafk = (1.0 - sigmaf) * Tak + sigmaf * (0.3 * Tak + 0.6 * (Tif + DataGlobalConstants::KelvinConv()) + 0.1 * Tgk); - Taf = Tafk - KelvinConv; // Air Temperature within canopy in Celcius (C). + Taf = Tafk - DataGlobalConstants::KelvinConv(); // Air Temperature within canopy in Celcius (C). Rhof = Pa / (Rair * Tafk); // Density of air at the leaf temperature Rhoaf = (Rhoa + Rhof) / 2.0; // Average of air density Zd = 0.701 * std::pow(Zf, 0.979); // Zero displacement height @@ -502,9 +502,9 @@ namespace EcoRoofManager { // These parameters were taken from "The Atm Boundary Layer", By J.R. Garratt // NOTE the Garratt eqn. (A21) gives esf in units of hPA so we have multiplied // the constant 6.112 by a factor of 100. - esf = 611.2 * std::exp(17.67 * Tif / (Tif + KelvinConv - 29.65)); + esf = 611.2 * std::exp(17.67 * Tif / (Tif + DataGlobalConstants::KelvinConv() - 29.65)); - // From Garratt - eqn. A21, p284. Note that Tif and Tif+KelvinConv usage is correct. + // From Garratt - eqn. A21, p284. Note that Tif and Tif+DataGlobalConstants::KelvinConv() usage is correct. // Saturation specific humidity at leaf temperature again based on previous temperatures qsf = 0.622 * esf / (Pa - 1.000 * esf); // "The Atm Boundary Layer", J.R Garrat for Saturation mixing ratio @@ -538,19 +538,19 @@ namespace EcoRoofManager { // Latent heat of vaporation at leaf surface temperature. The source of this // equation is Henderson-Sellers (1984) - Lef = 1.91846e6 * pow_2((Tif + KelvinConv) / (Tif + KelvinConv - 33.91)); + Lef = 1.91846e6 * pow_2((Tif + DataGlobalConstants::KelvinConv()) / (Tif + DataGlobalConstants::KelvinConv() - 33.91)); // Check to see if ice is sublimating or frost is forming. if (Tfold < 0.0) Lef = 2.838e6; // per FASST documentation p.15 after eqn. 37. // Derivative of Saturation vapor pressure, which is used in the calculation of // derivative of saturation specific humidity. - Desf = 611.2 * std::exp(17.67 * (Tf / (Tf + KelvinConv - 29.65))) * - (17.67 * Tf * (-1.0) * std::pow(Tf + KelvinConv - 29.65, -2) + 17.67 / (KelvinConv - 29.65 + Tf)); + Desf = 611.2 * std::exp(17.67 * (Tf / (Tf + DataGlobalConstants::KelvinConv() - 29.65))) * + (17.67 * Tf * (-1.0) * std::pow(Tf + DataGlobalConstants::KelvinConv() - 29.65, -2) + 17.67 / (DataGlobalConstants::KelvinConv() - 29.65 + Tf)); dqf = ((0.622 * Pa) / pow_2(Pa - esf)) * Desf; // Derivative of saturation specific humidity - esg = 611.2 * std::exp(17.67 * (Tg / ((Tg + KelvinConv) - 29.65))); // Pa saturation vapor pressure + esg = 611.2 * std::exp(17.67 * (Tg / ((Tg + DataGlobalConstants::KelvinConv()) - 29.65))); // Pa saturation vapor pressure // From Garratt - eqn. A21, p284. - // Note that Tg and Tg+KelvinConv usage is correct. + // Note that Tg and Tg+DataGlobalConstants::KelvinConv() usage is correct. qsg = 0.622 * esg / (Pa - esg); // Saturation mixing ratio at ground surface temperature. // Latent heat vaporization at the ground temperature @@ -558,8 +558,8 @@ namespace EcoRoofManager { // Check to see if ice is sublimating or frost is forming. if (Tgold < 0.0) Leg = 2.838e6; // per FASST documentation p.15 after eqn. 37. - Desg = 611.2 * std::exp(17.67 * (Tg / (Tg + KelvinConv - 29.65))) * - (17.67 * Tg * (-1.0) * std::pow(Tg + KelvinConv - 29.65, -2) + 17.67 / (KelvinConv - 29.65 + Tg)); + Desg = 611.2 * std::exp(17.67 * (Tg / (Tg + DataGlobalConstants::KelvinConv() - 29.65))) * + (17.67 * Tg * (-1.0) * std::pow(Tg + DataGlobalConstants::KelvinConv() - 29.65, -2) + 17.67 / (DataGlobalConstants::KelvinConv() - 29.65 + Tg)); dqg = (0.622 * Pa / pow_2(Pa - esg)) * Desg; // Final Ground Atmosphere Energy Balance @@ -630,13 +630,13 @@ namespace EcoRoofManager { // revisit this issue later. // Implement an iterative solution scheme to solve the simultaneous equations for Leaf and Soil temperature. // Prior experience suggests that no more than 3 iterations are likely needed - LeafTK = Tf + KelvinConv; - SoilTK = Tg + KelvinConv; + LeafTK = Tf + DataGlobalConstants::KelvinConv(); + SoilTK = Tg + DataGlobalConstants::KelvinConv(); for (EcoLoop = 1; EcoLoop <= 3; ++EcoLoop) { P1 = sigmaf * (RS * (1.0 - Alphaf) + epsilonf * Latm) - 3.0 * sigmaf * epsilonf * epsilong * Sigma * pow_4(SoilTK) / EpsilonOne - 3.0 * (-sigmaf * epsilonf * Sigma - sigmaf * epsilonf * epsilong * Sigma / EpsilonOne) * pow_4(LeafTK) + - sheatf * (1.0 - 0.7 * sigmaf) * (Ta + KelvinConv) + LAI * Rhoaf * Cf * Lef * Waf * rn * ((1.0 - 0.7 * sigmaf) / dOne) * qa + + sheatf * (1.0 - 0.7 * sigmaf) * (Ta + DataGlobalConstants::KelvinConv()) + LAI * Rhoaf * Cf * Lef * Waf * rn * ((1.0 - 0.7 * sigmaf) / dOne) * qa + LAI * Rhoaf * Cf * Lef * Waf * rn * (((0.6 * sigmaf * rn) / dOne) - 1.0) * (qsf - LeafTK * dqf) + LAI * Rhoaf * Cf * Lef * Waf * rn * ((0.1 * sigmaf * Mg) / dOne) * (qsg - SoilTK * dqg); P2 = 4.0 * (sigmaf * epsilonf * epsilong * Sigma) * pow_3(SoilTK) / EpsilonOne + 0.1 * sigmaf * sheatf + @@ -652,10 +652,10 @@ namespace EcoRoofManager { T1G = (1.0 - sigmaf) * (RS * (1.0 - Alphag) + epsilong * Latm) - (3.0 * (sigmaf * epsilonf * epsilong * Sigma) / EpsilonOne) * pow_4(LeafTK) - 3.0 * (-(1.0 - sigmaf) * epsilong * Sigma - sigmaf * epsilonf * epsilong * Sigma / EpsilonOne) * pow_4(SoilTK) + - sheatg * (1.0 - 0.7 * sigmaf) * (Ta + KelvinConv) + Rhoag * Ce * Leg * Waf * Mg * ((1.0 - 0.7 * sigmaf) / dOne) * qa + + sheatg * (1.0 - 0.7 * sigmaf) * (Ta + DataGlobalConstants::KelvinConv()) + Rhoag * Ce * Leg * Waf * Mg * ((1.0 - 0.7 * sigmaf) / dOne) * qa + Rhoag * Ce * Leg * Waf * Mg * (0.1 * sigmaf * Mg / dOne - Mg) * (qsg - SoilTK * dqg) + Rhoag * Ce * Leg * Waf * Mg * (0.6 * sigmaf * rn / dOne) * (qsf - LeafTK * dqf) + Qsoilpart1 + - Qsoilpart2 * (KelvinConv); // finished by T1G + Qsoilpart2 * (DataGlobalConstants::KelvinConv()); // finished by T1G T2G = 4.0 * (-(1.0 - sigmaf) * epsilong * Sigma - sigmaf * epsilonf * epsilong * Sigma / EpsilonOne) * pow_3(SoilTK) + (0.1 * sigmaf - 1.0) * sheatg + Rhoag * Ce * Leg * Waf * Mg * (0.1 * sigmaf * Mg / dOne - Mg) * dqg - Qsoilpart2; @@ -673,9 +673,9 @@ namespace EcoRoofManager { // difference scheme this loop structure should be removed. } // This loop does an iterative solution of the simultaneous equations - Qsoil = -1.0 * (Qsoilpart1 - Qsoilpart2 * (SoilTK - KelvinConv)); // This is heat flux INTO top of the soil - Tfold = LeafTK - KelvinConv; - Tgold = SoilTK - KelvinConv; + Qsoil = -1.0 * (Qsoilpart1 - Qsoilpart2 * (SoilTK - DataGlobalConstants::KelvinConv())); // This is heat flux INTO top of the soil + Tfold = LeafTK - DataGlobalConstants::KelvinConv(); + Tgold = SoilTK - DataGlobalConstants::KelvinConv(); } // if firstecosurface (if not we do NOT need to recalculate ecoroof energybalance as all ecoroof surfaces MUST be the same // this endif was moved here from the if statement regarding whether we are looking at the first ecoroof surface or not. diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.cc b/src/EnergyPlus/EvaporativeFluidCoolers.cc index 71cfefba85c..2d3457466a1 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.cc +++ b/src/EnergyPlus/EvaporativeFluidCoolers.cc @@ -1120,7 +1120,7 @@ namespace EvaporativeFluidCoolers { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); this->DesWaterMassFlowRate = this->DesignWaterFlowRate * rho; @@ -1263,7 +1263,7 @@ namespace EvaporativeFluidCoolers { if (PltSizCondNum > 0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1334,7 +1334,7 @@ namespace EvaporativeFluidCoolers { if (DataSizing::PlantSizData(PltSizCondNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1432,7 +1432,7 @@ namespace EvaporativeFluidCoolers { } Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1546,7 +1546,7 @@ namespace EvaporativeFluidCoolers { // 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, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Real64 Cp = FluidProperties::GetSpecificHeatGlycol( @@ -1613,7 +1613,7 @@ namespace EvaporativeFluidCoolers { if (this->DesignWaterFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1755,7 +1755,7 @@ namespace EvaporativeFluidCoolers { // predefined factor was 1.25 W heat rejection per W of delivered cooling, now user input with default 1.25 Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1808,7 +1808,7 @@ namespace EvaporativeFluidCoolers { if (this->DesignWaterFlowRate >= DataHVACGlobals::SmallWaterVolFlow && this->LowSpeedUserSpecifiedDesignCapacity > 0.0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -2280,9 +2280,9 @@ namespace EvaporativeFluidCoolers { OutletAirWetBulb = InletAirWetBulb + qActual / AirCapacity; // Check error tolerance and exit if satisfied DeltaTwb = std::abs(OutletAirWetBulb - InletAirWetBulb); - // Add KelvinConv to denominator below convert OutletAirWetBulbLast to Kelvin to avoid divide by zero. + // Add DataGlobalConstants::KelvinConv() to denominator below convert OutletAirWetBulbLast to Kelvin to avoid divide by zero. // Wet bulb error units are delta K/K - WetBulbError = std::abs((OutletAirWetBulb - OutletAirWetBulbLast) / (OutletAirWetBulbLast + DataGlobals::KelvinConv)); + WetBulbError = std::abs((OutletAirWetBulb - OutletAirWetBulbLast) / (OutletAirWetBulbLast + DataGlobalConstants::KelvinConv())); } if (qActual >= 0.0) { diff --git a/src/EnergyPlus/FanCoilUnits.cc b/src/EnergyPlus/FanCoilUnits.cc index d7576951bfb..6e4be0a2dd1 100644 --- a/src/EnergyPlus/FanCoilUnits.cc +++ b/src/EnergyPlus/FanCoilUnits.cc @@ -1269,7 +1269,7 @@ namespace FanCoilUnits { if (FanCoil(FanCoilNum).HCoilType_Num == HCoil_Water) { rho = GetDensityGlycol(state, PlantLoop(FanCoil(FanCoilNum).HeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(FanCoil(FanCoilNum).HeatCoilLoopNum).FluidIndex, RoutineName); FanCoil(FanCoilNum).MaxHeatCoilFluidFlow = rho * FanCoil(FanCoilNum).MaxHotWaterVolFlow; @@ -1278,7 +1278,7 @@ namespace FanCoilUnits { rho = GetDensityGlycol(state, PlantLoop(FanCoil(FanCoilNum).CoolCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(FanCoil(FanCoilNum).CoolCoilLoopNum).FluidIndex, RoutineName); FanCoil(FanCoilNum).MaxCoolCoilFluidFlow = rho * FanCoil(FanCoilNum).MaxColdWaterVolFlow; @@ -1886,12 +1886,12 @@ namespace FanCoilUnits { if (DesCoilLoad >= SmallLoad) { rho = GetDensityGlycol(state, PlantLoop(FanCoil(FanCoilNum).HeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(FanCoil(FanCoilNum).HeatCoilLoopNum).FluidIndex, RoutineNameNoSpace); Cp = GetSpecificHeatGlycol(state, PlantLoop(FanCoil(FanCoilNum).HeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(FanCoil(FanCoilNum).HeatCoilLoopNum).FluidIndex, RoutineNameNoSpace); diff --git a/src/EnergyPlus/Fans.cc b/src/EnergyPlus/Fans.cc index 8a307eec003..97ce2a11482 100644 --- a/src/EnergyPlus/Fans.cc +++ b/src/EnergyPlus/Fans.cc @@ -1272,7 +1272,7 @@ namespace Fans { // StdRhoAir=PsyRhoAirFnPbTdbW(StdBaroPress,20,0) // From PsychRoutines: // w=MAX(dw,1.0d-5) - // rhoair = pb/(287.d0*(tdb+KelvinConv)*(1.0d0+1.6077687d0*w)) + // rhoair = pb/(287.d0*(tdb+DataGlobalConstants::KelvinConv())*(1.0d0+1.6077687d0*w)) RhoAir = StdRhoAir; // Adjust max fan volumetric airflow using fan sizing factor @@ -2321,7 +2321,7 @@ namespace Fans { // StdRhoAir=PsyRhoAirFnPbTdbW(StdBaroPress,20,0) // From PsychRoutines: // w=MAX(dw,1.0d-5) - // rhoair = pb/(287.d0*(tdb+KelvinConv)*(1.0d0+1.6077687d0*w)) + // rhoair = pb/(287.d0*(tdb+DataGlobalConstants::KelvinConv())*(1.0d0+1.6077687d0*w)) RhoAir = Fan(FanNum).RhoAirStdInit; MassFlow = min(Fan(FanNum).InletAirMassFlowRate, Fan(FanNum).MaxAirMassFlowRate); diff --git a/src/EnergyPlus/FluidCoolers.cc b/src/EnergyPlus/FluidCoolers.cc index 0b999f2e248..bc94af4d18f 100644 --- a/src/EnergyPlus/FluidCoolers.cc +++ b/src/EnergyPlus/FluidCoolers.cc @@ -733,7 +733,7 @@ namespace FluidCoolers { Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, RoutineName); this->DesWaterMassFlowRate = this->DesignWaterFlowRate * rho; @@ -871,7 +871,7 @@ namespace FluidCoolers { if (PltSizCondNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -914,7 +914,7 @@ namespace FluidCoolers { } rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -987,7 +987,7 @@ namespace FluidCoolers { } rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1052,7 +1052,7 @@ namespace FluidCoolers { } rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1159,7 +1159,7 @@ namespace FluidCoolers { if (this->DesignWaterFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Cp = FluidProperties::GetSpecificHeatGlycol(state, @@ -1311,7 +1311,7 @@ namespace FluidCoolers { if (this->DesignWaterFlowRate >= DataHVACGlobals::SmallWaterVolFlow && this->FluidCoolerLowSpeedNomCap > 0.0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, CalledFrom); Cp = FluidProperties::GetSpecificHeatGlycol(state, diff --git a/src/EnergyPlus/FuelCellElectricGenerator.cc b/src/EnergyPlus/FuelCellElectricGenerator.cc index a939bad68c5..09ff4a7202b 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.cc +++ b/src/EnergyPlus/FuelCellElectricGenerator.cc @@ -2119,8 +2119,8 @@ namespace FuelCellElectricGenerator { Real64 tempCp = 0.0; - Real64 const Tkel = (FluidTemp + DataGlobals::KelvinConv); // temp for NASA eq. in Kelvin - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tkel = (FluidTemp + DataGlobalConstants::KelvinConv()); // temp for NASA eq. in Kelvin + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) Real64 const pow_2_Tsho(pow_2(Tsho)); Real64 const pow_3_Tsho(pow_3(Tsho)); @@ -2192,8 +2192,8 @@ namespace FuelCellElectricGenerator { Real64 A5; // NASA poly coeff Real64 A6; // NASA poly coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) - Real64 const Tkel = (FluidTemp + DataGlobals::KelvinConv); // temp for NASA eq. in Kelvin + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tkel = (FluidTemp + DataGlobalConstants::KelvinConv()); // temp for NASA eq. in Kelvin // loop through fuel constituents and sum up Cp @@ -2272,8 +2272,8 @@ namespace FuelCellElectricGenerator { Real64 A4; // NASA poly coeff Real64 A5; // NASA poly coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) - Real64 const Tkel = (FluidTemp + DataGlobals::KelvinConv); // temp for NASA eq. in Kelvin + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tkel = (FluidTemp + DataGlobalConstants::KelvinConv()); // temp for NASA eq. in Kelvin // loop through fuel constituents and sum up Cp @@ -2349,8 +2349,8 @@ namespace FuelCellElectricGenerator { Real64 A5; // NASA poly coeff Real64 A6; // NASA poly coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) - Real64 const Tkel = (FluidTemp + DataGlobals::KelvinConv); // temp for NASA eq. in Kelvin + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tkel = (FluidTemp + DataGlobalConstants::KelvinConv()); // temp for NASA eq. in Kelvin // loop through fuel constituents and sum up Cp @@ -2432,8 +2432,8 @@ namespace FuelCellElectricGenerator { Real64 A5; // NASA poly coeff Real64 A6; // NASA poly coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) - Real64 const Tkel = (FluidTemp + DataGlobals::KelvinConv); // temp for NASA eq. in Kelvin + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tkel = (FluidTemp + DataGlobalConstants::KelvinConv()); // temp for NASA eq. in Kelvin // loop through fuel constituents and sum up Cp @@ -2501,8 +2501,8 @@ namespace FuelCellElectricGenerator { Real64 A4; // NASA poly coeff Real64 A5; // NASA poly coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) - Real64 const Tkel = (FluidTemp + DataGlobals::KelvinConv); // temp for NASA eq. in Kelvin + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tkel = (FluidTemp + DataGlobalConstants::KelvinConv()); // temp for NASA eq. in Kelvin // loop through fuel constituents and sum up Cp @@ -2565,8 +2565,8 @@ namespace FuelCellElectricGenerator { Real64 A4; // NASA poly coeff Real64 A5; // NASA poly coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) - Real64 const Tkel = (FluidTemp + DataGlobals::KelvinConv); // temp for NASA eq. in Kelvin + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tkel = (FluidTemp + DataGlobalConstants::KelvinConv()); // temp for NASA eq. in Kelvin // loop through fuel constituents and sum up Cp @@ -2632,7 +2632,7 @@ namespace FuelCellElectricGenerator { Real64 const D = -0.95914; // shomate coeff Real64 const E = 0.11725; // shomate coeff Real64 const F = -250.569; // shomate coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) HGasWater = A * Tsho + B * pow_2(Tsho) / 2.0 + C * pow_3(Tsho) / 3.0 + D * pow_4(Tsho) / 4.0 - E / Tsho + F; //- H } @@ -2662,7 +2662,7 @@ namespace FuelCellElectricGenerator { Real64 const E = 3.85533; // shomate coeff Real64 const F = -256.5478; // shomate coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; // temp for Shomate eq in (Kelvin/1000) + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; // temp for Shomate eq in (Kelvin/1000) HLiqWater = A * Tsho + B * pow_2(Tsho) / 2.0 + C * pow_3(Tsho) / 3.0 + D * pow_4(Tsho) / 4.0 - E / Tsho + F; //- H } @@ -2686,7 +2686,7 @@ namespace FuelCellElectricGenerator { Real64 const C = -3196.413; // shomate coeff Real64 const D = 2474.455; // shomate coeff Real64 const E = 3.85533; // shomate coeff - Real64 const Tsho = (FluidTemp + DataGlobals::KelvinConv) / 1000.0; + Real64 const Tsho = (FluidTemp + DataGlobalConstants::KelvinConv()) / 1000.0; Cp = A + B * Tsho + C * pow_2(Tsho) + D * pow_3(Tsho) + E / pow_2(Tsho); } diff --git a/src/EnergyPlus/Furnaces.cc b/src/EnergyPlus/Furnaces.cc index b095b11d651..82461547b93 100644 --- a/src/EnergyPlus/Furnaces.cc +++ b/src/EnergyPlus/Furnaces.cc @@ -4991,7 +4991,7 @@ namespace Furnaces { if (Furnace(FurnaceNum).MaxHeatCoilFluidFlow > 0.0) { rho = GetDensityGlycol(state, PlantLoop(Furnace(FurnaceNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(Furnace(FurnaceNum).LoopNum).FluidIndex, RoutineName); Furnace(FurnaceNum).MaxHeatCoilFluidFlow *= rho; @@ -5063,7 +5063,7 @@ namespace Furnaces { if (Furnace(FurnaceNum).MaxSuppCoilFluidFlow > 0.0) { rho = GetDensityGlycol(state, PlantLoop(Furnace(FurnaceNum).LoopNumSupp).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(Furnace(FurnaceNum).LoopNumSupp).FluidIndex, RoutineName); Furnace(FurnaceNum).MaxSuppCoilFluidFlow *= rho; @@ -5136,7 +5136,7 @@ namespace Furnaces { CoilMaxVolFlowRate = GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", Furnace(FurnaceNum).HeatingCoilName, ErrorsFound); if (CoilMaxVolFlowRate != AutoSize) { rho = GetDensityGlycol(state, PlantLoop(Furnace(FurnaceNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(Furnace(FurnaceNum).LoopNum).FluidIndex, RoutineName); Furnace(FurnaceNum).MaxHeatCoilFluidFlow = CoilMaxVolFlowRate * rho; @@ -5177,7 +5177,7 @@ namespace Furnaces { if (CoilMaxVolFlowRate != AutoSize) { rho = GetDensityGlycol(state, PlantLoop(Furnace(FurnaceNum).LoopNumSupp).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(Furnace(FurnaceNum).LoopNumSupp).FluidIndex, RoutineName); Furnace(FurnaceNum).MaxSuppCoilFluidFlow = CoilMaxVolFlowRate * rho; diff --git a/src/EnergyPlus/GeneralRoutines.cc b/src/EnergyPlus/GeneralRoutines.cc index efb13820ca5..16495764e7d 100644 --- a/src/EnergyPlus/GeneralRoutines.cc +++ b/src/EnergyPlus/GeneralRoutines.cc @@ -1059,7 +1059,6 @@ void CalcPassiveExteriorBaffleGap(EnergyPlusData &state, Real64 const nu(15.66e-6); // kinematic viscosity (m**2/s) for air at 300 K (Mills 1999 Heat Transfer) Real64 const k(0.0267); // thermal conductivity (W/m K) for air at 300 K (Mills 1999 Heat Transfer) Real64 const Sigma(5.6697e-08); // Stefan-Boltzmann constant - Real64 const KelvinConv(273.15); // Conversion from Celsius to Kelvin static std::string const RoutineName("CalcPassiveExteriorBaffleGap"); // INTERFACE BLOCK SPECIFICATIONS: @@ -1155,8 +1154,8 @@ void CalcPassiveExteriorBaffleGap(EnergyPlusData &state, InitExteriorConvectionCoeff(state, SurfPtr, HMovInsul, Roughness, AbsExt, TmpTsBaf, HExtARR(ThisSurf), HSkyARR(ThisSurf), HGroundARR(ThisSurf), HAirARR(ThisSurf)); ConstrNum = Surface(SurfPtr).Construction; AbsThermSurf = dataMaterial.Material(state.dataConstruction->Construct(ConstrNum).LayerPoint(1)).AbsorpThermal; - TsoK = TH(1, 1, SurfPtr) + KelvinConv; - TsBaffK = TmpTsBaf + KelvinConv; + TsoK = TH(1, 1, SurfPtr) + DataGlobalConstants::KelvinConv(); + TsBaffK = TmpTsBaf + DataGlobalConstants::KelvinConv(); if (TsBaffK == TsoK) { // avoid divide by zero HPlenARR(ThisSurf) = 0.0; // no net heat transfer if same temperature } else { @@ -1219,7 +1218,7 @@ void CalcPassiveExteriorBaffleGap(EnergyPlusData &state, // Isc = sum( QRadSWOutIncident( SurfPtrARR ) * Surface( SurfPtrARR ).Area ) / A; //Autodesk:F2C++ Array subscript usage: Replaced by below Isc = sum_product_sub(QRadSWOutIncident, Surface, &SurfaceData::Area, SurfPtrARR) / A; // Autodesk:F2C++ Functions handle array subscript usage - TmeanK = 0.5 * (TmpTsBaf + Tso) + KelvinConv; + TmeanK = 0.5 * (TmpTsBaf + Tso) + DataGlobalConstants::KelvinConv(); Gr = g * pow_3(GapThick) * std::abs(Tso - TmpTsBaf) * pow_2(RhoAir) / (TmeanK * pow_2(nu)); @@ -1231,14 +1230,14 @@ void CalcPassiveExteriorBaffleGap(EnergyPlusData &state, VdotWind = Cv * (VentArea / 2.0) * Vwind; if (TaGap > Tamb) { - VdotThermal = Cd * (VentArea / 2.0) * std::sqrt(2.0 * g * HdeltaNPL * (TaGap - Tamb) / (TaGap + KelvinConv)); + VdotThermal = Cd * (VentArea / 2.0) * std::sqrt(2.0 * g * HdeltaNPL * (TaGap - Tamb) / (TaGap + DataGlobalConstants::KelvinConv())); } else if (TaGap == Tamb) { VdotThermal = 0.0; } else { if ((std::abs(Tilt) < 5.0) || (std::abs(Tilt - 180.0) < 5.0)) { VdotThermal = 0.0; // stable bouyancy situation } else { - VdotThermal = Cd * (VentArea / 2.0) * std::sqrt(2.0 * g * HdeltaNPL * (Tamb - TaGap) / (Tamb + KelvinConv)); + VdotThermal = Cd * (VentArea / 2.0) * std::sqrt(2.0 * g * HdeltaNPL * (Tamb - TaGap) / (Tamb + DataGlobalConstants::KelvinConv())); } } diff --git a/src/EnergyPlus/HVACControllers.cc b/src/EnergyPlus/HVACControllers.cc index c25e8a24ba8..93b7476d41d 100644 --- a/src/EnergyPlus/HVACControllers.cc +++ b/src/EnergyPlus/HVACControllers.cc @@ -1193,7 +1193,7 @@ namespace HVACControllers { rho = GetDensityGlycol(state, PlantLoop(ControllerProps(ControlNum).ActuatedNodePlantLoopNum).FluidName, - CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(ControllerProps(ControlNum).ActuatedNodePlantLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/HVACCooledBeam.cc b/src/EnergyPlus/HVACCooledBeam.cc index a67b3f59561..a292b6d32be 100644 --- a/src/EnergyPlus/HVACCooledBeam.cc +++ b/src/EnergyPlus/HVACCooledBeam.cc @@ -590,7 +590,7 @@ namespace HVACCooledBeam { InWaterNode = CoolBeam(CBNum).CWInNode; OutWaterNode = CoolBeam(CBNum).CWOutNode; rho = GetDensityGlycol(state, PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidIndex, RoutineName); CoolBeam(CBNum).MaxCoolWaterMassFlow = rho * CoolBeam(CBNum).MaxCoolWaterVolFlow; @@ -695,7 +695,6 @@ namespace HVACCooledBeam { // Using/Aliasing using namespace DataSizing; - using DataGlobals::AutoCalculate; using DataPlant::PlantLoop; using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; @@ -736,7 +735,7 @@ namespace HVACCooledBeam { MyPlantSizingIndex("cooled beam unit", CoolBeam(CBNum).Name, CoolBeam(CBNum).CWInNode, CoolBeam(CBNum).CWOutNode, ErrorsFound); } - if (CoolBeam(CBNum).Kin == AutoCalculate) { + if (CoolBeam(CBNum).Kin == DataGlobalConstants::AutoCalculate()) { if (CoolBeam(CBNum).CBType_Num == Passive_Cooled_Beam) { CoolBeam(CBNum).Kin = 0.0; } else { @@ -785,13 +784,13 @@ namespace HVACCooledBeam { rho = GetDensityGlycol(state, PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidIndex, RoutineName); @@ -820,7 +819,7 @@ namespace HVACCooledBeam { if (CoolBeam(CBNum).NumBeams == AutoSize) { rho = GetDensityGlycol(state, PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidIndex, RoutineName); @@ -838,13 +837,13 @@ namespace HVACCooledBeam { if (PltSizCoolNum > 0) { rho = GetDensityGlycol(state, PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CoolBeam(CBNum).CWLoopNum).FluidIndex, RoutineName); DesCoilLoad = diff --git a/src/EnergyPlus/HVACFourPipeBeam.cc b/src/EnergyPlus/HVACFourPipeBeam.cc index 0f4b7039a31..0392642c8f5 100644 --- a/src/EnergyPlus/HVACFourPipeBeam.cc +++ b/src/EnergyPlus/HVACFourPipeBeam.cc @@ -957,7 +957,7 @@ namespace FourPipeBeam { if (this->beamCoolingPresent) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->cWLocation.loopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->cWLocation.loopNum).FluidIndex, routineName); this->mDotNormRatedCW = this->vDotNormRatedCW * rho; @@ -974,7 +974,7 @@ namespace FourPipeBeam { if (this->beamHeatingPresent) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->hWLocation.loopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->hWLocation.loopNum).FluidIndex, routineName); this->mDotNormRatedHW = this->vDotNormRatedHW * rho; @@ -1032,7 +1032,7 @@ namespace FourPipeBeam { this->vDotDesignCW = this->vDotNormRatedCW * this->totBeamLength; rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->cWLocation.loopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->cWLocation.loopNum).FluidIndex, routineName); this->mDotNormRatedCW = this->vDotNormRatedCW * rho; @@ -1052,7 +1052,7 @@ namespace FourPipeBeam { this->vDotDesignHW = this->vDotNormRatedHW * this->totBeamLength; rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->hWLocation.loopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->hWLocation.loopNum).FluidIndex, routineName); this->mDotNormRatedHW = this->vDotNormRatedHW * rho; diff --git a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc index 5da3bc5da35..e6f4f190b22 100644 --- a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc +++ b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc @@ -1364,7 +1364,7 @@ namespace HVACMultiSpeedHeatPump { MSHeatPump(MSHPNum).DesignHeatRecFlowRate = Numbers(6); if (MSHeatPump(MSHPNum).DesignHeatRecFlowRate > 0.0) { MSHeatPump(MSHPNum).HeatRecActive = true; - MSHeatPump(MSHPNum).DesignHeatRecMassFlowRate = RhoH2O(DataGlobals::HWInitConvTemp) * MSHeatPump(MSHPNum).DesignHeatRecFlowRate; + MSHeatPump(MSHPNum).DesignHeatRecMassFlowRate = RhoH2O(DataGlobalConstants::HWInitConvTemp()) * MSHeatPump(MSHPNum).DesignHeatRecFlowRate; MSHeatPump(MSHPNum).HeatRecInletNodeNum = GetOnlySingleNode(state, Alphas(16), ErrorsFound, CurrentModuleObject, Alphas(1), NodeType_Water, NodeConnectionType_Inlet, 3, ObjectIsNotParent); if (MSHeatPump(MSHPNum).HeatRecInletNodeNum == 0) { @@ -1912,7 +1912,7 @@ namespace HVACMultiSpeedHeatPump { if (MSHeatPump(MSHeatPumpNum).MaxCoilFluidFlow > 0.0) { rho = GetDensityGlycol(state, PlantLoop(MSHeatPump(MSHeatPumpNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(MSHeatPump(MSHeatPumpNum).LoopNum).FluidIndex, RoutineName); MSHeatPump(MSHeatPumpNum).MaxCoilFluidFlow = @@ -1983,7 +1983,7 @@ namespace HVACMultiSpeedHeatPump { if (MSHeatPump(MSHeatPumpNum).MaxSuppCoilFluidFlow > 0.0) { rho = GetDensityGlycol(state, PlantLoop(MSHeatPump(MSHeatPumpNum).SuppLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(MSHeatPump(MSHeatPumpNum).SuppLoopNum).FluidIndex, RoutineName); MSHeatPump(MSHeatPumpNum).MaxSuppCoilFluidFlow = @@ -2138,7 +2138,7 @@ namespace HVACMultiSpeedHeatPump { rho = GetDensityGlycol(state, PlantLoop(MSHeatPump(MSHeatPumpNum).HRLoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(MSHeatPump(MSHeatPumpNum).HRLoopNum).FluidIndex, RoutineName); @@ -2163,7 +2163,7 @@ namespace HVACMultiSpeedHeatPump { if (CoilMaxVolFlowRate != AutoSize) { rho = GetDensityGlycol(state, PlantLoop(MSHeatPump(MSHeatPumpNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(MSHeatPump(MSHeatPumpNum).LoopNum).FluidIndex, RoutineName); MSHeatPump(MSHeatPumpNum).MaxCoilFluidFlow = CoilMaxVolFlowRate * rho; @@ -2213,7 +2213,7 @@ namespace HVACMultiSpeedHeatPump { if (CoilMaxVolFlowRate != AutoSize) { rho = GetDensityGlycol(state, PlantLoop(MSHeatPump(MSHeatPumpNum).SuppLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(MSHeatPump(MSHeatPumpNum).SuppLoopNum).FluidIndex, RoutineName); MSHeatPump(MSHeatPumpNum).MaxSuppCoilFluidFlow = CoilMaxVolFlowRate * rho; diff --git a/src/EnergyPlus/HVACSingleDuctInduc.cc b/src/EnergyPlus/HVACSingleDuctInduc.cc index c8f85db7399..afa0f98c003 100644 --- a/src/EnergyPlus/HVACSingleDuctInduc.cc +++ b/src/EnergyPlus/HVACSingleDuctInduc.cc @@ -665,7 +665,7 @@ namespace HVACSingleDuctInduc { rho = GetDensityGlycol(state, PlantLoop(IndUnit(IUNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(IndUnit(IUNum).HWLoopNum).FluidIndex, RoutineName); IndUnit(IUNum).MaxHotWaterFlow = rho * IndUnit(IUNum).MaxVolHotWaterFlow; @@ -690,7 +690,7 @@ namespace HVACSingleDuctInduc { if (ColdConNode > 0) { rho = GetDensityGlycol(state, PlantLoop(IndUnit(IUNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(IndUnit(IUNum).CWLoopNum).FluidIndex, RoutineName); IndUnit(IUNum).MaxColdWaterFlow = rho * IndUnit(IUNum).MaxVolColdWaterFlow; @@ -909,13 +909,13 @@ namespace HVACSingleDuctInduc { } IndUnit(IUNum).DesHeatingLoad = DesCoilLoad; Cp = GetSpecificHeatGlycol(state, PlantLoop(IndUnit(IUNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(IndUnit(IUNum).HWLoopNum).FluidIndex, RoutineName); rho = GetDensityGlycol(state, PlantLoop(IndUnit(IUNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(IndUnit(IUNum).HWLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/HVACSizingSimulationManager.cc b/src/EnergyPlus/HVACSizingSimulationManager.cc index bec24f499da..2a97c41a975 100644 --- a/src/EnergyPlus/HVACSizingSimulationManager.cc +++ b/src/EnergyPlus/HVACSizingSimulationManager.cc @@ -112,9 +112,9 @@ void HVACSizingSimulationManager::CreateNewCoincidentPlantAnalysisObject(EnergyP if (PlantLoopName == PlantLoop(i).Name) { // found it density = GetDensityGlycol( - state, PlantLoop(i).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(i).FluidIndex, "createNewCoincidentPlantAnalysisObject"); + state, PlantLoop(i).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(i).FluidIndex, "createNewCoincidentPlantAnalysisObject"); cp = GetSpecificHeatGlycol( - state, PlantLoop(i).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(i).FluidIndex, "createNewCoincidentPlantAnalysisObject"); + state, PlantLoop(i).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(i).FluidIndex, "createNewCoincidentPlantAnalysisObject"); plantCoincAnalyObjs.emplace_back(PlantLoopName, i, diff --git a/src/EnergyPlus/HVACUnitaryBypassVAV.cc b/src/EnergyPlus/HVACUnitaryBypassVAV.cc index ebb2ae99524..314be853727 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.cc +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.cc @@ -1487,7 +1487,7 @@ namespace HVACUnitaryBypassVAV { if (CBVAV(CBVAVNum).MaxHeatCoilFluidFlow > 0.0) { Real64 FluidDensity = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(CBVAV(CBVAVNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(CBVAV(CBVAVNum).LoopNum).FluidIndex, RoutineName); CBVAV(CBVAVNum).MaxHeatCoilFluidFlow = @@ -1597,7 +1597,7 @@ namespace HVACUnitaryBypassVAV { if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 FluidDensity = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(CBVAV(CBVAVNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(CBVAV(CBVAVNum).LoopNum).FluidIndex, RoutineName); CBVAV(CBVAVNum).MaxHeatCoilFluidFlow = CoilMaxVolFlowRate * FluidDensity; diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 26bda42249e..3db2e0bcd26 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -5231,7 +5231,7 @@ namespace HVACVariableRefrigerantFlow { if (VRFTU(VRFTUNum).SuppHeatCoilFluidMaxFlow > 0.0) { rho = GetDensityGlycol(state, PlantLoop(VRFTU(VRFTUNum).SuppHeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(VRFTU(VRFTUNum).SuppHeatCoilLoopNum).FluidIndex, RoutineName); VRFTU(VRFTUNum).SuppHeatCoilFluidMaxFlow = VRFTU(VRFTUNum).SuppHeatCoilFluidMaxFlow * rho; @@ -5958,7 +5958,8 @@ namespace HVACVariableRefrigerantFlow { if (VRF(VRFCond).CondenserType == DataHVACGlobals::WaterCooled) { rho = GetDensityGlycol( - state, PlantLoop(VRF(VRFCond).SourceLoopNum).FluidName, CWInitConvTemp, PlantLoop(VRF(VRFCond).SourceLoopNum).FluidIndex, RoutineName); + state, PlantLoop(VRF(VRFCond).SourceLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp(), + PlantLoop(VRF(VRFCond).SourceLoopNum).FluidIndex, RoutineName); VRF(VRFCond).WaterCondenserDesignMassFlow = VRF(VRFCond).WaterCondVolFlowRate * rho; InitComponentNodes(0.0, @@ -5988,7 +5989,7 @@ namespace HVACVariableRefrigerantFlow { if (CoilMaxVolFlowRate != DataSizing::AutoSize) { rho = GetDensityGlycol(state, PlantLoop(VRFTU(VRFTUNum).SuppHeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(VRFTU(VRFTUNum).SuppHeatCoilLoopNum).FluidIndex, RoutineName); VRFTU(VRFTUNum).SuppHeatCoilFluidMaxFlow = CoilMaxVolFlowRate * rho; @@ -8181,7 +8182,7 @@ namespace HVACVariableRefrigerantFlow { } rho = FluidProperties::GetDensityGlycol( - state, PlantLoop(this->SourceLoopNum).FluidName, CWInitConvTemp, PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); + state, PlantLoop(this->SourceLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); this->WaterCondenserDesignMassFlow = this->WaterCondVolFlowRate * rho; PlantUtilities::InitComponentNodes(0.0, this->WaterCondenserDesignMassFlow, diff --git a/src/EnergyPlus/HWBaseboardRadiator.cc b/src/EnergyPlus/HWBaseboardRadiator.cc index 67354adc4e1..88c517714ec 100644 --- a/src/EnergyPlus/HWBaseboardRadiator.cc +++ b/src/EnergyPlus/HWBaseboardRadiator.cc @@ -856,7 +856,7 @@ namespace HWBaseboardRadiator { rho = GetDensityGlycol(state, PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidIndex, RoutineName); @@ -1089,12 +1089,12 @@ namespace HWBaseboardRadiator { if (DesCoilLoad >= SmallLoad) { Cp = GetSpecificHeatGlycol(state, PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidIndex, RoutineName); rho = GetDensityGlycol(state, PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidIndex, RoutineName); WaterVolFlowRateMaxDes = DesCoilLoad / (PlantSizData(PltSizHeatNum).DeltaT * Cp * rho); @@ -1142,7 +1142,7 @@ namespace HWBaseboardRadiator { DesCoilLoad = RatedCapacityDes; rho = GetDensityGlycol(state, PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(HWBaseboard(BaseboardNum).LoopNum).FluidIndex, RoutineNameFull); WaterMassFlowRateStd = HWBaseboard(BaseboardNum).WaterVolFlowRateMax * rho; diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.cc b/src/EnergyPlus/HeatBalFiniteDiffManager.cc index eeb6b539f0c..89ebce7d407 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -100,7 +100,6 @@ namespace HeatBalFiniteDiffManager { using DataGlobals::DayOfSim; using DataGlobals::DisplayExtraWarnings; using DataGlobals::HourOfDay; - using DataGlobals::KelvinConv; using DataGlobals::NumOfTimeStepInHour; using DataGlobals::TimeStep; using DataGlobals::TimeStepZoneSec; diff --git a/src/EnergyPlus/HeatBalanceAirManager.cc b/src/EnergyPlus/HeatBalanceAirManager.cc index 58bce271680..5aabbc43b32 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.cc +++ b/src/EnergyPlus/HeatBalanceAirManager.cc @@ -1971,7 +1971,7 @@ namespace HeatBalanceAirManager { } Ventilation(VentiCount).OpenEff = rNumericArgs(2); - if (Ventilation(VentiCount).OpenEff != AutoCalculate && + if (Ventilation(VentiCount).OpenEff != DataGlobalConstants::AutoCalculate() && (Ventilation(VentiCount).OpenEff < 0.0 || Ventilation(VentiCount).OpenEff > 1.0)) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", " + cNumericFieldNames(2) + " must be between 0 and 1."); @@ -1992,7 +1992,7 @@ namespace HeatBalanceAirManager { } Ventilation(VentiCount).DiscCoef = rNumericArgs(5); - if (Ventilation(VentiCount).DiscCoef != AutoCalculate && + if (Ventilation(VentiCount).DiscCoef != DataGlobalConstants::AutoCalculate() && (Ventilation(VentiCount).DiscCoef < 0.0 || Ventilation(VentiCount).DiscCoef > 1.0)) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", " + cNumericFieldNames(5) + " must be between 0 and 1."); diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.cc b/src/EnergyPlus/HeatBalanceHAMTManager.cc index 55d092bcecd..71263a1b13f 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.cc +++ b/src/EnergyPlus/HeatBalanceHAMTManager.cc @@ -1524,7 +1524,7 @@ namespace HeatBalanceHAMTManager { TempSurfInP = cells(Intcell(sid)).rhp1 * PsyPsatFnTemp(cells(Intcell(sid)).tempp1); - RhoVaporSurfIn(sid) = TempSurfInP / (461.52 * (MAT(Surface(sid).Zone) + KelvinConv)); + RhoVaporSurfIn(sid) = TempSurfInP / (461.52 * (MAT(Surface(sid).Zone) + DataGlobalConstants::KelvinConv())); } void UpdateHeatBalHAMT(int const sid) @@ -1754,7 +1754,7 @@ namespace HeatBalanceHAMTManager { // FUNCTION LOCAL VARIABLE DECLARATIONS: // na - WVDC = (2.e-7 * std::pow(Temperature + KelvinConv, 0.81)) / ambp; + WVDC = (2.e-7 * std::pow(Temperature + DataGlobalConstants::KelvinConv(), 0.81)) / ambp; return WVDC; } diff --git a/src/EnergyPlus/HeatBalanceIntRadExchange.cc b/src/EnergyPlus/HeatBalanceIntRadExchange.cc index f84f434ddb5..69ec0f3b617 100644 --- a/src/EnergyPlus/HeatBalanceIntRadExchange.cc +++ b/src/EnergyPlus/HeatBalanceIntRadExchange.cc @@ -344,7 +344,7 @@ namespace HeatBalanceIntRadExchange { // If the window is bare this TS and it is the first time through we use the previous TS glass // temperature whether or not the window was shaded in the previous TS. If the window was shaded // the previous time step this temperature is a better starting value than the shade temperature. - SurfaceTempRad[ZoneSurfNum] = surface_window.ThetaFace(2 * construct.TotGlassLayers) - KelvinConv; + SurfaceTempRad[ZoneSurfNum] = surface_window.ThetaFace(2 * construct.TotGlassLayers) - DataGlobalConstants::KelvinConv(); SurfaceEmiss[ZoneSurfNum] = construct.InsideAbsorpThermal; // For windows with an interior shade or blind an effective inside surface temp // and emiss is used here that is a weighted combination of shade/blind and glass temp and emiss. @@ -364,12 +364,12 @@ namespace HeatBalanceIntRadExchange { CarrollMRTNumerator += SurfaceTempRad[ZoneSurfNum]*zone_info.Fp[ZoneSurfNum]*zone_info.Area[ZoneSurfNum]; CarrollMRTDenominator += zone_info.Fp[ZoneSurfNum]*zone_info.Area[ZoneSurfNum]; } - SurfaceTempInKto4th[ZoneSurfNum] = pow_4(SurfaceTempRad[ZoneSurfNum] + KelvinConv); + SurfaceTempInKto4th[ZoneSurfNum] = pow_4(SurfaceTempRad[ZoneSurfNum] + DataGlobalConstants::KelvinConv()); } if (CarrollMethod) { if (CarrollMRTDenominator > 0.0) { - CarrollMRTInKTo4th = pow_4(CarrollMRTNumerator/CarrollMRTDenominator + KelvinConv); + CarrollMRTInKTo4th = pow_4(CarrollMRTNumerator/CarrollMRTDenominator + DataGlobalConstants::KelvinConv()); } else { // Likely only one surface in this enclosure CarrollMRTInKTo4th = 293.15; // arbitrary value, IR will be zero @@ -397,7 +397,7 @@ namespace HeatBalanceIntRadExchange { } } if (CarrollMRTDenominatorWin > 0.0) { - CarrollMRTInKTo4thWin = pow_4(CarrollMRTNumeratorWin / CarrollMRTDenominatorWin + KelvinConv); + CarrollMRTInKTo4thWin = pow_4(CarrollMRTNumeratorWin / CarrollMRTDenominatorWin + DataGlobalConstants::KelvinConv()); } SurfWinIRfromParentZone(RecSurfNum) += (zone_info.Fp[RecZoneSurfNum] * CarrollMRTInKTo4thWin) / SurfaceEmiss[RecZoneSurfNum]; } @@ -2010,7 +2010,7 @@ namespace HeatBalanceIntRadExchange { Array1D &Fp // VECTOR OF OPPENHEIM RESISTANCE VALUES ) { - Real64 SB = DataGlobals::StefanBoltzmann; + Real64 SB = DataGlobalConstants::StefanBoltzmann(); for (int iS = 0; iS < N; iS++) { Fp[iS] = SB*EMISS[iS]/(EMISS[iS]/FMRT[iS] + 1. - EMISS[iS]); // actually sigma * } diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index c56d55f7692..8043147d923 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -216,7 +216,7 @@ namespace HeatBalanceKivaManager { std::shared_ptr bcs = instance.bcs; - bcs->outdoorTemp = kivaWeather.dryBulb[index] * weightNow + kivaWeather.dryBulb[indexPrev] * (1.0 - weightNow) + DataGlobals::KelvinConv; + bcs->outdoorTemp = kivaWeather.dryBulb[index] * weightNow + kivaWeather.dryBulb[indexPrev] * (1.0 - weightNow) + DataGlobalConstants::KelvinConv(); bcs->localWindSpeed = (kivaWeather.windSpeed[index] * weightNow + kivaWeather.windSpeed[indexPrev] * (1.0 - weightNow)) * DataEnvironment::WeatherFileWindModCoeff * @@ -228,7 +228,7 @@ namespace HeatBalanceKivaManager { bcs->diffuseHorizontalFlux = 0.0; bcs->slabAbsRadiation = 0.0; bcs->wallAbsRadiation = 0.0; - bcs->deepGroundTemperature = kivaWeather.annualAverageDrybulbTemp + DataGlobals::KelvinConv; + bcs->deepGroundTemperature = kivaWeather.annualAverageDrybulbTemp + DataGlobalConstants::KelvinConv(); // Estimate indoor temperature static const Real64 defaultFlagTemp = -999; // default sets this below -999 at -9999 so uses value if entered @@ -238,11 +238,11 @@ namespace HeatBalanceKivaManager { Real64 Tin; if (zoneAssumedTemperature > defaultFlagTemp) { - Tin = zoneAssumedTemperature + DataGlobals::KelvinConv; + Tin = zoneAssumedTemperature + DataGlobalConstants::KelvinConv(); } else { switch (zoneControlType) { case KIVAZONE_UNCONTROLLED: { - Tin = assumedFloatingTemp + DataGlobals::KelvinConv; + Tin = assumedFloatingTemp + DataGlobalConstants::KelvinConv(); break; } case KIVAZONE_TEMPCONTROL: { @@ -252,7 +252,7 @@ namespace HeatBalanceKivaManager { if (controlType == 0) { // Uncontrolled - Tin = assumedFloatingTemp + DataGlobals::KelvinConv; + Tin = assumedFloatingTemp + DataGlobalConstants::KelvinConv(); } else if (controlType == DataHVACGlobals::SingleHeatingSetPoint) { @@ -260,7 +260,7 @@ namespace HeatBalanceKivaManager { int schTypeId = DataZoneControls::TempControlledZone(zoneControlNum).ControlTypeSchIndx(schNameId); int spSchId = state.dataZoneTempPredictorCorrector->SetPointSingleHeating(schTypeId).TempSchedIndex; Real64 setpoint = ScheduleManager::LookUpScheduleValue(state, spSchId, hour, timestep); - Tin = setpoint + DataGlobals::KelvinConv; + Tin = setpoint + DataGlobalConstants::KelvinConv(); } else if (controlType == DataHVACGlobals::SingleCoolingSetPoint) { @@ -268,7 +268,7 @@ namespace HeatBalanceKivaManager { int schTypeId = DataZoneControls::TempControlledZone(zoneControlNum).ControlTypeSchIndx(schNameId); int spSchId = state.dataZoneTempPredictorCorrector->SetPointSingleCooling(schTypeId).TempSchedIndex; Real64 setpoint = ScheduleManager::LookUpScheduleValue(state, spSchId, hour, timestep); - Tin = setpoint + DataGlobals::KelvinConv; + Tin = setpoint + DataGlobalConstants::KelvinConv(); } else if (controlType == DataHVACGlobals::SingleHeatCoolSetPoint) { @@ -276,7 +276,7 @@ namespace HeatBalanceKivaManager { int schTypeId = DataZoneControls::TempControlledZone(zoneControlNum).ControlTypeSchIndx(schNameId); int spSchId = state.dataZoneTempPredictorCorrector->SetPointSingleHeatCool(schTypeId).TempSchedIndex; Real64 setpoint = ScheduleManager::LookUpScheduleValue(state, spSchId, hour, timestep); - Tin = setpoint + DataGlobals::KelvinConv; + Tin = setpoint + DataGlobalConstants::KelvinConv(); } else if (controlType == DataHVACGlobals::DualSetPointWithDeadBand) { @@ -290,12 +290,12 @@ namespace HeatBalanceKivaManager { const Real64 coolBalanceTemp = 15.0; // (assumed) degC if (bcs->outdoorTemp < heatBalanceTemp) { - Tin = heatSetpoint + DataGlobals::KelvinConv; + Tin = heatSetpoint + DataGlobalConstants::KelvinConv(); } else if (bcs->outdoorTemp > coolBalanceTemp) { - Tin = coolSetpoint + DataGlobals::KelvinConv; + Tin = coolSetpoint + DataGlobalConstants::KelvinConv(); } else { Real64 weight = (coolBalanceTemp - bcs->outdoorTemp) / (coolBalanceTemp - heatBalanceTemp); - Tin = heatSetpoint * weight + coolSetpoint * (1.0 - weight) + DataGlobals::KelvinConv; + Tin = heatSetpoint * weight + coolSetpoint * (1.0 - weight) + DataGlobalConstants::KelvinConv(); } } else { @@ -308,7 +308,7 @@ namespace HeatBalanceKivaManager { } case KIVAZONE_COMFORTCONTROL: { - Tin = standardTemp + DataGlobals::KelvinConv; + Tin = standardTemp + DataGlobalConstants::KelvinConv(); break; } case KIVAZONE_STAGEDCONTROL: { @@ -320,18 +320,18 @@ namespace HeatBalanceKivaManager { const Real64 heatBalanceTemp = 10.0; // (assumed) degC const Real64 coolBalanceTemp = 15.0; // (assumed) degC if (bcs->outdoorTemp < heatBalanceTemp) { - Tin = heatSetpoint + DataGlobals::KelvinConv; + Tin = heatSetpoint + DataGlobalConstants::KelvinConv(); } else if (bcs->outdoorTemp > coolBalanceTemp) { - Tin = coolSetpoint + DataGlobals::KelvinConv; + Tin = coolSetpoint + DataGlobalConstants::KelvinConv(); } else { Real64 weight = (coolBalanceTemp - bcs->outdoorTemp) / (coolBalanceTemp - heatBalanceTemp); - Tin = heatSetpoint * weight + coolSetpoint * (1.0 - weight) + DataGlobals::KelvinConv; + Tin = heatSetpoint * weight + coolSetpoint * (1.0 - weight) + DataGlobalConstants::KelvinConv(); } break; } default: { // error? - Tin = assumedFloatingTemp + DataGlobals::KelvinConv; + Tin = assumedFloatingTemp + DataGlobalConstants::KelvinConv(); break; } } @@ -361,7 +361,7 @@ namespace HeatBalanceKivaManager { std::shared_ptr bcs = instance.bcs; - bcs->outdoorTemp = DataEnvironment::OutDryBulbTemp + DataGlobals::KelvinConv; + bcs->outdoorTemp = DataEnvironment::OutDryBulbTemp + DataGlobalConstants::KelvinConv(); bcs->localWindSpeed = DataEnvironment::WindSpeedAt(instance.ground->foundation.grade.roughness); bcs->windDirection = DataEnvironment::WindDir * DataGlobalConstants::DegToRadians(); bcs->solarAzimuth = std::atan2(DataEnvironment::SOLCOS(1), DataEnvironment::SOLCOS(2)); @@ -376,8 +376,8 @@ namespace HeatBalanceKivaManager { DataHeatBalFanSys::QCoolingPanelSurf(floorSurface) + DataHeatBalFanSys::QSteamBaseboardSurf(floorSurface) + DataHeatBalFanSys::QElecBaseboardSurf(floorSurface); // HVAC - bcs->slabConvectiveTemp = DataHeatBalance::TempEffBulkAir(floorSurface) + DataGlobals::KelvinConv; - bcs->slabRadiantTemp = ThermalComfort::CalcSurfaceWeightedMRT(state, zoneNum, floorSurface) + DataGlobals::KelvinConv; + bcs->slabConvectiveTemp = DataHeatBalance::TempEffBulkAir(floorSurface) + DataGlobalConstants::KelvinConv(); + bcs->slabRadiantTemp = ThermalComfort::CalcSurfaceWeightedMRT(state, zoneNum, floorSurface) + DataGlobalConstants::KelvinConv(); bcs->gradeForcedTerm = kmPtr->surfaceConvMap[floorSurface].f; bcs->gradeConvectionAlgorithm = kmPtr->surfaceConvMap[floorSurface].out; bcs->slabConvectionAlgorithm = kmPtr->surfaceConvMap[floorSurface].in; @@ -408,8 +408,8 @@ namespace HeatBalanceKivaManager { if (Atotal > 0.0) { bcs->wallAbsRadiation = QAtotal / Atotal; - bcs->wallRadiantTemp = TARadTotal / Atotal + DataGlobals::KelvinConv; - bcs->wallConvectiveTemp = TAConvTotal / Atotal + DataGlobals::KelvinConv; + bcs->wallRadiantTemp = TARadTotal / Atotal + DataGlobalConstants::KelvinConv(); + bcs->wallConvectiveTemp = TAConvTotal / Atotal + DataGlobalConstants::KelvinConv(); bcs->extWallForcedTerm = kmPtr->surfaceConvMap[wallSurfaces[0]].f; bcs->extWallConvectionAlgorithm = kmPtr->surfaceConvMap[wallSurfaces[0]].out; bcs->intWallConvectionAlgorithm = kmPtr->surfaceConvMap[wallSurfaces[0]].in; @@ -619,9 +619,9 @@ namespace HeatBalanceKivaManager { kivaWeather.windSpeed.push_back(WindSpeed); Real64 OSky = OpaqueSkyCover; - Real64 TDewK = min(DryBulb, DewPoint) + DataGlobals::KelvinConv; + Real64 TDewK = min(DryBulb, DewPoint) + DataGlobalConstants::KelvinConv(); Real64 ESky = - (0.787 + 0.764 * std::log(TDewK / DataGlobals::KelvinConv)) * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky)); + (0.787 + 0.764 * std::log(TDewK / DataGlobalConstants::KelvinConv())) * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky)); kivaWeather.skyEmissivity.push_back(ESky); diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index 76a9e013e78..0e97428c7d3 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -5148,7 +5148,7 @@ namespace HeatBalanceSurfaceManager { for (int ZoneNum = 1; ZoneNum <= NumOfZones; ++ZoneNum) { Real64 ZoneW = ZoneAirHumRatAvg(ZoneNum); Real64 ZoneT = ZTAV(ZoneNum); - Real64 TDewPointK = Psychrometrics::PsyTdpFnWPb(ZoneW, OutBaroPress) + KelvinConv; + Real64 TDewPointK = Psychrometrics::PsyTdpFnWPb(ZoneW, OutBaroPress) + DataGlobalConstants::KelvinConv(); Real64 e = 6.11 * std::exp(5417.7530 * ((1 / 273.16) - (1 / TDewPointK))); Real64 h = 5.0 / 9.0 * (e - 10.0); Real64 Humidex = ZoneT + h; @@ -6132,13 +6132,13 @@ namespace HeatBalanceSurfaceManager { if (Surface(SurfNum).HasSurroundingSurfProperties) { int SrdSurfsNum = Surface(SurfNum).SurroundingSurfacesNum; // Absolute temperature of the outside surface of an exterior surface - Real64 TSurf = TH(1, 1, SurfNum) + KelvinConv; + Real64 TSurf = TH(1, 1, SurfNum) + DataGlobalConstants::KelvinConv(); for (int SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { // View factor of a surrounding surface Real64 SrdSurfViewFac = SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; // Absolute temperature of a surrounding surface - Real64 SrdSurfTempAbs = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + KelvinConv; - QRadLWOutSrdSurfs(SurfNum) += StefanBoltzmann * AbsThermSurf * SrdSurfViewFac * (pow_4(SrdSurfTempAbs) - pow_4(TSurf)); + Real64 SrdSurfTempAbs = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + DataGlobalConstants::KelvinConv(); + QRadLWOutSrdSurfs(SurfNum) += DataGlobalConstants::StefanBoltzmann() * AbsThermSurf * SrdSurfViewFac * (pow_4(SrdSurfTempAbs) - pow_4(TSurf)); } } @@ -6492,7 +6492,7 @@ namespace HeatBalanceSurfaceManager { if (DataHeatBalance::AnyKiva) { for (auto &kivaSurf : SurfaceGeometry::kivaManager.surfaceMap) { - TempSurfIn(kivaSurf.first) = kivaSurf.second.results.Tavg - DataGlobals::KelvinConv; // TODO: Use average radiant temp? Trad? + TempSurfIn(kivaSurf.first) = kivaSurf.second.results.Tavg - DataGlobalConstants::KelvinConv(); // TODO: Use average radiant temp? Trad? } } @@ -6783,7 +6783,7 @@ namespace HeatBalanceSurfaceManager { } else if (surface.HeatTransferAlgorithm == HeatTransferModel_Kiva) { // Read Kiva results for each surface - TempSurfInTmp(SurfNum) = SurfaceGeometry::kivaManager.surfaceMap[SurfNum].results.Tconv - DataGlobals::KelvinConv; + TempSurfInTmp(SurfNum) = SurfaceGeometry::kivaManager.surfaceMap[SurfNum].results.Tconv - DataGlobalConstants::KelvinConv(); OpaqSurfInsFaceConductionFlux(SurfNum) = SurfaceGeometry::kivaManager.surfaceMap[SurfNum].results.qtot; OpaqSurfInsFaceConduction(SurfNum) = OpaqSurfInsFaceConductionFlux(SurfNum) * DataSurfaces::Surface(SurfNum).Area; @@ -6851,7 +6851,7 @@ namespace HeatBalanceSurfaceManager { // conduction from the outside surface | Coefficient for conduction (current // time) | Convection and damping term - Real64 const Sigma_Temp_4(DataGlobals::StefanBoltzmann * pow_4(TempSurfIn(SurfNum))); + Real64 const Sigma_Temp_4(DataGlobalConstants::StefanBoltzmann() * pow_4(TempSurfIn(SurfNum))); // Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager SurfWinHeatGain(SurfNum) = @@ -7557,7 +7557,7 @@ namespace HeatBalanceSurfaceManager { // conduction from the outside surface | Coefficient for conduction (current // time) | Convection and damping term - Real64 const Sigma_Temp_4(DataGlobals::StefanBoltzmann * pow_4(TempSurfIn(surfNum))); + Real64 const Sigma_Temp_4(DataGlobalConstants::StefanBoltzmann() * pow_4(TempSurfIn(surfNum))); // Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager SurfWinHeatGain(surfNum) = @@ -8249,9 +8249,9 @@ namespace HeatBalanceSurfaceManager { SrdSurfsNum = Surface(SurfNum).SurroundingSurfacesNum; for (SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { SrdSurfViewFac = SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; - SrdSurfTempAbs = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + KelvinConv; - QRadLWOutSrdSurfsRep += StefanBoltzmann * dataMaterial.Material(state.dataConstruction->Construct(ConstrNum).LayerPoint(1)).AbsorpThermal * - SrdSurfViewFac * (pow_4(SrdSurfTempAbs) - pow_4(TH11 + KelvinConv)); + SrdSurfTempAbs = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + DataGlobalConstants::KelvinConv(); + QRadLWOutSrdSurfsRep += DataGlobalConstants::StefanBoltzmann() * dataMaterial.Material(state.dataConstruction->Construct(ConstrNum).LayerPoint(1)).AbsorpThermal * + SrdSurfViewFac * (pow_4(SrdSurfTempAbs) - pow_4(TH11 + DataGlobalConstants::KelvinConv())); } } QdotRadOutRep(SurfNum) = Surface(SurfNum).Area * HExtSurf_fac + Surface(SurfNum).Area * QRadLWOutSrdSurfsRep; diff --git a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc index 877df05cbc4..0fedd2a0a27 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc @@ -533,7 +533,7 @@ namespace HeatPumpWaterToWaterCOOLING { this->beginEnvironFlag = false; Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); this->LoadSideDesignMassFlow = this->LoadSideVolFlowRate * rho; @@ -549,7 +549,7 @@ namespace HeatPumpWaterToWaterCOOLING { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SourceLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); this->SourceSideDesignMassFlow = this->SourceSideVolFlowRate * rho; diff --git a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc index 3d75ce0d10d..6a8e0470ba7 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc @@ -94,7 +94,6 @@ namespace HeatPumpWaterToWaterHEATING { using DataGlobals::BeginSimFlag; using DataGlobals::DayOfSim; using DataGlobals::HourOfDay; - using DataGlobals::KelvinConv; using DataGlobals::TimeStep; using DataGlobals::TimeStepZone; using DataGlobals::WarmupFlag; @@ -504,7 +503,7 @@ namespace HeatPumpWaterToWaterHEATING { this->beginEnvironFlag = false; Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); this->LoadSideDesignMassFlow = this->LoadSideVolFlowRate * rho; @@ -520,7 +519,7 @@ namespace HeatPumpWaterToWaterHEATING { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SourceLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); this->SourceSideDesignMassFlow = this->SourceSideVolFlowRate * rho; diff --git a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc index 1a13d7f037b..91f368f3185 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc @@ -108,7 +108,6 @@ namespace HeatPumpWaterToWaterSimple { using DataGlobals::BeginSimFlag; using DataGlobals::DayOfSim; using DataGlobals::HourOfDay; - using DataGlobals::KelvinConv; using DataGlobals::TimeStep; using DataGlobals::TimeStepZone; using DataGlobals::WarmupFlag; @@ -773,17 +772,17 @@ namespace HeatPumpWaterToWaterSimple { if (this->WWHPPlantTypeOfNum == TypeOf_HPWaterEFHeating) { rho = GetDensityGlycol( - state, PlantLoop(this->LoadLoopNum).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); + state, PlantLoop(this->LoadLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); this->LoadSideDesignMassFlow = this->RatedLoadVolFlowHeat * rho; rho = GetDensityGlycol( - state, PlantLoop(this->SourceLoopNum).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); + state, PlantLoop(this->SourceLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); this->SourceSideDesignMassFlow = this->RatedSourceVolFlowHeat * rho; } else if (this->WWHPPlantTypeOfNum == TypeOf_HPWaterEFCooling) { rho = GetDensityGlycol( - state, PlantLoop(this->LoadLoopNum).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); + state, PlantLoop(this->LoadLoopNum).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); this->LoadSideDesignMassFlow = this->RatedLoadVolFlowCool * rho; rho = GetDensityGlycol( - state, PlantLoop(this->SourceLoopNum).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); + state, PlantLoop(this->SourceLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); this->SourceSideDesignMassFlow = this->RatedSourceVolFlowCool * rho; } @@ -976,12 +975,12 @@ namespace HeatPumpWaterToWaterSimple { } Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); tmpCoolingCap = Cp * rho * DataSizing::PlantSizData(pltLoadSizNum).DeltaT * tmpLoadSideVolFlowRate; @@ -989,12 +988,12 @@ namespace HeatPumpWaterToWaterSimple { tmpLoadSideVolFlowRate = this->RatedLoadVolFlowHeat; Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); tmpCoolingCap = Cp * rho * DataSizing::PlantSizData(pltLoadSizNum).DeltaT * tmpLoadSideVolFlowRate; @@ -1151,12 +1150,12 @@ namespace HeatPumpWaterToWaterSimple { if (pltSourceSizNum > 0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SourceLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->SourceLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); tmpSourceSideVolFlowRate = tmpCoolingCap * (1.0 + (1.0 / this->refCOP)) / (DataSizing::PlantSizData(pltSourceSizNum).DeltaT * Cp * rho); @@ -1314,12 +1313,12 @@ namespace HeatPumpWaterToWaterSimple { } Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); tmpHeatingCap = Cp * rho * DataSizing::PlantSizData(pltLoadSizNum).DeltaT * tmpLoadSideVolFlowRate; @@ -1327,12 +1326,12 @@ namespace HeatPumpWaterToWaterSimple { tmpLoadSideVolFlowRate = this->RatedLoadVolFlowCool; Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->LoadLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->LoadLoopNum).FluidIndex, RoutineName); tmpHeatingCap = Cp * rho * DataSizing::PlantSizData(pltLoadSizNum).DeltaT * tmpLoadSideVolFlowRate; @@ -1488,12 +1487,12 @@ namespace HeatPumpWaterToWaterSimple { if (pltSourceSizNum > 0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SourceLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->SourceLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->SourceLoopNum).FluidIndex, RoutineName); tmpSourceSideVolFlowRate = tmpHeatingCap * (1.0 - (1.0 / this->refCOP)) / (DataSizing::PlantSizData(pltSourceSizNum).DeltaT * Cp * rho); @@ -1636,7 +1635,7 @@ namespace HeatPumpWaterToWaterSimple { using FluidProperties::GetSpecificHeatGlycol; // SUBROUTINE PARAMETER DEFINITIONS: - Real64 const CelsiustoKelvin(KelvinConv); // Conversion from Celsius to Kelvin + Real64 const CelsiustoKelvin(DataGlobalConstants::KelvinConv()); // Conversion from Celsius to Kelvin Real64 const Tref(283.15); // Reference Temperature for performance curves,10C [K] static std::string const RoutineName("CalcWatertoWaterHPCooling"); @@ -1818,7 +1817,7 @@ namespace HeatPumpWaterToWaterSimple { using FluidProperties::GetSpecificHeatGlycol; // SUBROUTINE PARAMETER DEFINITIONS: - Real64 const CelsiustoKelvin(KelvinConv); // Conversion from Celsius to Kelvin + Real64 const CelsiustoKelvin(DataGlobalConstants::KelvinConv()); // Conversion from Celsius to Kelvin Real64 const Tref(283.15); // Reference Temperature for performance curves,10C [K] static std::string const RoutineName("CalcWatertoWaterHPHeating"); diff --git a/src/EnergyPlus/Humidifiers.cc b/src/EnergyPlus/Humidifiers.cc index 8c90c8725e9..120c315a993 100644 --- a/src/EnergyPlus/Humidifiers.cc +++ b/src/EnergyPlus/Humidifiers.cc @@ -864,7 +864,7 @@ namespace Humidifiers { } if (!HardSizeNoDesRun) { - NomCapVolDes = MassFlowDes * (OutletHumRatDes - InletHumRatDes) / RhoH2O(DataGlobals::InitConvTemp); + NomCapVolDes = MassFlowDes * (OutletHumRatDes - InletHumRatDes) / RhoH2O(DataGlobalConstants::InitConvTemp()); if (NomCapVolDes < 0.0) NomCapVolDes = 0.0; // No humidity demand if (IsAutoSize) { @@ -894,7 +894,7 @@ namespace Humidifiers { } } - NomCap = RhoH2O(DataGlobals::InitConvTemp) * NomCapVol; + NomCap = RhoH2O(DataGlobalConstants::InitConvTemp()) * NomCapVol; RefrigerantIndex = FindRefrigerant(state, fluidNameSteam); WaterIndex = FindGlycol(state, fluidNameWater); SteamSatEnthalpy = GetSatEnthalpyRefrig(state, fluidNameSteam, TSteam, 1.0, RefrigerantIndex, CalledFrom); @@ -1086,7 +1086,7 @@ namespace Humidifiers { HumRatSatOut = 0.0; HumRatSatApp = 0.0; WaterInEnthalpy = 2676125.0; // At 100 C - WaterDens = RhoH2O(DataGlobals::InitConvTemp); + WaterDens = RhoH2O(DataGlobalConstants::InitConvTemp()); WaterAddNeededMax = min(WaterAddNeeded, NomCap); if (WaterAddNeededMax > 0.0) { // ma*W1 + mw = ma*W2 @@ -1201,7 +1201,7 @@ namespace Humidifiers { HumRatSatOut = 0.0; HumRatSatApp = 0.0; WaterInEnthalpy = 2676125.0; // At 100 C - WaterDens = RhoH2O(DataGlobals::InitConvTemp); + WaterDens = RhoH2O(DataGlobalConstants::InitConvTemp()); WaterAddNeededMax = min(WaterAddNeeded, NomCap); if (WaterAddNeededMax > 0.0) { // ma*W1 + mw = ma*W2 diff --git a/src/EnergyPlus/ICEngineElectricGenerator.cc b/src/EnergyPlus/ICEngineElectricGenerator.cc index e55b1b91793..9ba5f252a00 100644 --- a/src/EnergyPlus/ICEngineElectricGenerator.cc +++ b/src/EnergyPlus/ICEngineElectricGenerator.cc @@ -764,7 +764,7 @@ namespace ICEngineElectricGenerator { // size mass flow rate Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index c214f5413e3..f3213361c1d 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -603,7 +603,7 @@ namespace InternalHeatGains { if (NumNumber >= 5 && !lNumericFieldBlanks(5)) { People(Loop).UserSpecSensFrac = IHGNumbers(5); } else { - People(Loop).UserSpecSensFrac = AutoCalculate; + People(Loop).UserSpecSensFrac = DataGlobalConstants::AutoCalculate(); } if (NumNumber == 6 && !lNumericFieldBlanks(6)) { @@ -4767,7 +4767,7 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", People(Loop).FractionRadiant); print(state.files.eio, "{:.3R},", People(Loop).FractionConvected); - if (People(Loop).UserSpecSensFrac == AutoCalculate) { + if (People(Loop).UserSpecSensFrac == DataGlobalConstants::AutoCalculate()) { print(state.files.eio, "AutoCalculate,"); } else { print(state.files.eio, "{:.3R},", People(Loop).UserSpecSensFrac); @@ -5291,7 +5291,7 @@ namespace InternalHeatGains { ActivityLevel_WperPerson = GetCurrentScheduleValue(People(Loop).ActivityLevelPtr); TotalPeopleGain = NumberOccupants * ActivityLevel_WperPerson; // if the user did not specify a sensible fraction, calculate the sensible heat gain - if (People(Loop).UserSpecSensFrac == AutoCalculate) { + if (People(Loop).UserSpecSensFrac == DataGlobalConstants::AutoCalculate()) { if (!(IsZoneDV(NZ) || IsZoneUI(NZ))) { SensiblePeopleGain = NumberOccupants * (C(1) + ActivityLevel_WperPerson * (C(2) + ActivityLevel_WperPerson * C(3)) + diff --git a/src/EnergyPlus/LowTempRadiantSystem.cc b/src/EnergyPlus/LowTempRadiantSystem.cc index a627f2a4faa..af55f9cd33c 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.cc +++ b/src/EnergyPlus/LowTempRadiantSystem.cc @@ -1961,7 +1961,7 @@ namespace LowTempRadiantSystem { if (HydrRadSys(RadSysNum).HotWaterInNode > 0) { rho = GetDensityGlycol(state, PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); HydrRadSys(RadSysNum).WaterFlowMaxHeat = rho * HydrRadSys(RadSysNum).WaterVolFlowMaxHeat; @@ -1977,7 +1977,7 @@ namespace LowTempRadiantSystem { if (HydrRadSys(RadSysNum).ColdWaterInNode > 0) { rho = GetDensityGlycol(state, PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); HydrRadSys(RadSysNum).WaterFlowMaxCool = rho * HydrRadSys(RadSysNum).WaterVolFlowMaxCool; @@ -2002,7 +2002,7 @@ namespace LowTempRadiantSystem { if (CFloRadSys(RadSysNum).HotWaterInNode > 0) { rho = GetDensityGlycol(state, PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); CFloRadSys(RadSysNum).HotDesignWaterMassFlowRate = rho * CFloRadSys(RadSysNum).WaterVolFlowMax; @@ -2018,7 +2018,7 @@ namespace LowTempRadiantSystem { if (CFloRadSys(RadSysNum).ColdWaterInNode > 0) { rho = GetDensityGlycol(state, PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); CFloRadSys(RadSysNum).ColdDesignWaterMassFlowRate = rho * CFloRadSys(RadSysNum).WaterVolFlowMax; @@ -2680,12 +2680,12 @@ namespace LowTempRadiantSystem { if (DesCoilLoad >= SmallLoad) { rho = GetDensityGlycol(state, PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(HydrRadSys(RadSysNum).HWLoopNum).FluidIndex, RoutineName); WaterVolFlowMaxHeatDes = DesCoilLoad / (PlantSizData(PltSizHeatNum).DeltaT * Cp * rho); @@ -2840,12 +2840,12 @@ namespace LowTempRadiantSystem { if (DesCoilLoad >= SmallLoad) { rho = GetDensityGlycol(state, PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(HydrRadSys(RadSysNum).CWLoopNum).FluidIndex, RoutineName); WaterVolFlowMaxCoolDes = DesCoilLoad / (PlantSizData(PltSizCoolNum).DeltaT * Cp * rho); @@ -2990,12 +2990,12 @@ namespace LowTempRadiantSystem { if (FinalZoneSizing(CurZoneEqNum).NonAirSysDesHeatLoad >= SmallLoad) { rho = GetDensityGlycol(state, PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); Cp = GetSpecificHeatGlycol(state, PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(CFloRadSys(RadSysNum).HWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); WaterVolFlowMaxHeatDes = @@ -3023,12 +3023,12 @@ namespace LowTempRadiantSystem { if (FinalZoneSizing(CurZoneEqNum).NonAirSysDesCoolLoad >= SmallLoad) { rho = GetDensityGlycol(state, PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); Cp = GetSpecificHeatGlycol(state, PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(CFloRadSys(RadSysNum).CWLoopNum).FluidIndex, "SizeLowTempRadiantSystem"); WaterVolFlowMaxCoolDes = diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.cc b/src/EnergyPlus/MicroturbineElectricGenerator.cc index b25ccc20174..5efcc587f51 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.cc +++ b/src/EnergyPlus/MicroturbineElectricGenerator.cc @@ -941,7 +941,7 @@ namespace MicroturbineElectricGenerator { // size mass flow rate Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.cc b/src/EnergyPlus/MoistureBalanceEMPDManager.cc index dc2ba8b084b..0fc4ce6333a 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.cc +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.cc @@ -264,12 +264,12 @@ namespace MoistureBalanceEMPDManager { material.MoistBCoeff = MaterialProps(3); material.MoistCCoeff = MaterialProps(4); material.MoistDCoeff = MaterialProps(5); - if (lNumericFieldBlanks(6) || MaterialProps(6) == AutoCalculate) { + if (lNumericFieldBlanks(6) || MaterialProps(6) == DataGlobalConstants::AutoCalculate()) { material.EMPDSurfaceDepth = CalcDepthFromPeriod(24 * 3600, material); // 1 day } else { material.EMPDSurfaceDepth = MaterialProps(6); } - if (lNumericFieldBlanks(7) || MaterialProps(7) == AutoCalculate) { + if (lNumericFieldBlanks(7) || MaterialProps(7) == DataGlobalConstants::AutoCalculate()) { material.EMPDDeepDepth = CalcDepthFromPeriod(21 * 24 * 3600, material); // 3 weeks } else { material.EMPDDeepDepth = MaterialProps(7); @@ -558,25 +558,25 @@ namespace MoistureBalanceEMPDManager { Taver = TempSurfIn; // Calculate average vapor density [kg/m^3], and RH for use in material property calculations. RVaver = rv_surface_old; - RHaver = RVaver * 461.52 * (Taver + KelvinConv) * std::exp(-23.7093 + 4111.0 / (Taver + 237.7)); + RHaver = RVaver * 461.52 * (Taver + DataGlobalConstants::KelvinConv()) * std::exp(-23.7093 + 4111.0 / (Taver + 237.7)); // Calculate the saturated vapor pressure, surface vapor pressure and dewpoint. Used to check for condensation in HeatBalanceSurfaceManager PVsat = PsyPsatFnTemp(Taver, RoutineName); PVsurf = RHaver * std::exp(23.7093 - 4111.0 / (Taver + 237.7)); - TempSat = 4111.0 / (23.7093 - std::log(PVsurf)) + 35.45 - KelvinConv; + TempSat = 4111.0 / (23.7093 - std::log(PVsurf)) + 35.45 - DataGlobalConstants::KelvinConv(); // Convert vapor resistance factor (user input) to diffusivity. Evaluate at local surface temperature. // 2e-7*T^0.81/P = vapor diffusivity in air. [kg/m-s-Pa] // 461.52 = universal gas constant for water [J/kg-K] // EMPDdiffusivity = [m^2/s] - EMPDdiffusivity = (2.0e-7 * pow(Taver + KelvinConv, 0.81) / OutBaroPress) / material.EMPDmu * 461.52 * (Taver + KelvinConv); + EMPDdiffusivity = (2.0e-7 * pow(Taver + DataGlobalConstants::KelvinConv(), 0.81) / OutBaroPress) / material.EMPDmu * 461.52 * (Taver + DataGlobalConstants::KelvinConv()); // Calculate slope of moisture sorption curve at current RH. [kg/kg-RH] dU_dRH = material.MoistACoeff * material.MoistBCoeff * pow(RHaver, material.MoistBCoeff - 1) + material.MoistCCoeff * material.MoistDCoeff * pow(RHaver, material.MoistDCoeff - 1); // Convert vapor density and temperature of zone air to RH - RHZone = rho_vapor_air_in * 461.52 * (TempZone + KelvinConv) * std::exp(-23.7093 + 4111.0 / ((TempZone + KelvinConv) - 35.45)); + RHZone = rho_vapor_air_in * 461.52 * (TempZone + DataGlobalConstants::KelvinConv()) * std::exp(-23.7093 + 4111.0 / ((TempZone + DataGlobalConstants::KelvinConv()) - 35.45)); // Convert stored vapor density from previous timestep to RH. RH_deep_layer_old = PsyRhFnTdbRhov(Taver, rv_deep_old); @@ -588,7 +588,7 @@ namespace MoistureBalanceEMPDManager { Rcoating = 0; } else { Rcoating = material.EMPDCoatingThickness * material.EMPDmuCoating * OutBaroPress / - (2.0e-7 * pow(Taver + KelvinConv, 0.81) * 461.52 * (Taver + KelvinConv)); + (2.0e-7 * pow(Taver + DataGlobalConstants::KelvinConv(), 0.81) * 461.52 * (Taver + DataGlobalConstants::KelvinConv())); } // Calculate mass-transfer coefficient between zone air and center of surface layer. [m/s] diff --git a/src/EnergyPlus/NodeInputManager.cc b/src/EnergyPlus/NodeInputManager.cc index 94e64516376..f761b84109b 100644 --- a/src/EnergyPlus/NodeInputManager.cc +++ b/src/EnergyPlus/NodeInputManager.cc @@ -1166,7 +1166,7 @@ namespace NodeInputManager { if (CalcMoreNodeInfoMyOneTimeFlag) { RhoAirStdInit = StdRhoAir; - RhoWaterStdInit = RhoH2O(DataGlobals::InitConvTemp); + RhoWaterStdInit = RhoH2O(DataGlobalConstants::InitConvTemp()); NodeWetBulbRepReq.allocate(NumOfNodes); NodeWetBulbSchedPtr.allocate(NumOfNodes); NodeRelHumidityRepReq.allocate(NumOfNodes); @@ -1299,7 +1299,7 @@ namespace NodeInputManager { } else { Cp = GetSpecificHeatGlycol(state, nodeFluidNames[iNode - 1], Node(iNode).Temp, Node(iNode).FluidIndex, nodeReportingStrings[iNode - 1]); rhoStd = GetDensityGlycol( - state, nodeFluidNames[iNode - 1], DataGlobals::InitConvTemp, Node(iNode).FluidIndex, nodeReportingStrings[iNode - 1]); + state, nodeFluidNames[iNode - 1], DataGlobalConstants::InitConvTemp(), Node(iNode).FluidIndex, nodeReportingStrings[iNode - 1]); rho = GetDensityGlycol(state, nodeFluidNames[iNode - 1], Node(iNode).Temp, Node(iNode).FluidIndex, nodeReportingStrings[iNode - 1]); } diff --git a/src/EnergyPlus/OutdoorAirUnit.cc b/src/EnergyPlus/OutdoorAirUnit.cc index 96b6c3a2924..8e03ae8356c 100644 --- a/src/EnergyPlus/OutdoorAirUnit.cc +++ b/src/EnergyPlus/OutdoorAirUnit.cc @@ -1295,7 +1295,7 @@ CurrentModuleObjects(CO_OAEqList), ComponentListName); OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxVolWaterFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, OutAirUnit(OAUnitNum).OAEquip(compLoop).ComponentType, OutAirUnit(OAUnitNum).OAEquip(compLoop).ComponentName, errFlag); rho = GetDensityGlycol(state, PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidIndex, RoutineName); OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxWaterMassFlow = rho * OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxVolWaterFlow; @@ -1314,7 +1314,7 @@ CurrentModuleObjects(CO_OAEqList), ComponentListName); OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxVolWaterFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, OutAirUnit(OAUnitNum).OAEquip(compLoop).ComponentType, OutAirUnit(OAUnitNum).OAEquip(compLoop).ComponentName, errFlag); rho = GetDensityGlycol(state, PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidIndex, RoutineName); OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxWaterMassFlow = rho * OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxVolWaterFlow; @@ -1332,7 +1332,7 @@ CurrentModuleObjects(CO_OAEqList), ComponentListName); OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxVolWaterFlow = GetCoilMaxSteamFlowRate(state, OutAirUnit(OAUnitNum).OAEquip(compLoop).ComponentIndex, errFlag); Real64 rho = GetSatDensityRefrig(state, PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidName, - DataGlobals::SteamInitConvTemp, + DataGlobalConstants::SteamInitConvTemp(), 1.0, PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidIndex, RoutineName); @@ -1351,7 +1351,7 @@ CurrentModuleObjects(CO_OAEqList), ComponentListName); OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxVolWaterFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, OutAirUnit(OAUnitNum).OAEquip(compLoop).ComponentType, OutAirUnit(OAUnitNum).OAEquip(compLoop).ComponentName, errFlag); rho = GetDensityGlycol(state, PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(OutAirUnit(OAUnitNum).OAEquip(compLoop).LoopNum).FluidIndex, RoutineName); OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxWaterMassFlow = rho * OutAirUnit(OAUnitNum).OAEquip(compLoop).MaxVolWaterFlow; diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index d1d1059b42f..229ba6bf5f3 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -3682,47 +3682,28 @@ namespace OutputProcessor { // for SM (Simulation period) meters, the value of the last calculation is stored // in the data structure. - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - // Using/Aliasing using namespace OutputReportPredefined; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - Real64 const convertJtoGJ(1.0 / 1000000000.0); - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int Loop; // Loop Control for (Loop = 1; Loop <= NumEnergyMeters; ++Loop) { int const RT_forIPUnits(EnergyMeters(Loop).RT_forIPUnits); if (RT_forIPUnits == RT_IPUnits_Electricity) { - PreDefTableEntry(pdchEMelecannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * convertJtoGJ); + PreDefTableEntry(pdchEMelecannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * DataGlobalConstants::convertJtoGJ()); PreDefTableEntry(pdchEMelecminvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMinVal / TimeStepZoneSec); PreDefTableEntry(pdchEMelecminvaluetime, EnergyMeters(Loop).Name, DateToStringWithMonth(EnergyMeters(Loop).FinYrSMMinValDate)); PreDefTableEntry(pdchEMelecmaxvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMaxVal / TimeStepZoneSec); PreDefTableEntry(pdchEMelecmaxvaluetime, EnergyMeters(Loop).Name, DateToStringWithMonth(EnergyMeters(Loop).FinYrSMMaxValDate)); } else if (RT_forIPUnits == RT_IPUnits_Gas) { - PreDefTableEntry(pdchEMgasannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * convertJtoGJ); + PreDefTableEntry(pdchEMgasannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * DataGlobalConstants::convertJtoGJ()); PreDefTableEntry(pdchEMgasminvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMinVal / TimeStepZoneSec); PreDefTableEntry(pdchEMgasminvaluetime, EnergyMeters(Loop).Name, DateToStringWithMonth(EnergyMeters(Loop).FinYrSMMinValDate)); PreDefTableEntry(pdchEMgasmaxvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMaxVal / TimeStepZoneSec); PreDefTableEntry(pdchEMgasmaxvaluetime, EnergyMeters(Loop).Name, DateToStringWithMonth(EnergyMeters(Loop).FinYrSMMaxValDate)); } else if (RT_forIPUnits == RT_IPUnits_Cooling) { - PreDefTableEntry(pdchEMcoolannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * convertJtoGJ); + PreDefTableEntry(pdchEMcoolannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * DataGlobalConstants::convertJtoGJ()); PreDefTableEntry(pdchEMcoolminvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMinVal / TimeStepZoneSec); PreDefTableEntry(pdchEMcoolminvaluetime, EnergyMeters(Loop).Name, DateToStringWithMonth(EnergyMeters(Loop).FinYrSMMinValDate)); PreDefTableEntry(pdchEMcoolmaxvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMaxVal / TimeStepZoneSec); @@ -3752,7 +3733,7 @@ namespace OutputProcessor { PreDefTableEntry(pdchEMotherLmaxvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMaxVal / TimeStepZoneSec, 3); PreDefTableEntry(pdchEMotherLmaxvaluetime, EnergyMeters(Loop).Name, DateToStringWithMonth(EnergyMeters(Loop).FinYrSMMaxValDate)); } else { - PreDefTableEntry(pdchEMotherJannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * convertJtoGJ); + PreDefTableEntry(pdchEMotherJannual, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMValue * DataGlobalConstants::convertJtoGJ()); PreDefTableEntry(pdchEMotherJminvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMinVal / TimeStepZoneSec); PreDefTableEntry(pdchEMotherJminvaluetime, EnergyMeters(Loop).Name, DateToStringWithMonth(EnergyMeters(Loop).FinYrSMMinValDate)); PreDefTableEntry(pdchEMotherJmaxvalue, EnergyMeters(Loop).Name, EnergyMeters(Loop).FinYrSMMaxVal / TimeStepZoneSec); diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index c398e74ec83..f11d4b0f9e4 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -4826,7 +4826,6 @@ namespace OutputReportTabular { // the output variables and data structures shown. // Using/Aliasing - using DataGlobals::convertJtoGJ; using DataHeatBalance::BuildingPreDefRep; using DataHeatBalance::ZoneTotalExfiltrationHeatLoss; @@ -4842,15 +4841,15 @@ namespace OutputReportTabular { // Only gather zone report at zone time steps if (t_timeStepType == OutputProcessor::TimeStepType::TimeStepZone) { - BuildingPreDefRep.emiEnvelopConv += SumSurfaceHeatEmission * convertJtoGJ; + BuildingPreDefRep.emiEnvelopConv += SumSurfaceHeatEmission * DataGlobalConstants::convertJtoGJ(); return; } CalcHeatEmissionReport(state); - BuildingPreDefRep.emiZoneExfiltration += ZoneTotalExfiltrationHeatLoss * convertJtoGJ; - BuildingPreDefRep.emiZoneExhaust += ZoneTotalExhaustHeatLoss * convertJtoGJ; - BuildingPreDefRep.emiHVACRelief += SysTotalHVACReliefHeatLoss * convertJtoGJ; - BuildingPreDefRep.emiHVACReject += SysTotalHVACRejectHeatLoss * convertJtoGJ; + BuildingPreDefRep.emiZoneExfiltration += ZoneTotalExfiltrationHeatLoss * DataGlobalConstants::convertJtoGJ(); + BuildingPreDefRep.emiZoneExhaust += ZoneTotalExhaustHeatLoss * DataGlobalConstants::convertJtoGJ(); + BuildingPreDefRep.emiHVACRelief += SysTotalHVACReliefHeatLoss * DataGlobalConstants::convertJtoGJ(); + BuildingPreDefRep.emiHVACReject += SysTotalHVACRejectHeatLoss * DataGlobalConstants::convertJtoGJ(); BuildingPreDefRep.emiTotHeat = BuildingPreDefRep.emiEnvelopConv + BuildingPreDefRep.emiZoneExfiltration + BuildingPreDefRep.emiZoneExhaust + BuildingPreDefRep.emiHVACRelief + BuildingPreDefRep.emiHVACReject; @@ -4866,7 +4865,6 @@ namespace OutputReportTabular { // Using/Aliasing using DataEnvironment::WeatherFileLocationTitle; - using DataGlobals::convertJtoGJ; using DataHeatBalance::BuildingPreDefRep; using DataHeatBalance::NumRefrigCondensers; using DataHeatBalance::NumRefrigeratedRacks; @@ -6441,7 +6439,6 @@ namespace OutputReportTabular { int StartOfWeek; static Real64 HrsPerWeek(0.0); Real64 consumptionTotal; - Real64 convertJtoGJ; // sensible heat gain report totals static Real64 totalZoneEqHt(0.0); static Real64 totalZoneEqCl(0.0); @@ -6462,7 +6459,6 @@ namespace OutputReportTabular { static Real64 totalInfilRem(0.0); static Real64 totalOtherRem(0.0); - convertJtoGJ = 1.0 / 1000000000.0; StartOfWeek = RunPeriodStartDayOfWeek; if (StartOfWeek == 0) StartOfWeek = 2; // if the first day of the week has not been set yet, assume monday @@ -6626,24 +6622,24 @@ namespace OutputReportTabular { // annual // PreDefTableEntry( pdchSHGSAnHvacHt, Zone( iZone ).Name, ZonePreDefRep( iZone ).SHGSAnHvacHt * convertJtoGJ, 3 ); // PreDefTableEntry( pdchSHGSAnHvacCl, Zone( iZone ).Name, ZonePreDefRep( iZone ).SHGSAnHvacCl * convertJtoGJ, 3 ); - PreDefTableEntry(pdchSHGSAnZoneEqHt, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnZoneEqHt * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnZoneEqCl, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnZoneEqCl * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnHvacATUHt, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnHvacATUHt * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnHvacATUCl, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnHvacATUCl * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnSurfHt, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnSurfHt * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnSurfCl, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnSurfCl * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnPeoplAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnPeoplAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnLiteAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnLiteAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnEquipAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnEquipAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnWindAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnWindAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnIzaAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnIzaAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnInfilAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnInfilAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnOtherAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnOtherAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnEquipRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnEquipRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnWindRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnWindRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnIzaRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnIzaRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnInfilRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnInfilRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnOtherRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnOtherRem * convertJtoGJ, 3); + PreDefTableEntry(pdchSHGSAnZoneEqHt, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnZoneEqHt * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnZoneEqCl, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnZoneEqCl * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnHvacATUHt, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnHvacATUHt * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnHvacATUCl, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnHvacATUCl * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnSurfHt, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnSurfHt * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnSurfCl, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnSurfCl * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnPeoplAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnPeoplAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnLiteAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnLiteAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnEquipAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnEquipAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnWindAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnWindAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnIzaAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnIzaAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnInfilAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnInfilAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnOtherAdd, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnOtherAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnEquipRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnEquipRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnWindRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnWindRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnIzaRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnIzaRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnInfilRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnInfilRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnOtherRem, Zone(iZone).Name, ZonePreDefRep(iZone).SHGSAnOtherRem * DataGlobalConstants::convertJtoGJ(), 3); // peak cooling PreDefTableEntry(pdchSHGSClTimePeak, Zone(iZone).Name, DateToString(ZonePreDefRep(iZone).clPtTimeStamp)); // PreDefTableEntry( pdchSHGSClHvacHt, Zone( iZone ).Name, ZonePreDefRep( iZone ).SHGSClHvacHt ); @@ -6712,24 +6708,24 @@ namespace OutputReportTabular { } // PreDefTableEntry( pdchSHGSAnHvacHt, "Total Facility", totalHvacHt * convertJtoGJ, 3 ); // PreDefTableEntry( pdchSHGSAnHvacCl, "Total Facility", totalHvacCl * convertJtoGJ, 3 ); - PreDefTableEntry(pdchSHGSAnZoneEqHt, "Total Facility", totalZoneEqHt * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnZoneEqCl, "Total Facility", totalZoneEqCl * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnHvacATUHt, "Total Facility", totalHvacATUHt * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnHvacATUCl, "Total Facility", totalHvacATUCl * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnSurfHt, "Total Facility", totalSurfHt * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnSurfCl, "Total Facility", totalSurfCl * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnPeoplAdd, "Total Facility", totalPeoplAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnLiteAdd, "Total Facility", totalLiteAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnEquipAdd, "Total Facility", totalEquipAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnWindAdd, "Total Facility", totalWindAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnIzaAdd, "Total Facility", totalIzaAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnInfilAdd, "Total Facility", totalInfilAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnOtherAdd, "Total Facility", totalOtherAdd * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnEquipRem, "Total Facility", totalEquipRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnWindRem, "Total Facility", totalWindRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnIzaRem, "Total Facility", totalIzaRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnInfilRem, "Total Facility", totalInfilRem * convertJtoGJ, 3); - PreDefTableEntry(pdchSHGSAnOtherRem, "Total Facility", totalOtherRem * convertJtoGJ, 3); + PreDefTableEntry(pdchSHGSAnZoneEqHt, "Total Facility", totalZoneEqHt * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnZoneEqCl, "Total Facility", totalZoneEqCl * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnHvacATUHt, "Total Facility", totalHvacATUHt * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnHvacATUCl, "Total Facility", totalHvacATUCl * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnSurfHt, "Total Facility", totalSurfHt * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnSurfCl, "Total Facility", totalSurfCl * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnPeoplAdd, "Total Facility", totalPeoplAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnLiteAdd, "Total Facility", totalLiteAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnEquipAdd, "Total Facility", totalEquipAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnWindAdd, "Total Facility", totalWindAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnIzaAdd, "Total Facility", totalIzaAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnInfilAdd, "Total Facility", totalInfilAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnOtherAdd, "Total Facility", totalOtherAdd * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnEquipRem, "Total Facility", totalEquipRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnWindRem, "Total Facility", totalWindRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnIzaRem, "Total Facility", totalIzaRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnInfilRem, "Total Facility", totalInfilRem * DataGlobalConstants::convertJtoGJ(), 3); + PreDefTableEntry(pdchSHGSAnOtherRem, "Total Facility", totalOtherRem * DataGlobalConstants::convertJtoGJ(), 3); // building level results for peak cooling PreDefTableEntry(pdchSHGSClTimePeak, "Total Facility", DateToString(BuildingPreDefRep.clPtTimeStamp)); // PreDefTableEntry( pdchSHGSClHvacHt, "Total Facility", BuildingPreDefRep.SHGSClHvacHt ); diff --git a/src/EnergyPlus/OutsideEnergySources.cc b/src/EnergyPlus/OutsideEnergySources.cc index 0bd8f162850..de762305b7c 100644 --- a/src/EnergyPlus/OutsideEnergySources.cc +++ b/src/EnergyPlus/OutsideEnergySources.cc @@ -418,12 +418,12 @@ namespace OutsideEnergySources { if (PltSizNum > 0) { Real64 const rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, "SizeDistrict" + typeName); Real64 const Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->LoopNum).FluidIndex, "SizeDistrict" + typeName); Real64 const NomCapDes = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate; diff --git a/src/EnergyPlus/PackagedTerminalHeatPump.cc b/src/EnergyPlus/PackagedTerminalHeatPump.cc index 059adbd38f1..f7424331c73 100644 --- a/src/EnergyPlus/PackagedTerminalHeatPump.cc +++ b/src/EnergyPlus/PackagedTerminalHeatPump.cc @@ -3892,7 +3892,7 @@ namespace PackagedTerminalHeatPump { if (PTUnit(PTUnitNum).MaxHeatCoilFluidFlow > 0.0) { rho = GetDensityGlycol(state, PlantLoop(PTUnit(PTUnitNum).HeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(PTUnit(PTUnitNum).HeatCoilLoopNum).FluidIndex, RoutineName); @@ -3965,7 +3965,7 @@ namespace PackagedTerminalHeatPump { if (PTUnit(PTUnitNum).MaxSuppCoilFluidFlow > 0.0) { rho = GetDensityGlycol(state, PlantLoop(PTUnit(PTUnitNum).SuppCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(PTUnit(PTUnitNum).SuppCoilLoopNum).FluidIndex, RoutineName); PTUnit(PTUnitNum).MaxSuppCoilFluidFlow = @@ -4322,7 +4322,7 @@ namespace PackagedTerminalHeatPump { CoilMaxVolFlowRate = GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", PTUnit(PTUnitNum).ACHeatCoilName, ErrorsFound); if (CoilMaxVolFlowRate != AutoSize) { rho = GetDensityGlycol(state, PlantLoop(PTUnit(PTUnitNum).HeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(PTUnit(PTUnitNum).HeatCoilLoopNum).FluidIndex, RoutineNameSpace); PTUnit(PTUnitNum).MaxHeatCoilFluidFlow = CoilMaxVolFlowRate * rho; @@ -4360,7 +4360,7 @@ namespace PackagedTerminalHeatPump { CoilMaxVolFlowRate = GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", PTUnit(PTUnitNum).SuppHeatCoilName, ErrorsFound); if (CoilMaxVolFlowRate != AutoSize) { rho = GetDensityGlycol(state, PlantLoop(PTUnit(PTUnitNum).SuppCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(PTUnit(PTUnitNum).SuppCoilLoopNum).FluidIndex, RoutineNameSpace); PTUnit(PTUnitNum).MaxSuppCoilFluidFlow = CoilMaxVolFlowRate * rho; diff --git a/src/EnergyPlus/PackagedThermalStorageCoil.cc b/src/EnergyPlus/PackagedThermalStorageCoil.cc index 25593d88c7d..aa9d48f98a4 100644 --- a/src/EnergyPlus/PackagedThermalStorageCoil.cc +++ b/src/EnergyPlus/PackagedThermalStorageCoil.cc @@ -404,7 +404,7 @@ namespace PackagedThermalStorageCoil { } if ((TESCoil(item).StorageMedia == IceBased) && (!lNumericFieldBlanks(2))) { - if (rNumericArgs(2) == AutoCalculate) { + if (rNumericArgs(2) == DataGlobalConstants::AutoCalculate()) { TESCoil(item).IceStorageCapacity = rNumericArgs(2); } else { TESCoil(item).IceStorageCapacity = rNumericArgs(2) * 1.e+09; // input in giga joules, used as joules internally @@ -2164,7 +2164,7 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).RatedEvapAirMassFlowRate = StdRhoAir * TESCoil(TESCoilNum).RatedEvapAirVolFlowRate; - if (TESCoil(TESCoilNum).CondenserAirVolumeFlow == AutoCalculate) { + if (TESCoil(TESCoilNum).CondenserAirVolumeFlow == DataGlobalConstants::AutoCalculate()) { TESCoil(TESCoilNum).CondenserAirVolumeFlow = TESCoil(TESCoilNum).RatedEvapAirVolFlowRate * TESCoil(TESCoilNum).CondenserAirFlowSizingFactor; BaseSizer::reportSizerOutput("Coil:Cooling:DX:SingleSpeed:ThermalStorage", @@ -2270,7 +2270,7 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).CoolingOnlyRatedTotCap); } - if (TESCoil(TESCoilNum).CoolingAndChargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndChargeRatedTotCap == AutoCalculate)) { + if (TESCoil(TESCoilNum).CoolingAndChargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndChargeRatedTotCap == DataGlobalConstants::AutoCalculate())) { TESCoil(TESCoilNum).CoolingAndChargeRatedTotCap = TESCoil(TESCoilNum).CoolingOnlyRatedTotCap * TESCoil(TESCoilNum).CoolingAndChargeRatedTotCapSizingFactor; BaseSizer::reportSizerOutput("Coil:Cooling:DX:SingleSpeed:ThermalStorage", @@ -2279,7 +2279,7 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).CoolingAndChargeRatedTotCap); } - if (TESCoil(TESCoilNum).CoolingAndChargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndChargeRatedChargeCap == AutoCalculate)) { + if (TESCoil(TESCoilNum).CoolingAndChargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndChargeRatedChargeCap == DataGlobalConstants::AutoCalculate())) { TESCoil(TESCoilNum).CoolingAndChargeRatedChargeCap = TESCoil(TESCoilNum).CoolingOnlyRatedTotCap * TESCoil(TESCoilNum).CoolingAndChargeRatedChargeCapSizingFactor; BaseSizer::reportSizerOutput("Coil:Cooling:DX:SingleSpeed:ThermalStorage", @@ -2288,7 +2288,7 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).CoolingAndChargeRatedChargeCap); } - if (TESCoil(TESCoilNum).CoolingAndDischargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndDischargeRatedTotCap == AutoCalculate)) { + if (TESCoil(TESCoilNum).CoolingAndDischargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndDischargeRatedTotCap == DataGlobalConstants::AutoCalculate())) { TESCoil(TESCoilNum).CoolingAndDischargeRatedTotCap = TESCoil(TESCoilNum).CoolingOnlyRatedTotCap * TESCoil(TESCoilNum).CoolingAndDischargeRatedTotCapSizingFactor; BaseSizer::reportSizerOutput("Coil:Cooling:DX:SingleSpeed:ThermalStorage", @@ -2297,7 +2297,7 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).CoolingAndDischargeRatedTotCap); } - if (TESCoil(TESCoilNum).CoolingAndDischargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndDischargeRatedDischargeCap == AutoCalculate)) { + if (TESCoil(TESCoilNum).CoolingAndDischargeModeAvailable && (TESCoil(TESCoilNum).CoolingAndDischargeRatedDischargeCap == DataGlobalConstants::AutoCalculate())) { TESCoil(TESCoilNum).CoolingAndDischargeRatedDischargeCap = TESCoil(TESCoilNum).CoolingOnlyRatedTotCap * TESCoil(TESCoilNum).CoolingAndDischargeRatedDischargeCapSizingFactor; BaseSizer::reportSizerOutput("Coil:Cooling:DX:SingleSpeed:ThermalStorage", @@ -2306,7 +2306,7 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).CoolingAndDischargeRatedDischargeCap); } - if (TESCoil(TESCoilNum).ChargeOnlyModeAvailable && (TESCoil(TESCoilNum).ChargeOnlyRatedCapacity == AutoCalculate)) { + if (TESCoil(TESCoilNum).ChargeOnlyModeAvailable && (TESCoil(TESCoilNum).ChargeOnlyRatedCapacity == DataGlobalConstants::AutoCalculate())) { TESCoil(TESCoilNum).ChargeOnlyRatedCapacity = TESCoil(TESCoilNum).CoolingOnlyRatedTotCap * TESCoil(TESCoilNum).ChargeOnlyRatedCapacitySizingFactor; BaseSizer::reportSizerOutput("Coil:Cooling:DX:SingleSpeed:ThermalStorage", @@ -2315,7 +2315,7 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).ChargeOnlyRatedCapacity); } - if (TESCoil(TESCoilNum).DischargeOnlyModeAvailable && (TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCap == AutoCalculate)) { + if (TESCoil(TESCoilNum).DischargeOnlyModeAvailable && (TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCap == DataGlobalConstants::AutoCalculate())) { TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCap = TESCoil(TESCoilNum).CoolingOnlyRatedTotCap * TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCapSizingFactor; BaseSizer::reportSizerOutput("Coil:Cooling:DX:SingleSpeed:ThermalStorage", @@ -2324,14 +2324,14 @@ namespace PackagedThermalStorageCoil { TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCap); } - if ((TESCoil(TESCoilNum).StorageMedia == FluidBased) && (TESCoil(TESCoilNum).FluidStorageVolume == AutoCalculate)) { + if ((TESCoil(TESCoilNum).StorageMedia == FluidBased) && (TESCoil(TESCoilNum).FluidStorageVolume == DataGlobalConstants::AutoCalculate())) { // for fluid tanks, assume a 10C deltaT or diff between max and min, whichever is smaller deltaT = min(FluidTankSizingDeltaT, (TESCoil(TESCoilNum).MaximumFluidTankTempLimit - TESCoil(TESCoilNum).MinimumFluidTankTempLimit)); rho = GetDensityGlycol( - state, TESCoil(TESCoilNum).StorageFluidName, DataGlobals::CWInitConvTemp, TESCoil(TESCoilNum).StorageFluidIndex, calcTESWaterStorageTank); + state, TESCoil(TESCoilNum).StorageFluidName, DataGlobalConstants::CWInitConvTemp(), TESCoil(TESCoilNum).StorageFluidIndex, calcTESWaterStorageTank); Cp = GetSpecificHeatGlycol( - state, TESCoil(TESCoilNum).StorageFluidName, DataGlobals::CWInitConvTemp, TESCoil(TESCoilNum).StorageFluidIndex, calcTESWaterStorageTank); + state, TESCoil(TESCoilNum).StorageFluidName, DataGlobalConstants::CWInitConvTemp(), TESCoil(TESCoilNum).StorageFluidIndex, calcTESWaterStorageTank); if (TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCap > 0.0 && TESCoil(TESCoilNum).DischargeOnlyModeAvailable) { TESCoil(TESCoilNum).FluidStorageVolume = (TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCap * TESCoil(TESCoilNum).StorageCapacitySizingFactor * DataGlobalConstants::SecInHour()) / @@ -2345,7 +2345,7 @@ namespace PackagedThermalStorageCoil { "Fluid Storage Volume [m3]", TESCoil(TESCoilNum).FluidStorageVolume); } - if ((TESCoil(TESCoilNum).StorageMedia == IceBased) && (TESCoil(TESCoilNum).IceStorageCapacity == AutoCalculate)) { + if ((TESCoil(TESCoilNum).StorageMedia == IceBased) && (TESCoil(TESCoilNum).IceStorageCapacity == DataGlobalConstants::AutoCalculate())) { if (TESCoil(TESCoilNum).DischargeOnlyRatedDischargeCap > 0.0 && TESCoil(TESCoilNum).DischargeOnlyModeAvailable) { TESCoil(TESCoilNum).IceStorageCapacity = diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index c20bb7a3815..fff3c88a4ae 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -578,7 +578,7 @@ namespace PhotovoltaicThermalCollectors { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->WLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->WLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/Photovoltaics.cc b/src/EnergyPlus/Photovoltaics.cc index 1351605c8f4..c59630a3444 100644 --- a/src/EnergyPlus/Photovoltaics.cc +++ b/src/EnergyPlus/Photovoltaics.cc @@ -120,7 +120,6 @@ namespace Photovoltaics { using DataGlobals::BeginEnvrnFlag; using DataGlobals::BeginSimFlag; using DataGlobals::EndEnvrnFlag; - using DataGlobals::KelvinConv; using DataHVACGlobals::TimeStepSys; // Data @@ -297,7 +296,6 @@ namespace Photovoltaics { // Using/Aliasing using namespace DataIPShortCuts; - using DataGlobals::KelvinConv; using DataSurfaces::Surface; using namespace DataHeatBalance; using General::RoundSigDigits; @@ -569,14 +567,14 @@ namespace Photovoltaics { tmpTNRSYSModuleParams(ModNum).ShuntResistance = rNumericArgs(5); tmpTNRSYSModuleParams(ModNum).RefIsc = rNumericArgs(6); tmpTNRSYSModuleParams(ModNum).RefVoc = rNumericArgs(7); - tmpTNRSYSModuleParams(ModNum).RefTemperature = rNumericArgs(8) + KelvinConv; + tmpTNRSYSModuleParams(ModNum).RefTemperature = rNumericArgs(8) + DataGlobalConstants::KelvinConv(); tmpTNRSYSModuleParams(ModNum).RefInsolation = rNumericArgs(9); tmpTNRSYSModuleParams(ModNum).Imp = rNumericArgs(10); tmpTNRSYSModuleParams(ModNum).Vmp = rNumericArgs(11); tmpTNRSYSModuleParams(ModNum).TempCoefIsc = rNumericArgs(12); tmpTNRSYSModuleParams(ModNum).TempCoefVoc = rNumericArgs(13); - tmpTNRSYSModuleParams(ModNum).NOCTAmbTemp = rNumericArgs(14) + KelvinConv; - tmpTNRSYSModuleParams(ModNum).NOCTCellTemp = rNumericArgs(15) + KelvinConv; + tmpTNRSYSModuleParams(ModNum).NOCTAmbTemp = rNumericArgs(14) + DataGlobalConstants::KelvinConv(); + tmpTNRSYSModuleParams(ModNum).NOCTCellTemp = rNumericArgs(15) + DataGlobalConstants::KelvinConv(); tmpTNRSYSModuleParams(ModNum).NOCTInsolation = rNumericArgs(16); tmpTNRSYSModuleParams(ModNum).HeatLossCoef = rNumericArgs(17); tmpTNRSYSModuleParams(ModNum).HeatCapacity = rNumericArgs(18); @@ -1254,8 +1252,8 @@ namespace Photovoltaics { // Do the Begin Environment initializations if (BeginEnvrnFlag && MyEnvrnFlag(PVnum)) { - PVarray(PVnum).TRNSYSPVcalc.CellTempK = Surface(PVarray(PVnum).SurfacePtr).OutDryBulbTemp + KelvinConv; - PVarray(PVnum).TRNSYSPVcalc.LastCellTempK = Surface(PVarray(PVnum).SurfacePtr).OutDryBulbTemp + KelvinConv; + PVarray(PVnum).TRNSYSPVcalc.CellTempK = Surface(PVarray(PVnum).SurfacePtr).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); + PVarray(PVnum).TRNSYSPVcalc.LastCellTempK = Surface(PVarray(PVnum).SurfacePtr).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); MyEnvrnFlag(PVnum) = false; } @@ -1372,7 +1370,7 @@ namespace Photovoltaics { ShuntResistance = PVarray(PVnum).TRNSYSPVModule.ShuntResistance; // convert ambient temperature from C to K - Tambient = Surface(PVarray(PVnum).SurfacePtr).OutDryBulbTemp + KelvinConv; + Tambient = Surface(PVarray(PVnum).SurfacePtr).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); if ((PVarray(PVnum).TRNSYSPVcalc.Insolation > MinInsolation) && (RunFlag)) { @@ -1406,13 +1404,13 @@ namespace Photovoltaics { (1.0 - std::exp(-PVarray(PVnum).TRNSYSPVModule.HeatLossCoef / PVarray(PVnum).TRNSYSPVModule.HeatCapacity * PVTimeStep)); } else if (SELECT_CASE_var == iSurfaceOutsideFaceCellIntegration) { - CellTemp = TempSurfOut(PVarray(PVnum).SurfacePtr) + KelvinConv; + CellTemp = TempSurfOut(PVarray(PVnum).SurfacePtr) + DataGlobalConstants::KelvinConv(); } else if (SELECT_CASE_var == iTranspiredCollectorCellIntegration) { GetUTSCTsColl(PVarray(PVnum).UTSCPtr, CellTemp); - CellTemp += KelvinConv; + CellTemp += DataGlobalConstants::KelvinConv(); } else if (SELECT_CASE_var == iExteriorVentedCavityCellIntegration) { GetExtVentedCavityTsColl(PVarray(PVnum).ExtVentCavPtr, CellTemp); - CellTemp += KelvinConv; + CellTemp += DataGlobalConstants::KelvinConv(); } else if (SELECT_CASE_var == iPVTSolarCollectorCellIntegration) { // get PVT model result for cell temp.. } @@ -1479,13 +1477,13 @@ namespace Photovoltaics { (PVarray(PVnum).TRNSYSPVcalc.LastCellTempK - Tambient) * std::exp(-PVarray(PVnum).TRNSYSPVModule.HeatLossCoef / PVarray(PVnum).TRNSYSPVModule.HeatCapacity * PVTimeStep); } else if (SELECT_CASE_var == iSurfaceOutsideFaceCellIntegration) { - CellTemp = TempSurfOut(PVarray(PVnum).SurfacePtr) + KelvinConv; + CellTemp = TempSurfOut(PVarray(PVnum).SurfacePtr) + DataGlobalConstants::KelvinConv(); } else if (SELECT_CASE_var == iTranspiredCollectorCellIntegration) { GetUTSCTsColl(PVarray(PVnum).UTSCPtr, CellTemp); - CellTemp += KelvinConv; + CellTemp += DataGlobalConstants::KelvinConv(); } else if (SELECT_CASE_var == iExteriorVentedCavityCellIntegration) { GetExtVentedCavityTsColl(PVarray(PVnum).ExtVentCavPtr, CellTemp); - CellTemp += KelvinConv; + CellTemp += DataGlobalConstants::KelvinConv(); } else if (SELECT_CASE_var == iPVTSolarCollectorCellIntegration) { // get PVT model result for cell temp.. //Bug CellTemp not set but used below } else { @@ -1503,7 +1501,7 @@ namespace Photovoltaics { } // convert cell temperature back to C - CellTempC = CellTemp - KelvinConv; + CellTempC = CellTemp - DataGlobalConstants::KelvinConv(); // calculate array based outputs (so far, the outputs are module based IA = PVarray(PVnum).NumSeriesNParall * IM; @@ -2577,7 +2575,7 @@ namespace Photovoltaics { if (Ee > 0.0) { // following is equation 8 in King et al. nov. 2003 - dTc = DiodeFactor * ((1.38066e-23 * (Tc + KelvinConv)) / 1.60218e-19); + dTc = DiodeFactor * ((1.38066e-23 * (Tc + DataGlobalConstants::KelvinConv())) / 1.60218e-19); BVmpEe = BVmp0 + mBVmp * (1.0 - Ee); @@ -2640,7 +2638,7 @@ namespace Photovoltaics { Real64 BVocEe; // working variable if (Ee > 0.0) { - dTc = DiodeFactor * ((1.38066e-23 * (Tc + KelvinConv)) / 1.60218e-19); + dTc = DiodeFactor * ((1.38066e-23 * (Tc + DataGlobalConstants::KelvinConv())) / 1.60218e-19); BVocEe = BVoc0 + mBVoc * (1.0 - Ee); SandiaVoc = Voc0 + NcellSer * dTc * std::log(Ee) + BVocEe * (Tc - 25.0); diff --git a/src/EnergyPlus/PipeHeatTransfer.cc b/src/EnergyPlus/PipeHeatTransfer.cc index 475ce43d35e..75a93943769 100644 --- a/src/EnergyPlus/PipeHeatTransfer.cc +++ b/src/EnergyPlus/PipeHeatTransfer.cc @@ -270,7 +270,6 @@ namespace PipeHeatTransfer { int const NumPipeSections(20); int const NumberOfDepthNodes(8); // Number of nodes in the cartesian grid-Should be an even # for now Real64 const SecondsInHour(DataGlobalConstants::SecInHour()); - Real64 const HoursInDay(24.0); // SUBROUTINE LOCAL VARIABLE DECLARATIONS: bool ErrorsFound(false); // Set to true if errors in input, @@ -1278,7 +1277,6 @@ namespace PipeHeatTransfer { using DataEnvironment::SOLCOS; using DataEnvironment::WindSpeed; using DataGlobals::HourOfDay; - using DataGlobals::KelvinConv; using DataGlobals::TimeStep; using DataLoopNode::Node; @@ -1348,8 +1346,8 @@ namespace PipeHeatTransfer { // If on soil boundary, load up local variables and perform calculations NodePast = this->T(WidthIndex, DepthIndex, LengthIndex, PreviousTimeIndex); - PastNodeTempAbs = NodePast + KelvinConv; - SkyTempAbs = SkyTemp + KelvinConv; + PastNodeTempAbs = NodePast + DataGlobalConstants::KelvinConv(); + SkyTempAbs = SkyTemp + DataGlobalConstants::KelvinConv(); TopRoughness = this->SoilRoughness; TopThermAbs = this->SoilThermAbs; TopSolarAbs = this->SoilSolarAbs; diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index 413fb57fcb1..6c77b16ed2d 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -455,8 +455,8 @@ namespace EnergyPlus { // correct loop temperature step. Loop data is read in supply side, but the volume is not used in // a calculation there. this_loop.Volume = Num(5); - if (lNumericFieldBlanks(5)) this_loop.Volume = AutoCalculate; - if (this_loop.Volume == AutoCalculate) { + if (lNumericFieldBlanks(5)) this_loop.Volume = DataGlobalConstants::AutoCalculate(); + if (this_loop.Volume == DataGlobalConstants::AutoCalculate()) { this_loop.VolumeWasAutoSized = true; } // circulation time used to autocalculate loop volume @@ -3204,7 +3204,7 @@ namespace EnergyPlus { // should now have plant volume, calculate plant volume's mass for fluid type if (PlantLoop(LoopNum).FluidType == NodeType_Water) { - FluidDensity = GetDensityGlycol(state, PlantLoop(LoopNum).FluidName, InitConvTemp, + FluidDensity = GetDensityGlycol(state, PlantLoop(LoopNum).FluidName, DataGlobalConstants::InitConvTemp(), PlantLoop(LoopNum).FluidIndex, RoutineName); } else if (PlantLoop(LoopNum).FluidType == NodeType_Steam) { FluidDensity = GetSatDensityRefrig(state, fluidNameSteam, 100.0, 1.0, PlantLoop(LoopNum).FluidIndex, @@ -3334,7 +3334,7 @@ namespace EnergyPlus { // should now have plant volume, calculate plant volume's mass for fluid type if (PlantLoop(LoopNum).FluidType == NodeType_Water) { - FluidDensity = GetDensityGlycol(state, PlantLoop(LoopNum).FluidName, InitConvTemp, + FluidDensity = GetDensityGlycol(state, PlantLoop(LoopNum).FluidName, DataGlobalConstants::InitConvTemp(), PlantLoop(LoopNum).FluidIndex, RoutineName); } else if (PlantLoop(LoopNum).FluidType == NodeType_Steam) { FluidDensity = GetSatDensityRefrig(state, fluidNameSteam, 100.0, 1.0, PlantLoop(LoopNum).FluidIndex, diff --git a/src/EnergyPlus/PlantCentralGSHP.cc b/src/EnergyPlus/PlantCentralGSHP.cc index afd01763594..78f3d52b40e 100644 --- a/src/EnergyPlus/PlantCentralGSHP.cc +++ b/src/EnergyPlus/PlantCentralGSHP.cc @@ -348,12 +348,12 @@ namespace PlantCentralGSHP { if (PltSizNum > 0) { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow && tmpEvapVolFlowRate > 0.0) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * tmpEvapVolFlowRate; @@ -442,7 +442,7 @@ namespace PlantCentralGSHP { if (PltSizCondNum > 0) { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->GLHELoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->GLHELoopNum).FluidIndex, RoutineName); // TODO: JM 2018-12-06 I wonder why Cp isn't calculated at the same temp as rho... @@ -1569,7 +1569,7 @@ namespace PlantCentralGSHP { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -1814,7 +1814,7 @@ namespace PlantCentralGSHP { // Hot water temperature is known, but evaporator mass flow rates will be adjusted in the following "Do" loop Real64 InitDensity = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 EvapDensity = FluidProperties::GetDensityGlycol( @@ -2239,7 +2239,7 @@ namespace PlantCentralGSHP { // Hot water temperature is known, but condenser mass flow rates will be adjusted in the following "Do" loop Real64 InitDensity = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 EvapDensity = FluidProperties::GetDensityGlycol( diff --git a/src/EnergyPlus/PlantChillers.cc b/src/EnergyPlus/PlantChillers.cc index f49043b23cb..8ef33ed2984 100644 --- a/src/EnergyPlus/PlantChillers.cc +++ b/src/EnergyPlus/PlantChillers.cc @@ -848,7 +848,7 @@ namespace PlantChillers { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -869,7 +869,7 @@ namespace PlantChillers { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); @@ -902,7 +902,7 @@ namespace PlantChillers { if (this->HeatRecActive) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; @@ -1050,12 +1050,12 @@ namespace PlantChillers { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; @@ -2789,7 +2789,7 @@ namespace PlantChillers { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -2811,7 +2811,7 @@ namespace PlantChillers { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); @@ -2842,7 +2842,7 @@ namespace PlantChillers { if (this->HeatRecActive) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; @@ -2949,12 +2949,12 @@ namespace PlantChillers { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; @@ -4657,7 +4657,7 @@ namespace PlantChillers { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); @@ -4678,7 +4678,7 @@ namespace PlantChillers { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); @@ -4709,7 +4709,7 @@ namespace PlantChillers { if (this->HeatRecActive) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HRLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HRLoopNum).FluidIndex, RoutineName); this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate; @@ -4816,12 +4816,12 @@ namespace PlantChillers { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; @@ -6341,7 +6341,7 @@ namespace PlantChillers { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); this->EvapMassFlowRateMax = this->EvapVolFlowRate * rho; @@ -6361,7 +6361,7 @@ namespace PlantChillers { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CDLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CDLoopNum).FluidIndex, RoutineName); @@ -6470,12 +6470,12 @@ namespace PlantChillers { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CWLoopNum).FluidIndex, RoutineName); tmpNomCap = Cp * rho * DataSizing::PlantSizData(PltSizNum).DeltaT * DataSizing::PlantSizData(PltSizNum).DesVolFlowRate * this->SizFac; diff --git a/src/EnergyPlus/PlantComponentTemperatureSources.cc b/src/EnergyPlus/PlantComponentTemperatureSources.cc index 909b5783813..a8bc54022c0 100644 --- a/src/EnergyPlus/PlantComponentTemperatureSources.cc +++ b/src/EnergyPlus/PlantComponentTemperatureSources.cc @@ -173,7 +173,7 @@ namespace PlantComponentTemperatureSources { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->Location.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->Location.loopNum).FluidIndex, RoutineName); this->MassFlowRateMax = this->DesVolFlowRate * rho; diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 3b2dca6d109..bd5efc8e224 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -784,7 +784,7 @@ namespace PlantHeatExchangerFluidToFluid { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, RoutineNameNoColon); this->DemandSideLoop.MassFlowRateMax = rho * this->DemandSideLoop.DesignVolumeFlowRate; @@ -799,7 +799,7 @@ namespace PlantHeatExchangerFluidToFluid { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineNameNoColon); this->SupplySideLoop.MassFlowRateMax = rho * this->SupplySideLoop.DesignVolumeFlowRate; @@ -940,13 +940,13 @@ namespace PlantHeatExchangerFluidToFluid { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); @@ -1025,13 +1025,13 @@ namespace PlantHeatExchangerFluidToFluid { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); Real64 SupSideMdot = this->SupplySideLoop.DesignVolumeFlowRate * rho; rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, RoutineName); Real64 DmdSideMdot = this->DemandSideLoop.DesignVolumeFlowRate * rho; diff --git a/src/EnergyPlus/PlantLoadProfile.cc b/src/EnergyPlus/PlantLoadProfile.cc index 780323ec5d6..6ae052c9611 100644 --- a/src/EnergyPlus/PlantLoadProfile.cc +++ b/src/EnergyPlus/PlantLoadProfile.cc @@ -236,7 +236,7 @@ namespace PlantLoadProfile { Node(OutletNode).Temp = 0.0; FluidDensityInit = - GetDensityGlycol(state, PlantLoop(this->WLoopNum).FluidName, DataGlobals::InitConvTemp, PlantLoop(this->WLoopNum).FluidIndex, RoutineName); + GetDensityGlycol(state, PlantLoop(this->WLoopNum).FluidName, DataGlobalConstants::InitConvTemp(), PlantLoop(this->WLoopNum).FluidIndex, RoutineName); Real64 MaxFlowMultiplier = GetScheduleMaxValue(this->FlowRateFracSchedule); diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index ea0b809cce8..ebece3f985f 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -500,7 +500,7 @@ namespace EIRPlantLoopHeatPumps { if (DataGlobals::BeginEnvrnFlag && this->envrnInit && DataPlant::PlantFirstSizesOkayToFinalize) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->loadSideLocation.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->loadSideLocation.loopNum).FluidIndex, routineName); this->loadSideDesignMassFlowRate = rho * this->loadSideDesignVolFlowRate; @@ -516,7 +516,7 @@ namespace EIRPlantLoopHeatPumps { if (this->waterSource) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->sourceSideLocation.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->sourceSideLocation.loopNum).FluidIndex, routineName); this->sourceSideDesignMassFlowRate = rho * this->sourceSideDesignVolFlowRate; @@ -575,9 +575,9 @@ namespace EIRPlantLoopHeatPumps { Real64 tmpLoadVolFlow = this->loadSideDesignVolFlowRate; std::string const typeName = DataPlant::ccSimPlantEquipTypes(this->plantTypeOfNum); - Real64 loadSideInitTemp = DataGlobals::CWInitConvTemp; + Real64 loadSideInitTemp = DataGlobalConstants::CWInitConvTemp(); if (this->plantTypeOfNum == DataPlant::TypeOf_HeatPumpEIRHeating) { - loadSideInitTemp = DataGlobals::HWInitConvTemp; + loadSideInitTemp = DataGlobalConstants::HWInitConvTemp(); } Real64 const rho = FluidProperties::GetDensityGlycol(state, @@ -755,9 +755,9 @@ namespace EIRPlantLoopHeatPumps { Real64 tmpSourceVolFlow; std::string const typeName = DataPlant::ccSimPlantEquipTypes(this->plantTypeOfNum); - Real64 sourceSideInitTemp = DataGlobals::HWInitConvTemp; + Real64 sourceSideInitTemp = DataGlobalConstants::HWInitConvTemp(); if (this->plantTypeOfNum == DataPlant::TypeOf_HeatPumpEIRHeating) { - sourceSideInitTemp = DataGlobals::CWInitConvTemp; + sourceSideInitTemp = DataGlobalConstants::CWInitConvTemp(); } Real64 const rhoSrc = FluidProperties::GetDensityGlycol(state, diff --git a/src/EnergyPlus/PlantPipingSystemsManager.cc b/src/EnergyPlus/PlantPipingSystemsManager.cc index 763ffb08660..503ecebf44c 100644 --- a/src/EnergyPlus/PlantPipingSystemsManager.cc +++ b/src/EnergyPlus/PlantPipingSystemsManager.cc @@ -2157,7 +2157,7 @@ namespace EnergyPlus { // Once we find ourselves on the plant loop, we can do other things Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(thisCircuit->LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(thisCircuit->LoopNum).FluidIndex, RoutineName); thisCircuit->DesignMassFlowRate = thisCircuit->DesignVolumeFlowRate * rho; diff --git a/src/EnergyPlus/PondGroundHeatExchanger.cc b/src/EnergyPlus/PondGroundHeatExchanger.cc index c061acd6606..217d6812651 100644 --- a/src/EnergyPlus/PondGroundHeatExchanger.cc +++ b/src/EnergyPlus/PondGroundHeatExchanger.cc @@ -596,8 +596,8 @@ namespace PondGroundHeatExchanger { } // absolute temperatures - Real64 SurfTempAbs = PondBulkTemp + DataGlobals::KelvinConv; // absolute value of surface temp - Real64 SkyTempAbs = DataEnvironment::SkyTemp + DataGlobals::KelvinConv; // absolute value of sky temp + Real64 SurfTempAbs = PondBulkTemp + DataGlobalConstants::KelvinConv(); // absolute value of surface temp + Real64 SkyTempAbs = DataEnvironment::SkyTemp + DataGlobalConstants::KelvinConv(); // absolute value of sky temp // ASHRAE simple convection coefficient model for external surfaces. Real64 ConvCoef = ConvectionCoefficients::CalcASHRAESimpExtConvectCoeff(DataHeatBalance::VeryRough, DataEnvironment::WindSpeedAt(PondHeight)); diff --git a/src/EnergyPlus/PoweredInductionUnits.cc b/src/EnergyPlus/PoweredInductionUnits.cc index 01f8f3aa16f..9574809e53f 100644 --- a/src/EnergyPlus/PoweredInductionUnits.cc +++ b/src/EnergyPlus/PoweredInductionUnits.cc @@ -866,7 +866,7 @@ namespace PoweredInductionUnits { // plant upgrade note? why no separate handling of steam coil? add it ? rho = GetDensityGlycol(state, PlantLoop(PIU(PIUNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(PIU(PIUNum).HWLoopNum).FluidIndex, RoutineName); @@ -1339,12 +1339,12 @@ namespace PoweredInductionUnits { rho = GetDensityGlycol(state, PlantLoop(PIU(PIUNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(PIU(PIUNum).HWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(PIU(PIUNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(PIU(PIUNum).HWLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/Psychrometrics.cc b/src/EnergyPlus/Psychrometrics.cc index b72b1afd639..683c1424563 100644 --- a/src/EnergyPlus/Psychrometrics.cc +++ b/src/EnergyPlus/Psychrometrics.cc @@ -882,14 +882,14 @@ namespace Psychrometrics { #endif // Convert temperature from Centigrade to Kelvin. - Real64 const Tkel(T + KelvinConv); // Dry-bulb in REAL(r64) for function passing + Real64 const Tkel(T + DataGlobalConstants::KelvinConv()); // Dry-bulb in REAL(r64) for function passing // If below -100C,set value of Pressure corresponding to Saturation Temperature of -100C. if (Tkel < 173.15) { Pascal = 0.0017; // If below freezing, calculate saturation pressure over ice. - } else if (Tkel < KelvinConv) { // Tkel >= 173.15 + } else if (Tkel < DataGlobalConstants::KelvinConv()) { // Tkel >= 173.15 Real64 const C1(-5674.5359); // Coefficient for TKel < KelvinConvK Real64 const C2(6.3925247); // Coefficient for TKel < KelvinConvK Real64 const C3(-0.9677843e-2); // Coefficient for TKel < KelvinConvK diff --git a/src/EnergyPlus/Psychrometrics.hh b/src/EnergyPlus/Psychrometrics.hh index 33ae096ede9..da304c4cda9 100644 --- a/src/EnergyPlus/Psychrometrics.hh +++ b/src/EnergyPlus/Psychrometrics.hh @@ -269,7 +269,7 @@ namespace Psychrometrics { // Wylan & Sontag, Fundamentals of Classical Thermodynamics. // ASHRAE handbook 1985 Fundamentals, Ch. 6, eqn. (6),(26) - Real64 const rhoair(pb / (287.0 * (tdb + KelvinConv) * (1.0 + 1.6077687 * max(dw, 1.0e-5)))); + Real64 const rhoair(pb / (287.0 * (tdb + DataGlobalConstants::KelvinConv()) * (1.0 + 1.6077687 * max(dw, 1.0e-5)))); #ifdef EP_psych_errors if (rhoair < 0.0) PsyRhoAirFnPbTdbW_error(pb, tdb, dw, rhoair, CalledFrom); #endif @@ -283,7 +283,7 @@ namespace Psychrometrics { { // Faster version with humidity ratio already adjusted assert(dw >= 1.0e-5); - Real64 const rhoair(pb / (287.0 * (tdb + KelvinConv) * (1.0 + 1.6077687 * dw))); + Real64 const rhoair(pb / (287.0 * (tdb + DataGlobalConstants::KelvinConv()) * (1.0 + 1.6077687 * dw))); #ifdef EP_psych_errors if (rhoair < 0.0) PsyRhoAirFnPbTdbW_error(pb, tdb, dw, rhoair); #endif @@ -479,7 +479,7 @@ namespace Psychrometrics { // REFERENCES: // ASHRAE handbook 1993 Fundamentals, - return RH / (461.52 * (Tdb + KelvinConv)) * std::exp(23.7093 - 4111.0 / ((Tdb + KelvinConv) - 35.45)); // Vapor density in air + return RH / (461.52 * (Tdb + DataGlobalConstants::KelvinConv())) * std::exp(23.7093 - 4111.0 / ((Tdb + DataGlobalConstants::KelvinConv()) - 35.45)); // Vapor density in air } inline Real64 PsyRhovFnTdbWPb(Real64 const Tdb, // dry-bulb temperature {C} @@ -505,7 +505,7 @@ namespace Psychrometrics { // ASHRAE handbook 1993 Fundamentals, Real64 const W(max(dW, 1.0e-5)); // humidity ratio - return W * PB / (461.52 * (Tdb + KelvinConv) * (W + 0.62198)); + return W * PB / (461.52 * (Tdb + DataGlobalConstants::KelvinConv()) * (W + 0.62198)); } inline Real64 PsyRhovFnTdbWPb_fast(Real64 const Tdb, // dry-bulb temperature {C} @@ -515,7 +515,7 @@ namespace Psychrometrics { { // Faster version with humidity ratio already adjusted assert(dW >= 1.0e-5); - return dW * PB / (461.52 * (Tdb + KelvinConv) * (dW + 0.62198)); + return dW * PB / (461.52 * (Tdb + DataGlobalConstants::KelvinConv()) * (dW + 0.62198)); } #ifdef EP_psych_errors @@ -553,7 +553,7 @@ namespace Psychrometrics { ++NumTimesCalled(iPsyRhFnTdbRhovLBnd0C); #endif - Real64 const RHValue(Rhovapor > 0.0 ? Rhovapor * 461.52 * (Tdb + KelvinConv) * std::exp(-23.7093 + 4111.0 / ((Tdb + KelvinConv) - 35.45)) + Real64 const RHValue(Rhovapor > 0.0 ? Rhovapor * 461.52 * (Tdb + DataGlobalConstants::KelvinConv()) * std::exp(-23.7093 + 4111.0 / ((Tdb + DataGlobalConstants::KelvinConv()) - 35.45)) : 0.0); if ((RHValue < 0.0) || (RHValue > 1.0)) { @@ -819,7 +819,7 @@ namespace Psychrometrics { // Used values from Table 2, HOF 2005, Chapter 6, to verify that these values match (at saturation) // values from PsyRhFnTdbWPb - return (PsyPsatFnTemp(Tdb, CalledFrom) * RH) / (461.52 * (Tdb + KelvinConv)); // Vapor density in air + return (PsyPsatFnTemp(Tdb, CalledFrom) * RH) / (461.52 * (Tdb + DataGlobalConstants::KelvinConv())); // Vapor density in air } #ifdef EP_psych_errors @@ -862,7 +862,7 @@ namespace Psychrometrics { ++NumTimesCalled(iPsyRhFnTdbRhov); #endif - Real64 const RHValue(Rhovapor > 0.0 ? Rhovapor * 461.52 * (Tdb + KelvinConv) / PsyPsatFnTemp(Tdb, RoutineName) : 0.0); + Real64 const RHValue(Rhovapor > 0.0 ? Rhovapor * 461.52 * (Tdb + DataGlobalConstants::KelvinConv()) / PsyPsatFnTemp(Tdb, RoutineName) : 0.0); if ((RHValue < 0.0) || (RHValue > 1.0)) { #ifdef EP_psych_errors @@ -1303,8 +1303,8 @@ namespace Psychrometrics { // postive value is heating, negative value is cooling // When called across a component (from PsyDeltaHSenFnTdb2W2Tdb1W1 by CalcComponentSensibleLatentOutput): - // returns sensible enthalpy difference between state 1 (TDB1) and state 2 (TDB2) using the minimum - // humidity ratio from states 1 and 2. This enthalpy difference multiplied by supply air mass flow + // returns sensible enthalpy difference between state 1 (TDB1) and state 2 (TDB2) using the minimum + // humidity ratio from states 1 and 2. This enthalpy difference multiplied by supply air mass flow // rate yields the sensible heat transfer rate in Watts. // postive value is heating, negative value is cooling diff --git a/src/EnergyPlus/Pumps.cc b/src/EnergyPlus/Pumps.cc index 4d7b9573159..5ed61889a62 100644 --- a/src/EnergyPlus/Pumps.cc +++ b/src/EnergyPlus/Pumps.cc @@ -798,7 +798,7 @@ namespace Pumps { } else { // Calc Condensate Pump Water Volume Flow Rate SteamDensity = GetSatDensityRefrig(state, fluidNameSteam, StartTemp, 1.0, PumpEquip(PumpNum).FluidIndex, RoutineNameNoColon); - TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, DummyWaterIndex, RoutineName); + TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), DummyWaterIndex, RoutineName); PumpEquip(PumpNum).NomVolFlowRate = (PumpEquip(PumpNum).NomSteamVolFlowRate * SteamDensity) / TempWaterDensity; } @@ -1440,7 +1440,7 @@ namespace Pumps { if (PumpEquip(PumpNum).PumpInitFlag && BeginEnvrnFlag) { if (PumpEquip(PumpNum).PumpType == Pump_Cond) { - TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, DummyWaterIndex, RoutineName); + TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), DummyWaterIndex, RoutineName); SteamDensity = GetSatDensityRefrig(state, fluidNameSteam, StartTemp, 1.0, PumpEquip(PumpNum).FluidIndex, RoutineName); PumpEquip(PumpNum).NomVolFlowRate = (PumpEquip(PumpNum).NomSteamVolFlowRate * SteamDensity) / TempWaterDensity; @@ -1468,7 +1468,7 @@ namespace Pumps { } else { TempWaterDensity = GetDensityGlycol(state, PlantLoop(PumpEquip(PumpNum).LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), PlantLoop(PumpEquip(PumpNum).LoopNum).FluidIndex, RoutineName); mdotMax = PumpEquip(PumpNum).NomVolFlowRate * TempWaterDensity; @@ -2052,11 +2052,11 @@ namespace Pumps { if (PumpEquip(PumpNum).LoopNum > 0) { TempWaterDensity = GetDensityGlycol(state, PlantLoop(PumpEquip(PumpNum).LoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), PlantLoop(PumpEquip(PumpNum).LoopNum).FluidIndex, RoutineName); } else { - TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, DummyWaterIndex, RoutineName); + TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), DummyWaterIndex, RoutineName); } // note: we assume pump impeller efficiency is 78% for autosizing @@ -2104,7 +2104,7 @@ namespace Pumps { if (!PlantLoop(PumpEquip(PumpNum).LoopNum).LoopSide(PumpEquip(PumpNum).LoopSideNum).BranchPumpsExist) { // size pump to full flow of plant loop if (PumpEquip(PumpNum).PumpType == Pump_Cond) { - TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, DummyWaterIndex, RoutineName); + TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), DummyWaterIndex, RoutineName); SteamDensity = GetSatDensityRefrig(state, fluidNameSteam, StartTemp, 1.0, PumpEquip(PumpNum).FluidIndex, RoutineNameSizePumps); PumpEquip(PumpNum).NomSteamVolFlowRate = PlantSizData(PlantSizNum).DesVolFlowRate * PumpSizFac; PumpEquip(PumpNum).NomVolFlowRate = PumpEquip(PumpNum).NomSteamVolFlowRate * SteamDensity / TempWaterDensity; @@ -2116,7 +2116,7 @@ namespace Pumps { DesVolFlowRatePerBranch = PlantSizData(PlantSizNum).DesVolFlowRate / PlantLoop(PumpEquip(PumpNum).LoopNum).LoopSide(PumpEquip(PumpNum).LoopSideNum).TotalPumps; if (PumpEquip(PumpNum).PumpType == Pump_Cond) { - TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, DummyWaterIndex, RoutineName); + TempWaterDensity = GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), DummyWaterIndex, RoutineName); SteamDensity = GetSatDensityRefrig(state, fluidNameSteam, StartTemp, 1.0, PumpEquip(PumpNum).FluidIndex, RoutineNameSizePumps); PumpEquip(PumpNum).NomSteamVolFlowRate = DesVolFlowRatePerBranch * PumpSizFac; PumpEquip(PumpNum).NomVolFlowRate = PumpEquip(PumpNum).NomSteamVolFlowRate * SteamDensity / TempWaterDensity; diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index fd79ff1378f..4da8122269a 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -2846,7 +2846,7 @@ namespace RefrigeratedCase { RefrigRack(RackNum).CondenserAirFlowRate = Numbers(8); if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && - RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && RefrigRack(RackNum).CondenserAirFlowRate != DataGlobals::AutoCalculate) { + RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && RefrigRack(RackNum).CondenserAirFlowRate != DataGlobalConstants::AutoCalculate()) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(8) + " cannot be less than or equal to zero."); ErrorsFound = true; @@ -2869,7 +2869,7 @@ namespace RefrigeratedCase { RefrigRack(RackNum).EvapPumpPower = Numbers(11); if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower < 0.0 && - RefrigRack(RackNum).EvapPumpPower != DataGlobals::AutoCalculate) { + RefrigRack(RackNum).EvapPumpPower != DataGlobalConstants::AutoCalculate()) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(11) + " cannot be less than zero."); ErrorsFound = true; @@ -3054,12 +3054,12 @@ namespace RefrigeratedCase { // set condenser air flow and evap water pump power if autocalculated // autocalculate condenser evap water pump if needed if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && - RefrigRack(RackNum).EvapPumpPower == DataGlobals::AutoCalculate) { + RefrigRack(RackNum).EvapPumpPower == DataGlobalConstants::AutoCalculate()) { RefrigRack(RackNum).EvapPumpPower = CondPumpRatePower * RefrigRack(RackNum).TotalRackLoad; } // autocalculate evap condenser air volume flow rate if needed if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && - RefrigRack(RackNum).CondenserAirFlowRate == DataGlobals::AutoCalculate) { + RefrigRack(RackNum).CondenserAirFlowRate == DataGlobalConstants::AutoCalculate()) { RefrigRack(RackNum).CondenserAirFlowRate = AirVolRateEvapCond * RefrigRack(RackNum).TotalRackLoad; } @@ -5078,7 +5078,7 @@ namespace RefrigeratedCase { // Now do evaporative condenser auto sizing because it is a function of the system's cooling load if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { - if (Condenser(CondNum).RatedAirFlowRate == DataGlobals::AutoCalculate) { + if (Condenser(CondNum).RatedAirFlowRate == DataGlobalConstants::AutoCalculate()) { Condenser(CondNum).RatedAirFlowRate = AirVolRateEvapCond * Condenser(CondNum).RatedCapacity; } if (Condenser(CondNum).RatedAirFlowRate <= 0.0) { @@ -5086,7 +5086,7 @@ namespace RefrigeratedCase { "\", Evaporative Condenser Air Volume Flow Rate cannot be less than or equal to zero."); ErrorsFound = true; } - if (Condenser(CondNum).EvapPumpPower == DataGlobals::AutoCalculate) { + if (Condenser(CondNum).EvapPumpPower == DataGlobalConstants::AutoCalculate()) { Condenser(CondNum).EvapPumpPower = CondPumpRatePower * Condenser(CondNum).RatedCapacity; } if (Condenser(CondNum).EvapPumpPower < 0.0) { diff --git a/src/EnergyPlus/ReportCoilSelection.cc b/src/EnergyPlus/ReportCoilSelection.cc index fe4d118bd14..4a7d6dddc8b 100644 --- a/src/EnergyPlus/ReportCoilSelection.cc +++ b/src/EnergyPlus/ReportCoilSelection.cc @@ -733,13 +733,13 @@ void ReportCoilSelection::doFinalProcessingOfCoilData(EnergyPlusData &state) if (DataSizing::PlantSizData(c->pltSizNum).LoopType != DataSizing::SteamLoop) { c->rhoFluid = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(c->waterLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(c->waterLoopNum).FluidIndex, "ReportCoilSelection::doFinalProcessingOfCoilData"); c->cpFluid = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(c->waterLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(c->waterLoopNum).FluidIndex, "ReportCoilSelection::doFinalProcessingOfCoilData"); } else { // steam loop @@ -1022,13 +1022,13 @@ void ReportCoilSelection::setCoilWaterFlowPltSizNum(EnergyPlusData &state, if (DataSizing::PlantSizData(c->pltSizNum).LoopType != DataSizing::SteamLoop) { c->rhoFluid = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(c->waterLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(c->waterLoopNum).FluidIndex, "ReportCoilSelection::setCoilWaterFlow"); c->cpFluid = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(c->waterLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(c->waterLoopNum).FluidIndex, "ReportCoilSelection::setCoilWaterFlow"); } else { // steam loop diff --git a/src/EnergyPlus/ResultsFramework.cc b/src/EnergyPlus/ResultsFramework.cc index bf34c9bd68b..2a0f0c6232e 100644 --- a/src/EnergyPlus/ResultsFramework.cc +++ b/src/EnergyPlus/ResultsFramework.cc @@ -77,7 +77,6 @@ namespace ResultsFramework { using namespace OutputProcessor; using DataGlobals::DisplayExtraWarnings; - using DataGlobals::InitConvTemp; using OutputProcessor::RealVariableType; using OutputProcessor::RealVariables; diff --git a/src/EnergyPlus/SingleDuct.cc b/src/EnergyPlus/SingleDuct.cc index c0bf8454f5b..e05a5045856 100644 --- a/src/EnergyPlus/SingleDuct.cc +++ b/src/EnergyPlus/SingleDuct.cc @@ -679,7 +679,7 @@ namespace SingleDuct { } } } - if (Numbers(7) == AutoCalculate) { + if (Numbers(7) == DataGlobalConstants::AutoCalculate()) { sd_airterminal(SysNum).MaxAirVolFlowRateDuringReheat = Numbers(7); } else { sd_airterminal(SysNum).MaxAirVolFlowRateDuringReheat = Numbers(7) * sd_airterminal(SysNum).ZoneFloorArea; @@ -2238,7 +2238,7 @@ namespace SingleDuct { if (this->HWLoopNum > 0 && this->ReheatComp_Num != HCoilType_SteamAirHeating) { // protect early calls before plant is setup rho = GetDensityGlycol( - state, PlantLoop(this->HWLoopNum).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(this->HWLoopNum).FluidIndex, RoutineName); + state, PlantLoop(this->HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(this->HWLoopNum).FluidIndex, RoutineName); } else { rho = 1000.0; } @@ -2461,7 +2461,6 @@ namespace SingleDuct { // Obtains flow rates from the zone or system sizing arrays. // Using/Aliasing - using DataGlobals::AutoCalculate; using DataHeatBalance::Zone; using DataPlant::PlantLoop; using FluidProperties::GetDensityGlycol; @@ -2816,7 +2815,7 @@ namespace SingleDuct { } else { MaxAirVolFractionDuringReheatDes = 0.0; } - if (this->MaxAirVolFlowRateDuringReheat == AutoCalculate && this->MaxAirVolFractionDuringReheat == AutoCalculate) { + if (this->MaxAirVolFlowRateDuringReheat == DataGlobalConstants::AutoCalculate() && this->MaxAirVolFractionDuringReheat == DataGlobalConstants::AutoCalculate()) { // if both inputs are autosize (the default) report both out and save in the Sys array. BaseSizer::reportSizerOutput( this->SysType, this->SysName, "Design Size Maximum Flow Fraction during Reheat []", MaxAirVolFractionDuringReheatDes); @@ -2828,7 +2827,7 @@ namespace SingleDuct { } this->MaxAirVolFlowRateDuringReheat = MaxAirVolFlowRateDuringReheatDes; this->MaxAirVolFractionDuringReheat = MaxAirVolFractionDuringReheatDes; - } else if (this->MaxAirVolFlowRateDuringReheat == AutoCalculate && this->MaxAirVolFractionDuringReheat != AutoCalculate) { + } else if (this->MaxAirVolFlowRateDuringReheat == DataGlobalConstants::AutoCalculate() && this->MaxAirVolFractionDuringReheat != DataGlobalConstants::AutoCalculate()) { // if max reheat flow fraction was input, set the max reheat flow design value correspondingly, report both out. // Check for optional caution message that user input value is not within 10% of the design value. MaxAirVolFlowRateDuringReheatDes = this->MaxAirVolFractionDuringReheat * this->MaxAirVolFlowRate; @@ -2859,7 +2858,7 @@ namespace SingleDuct { ShowContinueError("Verify that the value entered is intended and is consistent with other components."); } } - } else if (this->MaxAirVolFlowRateDuringReheat != AutoCalculate && this->MaxAirVolFractionDuringReheat == AutoCalculate) { + } else if (this->MaxAirVolFlowRateDuringReheat != DataGlobalConstants::AutoCalculate() && this->MaxAirVolFractionDuringReheat == DataGlobalConstants::AutoCalculate()) { // if max reheat flow was input set the design max reheat flow frac to the corresponding value, report both out, save the design value // of the flow frac in Sys. Check for optional caution message that user input value is not within 10% of the design value. if (this->MaxAirVolFlowRate > 0.0) { @@ -3073,12 +3072,12 @@ namespace SingleDuct { if (DesCoilLoad >= SmallLoad) { rho = GetDensityGlycol(state, PlantLoop(this->HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(this->HWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(this->HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(this->HWLoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/SolarCollectors.cc b/src/EnergyPlus/SolarCollectors.cc index a06cf7aabff..13c713d5f2d 100644 --- a/src/EnergyPlus/SolarCollectors.cc +++ b/src/EnergyPlus/SolarCollectors.cc @@ -246,7 +246,7 @@ namespace SolarCollectors { } if (DataIPShortCuts::rNumericArgs(2) > 0.0) { - Parameters(ParametersNum).TestMassFlowRate = DataIPShortCuts::rNumericArgs(2) * Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + Parameters(ParametersNum).TestMassFlowRate = DataIPShortCuts::rNumericArgs(2) * Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } else { ShowSevereError(CurrentModuleParamObject + " = " + DataIPShortCuts::cAlphaArgs(1) + ": flow rate must be greater than zero for " + DataIPShortCuts::cNumericFieldNames(2)); @@ -828,7 +828,7 @@ namespace SolarCollectors { if (this->VolFlowRateMax > 0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->WLoopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->WLoopNum).FluidIndex, RoutineName); @@ -1680,8 +1680,8 @@ namespace SolarCollectors { auto const SELECT_CASE_var(NumCovers); if (SELECT_CASE_var == 1) { // calc linearized radiation coefficient - tempnom = DataGlobals::StefanBoltzmann * ((TempAbsPlate + DataGlobals::KelvinConv) + (TempOuterCover + DataGlobals::KelvinConv)) * - (pow_2(TempAbsPlate + DataGlobals::KelvinConv) + pow_2(TempOuterCover + DataGlobals::KelvinConv)); + tempnom = DataGlobalConstants::StefanBoltzmann() * ((TempAbsPlate + DataGlobalConstants::KelvinConv()) + (TempOuterCover + DataGlobalConstants::KelvinConv())) * + (pow_2(TempAbsPlate + DataGlobalConstants::KelvinConv()) + pow_2(TempOuterCover + DataGlobalConstants::KelvinConv())); tempdenom = 1.0 / EmissOfAbsPlate + 1.0 / EmissOfOuterCover - 1.0; hRadCoefA2C = tempnom / tempdenom; hRadCoefC2C = 0.0; @@ -1693,9 +1693,9 @@ namespace SolarCollectors { for (int CoverNum = 1; CoverNum <= NumCovers; ++CoverNum) { if (CoverNum == 1) { // calc linearized radiation coefficient - tempnom = DataGlobals::StefanBoltzmann * - ((TempAbsPlate + DataGlobals::KelvinConv) + (TempInnerCover + DataGlobals::KelvinConv)) * - (pow_2(TempAbsPlate + DataGlobals::KelvinConv) + pow_2(TempInnerCover + DataGlobals::KelvinConv)); + tempnom = DataGlobalConstants::StefanBoltzmann() * + ((TempAbsPlate + DataGlobalConstants::KelvinConv()) + (TempInnerCover + DataGlobalConstants::KelvinConv())) * + (pow_2(TempAbsPlate + DataGlobalConstants::KelvinConv()) + pow_2(TempInnerCover + DataGlobalConstants::KelvinConv())); tempdenom = 1.0 / EmissOfAbsPlate + 1.0 / EmissOfInnerCover - 1.0; hRadCoefA2C = tempnom / tempdenom; // Calc convection heat transfer coefficient: @@ -1703,9 +1703,9 @@ namespace SolarCollectors { TempAbsPlate, TempOuterCover, AirGapDepth, this->CosTilt, this->SinTilt); } else { // calculate the linearized radiation coeff. - tempnom = DataGlobals::StefanBoltzmann * - ((TempInnerCover + DataGlobals::KelvinConv) + (TempOuterCover + DataGlobals::KelvinConv)) * - (pow_2(TempInnerCover + DataGlobals::KelvinConv) + pow_2(TempOuterCover + DataGlobals::KelvinConv)); + tempnom = DataGlobalConstants::StefanBoltzmann() * + ((TempInnerCover + DataGlobalConstants::KelvinConv()) + (TempOuterCover + DataGlobalConstants::KelvinConv())) * + (pow_2(TempInnerCover + DataGlobalConstants::KelvinConv()) + pow_2(TempOuterCover + DataGlobalConstants::KelvinConv())); tempdenom = 1.0 / EmissOfInnerCover + 1.0 / EmissOfOuterCover - 1.0; hRadCoefC2C = tempnom / tempdenom; // Calc convection heat transfer coefficient: @@ -1720,9 +1720,9 @@ namespace SolarCollectors { hConvCoefC2O = 2.8 + 3.0 * DataSurfaces::Surface(SurfNum).WindSpeed; // Calc linearized radiation coefficient between outer cover and the surrounding: - tempnom = DataSurfaces::Surface(SurfNum).ViewFactorSky * EmissOfOuterCover * DataGlobals::StefanBoltzmann * - ((TempOuterCover + DataGlobals::KelvinConv) + DataEnvironment::SkyTempKelvin) * - (pow_2(TempOuterCover + DataGlobals::KelvinConv) + pow_2(DataEnvironment::SkyTempKelvin)); + tempnom = DataSurfaces::Surface(SurfNum).ViewFactorSky * EmissOfOuterCover * DataGlobalConstants::StefanBoltzmann() * + ((TempOuterCover + DataGlobalConstants::KelvinConv()) + DataEnvironment::SkyTempKelvin) * + (pow_2(TempOuterCover + DataGlobalConstants::KelvinConv()) + pow_2(DataEnvironment::SkyTempKelvin)); tempdenom = (TempOuterCover - TempOutdoorAir) / (TempOuterCover - DataEnvironment::SkyTemp); if (tempdenom < 0.0) { // use approximate linearized radiation coefficient @@ -1734,9 +1734,9 @@ namespace SolarCollectors { hRadCoefC2Sky = tempnom / tempdenom; } - tempnom = DataSurfaces::Surface(SurfNum).ViewFactorGround * EmissOfOuterCover * DataGlobals::StefanBoltzmann * - ((TempOuterCover + DataGlobals::KelvinConv) + DataEnvironment::GroundTempKelvin) * - (pow_2(TempOuterCover + DataGlobals::KelvinConv) + pow_2(DataEnvironment::GroundTempKelvin)); + tempnom = DataSurfaces::Surface(SurfNum).ViewFactorGround * EmissOfOuterCover * DataGlobalConstants::StefanBoltzmann() * + ((TempOuterCover + DataGlobalConstants::KelvinConv()) + DataEnvironment::GroundTempKelvin) * + (pow_2(TempOuterCover + DataGlobalConstants::KelvinConv()) + pow_2(DataEnvironment::GroundTempKelvin)); tempdenom = (TempOuterCover - TempOutdoorAir) / (TempOuterCover - DataEnvironment::GroundTemp); if (tempdenom < 0.0) { // use approximate linearized radiation coefficient @@ -1873,7 +1873,7 @@ namespace SolarCollectors { DensOfAir = Density(Index - 1) + InterpFrac * (Density(Index) - Density(Index - 1)); } - VolExpAir = 1.0 / (Tref + DataGlobals::KelvinConv); + VolExpAir = 1.0 / (Tref + DataGlobalConstants::KelvinConv()); // Rayleigh number Real64 RaNum = gravity * pow_2(DensOfAir) * VolExpAir * PrOfAir * DeltaT * pow_3(AirGap) / pow_2(VisDOfAir); diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index 1b2b7e288c9..fcb58c1e7db 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -2023,7 +2023,7 @@ namespace SurfaceGeometry { ErrCount = 0; for (int ZoneNum = 1; ZoneNum <= NumOfZones; ++ZoneNum) { Zone(ZoneNum).CalcFloorArea = Zone(ZoneNum).FloorArea; - if (Zone(ZoneNum).UserEnteredFloorArea != AutoCalculate) { + if (Zone(ZoneNum).UserEnteredFloorArea != DataGlobalConstants::AutoCalculate()) { // Check entered vs calculated if (Zone(ZoneNum).UserEnteredFloorArea > 0.0) { // User entered zone floor area, // produce message if not near calculated @@ -2809,7 +2809,7 @@ namespace SurfaceGeometry { ShadingTransmittanceVaries = true; } } - if (lNumericFieldBlanks(1) || rNumericArgs(1) == AutoCalculate) { + if (lNumericFieldBlanks(1) || rNumericArgs(1) == DataGlobalConstants::AutoCalculate()) { numSides = (NumNumbers - 1) / 3; SurfaceTmp(SurfNum).Sides = numSides; if (mod(NumNumbers - 1, 3) != 0) { @@ -3414,8 +3414,8 @@ namespace SurfaceGeometry { if (SurfaceTmp(SurfNum).Construction > 0) SurfaceTmp(SurfNum).ExtEcoRoof = state.dataConstruction->Construct(SurfaceTmp(SurfNum).Construction).TypeIsEcoRoof; SurfaceTmp(SurfNum).ViewFactorGround = rNumericArgs(1); - if (lNumericFieldBlanks(1)) SurfaceTmp(SurfNum).ViewFactorGround = AutoCalculate; - if (lNumericFieldBlanks(2) || rNumericArgs(2) == AutoCalculate) { + if (lNumericFieldBlanks(1)) SurfaceTmp(SurfNum).ViewFactorGround = DataGlobalConstants::AutoCalculate(); + if (lNumericFieldBlanks(2) || rNumericArgs(2) == DataGlobalConstants::AutoCalculate()) { numSides = (SurfaceNumProp - 2) / 3; SurfaceTmp(SurfNum).Sides = numSides; if (mod(SurfaceNumProp - 2, 3) != 0) { @@ -3710,7 +3710,7 @@ namespace SurfaceGeometry { } SurfaceTmp(SurfNum).ExtSolar = false; SurfaceTmp(SurfNum).ExtWind = false; - SurfaceTmp(SurfNum).ViewFactorGround = AutoCalculate; + SurfaceTmp(SurfNum).ViewFactorGround = DataGlobalConstants::AutoCalculate(); if (SurfaceTmp(SurfNum).ExtBoundCond == ExternalEnvironment) { SurfaceTmp(SurfNum).ExtSolar = true; @@ -4284,9 +4284,9 @@ namespace SurfaceGeometry { SurfaceTmp(SurfNum).ExtBoundCondName = SurfaceTmp(SurfNum).Name; } SurfaceTmp(SurfNum).ViewFactorGround = rNumericArgs(1); - if (lNumericFieldBlanks(1)) SurfaceTmp(SurfNum).ViewFactorGround = AutoCalculate; + if (lNumericFieldBlanks(1)) SurfaceTmp(SurfNum).ViewFactorGround = DataGlobalConstants::AutoCalculate(); - if (lNumericFieldBlanks(3) || rNumericArgs(3) == AutoCalculate) { + if (lNumericFieldBlanks(3) || rNumericArgs(3) == DataGlobalConstants::AutoCalculate()) { rNumericArgs(3) = (SurfaceNumProp - 3) / 3; SurfaceTmp(SurfNum).Sides = rNumericArgs(3); if (mod(SurfaceNumProp - 3, 3) != 0) { @@ -5421,7 +5421,7 @@ namespace SurfaceGeometry { ShadingTransmittanceVaries = true; } } - if (lNumericFieldBlanks(1) || rNumericArgs(1) == AutoCalculate) { + if (lNumericFieldBlanks(1) || rNumericArgs(1) == DataGlobalConstants::AutoCalculate()) { rNumericArgs(1) = (NumNumbers - 1) / 3; SurfaceTmp(SurfNum).Sides = rNumericArgs(1); if (mod(NumNumbers - 1, 3) != 0) { @@ -7795,7 +7795,7 @@ namespace SurfaceGeometry { SurfaceTmp(SurfNum).CosAzim = std::cos(SurfWorldAz * DataGlobalConstants::DegToRadians()); SurfaceTmp(SurfNum).SinTilt = std::sin(SurfTilt * DataGlobalConstants::DegToRadians()); SurfaceTmp(SurfNum).CosTilt = std::cos(SurfTilt * DataGlobalConstants::DegToRadians()); - if (SurfaceTmp(SurfNum).ViewFactorGround == AutoCalculate) { + if (SurfaceTmp(SurfNum).ViewFactorGround == DataGlobalConstants::AutoCalculate()) { SurfaceTmp(SurfNum).ViewFactorGround = 0.5 * (1.0 - SurfaceTmp(SurfNum).CosTilt); } // Outward normal unit vector (pointing away from room) @@ -9173,7 +9173,7 @@ namespace SurfaceGeometry { } alpF++; - if (lNumericFieldBlanks(numF) || rNumericArgs(numF) == AutoCalculate) { + if (lNumericFieldBlanks(numF) || rNumericArgs(numF) == DataGlobalConstants::AutoCalculate()) { kivaManager.settings.deepGroundDepth = 40.0; } else { kivaManager.settings.deepGroundDepth = rNumericArgs(numF); @@ -10268,7 +10268,7 @@ namespace SurfaceGeometry { } else if (areOppositeWallsSame(ZoneStruct, oppositeWallArea, distanceBetweenOppositeWalls)) { CalcVolume = oppositeWallArea * distanceBetweenOppositeWalls; volCalcMethod = zoneVolumeCalculationMethod::opWallAreaTimesDistance; - } else if (Zone(ZoneNum).Volume == AutoCalculate) { // no user entered zone volume + } else if (Zone(ZoneNum).Volume == DataGlobalConstants::AutoCalculate()) { // no user entered zone volume ShowSevereError("For zone: " + Zone(ZoneNum).Name + " it is not possible to calculate the volume from the surrounding surfaces so either provide the volume value or " "define all the surfaces to fully enclose the zone."); diff --git a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc index e89a3d6ab5f..885e644017b 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc @@ -120,7 +120,6 @@ namespace SurfaceGroundHeatExchanger { // Use statements for data only modules // Using/Aliasing using namespace DataPrecisionGlobals; - using DataGlobals::KelvinConv; using namespace DataLoopNode; // Use statements for access to subroutines in other modules @@ -1288,8 +1287,8 @@ namespace SurfaceGroundHeatExchanger { // set previous surface temp OldSurfTemp = this->TtopHistory(1); // absolute temperatures - SurfTempAbs = OldSurfTemp + KelvinConv; - SkyTempAbs = ThisSkyTemp + KelvinConv; + SurfTempAbs = OldSurfTemp + DataGlobalConstants::KelvinConv(); + SkyTempAbs = ThisSkyTemp + DataGlobalConstants::KelvinConv(); // ASHRAE simple convection coefficient model for external surfaces. ConvCoef = CalcASHRAESimpExtConvectCoeff(this->TopRoughness, ThisWindSpeed); @@ -1341,8 +1340,8 @@ namespace SurfaceGroundHeatExchanger { // make a surface heat balance and solve for temperature OldSurfTemp = this->TbtmHistory(1); // absolute temperatures - SurfTempAbs = OldSurfTemp + KelvinConv; - ExtTempAbs = ThisDryBulb + KelvinConv; + SurfTempAbs = OldSurfTemp + DataGlobalConstants::KelvinConv(); + ExtTempAbs = ThisDryBulb + DataGlobalConstants::KelvinConv(); // ASHRAE simple convection coefficient model for external surfaces. ConvCoef = CalcASHRAESimpExtConvectCoeff(this->TopRoughness, ThisWindSpeed); diff --git a/src/EnergyPlus/TARCOGArgs.cc b/src/EnergyPlus/TARCOGArgs.cc index 983ee7287a3..e9a29de7686 100644 --- a/src/EnergyPlus/TARCOGArgs.cc +++ b/src/EnergyPlus/TARCOGArgs.cc @@ -83,7 +83,6 @@ namespace TARCOGArgs { // USE STATEMENTS: // Using/Aliasing - using DataGlobals::StefanBoltzmann; using namespace TARCOGCommon; using namespace TARCOGGassesParams; using namespace TARCOGOutput; @@ -692,10 +691,10 @@ namespace TARCOGArgs { auto const SELECT_CASE_var(isky); if (SELECT_CASE_var == 3) { Gout = outir; - trmout = root_4(Gout / StefanBoltzmann); + trmout = root_4(Gout / DataGlobalConstants::StefanBoltzmann()); } else if (SELECT_CASE_var == 2) { // effective clear sky emittance from swinbank (SPC142/ISO15099 equations 131, 132, ...) Rsky = 5.31e-13 * pow_6(tout); - esky = Rsky / (StefanBoltzmann * pow_4(tout)); // check esky const, also check what esky to use when tsky input... + esky = Rsky / (DataGlobalConstants::StefanBoltzmann() * pow_4(tout)); // check esky const, also check what esky to use when tsky input... } else if (SELECT_CASE_var == 1) { esky = pow_4(tsky) / pow_4(tout); } else if (SELECT_CASE_var == 0) { // for isky=0 it is assumed that actual values for esky and Tsky are specified @@ -721,7 +720,7 @@ namespace TARCOGArgs { trmout = tout * root_4(e0); } - Gout = StefanBoltzmann * pow_4(trmout); + Gout = DataGlobalConstants::StefanBoltzmann() * pow_4(trmout); } // if (isky.ne.3) then ebsky = Gout; @@ -739,7 +738,7 @@ namespace TARCOGArgs { trmin = tind; } - Gin = StefanBoltzmann * pow_4(trmin); + Gin = DataGlobalConstants::StefanBoltzmann() * pow_4(trmin); ebroom = Gin; // calculate ir reflectance: diff --git a/src/EnergyPlus/TARCOGCommon.cc b/src/EnergyPlus/TARCOGCommon.cc index af9aa8e4746..2f5e6ee305a 100644 --- a/src/EnergyPlus/TARCOGCommon.cc +++ b/src/EnergyPlus/TARCOGCommon.cc @@ -193,7 +193,6 @@ namespace TARCOGCommon { { // Using/Aliasing - using DataGlobals::StefanBoltzmann; using namespace TARCOGParams; // Locals @@ -236,7 +235,7 @@ namespace TARCOGCommon { } // second row - a(k, k + 1) = emis(front) * StefanBoltzmann * pow_3(theta(front)); + a(k, k + 1) = emis(front) * DataGlobalConstants::StefanBoltzmann() * pow_3(theta(front)); a(k + 1, k + 1) = -1.0; if (i != 1) { a(k - 2, k + 1) = rir(front); @@ -247,7 +246,7 @@ namespace TARCOGCommon { // third row a(k + 2, k + 2) = -1.0; - a(k + 3, k + 2) = emis(back) * StefanBoltzmann * pow_3(theta(back)); + a(k + 3, k + 2) = emis(back) * DataGlobalConstants::StefanBoltzmann() * pow_3(theta(back)); if (i != 1) { a(k - 2, k + 2) = tir(front); } diff --git a/src/EnergyPlus/TARCOGGasses90.cc b/src/EnergyPlus/TARCOGGasses90.cc index a7594586525..3d01d81c636 100644 --- a/src/EnergyPlus/TARCOGGasses90.cc +++ b/src/EnergyPlus/TARCOGGasses90.cc @@ -156,7 +156,7 @@ namespace TARCOGGasses90 { fvis(1) = xgvis(1, iprop(1)) + xgvis(2, iprop(1)) * tmean + xgvis(3, iprop(1)) * tmean_2; fcp(1) = xgcp(1, iprop(1)) + xgcp(2, iprop(1)) * tmean + xgcp(3, iprop(1)) * tmean_2; // Density using ideal gas law: rho=(presure*mol. weight)/(gas const*Tmean) - fdens(1) = pres * xwght(iprop(1)) / (UniversalGasConst * tmean); + fdens(1) = pres * xwght(iprop(1)) / (DataGlobalConstants::UniversalGasConst() * tmean); // Mollecular weights in kg/kmol if ((standard == EN673) || (standard == EN673Design)) { // fdens( 1 ) = xgrho( iprop( 1 ), 1 ) + xgrho( iprop( 1 ), 2 ) * tmean + xgrho( iprop( 1 ), 3 ) * pow_2( tmean ); //Autodesk:Uninit xgrho @@ -175,7 +175,7 @@ namespace TARCOGGasses90 { if (stdISO15099) { molmix = frct(1) * xwght(iprop(1)); // initialize equation 56 cpmixm = molmix * fcp(1); // initialize equation 58 - kprime(1) = 3.75 * UniversalGasConst / xwght(iprop(1)) * fvis(1); // equation 67 + kprime(1) = 3.75 * DataGlobalConstants::UniversalGasConst() / xwght(iprop(1)) * fvis(1); // equation 67 kdblprm(1) = fcon(1) - kprime(1); // equation 67 // initialize sumations for eqns 60-66: mukpdwn(1) = 1.0; @@ -200,7 +200,7 @@ namespace TARCOGGasses90 { if (stdISO15099) { molmix += frct(i) * xwght(iprop(i)); // equation 56 cpmixm += frct(i) * fcp(i) * xwght(iprop(i)); // equation 58-59 - kprime(i) = 3.75 * UniversalGasConst / xwght(iprop(i)) * fvis(i); // equation 67 + kprime(i) = 3.75 * DataGlobalConstants::UniversalGasConst() / xwght(iprop(i)) * fvis(i); // equation 67 kdblprm(i) = fcon(i) - kprime(i); // equation 68 mukpdwn(i) = 1.0; // initialize denominator of equation 60 kpdown(i) = 1.0; // initialize denominator of equation 63 @@ -248,7 +248,7 @@ namespace TARCOGGasses90 { } // calculate the density of the mixture assuming an ideal gas: - Real64 const rhomix = pres * molmix / (UniversalGasConst * tmean); // equation 57 + Real64 const rhomix = pres * molmix / (DataGlobalConstants::UniversalGasConst() * tmean); // equation 57 Real64 const kmix = kpmix + kdpmix; // equation 68-a // final mixture properties: @@ -296,7 +296,7 @@ namespace TARCOGGasses90 { return; } - B = alpha * (gama + 1) / (gama - 1) * std::sqrt(UniversalGasConst / (8 * DataGlobalConstants::Pi() * mwght * tmean)); + B = alpha * (gama + 1) / (gama - 1) * std::sqrt(DataGlobalConstants::UniversalGasConst() / (8 * DataGlobalConstants::Pi() * mwght * tmean)); cond = B * pressure; } diff --git a/src/EnergyPlus/TARCOGOutput.cc b/src/EnergyPlus/TARCOGOutput.cc index c5aa0f13eca..9df853d260e 100644 --- a/src/EnergyPlus/TARCOGOutput.cc +++ b/src/EnergyPlus/TARCOGOutput.cc @@ -161,8 +161,6 @@ namespace TARCOGOutput { { // Using/Aliasing - using DataGlobals::KelvinConv; - // Argument array dimensioning EP_SIZE_CHECK(ibc, 2); EP_SIZE_CHECK(LayerType, maxlay); @@ -326,9 +324,9 @@ namespace TARCOGOutput { print(InArgumentsFile, Format_1000); print(InArgumentsFile, "\n"); print(InArgumentsFile, Format_1005); - print(InArgumentsFile, Format_1010, tout, tout - KelvinConv); - print(InArgumentsFile, Format_1015, tind, tind - KelvinConv); - print(InArgumentsFile, Format_1020, trmin, trmin - KelvinConv); + print(InArgumentsFile, Format_1010, tout, tout - DataGlobalConstants::KelvinConv()); + print(InArgumentsFile, Format_1015, tind, tind - DataGlobalConstants::KelvinConv()); + print(InArgumentsFile, Format_1020, trmin, trmin - DataGlobalConstants::KelvinConv()); print(InArgumentsFile, Format_1030, wso); if (iwd == 0) print(InArgumentsFile, Format_1032); // windward if (iwd == 1) print(InArgumentsFile, Format_1033); // leeward @@ -336,7 +334,7 @@ namespace TARCOGOutput { print(InArgumentsFile, Format_1040, dir); print(InArgumentsFile, Format_1041, outir); print(InArgumentsFile, Format_1045, isky); - print(InArgumentsFile, Format_1050, tsky, tsky - KelvinConv); + print(InArgumentsFile, Format_1050, tsky, tsky - DataGlobalConstants::KelvinConv()); print(InArgumentsFile, Format_1055, esky); print(InArgumentsFile, Format_1060, fclr); print(InArgumentsFile, Format_1061, VacuumPressure); @@ -545,8 +543,6 @@ namespace TARCOGOutput { { // Using/Aliasing - using DataGlobals::KelvinConv; - // Argument array dimensioning EP_SIZE_CHECK(LayerType, maxlay); EP_SIZE_CHECK(nmix, maxlay1); @@ -595,8 +591,8 @@ namespace TARCOGOutput { print(InArgumentsFile, Format_1014); print(InArgumentsFile, "\n"); print(InArgumentsFile, Format_1055, esky); - print(InArgumentsFile, Format_1016, trmout, trmout - KelvinConv); - print(InArgumentsFile, Format_1020, trmin, trmin - KelvinConv); + print(InArgumentsFile, Format_1016, trmout, trmout - DataGlobalConstants::KelvinConv()); + print(InArgumentsFile, Format_1020, trmin, trmin - DataGlobalConstants::KelvinConv()); print(InArgumentsFile, Format_1019, ebsky); print(InArgumentsFile, Format_10191, ebroom); print(InArgumentsFile, Format_1017, Gout); @@ -685,8 +681,6 @@ namespace TARCOGOutput { { // Using/Aliasing - using DataGlobals::KelvinConv; - // Argument array dimensioning EP_SIZE_CHECK(q, maxlay3); EP_SIZE_CHECK(qv, maxlay1); @@ -779,7 +773,7 @@ namespace TARCOGOutput { print(OutArgumentsFile, "\n"); print(OutArgumentsFile, Format_2350); print(OutArgumentsFile, "\n"); - print(OutArgumentsFile, Format_2105, tamb, tamb - KelvinConv); + print(OutArgumentsFile, Format_2105, tamb, tamb - DataGlobalConstants::KelvinConv()); print(OutArgumentsFile, Format_2180, q(1)); // bi Write out layer properties: @@ -788,25 +782,25 @@ namespace TARCOGOutput { { auto const SELECT_CASE_var(LayerType(i)); if (SELECT_CASE_var == SPECULAR) { // Specular layer - print(OutArgumentsFile, Format_2110, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - KelvinConv); + print(OutArgumentsFile, Format_2110, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - DataGlobalConstants::KelvinConv()); print(OutArgumentsFile, Format_2190, i, q(2 * i)); - print(OutArgumentsFile, Format_2110, 2 * i, theta(2 * i), theta(2 * i) - KelvinConv); + print(OutArgumentsFile, Format_2110, 2 * i, theta(2 * i), theta(2 * i) - DataGlobalConstants::KelvinConv()); } else if (SELECT_CASE_var == VENETBLIND_HORIZ || SELECT_CASE_var == VENETBLIND_VERT) { // Venetian blind - print(OutArgumentsFile, Format_2111, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - KelvinConv); + print(OutArgumentsFile, Format_2111, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - DataGlobalConstants::KelvinConv()); print(OutArgumentsFile, Format_2195, i, q(2 * i), i, ShadeGapKeffConv(i)); - print(OutArgumentsFile, Format_2111, 2 * i, theta(2 * i), theta(2 * i) - KelvinConv); + print(OutArgumentsFile, Format_2111, 2 * i, theta(2 * i), theta(2 * i) - DataGlobalConstants::KelvinConv()); } else if (SELECT_CASE_var == WOVSHADE) { // Venetian blind - print(OutArgumentsFile, Format_2112, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - KelvinConv); + print(OutArgumentsFile, Format_2112, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - DataGlobalConstants::KelvinConv()); print(OutArgumentsFile, Format_2195, i, q(2 * i), i, ShadeGapKeffConv(i)); - print(OutArgumentsFile, Format_2112, 2 * i, theta(2 * i), theta(2 * i) - KelvinConv); + print(OutArgumentsFile, Format_2112, 2 * i, theta(2 * i), theta(2 * i) - DataGlobalConstants::KelvinConv()); } else if (SELECT_CASE_var == DIFFSHADE) { // Venetian blind - print(OutArgumentsFile, Format_2110, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - KelvinConv); + print(OutArgumentsFile, Format_2110, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - DataGlobalConstants::KelvinConv()); print(OutArgumentsFile, Format_2190, i, q(2 * i)); - print(OutArgumentsFile, Format_2110, 2 * i, theta(2 * i), theta(2 * i) - KelvinConv); + print(OutArgumentsFile, Format_2110, 2 * i, theta(2 * i), theta(2 * i) - DataGlobalConstants::KelvinConv()); } else { - print(OutArgumentsFile, Format_2110, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - KelvinConv); + print(OutArgumentsFile, Format_2110, 2 * i - 1, theta(2 * i - 1), theta(2 * i - 1) - DataGlobalConstants::KelvinConv()); print(OutArgumentsFile, Format_2199, i, q(2 * i)); - print(OutArgumentsFile, Format_2110, 2 * i, theta(2 * i), theta(2 * i) - KelvinConv); + print(OutArgumentsFile, Format_2110, 2 * i, theta(2 * i), theta(2 * i) - DataGlobalConstants::KelvinConv()); } } @@ -832,7 +826,7 @@ namespace TARCOGOutput { } } // i - layers - print(OutArgumentsFile, Format_2115, troom, troom - KelvinConv); + print(OutArgumentsFile, Format_2115, troom, troom - DataGlobalConstants::KelvinConv()); print(OutArgumentsFile, "\n"); diff --git a/src/EnergyPlus/TarcogShading.cc b/src/EnergyPlus/TarcogShading.cc index 0a63cbead67..543281f0404 100644 --- a/src/EnergyPlus/TarcogShading.cc +++ b/src/EnergyPlus/TarcogShading.cc @@ -610,7 +610,6 @@ namespace TarcogShading { //************************************************************************************************************** // Using/Aliasing - using DataGlobals::KelvinConv; // Argument array dimensioning EP_SIZE_CHECK(iprop1, maxgas); EP_SIZE_CHECK(frct1, maxgas); @@ -679,7 +678,7 @@ namespace TarcogShading { TGapOld1 = 0.0; TGapOld2 = 0.0; tilt = DataGlobalConstants::Pi() / 180 * (angle - 90); - T0 = 0.0 + KelvinConv; + T0 = 0.0 + DataGlobalConstants::KelvinConv(); A1eqin = 0.0; A2eqout = 0.0; A1eqout = 0.0; @@ -904,7 +903,6 @@ namespace TarcogShading { //************************************************************************************************************** // Using/Aliasing - using DataGlobals::KelvinConv; // Argument array dimensioning EP_SIZE_CHECK(iprop1, maxgas); EP_SIZE_CHECK(frct1, maxgas); @@ -950,7 +948,7 @@ namespace TarcogShading { bool converged; tilt = DataGlobalConstants::Pi() / 180.0 * (angle - 90.0); - T0 = 0.0 + KelvinConv; + T0 = 0.0 + DataGlobalConstants::KelvinConv(); GASSES90(T0, iprop1, frct1, press1, nmix1, xwght, xgcon, xgvis, xgcp, con0, visc0, dens0, cp0, pr0, 1, nperr, ErrorMessage); // call gasses90(Tenv, iprop1, frct1, press1, nmix1, xwght, xgcon, xgvis, xgcp, con1, visc1, dens1, cp1, pr1, 1, & diff --git a/src/EnergyPlus/ThermalChimney.cc b/src/EnergyPlus/ThermalChimney.cc index 84e2b69f14a..22170b25adf 100644 --- a/src/EnergyPlus/ThermalChimney.cc +++ b/src/EnergyPlus/ThermalChimney.cc @@ -718,7 +718,7 @@ namespace ThermalChimney { if (TempSurfIn(SurfNum) > TemporaryWallSurfTemp) { TemporaryWallSurfTemp = TempSurfIn(SurfNum); ConvTransCoeffWallFluid = HConvIn(SurfNum); - SurfTempAbsorberWall = TempSurfIn(SurfNum) + KelvinConv; + SurfTempAbsorberWall = TempSurfIn(SurfNum) + DataGlobalConstants::KelvinConv(); } } } @@ -732,7 +732,7 @@ namespace ThermalChimney { if (Surface(SurfNum).Width > TempmajorW) { TempmajorW = Surface(SurfNum).Width; ConvTransCoeffGlassFluid = HConvIn(SurfNum); - SurfTempGlassCover = TempSurfIn(SurfNum) + KelvinConv; + SurfTempGlassCover = TempSurfIn(SurfNum) + DataGlobalConstants::KelvinConv(); } } } @@ -757,7 +757,7 @@ namespace ThermalChimney { TCZoneNumCounter = ThermalChimneySys(Loop).ZonePtr(TCZoneNum); RoomAirTemp += ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * MAT(TCZoneNumCounter); } - RoomAirTemp += KelvinConv; + RoomAirTemp += DataGlobalConstants::KelvinConv(); Process1 = 0.0; Process2 = 0.0; @@ -887,7 +887,7 @@ namespace ThermalChimney { if (ThermalChimneyReport(Loop).OverallTCMassFlow != (TCVolumeAirFlowRate * AirDensityThermalChim)) { ThermalChimneyReport(Loop).OverallTCMassFlow = ThermalChimneyReport(Loop).OverallTCVolumeFlow * AirDensityThermalChim; } - ThermalChimneyReport(Loop).OutletAirTempThermalChim = ThermChimSubTemp(NTC) - KelvinConv; + ThermalChimneyReport(Loop).OutletAirTempThermalChim = ThermChimSubTemp(NTC) - DataGlobalConstants::KelvinConv(); if (GetCurrentScheduleValue(ThermalChimneySys(Loop).SchedPtr) <= 0.0) { for (TCZoneNum = 1; TCZoneNum <= ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { diff --git a/src/EnergyPlus/ThermalComfort.cc b/src/EnergyPlus/ThermalComfort.cc index 3583df8c16d..7e12761303d 100644 --- a/src/EnergyPlus/ThermalComfort.cc +++ b/src/EnergyPlus/ThermalComfort.cc @@ -141,7 +141,7 @@ namespace ThermalComfort { } // namespace // MODULE PARAMETER DEFINITIONS - Real64 const TAbsConv(KelvinConv); // Converter for absolute temperature + Real64 const TAbsConv(DataGlobalConstants::KelvinConv()); // Converter for absolute temperature Real64 const ActLevelConv(58.2); // Converter for activity level (1Met = 58.2 W/m2) Real64 const BodySurfArea(1.8); // Dubois body surface area of the human body (m2) Real64 const RadSurfEff(0.72); // Fraction of surface effective for radiation @@ -1979,9 +1979,6 @@ namespace ThermalComfort { // Locals Real64 SurfaceTemp; - // SUBROUTINE PARAMETER DEFINITIONS: - Real64 const KelvinConv(273.15); // Conversion from Celsius to Kelvin - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int SurfNum; Real64 SurfTempEmissAngleFacSummed; @@ -1995,13 +1992,13 @@ namespace ThermalComfort { auto &thisAngFacList(AngleFactorList(AngleFacNum)); for (SurfNum = 1; SurfNum <= thisAngFacList.TotAngleFacSurfaces; ++SurfNum) { - SurfaceTemp = TH(2, 1, thisAngFacList.SurfacePtr(SurfNum)) + KelvinConv; + SurfaceTemp = TH(2, 1, thisAngFacList.SurfacePtr(SurfNum)) + DataGlobalConstants::KelvinConv(); SurfEAF = state.dataConstruction->Construct(Surface(thisAngFacList.SurfacePtr(SurfNum)).Construction).InsideAbsorpThermal * thisAngFacList.AngleFactor(SurfNum); SurfTempEmissAngleFacSummed += SurfEAF * pow_4(SurfaceTemp); SumSurfaceEmissAngleFactor += SurfEAF; } - CalcAngleFactorMRT = root_4(SurfTempEmissAngleFacSummed / SumSurfaceEmissAngleFactor) - KelvinConv; + CalcAngleFactorMRT = root_4(SurfTempEmissAngleFacSummed / SumSurfaceEmissAngleFactor) - DataGlobalConstants::KelvinConv(); return CalcAngleFactorMRT; } @@ -2174,11 +2171,11 @@ namespace ThermalComfort { // If high temperature radiant heater present and on, then must account for this in MRT calculation if (QHTRadSysToPerson(ZoneNum) > 0.0 || QCoolingPanelToPerson(ZoneNum) > 0.0 || QHWBaseboardToPerson(ZoneNum) > 0.0 || QSteamBaseboardToPerson(ZoneNum) > 0.0 || QElecBaseboardToPerson(ZoneNum) > 0.0) { - RadTemp += KelvinConv; // Convert to Kelvin + RadTemp += DataGlobalConstants::KelvinConv(); // Convert to Kelvin RadTemp = root_4(pow_4(RadTemp) + ((QHTRadSysToPerson(ZoneNum) + QCoolingPanelToPerson(ZoneNum) + QHWBaseboardToPerson(ZoneNum) + QSteamBaseboardToPerson(ZoneNum) + QElecBaseboardToPerson(ZoneNum)) / AreaEff / StefanBoltzmannConst)); - RadTemp -= KelvinConv; // Convert back to Celsius + RadTemp -= DataGlobalConstants::KelvinConv(); // Convert back to Celsius } CalcRadTemp = RadTemp; diff --git a/src/EnergyPlus/ThermalEN673Calc.cc b/src/EnergyPlus/ThermalEN673Calc.cc index 4f9f35b57a9..117bbcc269c 100644 --- a/src/EnergyPlus/ThermalEN673Calc.cc +++ b/src/EnergyPlus/ThermalEN673Calc.cc @@ -260,8 +260,6 @@ namespace ThermalEN673Calc { std::string &ErrorMessage) { // Using - using DataGlobals::StefanBoltzmann; - // Argument array dimensioning EP_SIZE_CHECK(emis, maxlay2); EP_SIZE_CHECK(gap, MaxGap); @@ -424,7 +422,7 @@ namespace ThermalEN673Calc { } } for (i = 1; i <= nlayer - 1; ++i) { - hr(i) = 4.0 * StefanBoltzmann * std::pow(1.0 / emis(2 * i) + 1.0 / emis(2 * i + 1) - 1.0, -1.0) * pow_3(Tm); + hr(i) = 4.0 * DataGlobalConstants::StefanBoltzmann() * std::pow(1.0 / emis(2 * i) + 1.0 / emis(2 * i + 1) - 1.0, -1.0) * pow_3(Tm); hs(i) = hg(i) + hr(i); rs(2 * i + 1) = 1.0 / hs(i); // Thermal resistance of each gap sumRs += rs(2 * i + 1); diff --git a/src/EnergyPlus/ThermalISO15099Calc.cc b/src/EnergyPlus/ThermalISO15099Calc.cc index 8cda1128228..56bb2f2e2a2 100644 --- a/src/EnergyPlus/ThermalISO15099Calc.cc +++ b/src/EnergyPlus/ThermalISO15099Calc.cc @@ -1442,8 +1442,6 @@ namespace ThermalISO15099Calc { // index iteration step // Using - using DataGlobals::StefanBoltzmann; - // Locals // 0 - don't create debug output files // 1 - append results to existing debug output file @@ -2062,8 +2060,8 @@ namespace ThermalISO15099Calc { k = 2 * i - 1; Rf(i) = Radiation(k); Rb(i) = Radiation(k + 1); - Ebf(i) = StefanBoltzmann * pow_4(theta(k)); - Ebb(i) = StefanBoltzmann * pow_4(theta(k + 1)); + Ebf(i) = DataGlobalConstants::StefanBoltzmann() * pow_4(theta(k)); + Ebb(i) = DataGlobalConstants::StefanBoltzmann() * pow_4(theta(k + 1)); } // end if @@ -2078,7 +2076,7 @@ namespace ThermalISO15099Calc { qr_gap_in = Rf(nlayer) - Rb(nlayer - 1); if (IsShadingLayer(LayerType(1))) { - ShadeEmisRatioOut = qr_gap_out / (emis(3) * StefanBoltzmann * (pow_4(theta(3)) - pow_4(trmout))); + ShadeEmisRatioOut = qr_gap_out / (emis(3) * DataGlobalConstants::StefanBoltzmann() * (pow_4(theta(3)) - pow_4(trmout))); // qc_gap_out = qprim(3) - qr_gap_out // qcgapout2 = qcgas(1) // Hc_modified_out = (qc_gap_out / (theta(3) - tout)) @@ -2086,7 +2084,7 @@ namespace ThermalISO15099Calc { } if (IsShadingLayer(LayerType(nlayer))) { - ShadeEmisRatioIn = qr_gap_in / (emis(2 * nlayer - 2) * StefanBoltzmann * (pow_4(trmin) - pow_4(theta(2 * nlayer - 2)))); + ShadeEmisRatioIn = qr_gap_in / (emis(2 * nlayer - 2) * DataGlobalConstants::StefanBoltzmann() * (pow_4(trmin) - pow_4(theta(2 * nlayer - 2)))); qc_gap_in = q(2 * nlayer - 1) - qr_gap_in; hc_modified_in = (qc_gap_in / (tind - theta(2 * nlayer - 2))); ShadeHcModifiedIn = hc_modified_in; @@ -2139,8 +2137,6 @@ namespace ThermalISO15099Calc { // delta delta T per unit length // Using - using DataGlobals::StefanBoltzmann; - // Argument array dimensioning EP_SIZE_CHECK(gap, MaxGap); EP_SIZE_CHECK(thick, maxlay); @@ -2177,8 +2173,8 @@ namespace ThermalISO15099Calc { j = 2 * i; theta(j - 1) = tout + x(j - 1) * delta; theta(j) = tout + x(j) * delta; - Ebf(i) = StefanBoltzmann * pow_4(theta(j - 1)); - Ebb(i) = StefanBoltzmann * pow_4(theta(j)); + Ebf(i) = DataGlobalConstants::StefanBoltzmann() * pow_4(theta(j - 1)); + Ebb(i) = DataGlobalConstants::StefanBoltzmann() * pow_4(theta(j)); } for (i = 1; i <= nlayer + 1; ++i) { @@ -2205,8 +2201,6 @@ namespace ThermalISO15099Calc { //*********************************************************************** // Using - using DataGlobals::StefanBoltzmann; - // Argument array dimensioning EP_SIZE_CHECK(theta, maxlay2); EP_SIZE_CHECK(Tgap, maxlay1); @@ -2238,8 +2232,8 @@ namespace ThermalISO15099Calc { j = 2 * i; told(j) = theta(j); told(j - 1) = theta(j - 1); - theta(j - 1) = root_4(Ebf(i) / StefanBoltzmann); - theta(j) = root_4(Ebb(i) / StefanBoltzmann); + theta(j - 1) = root_4(Ebf(i) / DataGlobalConstants::StefanBoltzmann()); + theta(j) = root_4(Ebb(i) / DataGlobalConstants::StefanBoltzmann()); if (i != 1) { Tgap(i) = (theta(j - 1) + theta(j - 2)) / 2; } @@ -3350,8 +3344,6 @@ namespace ThermalISO15099Calc { { // Using/Aliasing - using DataGlobals::KelvinConv; - // Locals // character(len=*), intent(inout) :: ErrorMessage @@ -3383,10 +3375,10 @@ namespace ThermalISO15099Calc { print(files.TarcogIterationsFile, "*************************************************************************************************\n"); print(files.TarcogIterationsFile, "Iteration number: {:5}\n" , index); - print(files.TarcogIterationsFile, "Trmin = {:8.4F}\n" , trmin - KelvinConv); - print(files.TarcogIterationsFile, "Troom = {:12.6F}\n" , troom - KelvinConv); - print(files.TarcogIterationsFile, "Trmout = {:8.4F}\n" , trmout - KelvinConv); - print(files.TarcogIterationsFile, "Tamb = {:12.6F}\n" , tamb - KelvinConv); + print(files.TarcogIterationsFile, "Trmin = {:8.4F}\n" , trmin - DataGlobalConstants::KelvinConv()); + print(files.TarcogIterationsFile, "Troom = {:12.6F}\n" , troom - DataGlobalConstants::KelvinConv()); + print(files.TarcogIterationsFile, "Trmout = {:8.4F}\n" , trmout - DataGlobalConstants::KelvinConv()); + print(files.TarcogIterationsFile, "Tamb = {:12.6F}\n" , tamb - DataGlobalConstants::KelvinConv()); print(files.TarcogIterationsFile, "Ebsky = {:8.4F}\n" , ebsky); print(files.TarcogIterationsFile, "Ebroom = {:8.4F}\n" , ebroom); @@ -3461,9 +3453,9 @@ namespace ThermalISO15099Calc { print(files.TarcogIterationsFile, "\n"); // write temperatures - print(files.TarcogIterationsFile, "{:16.8F} \n", theta(1) - KelvinConv); + print(files.TarcogIterationsFile, "{:16.8F} \n", theta(1) - DataGlobalConstants::KelvinConv()); for (i = 2; i <= 2 * nlayer; ++i) { - print(files.TarcogIterationsFile, " {:16.8F} \n", theta(i) - KelvinConv); + print(files.TarcogIterationsFile, " {:16.8F} \n", theta(i) - DataGlobalConstants::KelvinConv()); } print(files.TarcogIterationsFile, "\n"); @@ -3483,9 +3475,9 @@ namespace ThermalISO15099Calc { print(files.IterationCSVFile, dynFormat); print(files.IterationCSVFile, "\n"); } - print(files.IterationCSVFile, "{:16.8F} \n", theta(1) - KelvinConv); + print(files.IterationCSVFile, "{:16.8F} \n", theta(1) - DataGlobalConstants::KelvinConv()); for (i = 2; i <= 2 * nlayer; ++i) { - print(files.IterationCSVFile, " {:16.8F} \n", theta(i) - KelvinConv); + print(files.IterationCSVFile, " {:16.8F} \n", theta(i) - DataGlobalConstants::KelvinConv()); } print(files.IterationCSVFile, "\n"); diff --git a/src/EnergyPlus/TranspiredCollector.cc b/src/EnergyPlus/TranspiredCollector.cc index ed698a47d44..34616e53571 100644 --- a/src/EnergyPlus/TranspiredCollector.cc +++ b/src/EnergyPlus/TranspiredCollector.cc @@ -112,7 +112,6 @@ namespace TranspiredCollector { // See EngineeringReference for details // Using/Aliasing - using DataGlobals::KelvinConv; using DataHeatBalance::QRadSWOutIncident; using DataVectorTypes::Vector; @@ -913,9 +912,6 @@ namespace TranspiredCollector { Real64 const k(0.0267); // thermal conductivity (W/m K) for air at 300 K // (Mills 1999 Heat Transfer) Real64 const Sigma(5.6697e-08); // Stefan-Boltzmann constant - // REAL(r64), PARAMETER :: KelvinConv = KelvinConv ! Conversion from Celsius to Kelvin - // INTERFACE BLOCK SPECIFICATIONS: - // na // DERIVED TYPE DEFINITIONS: // na @@ -1076,8 +1072,8 @@ namespace TranspiredCollector { InitExteriorConvectionCoeff(state, SurfPtr, HMovInsul, Roughness, AbsExt, TempExt, HExt, HSkyARR(ThisSurf), HGroundARR(ThisSurf), HAirARR(ThisSurf)); ConstrNum = Surface(SurfPtr).Construction; AbsThermSurf = dataMaterial.Material(state.dataConstruction->Construct(ConstrNum).LayerPoint(1)).AbsorpThermal; - TsoK = TH(1, 1, SurfPtr) + KelvinConv; - TscollK = UTSC(UTSCNum).TcollLast + KelvinConv; + TsoK = TH(1, 1, SurfPtr) + DataGlobalConstants::KelvinConv(); + TscollK = UTSC(UTSCNum).TcollLast + DataGlobalConstants::KelvinConv(); HPlenARR(ThisSurf) = Sigma * AbsExt * AbsThermSurf * (pow_4(TscollK) - pow_4(TsoK)) / (TscollK - TsoK); } // AreaSum = sum( Surface( UTSC( UTSCNum ).SurfPtrs ).Area ); //Autodesk:F2C++ Array subscript usage: Replaced by below diff --git a/src/EnergyPlus/UFADManager.cc b/src/EnergyPlus/UFADManager.cc index a7b2844b586..63ac23070af 100644 --- a/src/EnergyPlus/UFADManager.cc +++ b/src/EnergyPlus/UFADManager.cc @@ -396,8 +396,8 @@ namespace UFADManager { ZoneUCSDUI(UINum).CalcTransHeight = false; } if (ZoneUCSDUI(UINum).DiffuserType == Swirl) { - if (ZoneUCSDUI(UINum).A_Kc != AutoCalculate || ZoneUCSDUI(UINum).B_Kc != AutoCalculate || ZoneUCSDUI(UINum).C_Kc != AutoCalculate || - ZoneUCSDUI(UINum).D_Kc != AutoCalculate || ZoneUCSDUI(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUI(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUI(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionInterior for Zone " + ZoneUCSDUI(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = Swirl."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -408,8 +408,8 @@ namespace UFADManager { ZoneUCSDUI(UINum).D_Kc = 0.0069; ZoneUCSDUI(UINum).E_Kc = -0.00004; } else if (ZoneUCSDUI(UINum).DiffuserType == VarArea) { - if (ZoneUCSDUI(UINum).A_Kc != AutoCalculate || ZoneUCSDUI(UINum).B_Kc != AutoCalculate || ZoneUCSDUI(UINum).C_Kc != AutoCalculate || - ZoneUCSDUI(UINum).D_Kc != AutoCalculate || ZoneUCSDUI(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUI(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUI(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionInterior for Zone " + ZoneUCSDUI(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = VariableArea."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -420,8 +420,8 @@ namespace UFADManager { ZoneUCSDUI(UINum).D_Kc = 0.0; ZoneUCSDUI(UINum).E_Kc = 0.0; } else if (ZoneUCSDUI(UINum).DiffuserType == DisplVent) { - if (ZoneUCSDUI(UINum).A_Kc != AutoCalculate || ZoneUCSDUI(UINum).B_Kc != AutoCalculate || ZoneUCSDUI(UINum).C_Kc != AutoCalculate || - ZoneUCSDUI(UINum).D_Kc != AutoCalculate || ZoneUCSDUI(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUI(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUI(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionInterior for Zone " + ZoneUCSDUI(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = HorizontalDisplacement."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -432,8 +432,8 @@ namespace UFADManager { ZoneUCSDUI(UINum).D_Kc = 0.0; ZoneUCSDUI(UINum).E_Kc = 0.0; } else if (ZoneUCSDUI(UINum).DiffuserType == LinBarGrille) { - if (ZoneUCSDUI(UINum).A_Kc != AutoCalculate || ZoneUCSDUI(UINum).B_Kc != AutoCalculate || ZoneUCSDUI(UINum).C_Kc != AutoCalculate || - ZoneUCSDUI(UINum).D_Kc != AutoCalculate || ZoneUCSDUI(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUI(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUI(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionInterior for Zone " + ZoneUCSDUI(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = LinearBarGrille."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -444,13 +444,13 @@ namespace UFADManager { ZoneUCSDUI(UINum).D_Kc = 0.0; ZoneUCSDUI(UINum).E_Kc = 0.0; } else { - if (ZoneUCSDUI(UINum).A_Kc == AutoCalculate || ZoneUCSDUI(UINum).B_Kc == AutoCalculate || ZoneUCSDUI(UINum).C_Kc == AutoCalculate || - ZoneUCSDUI(UINum).D_Kc == AutoCalculate || ZoneUCSDUI(UINum).E_Kc == AutoCalculate) { + if (ZoneUCSDUI(UINum).A_Kc == DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).B_Kc == DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).C_Kc == DataGlobalConstants::AutoCalculate() || + ZoneUCSDUI(UINum).D_Kc == DataGlobalConstants::AutoCalculate() || ZoneUCSDUI(UINum).E_Kc == DataGlobalConstants::AutoCalculate()) { ShowFatalError("For RoomAirSettings:UnderFloorAirDistributionInterior for Zone " + ZoneUCSDUI(UINum).ZoneName + ", input for Coefficients A - E must be specified when Floor Diffuser Type = Custom."); } } - if (ZoneUCSDUI(UINum).PowerPerPlume == AutoCalculate) { + if (ZoneUCSDUI(UINum).PowerPerPlume == DataGlobalConstants::AutoCalculate()) { NumberOfPlumes = 0.0; if (NumberOfOccupants > 0.0) { NumberOfPlumes = NumberOfOccupants; @@ -572,8 +572,8 @@ namespace UFADManager { ZoneUCSDUE(UINum).CalcTransHeight = false; } if (ZoneUCSDUE(UINum).DiffuserType == Swirl) { - if (ZoneUCSDUE(UINum).A_Kc != AutoCalculate || ZoneUCSDUE(UINum).B_Kc != AutoCalculate || ZoneUCSDUE(UINum).C_Kc != AutoCalculate || - ZoneUCSDUE(UINum).D_Kc != AutoCalculate || ZoneUCSDUE(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUE(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUE(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionExterior for Zone " + ZoneUCSDUE(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = Swirl."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -584,8 +584,8 @@ namespace UFADManager { ZoneUCSDUE(UINum).D_Kc = 0.0069; ZoneUCSDUE(UINum).E_Kc = -0.00004; } else if (ZoneUCSDUE(UINum).DiffuserType == VarArea) { - if (ZoneUCSDUE(UINum).A_Kc != AutoCalculate || ZoneUCSDUE(UINum).B_Kc != AutoCalculate || ZoneUCSDUE(UINum).C_Kc != AutoCalculate || - ZoneUCSDUE(UINum).D_Kc != AutoCalculate || ZoneUCSDUE(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUE(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUE(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionExterior for Zone " + ZoneUCSDUE(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = VariableArea."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -596,8 +596,8 @@ namespace UFADManager { ZoneUCSDUE(UINum).D_Kc = 0.0; ZoneUCSDUE(UINum).E_Kc = 0.0; } else if (ZoneUCSDUE(UINum).DiffuserType == DisplVent) { - if (ZoneUCSDUE(UINum).A_Kc != AutoCalculate || ZoneUCSDUE(UINum).B_Kc != AutoCalculate || ZoneUCSDUE(UINum).C_Kc != AutoCalculate || - ZoneUCSDUE(UINum).D_Kc != AutoCalculate || ZoneUCSDUE(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUE(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUE(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionExterior for Zone " + ZoneUCSDUE(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = HorizontalDisplacement."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -608,8 +608,8 @@ namespace UFADManager { ZoneUCSDUE(UINum).D_Kc = 0.0; ZoneUCSDUE(UINum).E_Kc = 0.0; } else if (ZoneUCSDUE(UINum).DiffuserType == LinBarGrille) { - if (ZoneUCSDUE(UINum).A_Kc != AutoCalculate || ZoneUCSDUE(UINum).B_Kc != AutoCalculate || ZoneUCSDUE(UINum).C_Kc != AutoCalculate || - ZoneUCSDUE(UINum).D_Kc != AutoCalculate || ZoneUCSDUE(UINum).E_Kc != AutoCalculate) { + if (ZoneUCSDUE(UINum).A_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).B_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).C_Kc != DataGlobalConstants::AutoCalculate() || + ZoneUCSDUE(UINum).D_Kc != DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).E_Kc != DataGlobalConstants::AutoCalculate()) { ShowWarningError("For RoomAirSettings:UnderFloorAirDistributionExterior for Zone " + ZoneUCSDUE(UINum).ZoneName + ", input for Coefficients A - E will be ignored when Floor Diffuser Type = LinearBarGrille."); ShowContinueError(" To input these Coefficients, use Floor Diffuser Type = Custom."); @@ -620,13 +620,13 @@ namespace UFADManager { ZoneUCSDUE(UINum).D_Kc = -0.0263; ZoneUCSDUE(UINum).E_Kc = 0.0014; } else { - if (ZoneUCSDUE(UINum).A_Kc == AutoCalculate || ZoneUCSDUE(UINum).B_Kc == AutoCalculate || ZoneUCSDUE(UINum).C_Kc == AutoCalculate || - ZoneUCSDUE(UINum).D_Kc == AutoCalculate || ZoneUCSDUE(UINum).E_Kc == AutoCalculate) { + if (ZoneUCSDUE(UINum).A_Kc == DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).B_Kc == DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).C_Kc == DataGlobalConstants::AutoCalculate() || + ZoneUCSDUE(UINum).D_Kc == DataGlobalConstants::AutoCalculate() || ZoneUCSDUE(UINum).E_Kc == DataGlobalConstants::AutoCalculate()) { ShowFatalError("For RoomAirSettings:UnderFloorAirDistributionExterior for Zone " + ZoneUCSDUE(UINum).ZoneName + ", input for Coefficients A - E must be specified when Floor Diffuser Type = Custom."); } } - if (ZoneUCSDUE(UINum).PowerPerPlume == AutoCalculate) { + if (ZoneUCSDUE(UINum).PowerPerPlume == DataGlobalConstants::AutoCalculate()) { if (NumberOfOccupants > 0) { NumberOfPlumes = NumberOfOccupants; } else { @@ -1167,7 +1167,7 @@ namespace UFADManager { SumSysM += MassFlowRate; } if (TotSysFlow > 0.0) { - TSupK = TSupK / SumSysM + KelvinConv; + TSupK = TSupK / SumSysM + DataGlobalConstants::KelvinConv(); } else { TSupK = 0.0; } @@ -1196,7 +1196,7 @@ namespace UFADManager { NumberOfPlumes = 1.0; NumDiffusersPerPlume = 1.0; } - if ((PowerInPlumes <= 0.0) || (TotSysFlow == 0.0) || (TSupK - KelvinConv) > MAT(ZoneNum)) { + if ((PowerInPlumes <= 0.0) || (TotSysFlow == 0.0) || (TSupK - DataGlobalConstants::KelvinConv()) > MAT(ZoneNum)) { // The system will mix HeightFrac = 0.0; } else { @@ -1433,7 +1433,7 @@ namespace UFADManager { if (MIXFLAG) { Phi(ZoneNum) = 1.0; } else { - Phi(ZoneNum) = (ZTOC(ZoneNum) - (TSupK - KelvinConv)) / (ZTMX(ZoneNum) - (TSupK - KelvinConv)); + Phi(ZoneNum) = (ZTOC(ZoneNum) - (TSupK - DataGlobalConstants::KelvinConv())) / (ZTMX(ZoneNum) - (TSupK - DataGlobalConstants::KelvinConv())); } // Mixed for reporting purposes @@ -1644,7 +1644,7 @@ namespace UFADManager { SumSysM += MassFlowRate; } if (TotSysFlow > 0.0) { - TSupK = TSupK / SumSysM + KelvinConv; + TSupK = TSupK / SumSysM + DataGlobalConstants::KelvinConv(); } else { TSupK = 0.0; } @@ -1676,7 +1676,7 @@ namespace UFADManager { NumberOfPlumes = 1.0; NumDiffusersPerPlume = 1.0; } - if ((PowerInPlumes <= 0.0) || (TotSysFlow == 0.0) || (TSupK - KelvinConv) > MAT(ZoneNum)) { + if ((PowerInPlumes <= 0.0) || (TotSysFlow == 0.0) || (TSupK - DataGlobalConstants::KelvinConv()) > MAT(ZoneNum)) { // The system will mix HeightFrac = 0.0; } else { @@ -1947,7 +1947,7 @@ namespace UFADManager { if (MIXFLAG) { Phi(ZoneNum) = 1.0; } else { - Phi(ZoneNum) = (ZTOC(ZoneNum) - (TSupK - KelvinConv)) / (ZTMX(ZoneNum) - (TSupK - KelvinConv)); + Phi(ZoneNum) = (ZTOC(ZoneNum) - (TSupK - DataGlobalConstants::KelvinConv())) / (ZTMX(ZoneNum) - (TSupK - DataGlobalConstants::KelvinConv())); } // Mixed for reporting purposes diff --git a/src/EnergyPlus/UnitHeater.cc b/src/EnergyPlus/UnitHeater.cc index e6a66e7bff2..add7a66e7f8 100644 --- a/src/EnergyPlus/UnitHeater.cc +++ b/src/EnergyPlus/UnitHeater.cc @@ -864,7 +864,7 @@ namespace UnitHeater { if (UnitHeat(UnitHeatNum).HCoilType == WaterHeatingCoil) { rho = GetDensityGlycol(state, PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidIndex, RoutineName); @@ -1224,11 +1224,11 @@ namespace UnitHeater { if (DesCoilLoad >= SmallLoad) { rho = GetDensityGlycol(state, PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidIndex, RoutineName); MaxVolHotWaterFlowDes = DesCoilLoad / (WaterCoilSizDeltaT * Cp * rho); diff --git a/src/EnergyPlus/UnitVentilator.cc b/src/EnergyPlus/UnitVentilator.cc index c6088c5f72b..432488d28d5 100644 --- a/src/EnergyPlus/UnitVentilator.cc +++ b/src/EnergyPlus/UnitVentilator.cc @@ -1471,7 +1471,7 @@ namespace UnitVentilator { if (UnitVent(UnitVentNum).HCoilType == Heating_WaterCoilType) { rho = GetDensityGlycol(state, PlantLoop(UnitVent(UnitVentNum).HWLoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitVent(UnitVentNum).HWLoopNum).FluidIndex, RoutineName); @@ -2227,11 +2227,11 @@ namespace UnitVentilator { DesHeatingLoad = sizerHeatingCapacity.size(state, TempSize, errorsFound); } rho = GetDensityGlycol(state, PlantLoop(UnitVent(UnitVentNum).HWLoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitVent(UnitVentNum).HWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(UnitVent(UnitVentNum).HWLoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitVent(UnitVentNum).HWLoopNum).FluidIndex, RoutineName); MaxVolHotWaterFlowDes = DesHeatingLoad / (WaterCoilSizDeltaT * Cp * rho); diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index ef5b82c2f7c..c32de0da716 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -740,7 +740,7 @@ namespace UnitarySystems { if (this->MaxCoolCoilFluidFlow > 0.0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CoolCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CoolCoilLoopNum).FluidIndex, routineName); this->MaxCoolCoilFluidFlow *= rho; @@ -790,7 +790,7 @@ namespace UnitarySystems { if (this->MaxHeatCoilFluidFlow > 0.0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HeatCoilLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->HeatCoilLoopNum).FluidIndex, routineName); this->MaxHeatCoilFluidFlow = @@ -849,7 +849,7 @@ namespace UnitarySystems { if (this->m_MaxSuppCoilFluidFlow > 0.0) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->m_SuppCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->m_SuppCoilLoopNum).FluidIndex, routineName); this->m_MaxSuppCoilFluidFlow = @@ -921,7 +921,7 @@ namespace UnitarySystems { if ((this->m_HeatRecActive) && (!this->m_MyPlantScanFlag)) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->m_HRLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), DataPlant::PlantLoop(this->m_HRLoopNum).FluidIndex, routineName); @@ -952,7 +952,7 @@ namespace UnitarySystems { WaterCoils::GetCoilMaxWaterFlowRate(state, CoolingCoilType, this->m_CoolingCoilName, initUnitarySystemsErrorsFound); if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->CoolCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->CoolCoilLoopNum).FluidIndex, routineName); this->MaxCoolCoilFluidFlow = CoilMaxVolFlowRate * rho; @@ -978,7 +978,7 @@ namespace UnitarySystems { WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", this->m_HeatingCoilName, initUnitarySystemsErrorsFound); if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HeatCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->HeatCoilLoopNum).FluidIndex, routineName); this->MaxHeatCoilFluidFlow = CoilMaxVolFlowRate * rho; @@ -1020,7 +1020,7 @@ namespace UnitarySystems { WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", this->m_SuppHeatCoilName, initUnitarySystemsErrorsFound); if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->m_SuppCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->m_SuppCoilLoopNum).FluidIndex, routineName); this->m_MaxSuppCoilFluidFlow = CoilMaxVolFlowRate * rho; @@ -9540,7 +9540,7 @@ namespace UnitarySystems { Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", this->m_HeatingCoilName, errorsFound); if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->HeatCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->HeatCoilLoopNum).FluidIndex, routineName); this->MaxHeatCoilFluidFlow = CoilMaxVolFlowRate * rho; @@ -9581,7 +9581,7 @@ namespace UnitarySystems { Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", this->m_SuppHeatCoilName, errorsFound); if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->m_SuppCoilLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(this->m_SuppCoilLoopNum).FluidIndex, routineName); this->m_MaxSuppCoilFluidFlow = CoilMaxVolFlowRate * rho; diff --git a/src/EnergyPlus/VariableSpeedCoils.cc b/src/EnergyPlus/VariableSpeedCoils.cc index 0af893ba8b5..ba520ba407b 100644 --- a/src/EnergyPlus/VariableSpeedCoils.cc +++ b/src/EnergyPlus/VariableSpeedCoils.cc @@ -1886,7 +1886,7 @@ namespace VariableSpeedCoils { state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate = NumArray(7); state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedWaterVolFlowRate = NumArray(8); - if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate != AutoCalculate) { + if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate != DataGlobalConstants::AutoCalculate()) { if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate <= 0.0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name + "\", invalid"); ShowContinueError("..." + cNumericFields(7) + " must be > 0.0. entered value=[" + TrimSigDigits(NumArray(7), 3) + "]."); @@ -1894,7 +1894,7 @@ namespace VariableSpeedCoils { } } - if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedWaterVolFlowRate != AutoCalculate) { + if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedWaterVolFlowRate != DataGlobalConstants::AutoCalculate()) { if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedWaterVolFlowRate <= 0.0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).Name + "\", invalid"); ShowContinueError("..." + cNumericFields(8) + " must be > 0.0 entered value=[" + TrimSigDigits(NumArray(8), 3) + "]."); @@ -3455,12 +3455,12 @@ namespace VariableSpeedCoils { rho = GetDensityGlycol(state, PlantLoop(state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).LoopNum).FluidName, - CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).LoopNum).FluidIndex, RoutineNameSimpleWatertoAirHP); Cp = GetSpecificHeatGlycol(state, PlantLoop(state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).LoopNum).FluidName, - CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).LoopNum).FluidIndex, RoutineNameSimpleWatertoAirHP); @@ -3778,7 +3778,7 @@ namespace VariableSpeedCoils { } if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).CoolHeatType == "WATERHEATING") { - if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate == AutoCalculate) { + if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate == DataGlobalConstants::AutoCalculate()) { state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate = state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedCapWH * state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).MSRatedAirVolFlowRate(NormSpeed) / state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).MSRatedTotCap(NormSpeed); // 0.00005035; @@ -3789,7 +3789,7 @@ namespace VariableSpeedCoils { state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedAirVolFlowRate, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirVolFlowAutoSized); - if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedWaterVolFlowRate == AutoCalculate) { + if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedWaterVolFlowRate == DataGlobalConstants::AutoCalculate()) { state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedHPWHCondWaterFlow = state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedCapWH * state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).MSRatedWaterVolFlowRate(NormSpeed) / state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).MSRatedTotCap(NormSpeed); // 0.00000004487; diff --git a/src/EnergyPlus/VentilatedSlab.cc b/src/EnergyPlus/VentilatedSlab.cc index 10573c9e3c1..8230f9c897e 100644 --- a/src/EnergyPlus/VentilatedSlab.cc +++ b/src/EnergyPlus/VentilatedSlab.cc @@ -1515,7 +1515,7 @@ namespace VentilatedSlab { if (state.dataVentilatedSlab->VentSlab(Item).HCoil_PlantTypeNum == TypeOf_CoilWaterSimpleHeating && !MyPlantScanFlag(Item)) { rho = GetDensityGlycol( - state, PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidName, HWInitConvTemp, PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidIndex, RoutineName); + state, PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidIndex, RoutineName); state.dataVentilatedSlab->VentSlab(Item).MaxHotWaterFlow = rho * state.dataVentilatedSlab->VentSlab(Item).MaxVolHotWaterFlow; state.dataVentilatedSlab->VentSlab(Item).MinHotWaterFlow = rho * state.dataVentilatedSlab->VentSlab(Item).MinVolHotWaterFlow; @@ -1551,7 +1551,7 @@ namespace VentilatedSlab { if ((state.dataVentilatedSlab->VentSlab(Item).CCoil_PlantTypeNum == TypeOf_CoilWaterCooling) || (state.dataVentilatedSlab->VentSlab(Item).CCoil_PlantTypeNum == TypeOf_CoilWaterDetailedFlatCooling)) { rho = GetDensityGlycol(state, PlantLoop(state.dataVentilatedSlab->VentSlab(Item).CWLoopNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), PlantLoop(state.dataVentilatedSlab->VentSlab(Item).CWLoopNum).FluidIndex, RoutineName); state.dataVentilatedSlab->VentSlab(Item).MaxColdWaterFlow = rho * state.dataVentilatedSlab->VentSlab(Item).MaxVolColdWaterFlow; @@ -2057,11 +2057,11 @@ namespace VentilatedSlab { DesCoilLoad = sizerHeatingCapacity.size(state, TempSize, ErrorsFound); } rho = GetDensityGlycol(state, PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidName, - HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(state.dataVentilatedSlab->VentSlab(Item).HWLoopNum).FluidIndex, RoutineName); MaxVolHotWaterFlowDes = DesCoilLoad / (WaterCoilSizDeltaT * Cp * rho); @@ -2175,8 +2175,8 @@ namespace VentilatedSlab { GetSatEnthalpyRefrig(state, fluidNameSteam, TempSteamIn, 0.0, state.dataVentilatedSlab->VentSlab(Item).HCoil_FluidIndex, RoutineName); LatentHeatSteam = EnthSteamInDry - EnthSteamOutWet; SteamDensity = GetSatDensityRefrig(state, fluidNameSteam, TempSteamIn, 1.0, state.dataVentilatedSlab->VentSlab(Item).HCoil_FluidIndex, RoutineName); - Cp = GetSpecificHeatGlycol(state, fluidNameWater, HWInitConvTemp, DummyWaterIndex, RoutineName); - rho = GetDensityGlycol(state, fluidNameWater, HWInitConvTemp, DummyWaterIndex, RoutineName); + Cp = GetSpecificHeatGlycol(state, fluidNameWater, DataGlobalConstants::HWInitConvTemp(), DummyWaterIndex, RoutineName); + rho = GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::HWInitConvTemp(), DummyWaterIndex, RoutineName); MaxVolHotSteamFlowDes = DesCoilLoad / ((PlantSizData(PltSizHeatNum).DeltaT * Cp * rho) + SteamDensity * LatentHeatSteam); } else { diff --git a/src/EnergyPlus/WaterCoils.cc b/src/EnergyPlus/WaterCoils.cc index 02f1d1c468f..cd2ce63574c 100644 --- a/src/EnergyPlus/WaterCoils.cc +++ b/src/EnergyPlus/WaterCoils.cc @@ -1091,7 +1091,7 @@ namespace WaterCoils { if (BeginEnvrnFlag && MyEnvrnFlag(CoilNum)) { rho = GetDensityGlycol(state, PlantLoop(state.dataWaterCoils->WaterCoil(CoilNum).WaterLoopNum).FluidName, - InitConvTemp, + DataGlobalConstants::InitConvTemp(), PlantLoop(state.dataWaterCoils->WaterCoil(CoilNum).WaterLoopNum).FluidIndex, RoutineName); // Initialize all report variables to a known state at beginning of simulation @@ -2471,11 +2471,11 @@ namespace WaterCoils { DataWaterLoopNum = state.dataWaterCoils->WaterCoil(CoilNum).WaterLoopNum; rho = GetDensityGlycol(state, PlantLoop(state.dataWaterCoils->WaterCoil(CoilNum).WaterLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(state.dataWaterCoils->WaterCoil(CoilNum).WaterLoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol( - state, PlantLoop(DataWaterLoopNum).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(DataWaterLoopNum).FluidIndex, RoutineName); + state, PlantLoop(DataWaterLoopNum).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(DataWaterLoopNum).FluidIndex, RoutineName); if (state.dataWaterCoils->WaterCoil(CoilNum).DesTotWaterCoilLoad > 0.0) { NomCapUserInp = true; } else if (CurSysNum > 0 && CurSysNum <= DataHVACGlobals::NumPrimaryAirSys) { diff --git a/src/EnergyPlus/WaterThermalTanks.cc b/src/EnergyPlus/WaterThermalTanks.cc index 5dcfac49cfa..9ae85f4b334 100644 --- a/src/EnergyPlus/WaterThermalTanks.cc +++ b/src/EnergyPlus/WaterThermalTanks.cc @@ -1190,7 +1190,7 @@ namespace WaterThermalTanks { // Condenser Water Flow Rate HPWH.OperatingWaterFlowRate = hpwhNumeric[2]; - if (HPWH.OperatingWaterFlowRate <= 0.0 && hpwhNumeric[2] != DataGlobals::AutoCalculate) { + if (HPWH.OperatingWaterFlowRate <= 0.0 && hpwhNumeric[2] != DataGlobalConstants::AutoCalculate()) { ShowSevereError(DataIPShortCuts::cCurrentModuleObject + "=\"" + HPWH.Name + "\", "); ShowContinueError(hpwhNumericFieldNames[2] + " must be greater than 0. Condenser water flow rate = " + General::TrimSigDigits(hpwhNumeric[2], 6)); @@ -1228,7 +1228,7 @@ namespace WaterThermalTanks { // Evaporator Air Flow Rate HPWH.OperatingAirFlowRate = hpwhNumeric[3 + nNumericOffset]; - if (HPWH.OperatingAirFlowRate <= 0.0 && hpwhNumeric[3 + nNumericOffset] != DataGlobals::AutoCalculate) { + if (HPWH.OperatingAirFlowRate <= 0.0 && hpwhNumeric[3 + nNumericOffset] != DataGlobalConstants::AutoCalculate()) { ShowSevereError(DataIPShortCuts::cCurrentModuleObject + "=\"" + HPWH.Name + "\", "); ShowContinueError(hpwhNumericFieldNames[3 + nNumericOffset] + " must be greater than 0. Evaporator air flow rate = " + General::TrimSigDigits(hpwhNumeric[3 + nNumericOffset], 6)); @@ -1617,12 +1617,12 @@ namespace WaterThermalTanks { // check the range of condenser pump power to be <= 5 gpm/ton, will be checked in the coil object } - if (HPWH.OperatingWaterFlowRate == DataGlobals::AutoCalculate) { + if (HPWH.OperatingWaterFlowRate == DataGlobalConstants::AutoCalculate()) { HPWH.OperatingWaterFlowRate = 0.00000004487 * HPWH.Capacity; HPWH.WaterFlowRateAutoSized = true; } - if (HPWH.OperatingAirFlowRate == DataGlobals::AutoCalculate) { + if (HPWH.OperatingAirFlowRate == DataGlobalConstants::AutoCalculate()) { HPWH.OperatingAirFlowRate = 0.00005035 * HPWH.Capacity; HPWH.AirFlowRateAutoSized = true; } @@ -2420,7 +2420,7 @@ namespace WaterThermalTanks { Tank.OnCycLossCoeff = DataIPShortCuts::rNumericArgs(15); Tank.OnCycLossFracToZone = DataIPShortCuts::rNumericArgs(16); - Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, Tank.FluidIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), Tank.FluidIndex, RoutineName); Tank.MassFlowRateMax = DataIPShortCuts::rNumericArgs(17) * rho; if ((DataIPShortCuts::cAlphaArgs(14).empty()) && (DataIPShortCuts::cAlphaArgs(15).empty())) { @@ -2637,7 +2637,7 @@ namespace WaterThermalTanks { if (Tank.Volume == DataSizing::AutoSize) { Tank.VolumeWasAutoSized = true; } - Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, Tank.FluidIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), Tank.FluidIndex, RoutineName); Tank.Mass = Tank.Volume * rho; Tank.Height = DataIPShortCuts::rNumericArgs(2); if (Tank.Height == DataSizing::AutoSize) { @@ -2899,7 +2899,7 @@ namespace WaterThermalTanks { Tank.OffCycFlueLossFracToZone = DataIPShortCuts::rNumericArgs(21); // this is temporary until we know fluid type - rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, Tank.FluidIndex, RoutineName); + rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), Tank.FluidIndex, RoutineName); Tank.MassFlowRateMax = DataIPShortCuts::rNumericArgs(22) * rho; if ((DataIPShortCuts::cAlphaArgs(16).empty()) && (DataIPShortCuts::cAlphaArgs(17).empty())) { @@ -2942,7 +2942,7 @@ namespace WaterThermalTanks { ErrorsFound = true; } - if ((NumNums > 24) && (DataIPShortCuts::rNumericArgs(25) != DataGlobals::AutoCalculate)) { + if ((NumNums > 24) && (DataIPShortCuts::rNumericArgs(25) != DataGlobalConstants::AutoCalculate())) { Tank.UseOutletHeight = DataIPShortCuts::rNumericArgs(25); } else { // Defaults to top of tank @@ -2970,7 +2970,7 @@ namespace WaterThermalTanks { Tank.SourceEffectiveness = 1.0; } - if ((NumNums > 26) && (DataIPShortCuts::rNumericArgs(27) != DataGlobals::AutoCalculate)) { + if ((NumNums > 26) && (DataIPShortCuts::rNumericArgs(27) != DataGlobalConstants::AutoCalculate())) { Tank.SourceInletHeight = DataIPShortCuts::rNumericArgs(27); } else { // Defaults to top of tank @@ -2987,7 +2987,7 @@ namespace WaterThermalTanks { ErrorsFound = true; } - if ((NumNums > 27) && (DataIPShortCuts::rNumericArgs(28) != DataGlobals::AutoCalculate)) { + if ((NumNums > 27) && (DataIPShortCuts::rNumericArgs(28) != DataGlobalConstants::AutoCalculate())) { Tank.SourceOutletHeight = DataIPShortCuts::rNumericArgs(28); } else { // Defaults to bottom of tank @@ -3479,7 +3479,7 @@ namespace WaterThermalTanks { if (Tank.Volume == DataSizing::AutoSize) { Tank.VolumeWasAutoSized = true; } - Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, Tank.FluidIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), Tank.FluidIndex, RoutineName); Tank.Mass = Tank.Volume * rho; Tank.Height = DataIPShortCuts::rNumericArgs(2); if (Tank.Height == DataSizing::AutoSize) { @@ -3624,7 +3624,7 @@ namespace WaterThermalTanks { Tank.SourceSideAvailSchedNum = DataGlobals::ScheduleAlwaysOn; Tank.UseSideAvailSchedNum = DataGlobals::ScheduleAlwaysOn; - if (DataIPShortCuts::rNumericArgs(10) == DataGlobals::AutoCalculate) { + if (DataIPShortCuts::rNumericArgs(10) == DataGlobalConstants::AutoCalculate()) { Tank.UseInletHeight = Tank.Height; // top of tank } if (Tank.UseInletHeight > Tank.Height) { @@ -3661,7 +3661,7 @@ namespace WaterThermalTanks { } Tank.SourceOutletHeight = DataIPShortCuts::rNumericArgs(15); - if (DataIPShortCuts::rNumericArgs(15) == DataGlobals::AutoCalculate) { + if (DataIPShortCuts::rNumericArgs(15) == DataGlobalConstants::AutoCalculate()) { Tank.SourceOutletHeight = Tank.Height; // top of tank } if (Tank.SourceOutletHeight > Tank.Height) { @@ -5126,11 +5126,11 @@ namespace WaterThermalTanks { if ((this->UseSide.loopNum > 0) && allocated(DataPlant::PlantLoop)) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, RoutineName); } else { - rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, this->FluidIndex, RoutineName); + rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), this->FluidIndex, RoutineName); } Real64 NodeMass = this->Volume * rho / NumNodes; @@ -5407,7 +5407,7 @@ namespace WaterThermalTanks { if (this->SetLoopIndexFlag && allocated(DataPlant::PlantLoop)) { if ((this->UseInletNode > 0) && (this->HeatPumpNum == 0)) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, GetWaterThermalTankInput); this->PlantUseMassFlowRateMax = this->UseDesignVolFlowRate * rho; @@ -5420,7 +5420,7 @@ namespace WaterThermalTanks { } if ((this->UseInletNode > 0) && (this->HeatPumpNum > 0)) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, GetWaterThermalTankInput); this->PlantUseMassFlowRateMax = this->UseDesignVolFlowRate * rho; @@ -5433,7 +5433,7 @@ namespace WaterThermalTanks { } if ((this->SourceInletNode > 0) && (this->DesuperheaterNum == 0) && (this->HeatPumpNum == 0)) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SrcSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SrcSide.loopNum).FluidIndex, GetWaterThermalTankInput); this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; @@ -5497,7 +5497,7 @@ namespace WaterThermalTanks { if (this->UseInletNode > 0 && this->UseOutletNode > 0) { DataLoopNode::Node(this->UseInletNode).Temp = 0.0; Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, GetWaterThermalTankInput); this->MassFlowRateMin = this->VolFlowRateMin * rho; @@ -5524,7 +5524,7 @@ namespace WaterThermalTanks { if ((this->SourceInletNode > 0) && (this->DesuperheaterNum == 0) && (this->HeatPumpNum == 0)) { Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SrcSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SrcSide.loopNum).FluidIndex, GetWaterThermalTankInput); this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; @@ -5553,7 +5553,7 @@ namespace WaterThermalTanks { this->SourceOutletTemp = 0.0; this->SourceMassFlowRate = 0.0; this->SavedSourceOutletTemp = 0.0; - Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, this->FluidIndex, SizeTankForDemand); + Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), this->FluidIndex, SizeTankForDemand); this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; } @@ -5736,10 +5736,10 @@ namespace WaterThermalTanks { if (SchIndex > 0) { this->UseMassFlowRate = ScheduleManager::GetCurrentScheduleValue(SchIndex) * this->MassFlowRateMax; - this->VolFlowRate = this->UseMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + this->VolFlowRate = this->UseMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } else { this->UseMassFlowRate = this->MassFlowRateMax; - this->VolFlowRate = this->UseMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + this->VolFlowRate = this->UseMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } } @@ -10166,7 +10166,7 @@ namespace WaterThermalTanks { } Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, RoutineName); if (DataPlant::PlantFirstSizesOkayToFinalize) { @@ -10183,11 +10183,11 @@ namespace WaterThermalTanks { Real64 rho; if (this->UseSide.loopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, RoutineName); } else { - rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, waterIndex, RoutineName); + rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), waterIndex, RoutineName); } this->PlantUseMassFlowRateMax = this->UseDesignVolFlowRate * rho; @@ -10227,7 +10227,7 @@ namespace WaterThermalTanks { PlantUtilities::RegisterPlantCompDesignFlow(this->SourceInletNode, tmpSourceDesignVolFlowRate); } Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SrcSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SrcSide.loopNum).FluidIndex, RoutineName); if (DataPlant::PlantFirstSizesOkayToFinalize) { @@ -10245,11 +10245,11 @@ namespace WaterThermalTanks { Real64 rho; if (this->SrcSide.loopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SrcSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SrcSide.loopNum).FluidIndex, RoutineName); } else { - rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, waterIndex, RoutineName); + rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), waterIndex, RoutineName); } this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; } @@ -10589,7 +10589,7 @@ namespace WaterThermalTanks { if (DataPlant::PlantFirstSizesOkayToReport) { BaseSizer::reportSizerOutput(this->Type, this->Name, "Initial Tank Height [m]", this->Height); } - // check if DataGlobals::AutoCalculate Use outlet and source inlet are still set to autosize by earlier + // check if DataGlobalConstants::AutoCalculate() Use outlet and source inlet are still set to autosize by earlier if (this->UseOutletHeightWasAutoSized) { this->UseOutletHeight = this->Height; } @@ -10818,7 +10818,7 @@ namespace WaterThermalTanks { PlantUtilities::RegisterPlantCompDesignFlow(this->UseInletNode, tmpUseDesignVolFlowRate); } Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, RoutineName); if (DataPlant::PlantFirstSizesOkayToFinalize) { @@ -10837,11 +10837,11 @@ namespace WaterThermalTanks { Real64 rho; if (this->UseSide.loopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->UseSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->UseSide.loopNum).FluidIndex, RoutineName); } else { - rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, waterIndex, RoutineName); + rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), waterIndex, RoutineName); } this->PlantUseMassFlowRateMax = this->UseDesignVolFlowRate * rho; } // autosizing needed. @@ -10902,7 +10902,7 @@ namespace WaterThermalTanks { PlantUtilities::RegisterPlantCompDesignFlow(this->SourceInletNode, tmpSourceDesignVolFlowRate); } Real64 rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SrcSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SrcSide.loopNum).FluidIndex, RoutineName); if (DataPlant::PlantFirstSizesOkayToFinalize) { @@ -10921,11 +10921,11 @@ namespace WaterThermalTanks { Real64 rho; if (this->SrcSide.loopNum > 0) { rho = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(this->SrcSide.loopNum).FluidName, - DataGlobals::InitConvTemp, + DataGlobalConstants::InitConvTemp(), DataPlant::PlantLoop(this->SrcSide.loopNum).FluidIndex, RoutineName); } else { - rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, waterIndex, RoutineName); + rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), waterIndex, RoutineName); } this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; } // autosizing needed. @@ -10968,7 +10968,7 @@ namespace WaterThermalTanks { if (SELECT_CASE_var == SizeEnum::PeakDraw) { // get draw rate from maximum in schedule - Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobals::InitConvTemp, waterIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol(state, fluidNameWater, DataGlobalConstants::InitConvTemp(), waterIndex, RoutineName); Real64 DrawDesignVolFlowRate = ScheduleManager::GetScheduleMaxValue(this->FlowRateSchedule) * this->MassFlowRateMax / rho; if (this->VolumeWasAutoSized) { @@ -11315,7 +11315,7 @@ namespace WaterThermalTanks { for (auto &e : this->Node) e.Temp = 57.2222; - Real64 TotalDrawMass = 0.243402 * Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); // 64.3 gal * rho + Real64 TotalDrawMass = 0.243402 * Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); // 64.3 gal * rho Real64 DrawMass = TotalDrawMass / 6.0; // 6 equal draws Real64 SecInTimeStep = DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); Real64 DrawMassFlowRate = DrawMass / SecInTimeStep; diff --git a/src/EnergyPlus/WaterToAirHeatPump.cc b/src/EnergyPlus/WaterToAirHeatPump.cc index 2406d54d2fd..80adb411464 100644 --- a/src/EnergyPlus/WaterToAirHeatPump.cc +++ b/src/EnergyPlus/WaterToAirHeatPump.cc @@ -906,9 +906,9 @@ namespace WaterToAirHeatPump { // The rest of the one time initializations rho = GetDensityGlycol( - state, PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidName, InitConvTemp, PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidIndex, RoutineName); + state, PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidName, DataGlobalConstants::InitConvTemp(), PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol( - state, PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidName, InitConvTemp, PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidIndex, RoutineName); + state, PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidName, DataGlobalConstants::InitConvTemp(), PlantLoop(state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).LoopNum).FluidIndex, RoutineName); state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).DesignWaterMassFlowRate = rho * state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).DesignWaterVolFlowRate; state.dataWaterToAirHeatPump->WatertoAirHP(HPNum).MaxONOFFCyclesperHour = MaxONOFFCyclesperHour; diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc index 628017ce626..032fc47f04d 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc @@ -938,11 +938,11 @@ namespace WaterToAirHeatPumpSimple { state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).PartLoadRatio = 0.0; rho = GetDensityGlycol(state, PlantLoop(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).LoopNum).FluidName, - InitConvTemp, + DataGlobalConstants::InitConvTemp(), PlantLoop(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).LoopNum).FluidIndex, RoutineName); Cp = GetSpecificHeatGlycol(state, PlantLoop(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).LoopNum).FluidName, - InitConvTemp, + DataGlobalConstants::InitConvTemp(), PlantLoop(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum).LoopNum).FluidIndex, RoutineName); diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.hh b/src/EnergyPlus/WaterToAirHeatPumpSimple.hh index ffd5717e62d..9d6f53b999c 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.hh +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.hh @@ -335,7 +335,7 @@ namespace WaterToAirHeatPumpSimple { // Default Constructor WaterToAirHeatPumpSimpleData() - : CelsiustoKelvin(DataGlobals::KelvinConv), NumWatertoAirHPs(0), GetCoilsInputFlag(true), + : CelsiustoKelvin(DataGlobalConstants::KelvinConv()), NumWatertoAirHPs(0), GetCoilsInputFlag(true), SourceSideMassFlowRate(0.0), SourceSideInletTemp(0.0), SourceSideInletEnth(0.0), LoadSideMassFlowRate(0.0), LoadSideInletDBTemp(0.0), LoadSideInletWBTemp(0.0), LoadSideInletHumRat(0.0), LoadSideInletEnth(0.0), LoadSideOutletDBTemp(0.0), LoadSideOutletHumRat(0.0), LoadSideOutletEnth(0.0), QSensible(0.0), diff --git a/src/EnergyPlus/WaterUse.cc b/src/EnergyPlus/WaterUse.cc index 2b171a856c5..62c03eb18c9 100644 --- a/src/EnergyPlus/WaterUse.cc +++ b/src/EnergyPlus/WaterUse.cc @@ -565,17 +565,17 @@ namespace WaterUse { int thisWaterEquipNum = state.dataWaterUse->WaterConnections(WaterConnNum).myWaterEquipArr(WaterEquipNum); if (state.dataWaterUse->WaterEquipment(thisWaterEquipNum).Zone > 0) { state.dataWaterUse->WaterConnections(WaterConnNum).PeakMassFlowRate += - state.dataWaterUse->WaterEquipment(thisWaterEquipNum).PeakVolFlowRate * Psychrometrics::RhoH2O(DataGlobals::InitConvTemp) * + state.dataWaterUse->WaterEquipment(thisWaterEquipNum).PeakVolFlowRate * Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()) * DataHeatBalance::Zone(state.dataWaterUse->WaterEquipment(thisWaterEquipNum).Zone).Multiplier * DataHeatBalance::Zone(state.dataWaterUse->WaterEquipment(thisWaterEquipNum).Zone).ListMultiplier; } else { // can't have multipliers state.dataWaterUse->WaterConnections(WaterConnNum).PeakMassFlowRate += - state.dataWaterUse->WaterEquipment(thisWaterEquipNum).PeakVolFlowRate * Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + state.dataWaterUse->WaterEquipment(thisWaterEquipNum).PeakVolFlowRate * Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } } PlantUtilities::RegisterPlantCompDesignFlow(state.dataWaterUse->WaterConnections(WaterConnNum).InletNode, state.dataWaterUse->WaterConnections(WaterConnNum).PeakMassFlowRate / - Psychrometrics::RhoH2O(DataGlobals::InitConvTemp)); + Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp())); } } } @@ -859,7 +859,7 @@ namespace WaterUse { } } - this->TotalMassFlowRate = this->TotalVolFlowRate * Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + this->TotalMassFlowRate = this->TotalVolFlowRate * Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); // Calculate hot and cold water mixing at the tap if (this->TotalMassFlowRate > 0.0) { @@ -924,7 +924,7 @@ namespace WaterUse { this->SensibleEnergy = 0.0; } else { this->SensibleRate = ScheduleManager::GetCurrentScheduleValue(this->SensibleFracSchedule) * this->TotalMassFlowRate * - Psychrometrics::CPHW(DataGlobals::InitConvTemp) * (this->MixedTemp - DataHeatBalFanSys::MAT(this->Zone)); + Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * (this->MixedTemp - DataHeatBalFanSys::MAT(this->Zone)); this->SensibleEnergy = this->SensibleRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); } @@ -953,9 +953,9 @@ namespace WaterUse { if (this->DrainMassFlowRate == 0.0) { this->DrainTemp = this->MixedTemp; } else { - this->DrainTemp = (this->TotalMassFlowRate * Psychrometrics::CPHW(DataGlobals::InitConvTemp) * this->MixedTemp - this->SensibleRate - + this->DrainTemp = (this->TotalMassFlowRate * Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * this->MixedTemp - this->SensibleRate - this->LatentRate) / - (this->DrainMassFlowRate * Psychrometrics::CPHW(DataGlobals::InitConvTemp)); + (this->DrainMassFlowRate * Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp())); } } } @@ -1132,14 +1132,14 @@ namespace WaterUse { if (this->SupplyTankNum > 0) { // Set the demand request for supply water from water storage tank - this->ColdVolFlowRate = this->ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + this->ColdVolFlowRate = this->ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); DataWater::WaterStorage(this->SupplyTankNum).VdotRequestDemand(this->TankDemandID) = this->ColdVolFlowRate; // Check if cold flow rate should be starved by restricted flow from tank // Currently, the tank flow is not really starved--water continues to flow at the tank water temperature // But the user can see the error by comparing report variables for TankVolFlowRate < ColdVolFlowRate this->TankVolFlowRate = DataWater::WaterStorage(this->SupplyTankNum).VdotAvailDemand(this->TankDemandID); - this->TankMassFlowRate = this->TankVolFlowRate * Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + this->TankMassFlowRate = this->TankVolFlowRate * Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } } @@ -1170,7 +1170,7 @@ namespace WaterUse { this->DrainTemp = this->HotTemp; } - this->DrainVolFlowRate = this->DrainMassFlowRate * Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + this->DrainVolFlowRate = this->DrainMassFlowRate * Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); } void WaterConnectionsType::CalcConnectionsHeatRecovery() @@ -1210,8 +1210,8 @@ namespace WaterUse { } } - Real64 HXCapacityRate = Psychrometrics::CPHW(DataGlobals::InitConvTemp) * this->RecoveryMassFlowRate; - Real64 DrainCapacityRate = Psychrometrics::CPHW(DataGlobals::InitConvTemp) * this->DrainMassFlowRate; + Real64 HXCapacityRate = Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * this->RecoveryMassFlowRate; + Real64 DrainCapacityRate = Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * this->DrainMassFlowRate; Real64 MinCapacityRate = min(DrainCapacityRate, HXCapacityRate); { @@ -1239,8 +1239,8 @@ namespace WaterUse { this->RecoveryRate = this->Effectiveness * MinCapacityRate * (this->DrainTemp - this->ColdSupplyTemp); this->RecoveryTemp = - this->ColdSupplyTemp + this->RecoveryRate / (Psychrometrics::CPHW(DataGlobals::InitConvTemp) * this->TotalMassFlowRate); - this->WasteTemp = this->DrainTemp - this->RecoveryRate / (Psychrometrics::CPHW(DataGlobals::InitConvTemp) * this->TotalMassFlowRate); + this->ColdSupplyTemp + this->RecoveryRate / (Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * this->TotalMassFlowRate); + this->WasteTemp = this->DrainTemp - this->RecoveryRate / (Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * this->TotalMassFlowRate); if (this->RecoveryTankNum > 0) { DataWater::WaterStorage(this->RecoveryTankNum).VdotAvailSupply(this->TankSupplyID) = this->DrainVolFlowRate; @@ -1305,8 +1305,8 @@ namespace WaterUse { for (int WaterEquipNum = 1; WaterEquipNum <= state.dataWaterUse->numWaterEquipment; ++WaterEquipNum) { auto &thisWEq = state.dataWaterUse->WaterEquipment(WaterEquipNum); - thisWEq.ColdVolFlowRate = thisWEq.ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); - thisWEq.HotVolFlowRate = thisWEq.HotMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + thisWEq.ColdVolFlowRate = thisWEq.ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); + thisWEq.HotVolFlowRate = thisWEq.HotMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); thisWEq.TotalVolFlowRate = thisWEq.ColdVolFlowRate + thisWEq.HotVolFlowRate; thisWEq.ColdVolume = thisWEq.ColdVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); @@ -1314,9 +1314,9 @@ namespace WaterUse { thisWEq.TotalVolume = thisWEq.TotalVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); if (thisWEq.Connections == 0) { - thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobals::InitConvTemp) * (thisWEq.HotTemp - thisWEq.ColdTemp); + thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * (thisWEq.HotTemp - thisWEq.ColdTemp); } else { - thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobals::InitConvTemp) * + thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * (thisWEq.HotTemp - state.dataWaterUse->WaterConnections(thisWEq.Connections).ReturnTemp); } @@ -1341,30 +1341,30 @@ namespace WaterUse { int WaterEquipNum = this->myWaterEquipArr(Loop); auto &thisWEq = state.dataWaterUse->WaterEquipment(WaterEquipNum); - thisWEq.ColdVolFlowRate = thisWEq.ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); - thisWEq.HotVolFlowRate = thisWEq.HotMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + thisWEq.ColdVolFlowRate = thisWEq.ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); + thisWEq.HotVolFlowRate = thisWEq.HotMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); thisWEq.TotalVolFlowRate = thisWEq.ColdVolFlowRate + thisWEq.HotVolFlowRate; thisWEq.ColdVolume = thisWEq.ColdVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); thisWEq.HotVolume = thisWEq.HotVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); thisWEq.TotalVolume = thisWEq.TotalVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); if (thisWEq.Connections == 0) { - thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobals::InitConvTemp) * (thisWEq.HotTemp - thisWEq.ColdTemp); + thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * (thisWEq.HotTemp - thisWEq.ColdTemp); } else { - thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobals::InitConvTemp) * + thisWEq.Power = thisWEq.HotMassFlowRate * Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * (thisWEq.HotTemp - state.dataWaterUse->WaterConnections(thisWEq.Connections).ReturnTemp); } thisWEq.Energy = thisWEq.Power * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); } - this->ColdVolFlowRate = this->ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); - this->HotVolFlowRate = this->HotMassFlowRate / Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + this->ColdVolFlowRate = this->ColdMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); + this->HotVolFlowRate = this->HotMassFlowRate / Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); this->TotalVolFlowRate = this->ColdVolFlowRate + this->HotVolFlowRate; this->ColdVolume = this->ColdVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); this->HotVolume = this->HotVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); this->TotalVolume = this->TotalVolFlowRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); - this->Power = this->HotMassFlowRate * Psychrometrics::CPHW(DataGlobals::InitConvTemp) * (this->HotTemp - this->ReturnTemp); + this->Power = this->HotMassFlowRate * Psychrometrics::CPHW(DataGlobalConstants::InitConvTemp()) * (this->HotTemp - this->ReturnTemp); this->Energy = this->Power * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); this->RecoveryEnergy = this->RecoveryRate * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour(); } diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index eed09e769e8..d6eeeaa2031 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -1881,7 +1881,7 @@ namespace WeatherManager { (DataGlobals::HourOfDay - 1) * DataGlobals::NumOfTimeStepInHour + DataGlobals::TimeStep; DataEnvironment::GroundTemp = state.dataWeatherManager->siteBuildingSurfaceGroundTempsPtr->getGroundTempAtTimeInMonths(state, 0, DataEnvironment::Month); - DataEnvironment::GroundTempKelvin = DataEnvironment::GroundTemp + DataGlobals::KelvinConv; + DataEnvironment::GroundTempKelvin = DataEnvironment::GroundTemp + DataGlobalConstants::KelvinConv(); DataEnvironment::GroundTempFC = state.dataWeatherManager->siteFCFactorMethodGroundTempsPtr->getGroundTempAtTimeInMonths(state, 0, DataEnvironment::Month); DataEnvironment::GroundTemp_Surface = state.dataWeatherManager->siteShallowGroundTempsPtr->getGroundTempAtTimeInMonths(state, 0, DataEnvironment::Month); DataEnvironment::GroundTemp_Deep = state.dataWeatherManager->siteDeepGroundTempsPtr->getGroundTempAtTimeInMonths(state, 0, DataEnvironment::Month); @@ -1963,7 +1963,7 @@ namespace WeatherManager { if (DataEnvironment::EMSWindDirOverrideOn) DataEnvironment::WindDir = DataEnvironment::EMSWindDirOverrideValue; state.dataWeatherManager->HorizIRSky = state.dataWeatherManager->TodayHorizIRSky(DataGlobals::TimeStep, DataGlobals::HourOfDay); DataEnvironment::SkyTemp = state.dataWeatherManager->TodaySkyTemp(DataGlobals::TimeStep, DataGlobals::HourOfDay); - DataEnvironment::SkyTempKelvin = DataEnvironment::SkyTemp + DataGlobals::KelvinConv; + DataEnvironment::SkyTempKelvin = DataEnvironment::SkyTemp + DataGlobalConstants::KelvinConv(); DataEnvironment::DifSolarRad = state.dataWeatherManager->TodayDifSolarRad(DataGlobals::TimeStep, DataGlobals::HourOfDay); if (DataEnvironment::EMSDifSolarRadOverrideOn) DataEnvironment::DifSolarRad = DataEnvironment::EMSDifSolarRadOverrideValue; DataEnvironment::BeamSolarRad = state.dataWeatherManager->TodayBeamSolarRad(DataGlobals::TimeStep, DataGlobals::HourOfDay); @@ -2992,12 +2992,12 @@ namespace WeatherManager { ESky = 0.618 + 0.056 * pow(PartialPress, 0.5); } else if (ESkyCalcType == EmissivityCalcType::IdsoModel) { double const PartialPress = RelHum * Psychrometrics::PsyPsatFnTemp(DryBulb) * 0.01; - ESky = 0.685 + 0.000032 * PartialPress * exp(1699 / (DryBulb + DataGlobals::KelvinConv)); + ESky = 0.685 + 0.000032 * PartialPress * exp(1699 / (DryBulb + DataGlobalConstants::KelvinConv())); } else if (ESkyCalcType == EmissivityCalcType::BerdahlMartinModel) { double const TDewC = min(DryBulb, DewPoint); ESky = 0.758 + 0.521 * (TDewC / 100) + 0.625 * pow_2(TDewC / 100); } else { - ESky = 0.787 + 0.764 * std::log((min(DryBulb, DewPoint) + DataGlobals::KelvinConv) / DataGlobals::KelvinConv); + ESky = 0.787 + 0.764 * std::log((min(DryBulb, DewPoint) + DataGlobalConstants::KelvinConv()) / DataGlobalConstants::KelvinConv()); } ESky = ESky * (1.0 + 0.0224 * OSky - 0.0035 * pow_2(OSky) + 0.00028 * pow_3(OSky)); return ESky; @@ -3673,7 +3673,7 @@ namespace WeatherManager { double RelHum = state.dataWeatherManager->TomorrowOutRelHum(ts, hour) * 0.01; Real64 ESky = CalcSkyEmissivity(state, state.dataWeatherManager->Environment(EnvrnNum).SkyTempModel, OSky, DryBulb, state.dataWeatherManager->TomorrowOutDewPointTemp(ts, hour), RelHum); // Emissivitity of Sky - state.dataWeatherManager->TomorrowHorizIRSky(ts, hour) = ESky * state.dataWeatherManager->Sigma * pow_4(DryBulb + DataGlobals::KelvinConv); + state.dataWeatherManager->TomorrowHorizIRSky(ts, hour) = ESky * state.dataWeatherManager->Sigma * pow_4(DryBulb + DataGlobalConstants::KelvinConv()); if (state.dataWeatherManager->Environment(EnvrnNum).SkyTempModel == EmissivityCalcType::BruntModel || state.dataWeatherManager->Environment(EnvrnNum).SkyTempModel == EmissivityCalcType::IdsoModel || @@ -3681,7 +3681,7 @@ namespace WeatherManager { state.dataWeatherManager->Environment(EnvrnNum).SkyTempModel == EmissivityCalcType::SkyTAlgorithmA || state.dataWeatherManager->Environment(EnvrnNum).SkyTempModel == EmissivityCalcType::ClarkAllenModel) { // Design day not scheduled - state.dataWeatherManager->TomorrowSkyTemp(ts, hour) = (DryBulb + DataGlobals::KelvinConv) * root_4(ESky) - DataGlobals::KelvinConv; + state.dataWeatherManager->TomorrowSkyTemp(ts, hour) = (DryBulb + DataGlobalConstants::KelvinConv()) * root_4(ESky) - DataGlobalConstants::KelvinConv(); } // Generate solar values for timestep // working results = BeamRad and DiffRad @@ -8684,13 +8684,13 @@ namespace WeatherManager { if (!state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).UseWeatherFileHorizontalIR || IRHoriz >= 9999.0) { // Missing or user defined to not use IRHoriz from weather, using sky cover and clear sky emissivity ESky = CalcSkyEmissivity(state, state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel, OpaqueSkyCover, DryBulb, DewPoint, RelHum); - HorizIRSky = ESky * state.dataWeatherManager->Sigma * pow_4(DryBulb + DataGlobals::KelvinConv); + HorizIRSky = ESky * state.dataWeatherManager->Sigma * pow_4(DryBulb + DataGlobalConstants::KelvinConv()); if (state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::BruntModel || state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::IdsoModel || state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::BerdahlMartinModel || state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::SkyTAlgorithmA || state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::ClarkAllenModel) { - SkyTemp = (DryBulb + DataGlobals::KelvinConv) * root_4(ESky) - DataGlobals::KelvinConv; + SkyTemp = (DryBulb + DataGlobalConstants::KelvinConv()) * root_4(ESky) - DataGlobalConstants::KelvinConv(); } else { SkyTemp = 0.0; // dealt with later } @@ -8703,7 +8703,7 @@ namespace WeatherManager { state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::BerdahlMartinModel || state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::SkyTAlgorithmA || state.dataWeatherManager->Environment(state.dataWeatherManager->Envrn).SkyTempModel == EmissivityCalcType::ClarkAllenModel) { - SkyTemp = root_4(IRHoriz / state.dataWeatherManager->Sigma) - DataGlobals::KelvinConv; + SkyTemp = root_4(IRHoriz / state.dataWeatherManager->Sigma) - DataGlobalConstants::KelvinConv(); } else { SkyTemp = 0.0; // dealt with later } diff --git a/src/EnergyPlus/WindowComplexManager.cc b/src/EnergyPlus/WindowComplexManager.cc index b622408ec20..726550ffe17 100644 --- a/src/EnergyPlus/WindowComplexManager.cc +++ b/src/EnergyPlus/WindowComplexManager.cc @@ -98,7 +98,6 @@ namespace WindowComplexManager { using namespace DataComplexFenestration; using namespace DataVectorTypes; using namespace DataBSDFWindow; - using DataGlobals::KelvinConv; using DataGlobals::NumOfTimeStepInHour; using DataGlobals::NumOfZones; using DataGlobals::TimeStepZoneSec; @@ -2470,7 +2469,6 @@ namespace WindowComplexManager { using namespace DataBSDFWindow; using DataGlobals::AnyLocalEnvironmentsInModel; - using DataGlobals::StefanBoltzmann; using DataHeatBalance::GasCoeffsAir; using DataHeatBalance::SupportPillar; using DataLoopNode::Node; @@ -2791,7 +2789,7 @@ namespace WindowComplexManager { CalcDeflection = WindowThermalModel(ThermalModelNum).DeflectionModel; SDScalar = WindowThermalModel(ThermalModelNum).SDScalar; VacuumPressure = WindowThermalModel(ThermalModelNum).VacuumPressureLimit; - Tini = WindowThermalModel(ThermalModelNum).InitialTemperature - KelvinConv; + Tini = WindowThermalModel(ThermalModelNum).InitialTemperature - DataGlobalConstants::KelvinConv(); Pini = WindowThermalModel(ThermalModelNum).InitialPressure; nlayer = state.dataConstruction->Construct(ConstrNum).TotSolidLayers; @@ -2844,7 +2842,7 @@ namespace WindowComplexManager { } } - tind = RefAirTemp + KelvinConv; // Inside air temperature + tind = RefAirTemp + DataGlobalConstants::KelvinConv(); // Inside air temperature // now get "outside" air temperature if (SurfNumAdj > 0) { // Interzone window @@ -2889,9 +2887,9 @@ namespace WindowComplexManager { } } - tout = RefAirTemp + KelvinConv; // outside air temperature + tout = RefAirTemp + DataGlobalConstants::KelvinConv(); // outside air temperature - tsky = MRT(ZoneNumAdj) + KelvinConv; // TODO this misses IR from sources such as high temp radiant and baseboards + tsky = MRT(ZoneNumAdj) + DataGlobalConstants::KelvinConv(); // TODO this misses IR from sources such as high temp radiant and baseboards // ! Add long-wave radiation from adjacent zone absorbed by glass layer closest to the adjacent zone. // AbsRadGlassFace(1) = AbsRadGlassFace(1) + QRadThermInAbs(SurfNumAdj) @@ -2915,19 +2913,19 @@ namespace WindowComplexManager { for (SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { SrdSurfViewFac = SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; SrdSurfTempAbs = - GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + KelvinConv; - OutSrdIR += StefanBoltzmann * SrdSurfViewFac * (pow_4(SrdSurfTempAbs)); + GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + DataGlobalConstants::KelvinConv(); + OutSrdIR += DataGlobalConstants::StefanBoltzmann() * SrdSurfViewFac * (pow_4(SrdSurfTempAbs)); } } } if (Surface(SurfNum).ExtWind) { // Window is exposed to wind (and possibly rain) if (IsRain) { // Raining: since wind exposed, outside window surface gets wet - tout = Surface(SurfNum).OutWetBulbTemp + KelvinConv; + tout = Surface(SurfNum).OutWetBulbTemp + DataGlobalConstants::KelvinConv(); } else { // Dry - tout = Surface(SurfNum).OutDryBulbTemp + KelvinConv; + tout = Surface(SurfNum).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); } } else { // Window not exposed to wind - tout = Surface(SurfNum).OutDryBulbTemp + KelvinConv; + tout = Surface(SurfNum).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); } // tsky = SkyTemp + TKelvin tsky = SkyTempKelvin; @@ -2951,7 +2949,7 @@ namespace WindowComplexManager { // IR incident on window from zone surfaces and high-temp radiant sources rmir = SurfWinIRfromParentZone(SurfNum) + QHTRadSysSurf(SurfNum) + QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) + QSteamBaseboardSurf(SurfNum) + QElecBaseboardSurf(SurfNum); - trmin = root_4(rmir / StefanBoltzmann); // TODO check model equation. + trmin = root_4(rmir / DataGlobalConstants::StefanBoltzmann()); // TODO check model equation. // outdoor wind speed if (!Surface(SurfNum).ExtWind) { @@ -3347,9 +3345,9 @@ namespace WindowComplexManager { // For all cases, get total window heat gain for reporting. See CalcWinFrameAndDividerTemps for // contribution of frame and divider. - SurfInsideTemp = theta(2 * nlayer) - KelvinConv; + SurfInsideTemp = theta(2 * nlayer) - DataGlobalConstants::KelvinConv(); SurfWinEffInsSurfTemp(SurfNum) = SurfInsideTemp; - SurfOutsideTemp = theta(1) - KelvinConv; + SurfOutsideTemp = theta(1) - DataGlobalConstants::KelvinConv(); SurfOutsideEmiss = emis(1); IncidentSolar = Surface(SurfNum).Area * QRadSWOutIncident(SurfNum); @@ -3414,8 +3412,8 @@ namespace WindowComplexManager { // WinGapConvHtFlowRep(SurfNum) = 0.0d0 // WinGapConvHtFlowRepEnergy(SurfNum) = 0.0d0 TotAirflowGap = SurfWinAirflowThisTS(SurfNum) * Surface(SurfNum).Width; - TAirflowGapOutlet = KelvinConv; // TODO Need to calculate this - TAirflowGapOutletC = TAirflowGapOutlet - KelvinConv; + TAirflowGapOutlet = DataGlobalConstants::KelvinConv(); // TODO Need to calculate this + TAirflowGapOutletC = TAirflowGapOutlet - DataGlobalConstants::KelvinConv(); SurfWinTAirflowGapOutlet(SurfNum) = TAirflowGapOutletC; if (SurfWinAirflowThisTS(SurfNum) > 0.0) { ConvHeatFlowForced = sum(qv); // TODO. figure forced ventilation heat flow in Watts @@ -3493,17 +3491,17 @@ namespace WindowComplexManager { if (ShadeFlag == IntShadeOn) SurfWinConvCoeffWithShade(SurfNum) = 0.0; if (ShadeFlag == IntShadeOn) { - SurfInsideTemp = theta(2 * ngllayer + 2) - KelvinConv; + SurfInsideTemp = theta(2 * ngllayer + 2) - DataGlobalConstants::KelvinConv(); // // Get properties of inside shading layer Real64 EffShBlEmiss = SurfaceWindow(SurfNum).EffShBlindEmiss[0]; Real64 EffGlEmiss = SurfaceWindow(SurfNum).EffGlassEmiss[0]; SurfWinEffInsSurfTemp(SurfNum) = - (EffShBlEmiss * SurfInsideTemp + EffGlEmiss * (theta(2 * ngllayer) - KelvinConv)) / (EffShBlEmiss + EffGlEmiss); + (EffShBlEmiss * SurfInsideTemp + EffGlEmiss * (theta(2 * ngllayer) - DataGlobalConstants::KelvinConv())) / (EffShBlEmiss + EffGlEmiss); } else { - SurfOutsideTemp = theta(1) - KelvinConv; + SurfOutsideTemp = theta(1) - DataGlobalConstants::KelvinConv(); } for (k = 1; k <= nlayer; ++k) { @@ -3511,8 +3509,8 @@ namespace WindowComplexManager { SurfaceWindow(SurfNum).ThetaFace(2 * k) = theta(2 * k); // temperatures for reporting - FenLaySurfTempFront(k, SurfNum) = theta(2 * k - 1) - KelvinConv; - FenLaySurfTempBack(k, SurfNum) = theta(2 * k) - KelvinConv; + FenLaySurfTempFront(k, SurfNum) = theta(2 * k - 1) - DataGlobalConstants::KelvinConv(); + FenLaySurfTempBack(k, SurfNum) = theta(2 * k) - DataGlobalConstants::KelvinConv(); // thetas(k) = theta(k) } } diff --git a/src/EnergyPlus/WindowEquivalentLayer.cc b/src/EnergyPlus/WindowEquivalentLayer.cc index 68fd5ca39a5..81acb376baf 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.cc +++ b/src/EnergyPlus/WindowEquivalentLayer.cc @@ -127,10 +127,7 @@ namespace WindowEquivalentLayer { using DataEnvironment::Month; using DataGlobals::CurrentTime; using DataGlobals::HourOfDay; - using DataGlobals::KelvinConv; - using DataGlobals::StefanBoltzmann; using DataGlobals::TimeStep; - using DataGlobals::UniversalGasConst; using DataGlobals::WarmupFlag; using General::TrimSigDigits; @@ -434,11 +431,11 @@ namespace WindowEquivalentLayer { for (I = 1; I <= 10; ++I) { TGO = TOUT + U * DT / HXO; // update glazing surface temps TGI = TIN - U * DT / HXI; - HRO = StefanBoltzmann * EO * (pow_2(TGO + KelvinConv) + pow_2(TOUT + KelvinConv)) * ((TGO + KelvinConv) + (TOUT + KelvinConv)); - HRI = StefanBoltzmann * EI * (pow_2(TGI + KelvinConv) + pow_2(TIN + KelvinConv)) * ((TGI + KelvinConv) + (TIN + KelvinConv)); + HRO = DataGlobalConstants::StefanBoltzmann() * EO * (pow_2(TGO + DataGlobalConstants::KelvinConv()) + pow_2(TOUT + DataGlobalConstants::KelvinConv())) * ((TGO + DataGlobalConstants::KelvinConv()) + (TOUT + DataGlobalConstants::KelvinConv())); + HRI = DataGlobalConstants::StefanBoltzmann() * EI * (pow_2(TGI + DataGlobalConstants::KelvinConv()) + pow_2(TIN + DataGlobalConstants::KelvinConv())) * ((TGI + DataGlobalConstants::KelvinConv()) + (TIN + DataGlobalConstants::KelvinConv())); // HCI = HIC_ASHRAE( Height, TGI, TI) ! BAN June 2103 Raplaced with ISO Std 15099 - TGIK = TGI + KelvinConv; - TIK = TIN + KelvinConv; + TGIK = TGI + DataGlobalConstants::KelvinConv(); + TIK = TIN + DataGlobalConstants::KelvinConv(); HCI = HCInWindowStandardRatings(Height, TGIK, TIK); if (HCI < 0.001) break; HXI = HCI + HRI; @@ -672,7 +669,6 @@ namespace WindowEquivalentLayer { using DataEnvironment::IsRain; using DataEnvironment::SkyTempKelvin; using DataGlobals::AnyLocalEnvironmentsInModel; - using DataGlobals::StefanBoltzmann; using DataLoopNode::Node; using DataZoneEquipment::ZoneEquipConfig; using General::InterpSw; @@ -780,7 +776,7 @@ namespace WindowEquivalentLayer { } } TaIn = RefAirTemp; - TIN = TaIn + KelvinConv; // Inside air temperature, K + TIN = TaIn + DataGlobalConstants::KelvinConv(); // Inside air temperature, K // now get "outside" air temperature if (SurfNumAdj > 0) { @@ -824,8 +820,8 @@ namespace WindowEquivalentLayer { } } - Tout = RefAirTemp + KelvinConv; // outside air temperature - tsky = MRT(ZoneNumAdj) + KelvinConv; // TODO this misses IR from sources such as high temp radiant and baseboards + Tout = RefAirTemp + DataGlobalConstants::KelvinConv(); // outside air temperature + tsky = MRT(ZoneNumAdj) + DataGlobalConstants::KelvinConv(); // TODO this misses IR from sources such as high temp radiant and baseboards // The IR radiance of this window's "exterior" surround is the IR radiance // from surfaces and high-temp radiant sources in the adjacent zone @@ -847,30 +843,30 @@ namespace WindowEquivalentLayer { for (SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { SrdSurfViewFac = SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; SrdSurfTempAbs = - GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + KelvinConv; - OutSrdIR += StefanBoltzmann * SrdSurfViewFac * (pow_4(SrdSurfTempAbs)); + GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + DataGlobalConstants::KelvinConv(); + OutSrdIR += DataGlobalConstants::StefanBoltzmann() * SrdSurfViewFac * (pow_4(SrdSurfTempAbs)); } } } if (Surface(SurfNum).ExtWind) { // Window is exposed to wind (and possibly rain) if (IsRain) { // Raining: since wind exposed, outside window surface gets wet - Tout = Surface(SurfNum).OutWetBulbTemp + KelvinConv; + Tout = Surface(SurfNum).OutWetBulbTemp + DataGlobalConstants::KelvinConv(); } else { // Dry - Tout = Surface(SurfNum).OutDryBulbTemp + KelvinConv; + Tout = Surface(SurfNum).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); } } else { // Window not exposed to wind - Tout = Surface(SurfNum).OutDryBulbTemp + KelvinConv; + Tout = Surface(SurfNum).OutDryBulbTemp + DataGlobalConstants::KelvinConv(); } tsky = SkyTempKelvin; - Ebout = StefanBoltzmann * pow_4(Tout); + Ebout = DataGlobalConstants::StefanBoltzmann() * pow_4(Tout); // ASHWAT model may be slightly different outir = Surface(SurfNum).ViewFactorSkyIR * - (AirSkyRadSplit(SurfNum) * StefanBoltzmann * pow_4(tsky) + (1.0 - AirSkyRadSplit(SurfNum)) * Ebout) + + (AirSkyRadSplit(SurfNum) * DataGlobalConstants::StefanBoltzmann() * pow_4(tsky) + (1.0 - AirSkyRadSplit(SurfNum)) * Ebout) + Surface(SurfNum).ViewFactorGroundIR * Ebout + OutSrdIR; } } // Outdoor conditions - TRMOUT = root_4(outir / StefanBoltzmann); // it is in Kelvin scale + TRMOUT = root_4(outir / DataGlobalConstants::StefanBoltzmann()); // it is in Kelvin scale // indoor conditions LWAbsIn = EffectiveEPSLB(CFS(EQLNum)); // windows inside face effective thermal emissivity LWAbsOut = EffectiveEPSLF(CFS(EQLNum)); // windows outside face effective thermal emissivity @@ -879,7 +875,7 @@ namespace WindowEquivalentLayer { // IR incident on window from zone surfaces and high-temp radiant sources rmir = SurfWinIRfromParentZone(SurfNum) + QHTRadSysSurf(SurfNum) + QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) + QSteamBaseboardSurf(SurfNum) + QElecBaseboardSurf(SurfNum) + QRadThermInAbs(SurfNum); - TRMIN = root_4(rmir / StefanBoltzmann); // TODO check model equation. + TRMIN = root_4(rmir / DataGlobalConstants::StefanBoltzmann()); // TODO check model equation. NL = CFS(EQLNum).NL; QAllSWwinAbs({1, NL + 1}) = QRadSWwinAbs({1, NL + 1}, SurfNum); @@ -889,7 +885,7 @@ namespace WindowEquivalentLayer { // effective surface temperature is set to surface temperature calculated // by the fenestration layers temperature solver - SurfInsideTemp = T(NL) - KelvinConv; + SurfInsideTemp = T(NL) - DataGlobalConstants::KelvinConv(); // Convective to room QCONV = H(NL) * (T(NL) - TIN); // Other convective = total conv - standard model prediction @@ -897,7 +893,7 @@ namespace WindowEquivalentLayer { // Save the extra convection term. This term is added to the zone air heat // balance equation SurfWinOtherConvHeatGain(SurfNum) = Surface(SurfNum).Area * QXConv; - SurfOutsideTemp = T(1) - KelvinConv; + SurfOutsideTemp = T(1) - DataGlobalConstants::KelvinConv(); // Various reporting calculations InSideLayerType = CFS(EQLNum).L(NL).LTYPE; if (InSideLayerType == ltyGLAZE) { @@ -906,7 +902,7 @@ namespace WindowEquivalentLayer { ConvHeatFlowNatural = Surface(SurfNum).Area * QOCFRoom; } SurfWinEffInsSurfTemp(SurfNum) = SurfInsideTemp; - NetIRHeatGainWindow = Surface(SurfNum).Area * LWAbsIn * (StefanBoltzmann * pow_4(SurfInsideTemp + KelvinConv) - rmir); + NetIRHeatGainWindow = Surface(SurfNum).Area * LWAbsIn * (DataGlobalConstants::StefanBoltzmann() * pow_4(SurfInsideTemp + DataGlobalConstants::KelvinConv()) - rmir); ConvHeatGainWindow = Surface(SurfNum).Area * HcIn * (SurfInsideTemp - TaIn); // Window heat gain (or loss) is calculated here SurfWinHeatGain(SurfNum) = SurfWinTransSolar(SurfNum) + ConvHeatGainWindow + NetIRHeatGainWindow + ConvHeatFlowNatural; @@ -4530,8 +4526,8 @@ namespace WindowEquivalentLayer { ITRY = 0; - EB(0) = StefanBoltzmann * pow_4(TOUT); - EB(NL + 1) = StefanBoltzmann * pow_4(TIN); + EB(0) = DataGlobalConstants::StefanBoltzmann() * pow_4(TOUT); + EB(NL + 1) = DataGlobalConstants::StefanBoltzmann() * pow_4(TIN); ADIM = 3 * NL + 2; // DIMENSION OF A-MATRIX @@ -4571,7 +4567,7 @@ namespace WindowEquivalentLayer { // FIRST ESTIMATE OF GLAZING TEMPERATURES AND BLACK EMISSIVE POWERS for (I = 1; I <= NL; ++I) { T(I) = TOUT + double(I) / double(NL + 1) * (TIN - TOUT); - EB(I) = StefanBoltzmann * pow_4(T(I)); + EB(I) = DataGlobalConstants::StefanBoltzmann() * pow_4(T(I)); } CONVRG = 0; @@ -4671,16 +4667,16 @@ namespace WindowEquivalentLayer { // CONVERT TEMPERATURE POTENTIAL CONVECTIVE COEFFICIENTS to // BLACK EMISSIVE POWER POTENTIAL CONVECTIVE COEFFICIENTS - HHAT(0) = HC[0] * (1.0 / StefanBoltzmann) / ((TOUT_2 + pow_2(T(1))) * (TOUT + T(1))); + HHAT(0) = HC[0] * (1.0 / DataGlobalConstants::StefanBoltzmann()) / ((TOUT_2 + pow_2(T(1))) * (TOUT + T(1))); Real64 T_I_2(pow_2(T(1))), T_IP_2; for (I = 1; I <= NL - 1; ++I) { // Scan the cavities T_IP_2 = pow_2(T(I + 1)); - HHAT(I) = HC[I] * (1.0 / StefanBoltzmann) / ((T_I_2 + T_IP_2) * (T(I) + T(I + 1))); + HHAT(I) = HC[I] * (1.0 / DataGlobalConstants::StefanBoltzmann()) / ((T_I_2 + T_IP_2) * (T(I) + T(I + 1))); T_I_2 = T_IP_2; } - HHAT(NL) = HC[NL] * (1.0 / StefanBoltzmann) / ((pow_2(T(NL)) + TIN_2) * (T(NL) + TIN)); + HHAT(NL) = HC[NL] * (1.0 / DataGlobalConstants::StefanBoltzmann()) / ((pow_2(T(NL)) + TIN_2) * (T(NL) + TIN)); // SET UP MATRIX XSOL = 0.0; @@ -4689,7 +4685,7 @@ namespace WindowEquivalentLayer { L = 1; A(1, L) = 1.0; A(2, L) = -1.0 * RHOB(0); // -1.0 * RHOB_OUT - A(ADIM + 1, L) = EPSB_OUT * StefanBoltzmann * TRMOUT_4; + A(ADIM + 1, L) = EPSB_OUT * DataGlobalConstants::StefanBoltzmann() * TRMOUT_4; for (I = 1; I <= NL; ++I) { L = 3 * I - 1; @@ -4744,7 +4740,7 @@ namespace WindowEquivalentLayer { L = 3 * NL + 2; A(3 * NL + 1, L) = -1.0 * RHOF(NL + 1); // - 1.0 * RHOF_ROOM A(3 * NL + 2, L) = 1.0; - A(ADIM + 1, L) = EPSF_ROOM * StefanBoltzmann * TRMIN_4; + A(ADIM + 1, L) = EPSF_ROOM * DataGlobalConstants::StefanBoltzmann() * TRMIN_4; // SOLVE MATRIX // Call SOLMATS for single precision matrix solution @@ -4759,7 +4755,7 @@ namespace WindowEquivalentLayer { JF(I) = XSOL(J); ++J; EB(I) = max(1.0, XSOL(J)); // prevent impossible temps - TNEW(I) = root_4(EB(I) / StefanBoltzmann); + TNEW(I) = root_4(EB(I) / DataGlobalConstants::StefanBoltzmann()); ++J; JB[I] = XSOL(J); MAXERR = max(MAXERR, std::abs(TNEW(I) - T(I)) / TNEW(I)); @@ -4781,7 +4777,7 @@ namespace WindowEquivalentLayer { // UPDATE GLAZING TEMPERATURES AND BLACK EMISSIVE POWERS for (I = 1; I <= NL; ++I) { T(I) += ALPHA * (TNEW(I) - T(I)); - EB(I) = StefanBoltzmann * pow_4(T(I)); + EB(I) = DataGlobalConstants::StefanBoltzmann() * pow_4(T(I)); } // CHECK FOR CONVERGENCE @@ -5008,8 +5004,8 @@ namespace WindowEquivalentLayer { ITRY = 0; - EB(0) = StefanBoltzmann * pow_4(TOUT); - EB(NL + 1) = StefanBoltzmann * pow_4(TIN); + EB(0) = DataGlobalConstants::StefanBoltzmann() * pow_4(TOUT); + EB(NL + 1) = DataGlobalConstants::StefanBoltzmann() * pow_4(TIN); ADIM = 3 * NL + 2; // DIMENSION OF A-MATRIX @@ -5049,7 +5045,7 @@ namespace WindowEquivalentLayer { // FIRST ESTIMATE OF GLAZING TEMPERATURES AND BLACK EMISSIVE POWERS for (I = 1; I <= NL; ++I) { T(I) = TOUT + double(I) / double(NL + 1) * (TIN - TOUT); - EB(I) = StefanBoltzmann * pow_4(T(I)); + EB(I) = DataGlobalConstants::StefanBoltzmann() * pow_4(T(I)); } CONVRG = 0; @@ -5147,16 +5143,16 @@ namespace WindowEquivalentLayer { // CONVERT TEMPERATURE POTENTIAL CONVECTIVE COEFFICIENTS to // BLACK EMISSIVE POWER POTENTIAL CONVECTIVE COEFFICIENTS - HHAT(0) = HC[0] * (1.0 / StefanBoltzmann) / ((TOUT_2 + pow_2(T(1))) * (TOUT + T(1))); + HHAT(0) = HC[0] * (1.0 / DataGlobalConstants::StefanBoltzmann()) / ((TOUT_2 + pow_2(T(1))) * (TOUT + T(1))); Real64 T_I_2(pow_2(T(1))), T_IP_2; for (I = 1; I <= NL - 1; ++I) { // Scan the cavities T_IP_2 = pow_2(T(I + 1)); - HHAT(I) = HC[I] * (1.0 / StefanBoltzmann) / ((T_I_2 + T_IP_2) * (T(I) + T(I + 1))); + HHAT(I) = HC[I] * (1.0 / DataGlobalConstants::StefanBoltzmann()) / ((T_I_2 + T_IP_2) * (T(I) + T(I + 1))); T_I_2 = T_IP_2; } - HHAT(NL) = HC[NL] * (1.0 / StefanBoltzmann) / ((pow_2(T(NL)) + TIN_2) * (T(NL) + TIN)); + HHAT(NL) = HC[NL] * (1.0 / DataGlobalConstants::StefanBoltzmann()) / ((pow_2(T(NL)) + TIN_2) * (T(NL) + TIN)); // SET UP MATRIX XSOL = 0.0; @@ -5165,7 +5161,7 @@ namespace WindowEquivalentLayer { L = 1; A(1, L) = 1.0; A(2, L) = -1.0 * RHOB(0); // -1.0 * RHOB_OUT - A(ADIM + 1, L) = EPSB_OUT * StefanBoltzmann * TRMOUT_4; + A(ADIM + 1, L) = EPSB_OUT * DataGlobalConstants::StefanBoltzmann() * TRMOUT_4; for (I = 1; I <= NL; ++I) { L = 3 * I - 1; @@ -5220,7 +5216,7 @@ namespace WindowEquivalentLayer { L = 3 * NL + 2; A(3 * NL + 1, L) = -1.0 * RHOF(NL + 1); // - 1.0 * RHOF_ROOM A(3 * NL + 2, L) = 1.0; - A(ADIM + 1, L) = EPSF_ROOM * StefanBoltzmann * TRMIN_4; + A(ADIM + 1, L) = EPSF_ROOM * DataGlobalConstants::StefanBoltzmann() * TRMIN_4; // SOLVE MATRIX // Call SOLMATS for single precision matrix solution @@ -5235,7 +5231,7 @@ namespace WindowEquivalentLayer { JF(I) = XSOL(J); ++J; EB(I) = max(1.0, XSOL(J)); // prevent impossible temps - TNEW(I) = root_4(EB(I) / StefanBoltzmann); + TNEW(I) = root_4(EB(I) / DataGlobalConstants::StefanBoltzmann()); ++J; JB[I] = XSOL(J); MAXERR = max(MAXERR, std::abs(TNEW(I) - T(I)) / TNEW(I)); @@ -5257,7 +5253,7 @@ namespace WindowEquivalentLayer { // UPDATE GLAZING TEMPERATURES AND BLACK EMISSIVE POWERS for (I = 1; I <= NL; ++I) { T(I) += ALPHA * (TNEW(I) - T(I)); - EB(I) = StefanBoltzmann * pow_4(T(I)); + EB(I) = DataGlobalConstants::StefanBoltzmann() * pow_4(T(I)); } // CHECK FOR CONVERGENCE @@ -5863,11 +5859,11 @@ namespace WindowEquivalentLayer { Real64 const Td_2(pow_2(Td)); Real64 const Tg_2(pow_2(Tg)); Real64 const Tm_2(pow_2(Tm)); - hr_gm = Epsg * Epsm * FSg_m * StefanBoltzmann * (Tg + Tm) * (Tg_2 + Tm_2); + hr_gm = Epsg * Epsm * FSg_m * DataGlobalConstants::StefanBoltzmann() * (Tg + Tm) * (Tg_2 + Tm_2); hr_gd = - Epsg * Epsdf * FSg_df * StefanBoltzmann * (Td + Tg) * (Td_2 + Tg_2) + Epsg * Epsdb * FSg_db * StefanBoltzmann * (Td + Tg) * (Td_2 + Tg_2); + Epsg * Epsdf * FSg_df * DataGlobalConstants::StefanBoltzmann() * (Td + Tg) * (Td_2 + Tg_2) + Epsg * Epsdb * FSg_db * DataGlobalConstants::StefanBoltzmann() * (Td + Tg) * (Td_2 + Tg_2); hr_md = - Epsm * Epsdf * FSm_df * StefanBoltzmann * (Td + Tm) * (Td_2 + Tm_2) + Epsm * Epsdb * FSm_db * StefanBoltzmann * (Td + Tm) * (Td_2 + Tm_2); + Epsm * Epsdf * FSm_df * DataGlobalConstants::StefanBoltzmann() * (Td + Tm) * (Td_2 + Tm_2) + Epsm * Epsdb * FSm_db * DataGlobalConstants::StefanBoltzmann() * (Td + Tm) * (Td_2 + Tm_2); } void SETUP4x4_A(Real64 const rhog, Real64 const rhodf, Real64 const rhodb, Real64 const taud, Real64 const rhom, Array2A A) @@ -6046,7 +6042,7 @@ namespace WindowEquivalentLayer { HRadPar = 0.0; if ((E1 > 0.001) && (E2 > 0.001)) { DV = (1.0 / E1) + (1.0 / E2) - 1.0; - HRadPar = (StefanBoltzmann / DV) * (T1 + T2) * (pow_2(T1) + pow_2(T2)); + HRadPar = (DataGlobalConstants::StefanBoltzmann() / DV) * (T1 + T2) * (pow_2(T1) + pow_2(T2)); } return HRadPar; } @@ -6435,9 +6431,9 @@ namespace WindowEquivalentLayer { return CFSUFactor; } - TOABS = TOUT + KelvinConv; + TOABS = TOUT + DataGlobalConstants::KelvinConv(); TRMOUT = TOABS; - TIABS = TIN + KelvinConv; + TIABS = TIN + DataGlobalConstants::KelvinConv(); TRMIN = TIABS; NL = FS.NL; @@ -7765,7 +7761,7 @@ namespace WindowEquivalentLayer { PMan = state.dataWindowEquivalentLayer->PAtmSeaLevel; if (present(xPMan)) PMan = xPMan; - G.RHOGAS = DensityCFSFillGas(G.FG, PMan, TMan + KelvinConv); + G.RHOGAS = DensityCFSFillGas(G.FG, PMan, TMan + DataGlobalConstants::KelvinConv()); } void AdjustVBGap(CFSGAP &G, // gap, returned updated @@ -7816,7 +7812,7 @@ namespace WindowEquivalentLayer { // Return value float DensityCFSFillGas; - DensityCFSFillGas = (P * FG.MHAT) / (UniversalGasConst * max(T, 1.0)); + DensityCFSFillGas = (P * FG.MHAT) / (DataGlobalConstants::UniversalGasConst() * max(T, 1.0)); return DensityCFSFillGas; } @@ -8109,7 +8105,7 @@ namespace WindowEquivalentLayer { // PURPOSE OF THIS FUNCTION: // Returns equivalent celsius scale temperature from radiosity - return root_4(J / (StefanBoltzmann * max(Emiss, 0.001))) - KelvinConv; + return root_4(J / (DataGlobalConstants::StefanBoltzmann() * max(Emiss, 0.001))) - DataGlobalConstants::KelvinConv(); } void CalcEQLOpticalProperty(EnergyPlusData &state, diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index 6999f421fba..99990086692 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -2534,7 +2534,7 @@ namespace WindowManager { for (SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { SrdSurfViewFac = SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; SrdSurfTempAbs = - GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + KelvinConv; + GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + DataGlobalConstants::KelvinConv(); OutSrdIR += state.dataWindowManager->sigma * SrdSurfViewFac * pow_4(SrdSurfTempAbs); } } @@ -2665,7 +2665,7 @@ namespace WindowManager { for (SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { SrdSurfViewFac = SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; SrdSurfTempAbs = - GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + KelvinConv; + GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + DataGlobalConstants::KelvinConv(); rad_out_lw_srd_per_area += - emiss_sigma_product * SrdSurfViewFac * (Tsout_4 - pow_4(SrdSurfTempAbs)); } } @@ -3016,7 +3016,7 @@ namespace WindowManager { } else { InsideFaceIndex = state.dataWindowManager->nglface; } - CalcISO15099WindowIntConvCoeff(SurfNum, state.dataWindowManager->thetas(InsideFaceIndex) - KelvinConv, state.dataWindowManager->tin - KelvinConv); + CalcISO15099WindowIntConvCoeff(SurfNum, state.dataWindowManager->thetas(InsideFaceIndex) - DataGlobalConstants::KelvinConv(), state.dataWindowManager->tin - DataGlobalConstants::KelvinConv()); state.dataWindowManager->hcin = HConvIn(SurfNum); } @@ -3576,8 +3576,8 @@ namespace WindowManager { // report out temperatures for (i = 1; i <= state.dataWindowManager->nglfacep; ++i) { ShowContinueError("Glazing face index = " + RoundSigDigits(i) + - " ; new temperature =" + RoundSigDigits(state.dataWindowManager->thetas(i) - KelvinConv, 4) + - "C ; previous temperature = " + RoundSigDigits(state.dataWindowManager->thetasPrev(i) - KelvinConv, 4) + 'C'); + " ; new temperature =" + RoundSigDigits(state.dataWindowManager->thetas(i) - DataGlobalConstants::KelvinConv(), 4) + + "C ; previous temperature = " + RoundSigDigits(state.dataWindowManager->thetasPrev(i) - DataGlobalConstants::KelvinConv(), 4) + 'C'); } } diff --git a/src/EnergyPlus/WindowManager.hh b/src/EnergyPlus/WindowManager.hh index 79e2e841e71..017f3cbcf79 100644 --- a/src/EnergyPlus/WindowManager.hh +++ b/src/EnergyPlus/WindowManager.hh @@ -682,7 +682,7 @@ namespace WindowManager { } // Default Constructor - WindowManagerData() : sigma(5.6697e-8), TKelvin(DataGlobals::KelvinConv), nume(107), numt3(81), + WindowManagerData() : sigma(5.6697e-8), TKelvin(DataGlobalConstants::KelvinConv()), nume(107), numt3(81), gcon(3, 5, 5, 0.0), gvis(3, 5, 5, 0.0), gcp(3, 5, 5, 0.0), gwght(5, 5, 0.0), gfract(5, 5, 0.0), gnmix(5, 0), gap(5, 0.0), thick(5, 0.0), scon(5, 0.0), tir(10, 0.0), emis(10, 0.0), rir(10, 0.0), AbsRadGlassFace(10, 0.0), thetas(10, 0.0), thetasPrev(10, 0.0), fvec(10, 0.0), fjac(10, 10, 0.0), diff --git a/src/EnergyPlus/WindowManagerExteriorThermal.cc b/src/EnergyPlus/WindowManagerExteriorThermal.cc index 575c0e00964..5b839bf0105 100644 --- a/src/EnergyPlus/WindowManagerExteriorThermal.cc +++ b/src/EnergyPlus/WindowManagerExteriorThermal.cc @@ -138,11 +138,11 @@ namespace WindowManager { aTemp = aLayer->getTemperature(aSide); state.dataWindowManager->thetas(i) = aTemp; if (i == 1) { - SurfOutsideTemp = aTemp - KelvinConv; + SurfOutsideTemp = aTemp - DataGlobalConstants::KelvinConv(); } ++i; } - SurfInsideTemp = aTemp - KelvinConv; + SurfInsideTemp = aTemp - DataGlobalConstants::KelvinConv(); if (SurfWinShadingFlag(SurfNum) == IntShadeOn || SurfWinShadingFlag(SurfNum) == IntBlindOn) { auto EffShBlEmiss = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), window.EffShBlindEmiss); auto EffGlEmiss = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), window.EffGlassEmiss); @@ -177,7 +177,7 @@ namespace WindowManager { auto NetIRHeatGainShade = ShadeArea * EpsShIR2 * (state.dataWindowManager->sigma * pow(state.dataWindowManager->thetas(state.dataWindowManager->nglfacep), 4) - rmir) + EpsShIR1 * (state.dataWindowManager->sigma * pow(state.dataWindowManager->thetas(state.dataWindowManager->nglfacep - 1), 4) - rmir) * RhoGlIR2 * TauShIR / ShGlReflFacIR; auto NetIRHeatGainGlass = ShadeArea * (glassEmiss * TauShIR / ShGlReflFacIR) * (state.dataWindowManager->sigma * pow(state.dataWindowManager->thetas(state.dataWindowManager->nglface), 4) - rmir); - auto tind = surface.getInsideAirTemperature(SurfNum) + KelvinConv; + auto tind = surface.getInsideAirTemperature(SurfNum) + DataGlobalConstants::KelvinConv(); auto ConvHeatGainFrZoneSideOfShade = ShadeArea * HConvIn(SurfNum) * (state.dataWindowManager->thetas(state.dataWindowManager->nglfacep) - tind); SurfWinHeatGain(SurfNum) = SurfWinTransSolar(SurfNum) + ConvHeatGainFrZoneSideOfShade + NetIRHeatGainGlass + NetIRHeatGainShade; SurfWinHeatTransfer(SurfNum) = SurfWinHeatGain(SurfNum); @@ -194,7 +194,7 @@ namespace WindowManager { auto glassTemperature = aGlassLayer->getSurface(Side::Back)->getTemperature(); SurfWinEffInsSurfTemp(SurfNum) = - (EffShBlEmiss * SurfInsideTemp + EffGlEmiss * (glassTemperature - KelvinConv)) / (EffShBlEmiss + EffGlEmiss); + (EffShBlEmiss * SurfInsideTemp + EffGlEmiss * (glassTemperature - DataGlobalConstants::KelvinConv())) / (EffShBlEmiss + EffGlEmiss); } else { // Another adoptation to old source that looks suspicious. Check if heat flow through @@ -232,8 +232,8 @@ namespace WindowManager { SurfaceWindow(SurfNum).ThetaFace(2 * k) = state.dataWindowManager->thetas(2 * k); // temperatures for reporting - FenLaySurfTempFront(k, SurfNum) = state.dataWindowManager->thetas(2 * k - 1) - KelvinConv; - FenLaySurfTempBack(k, SurfNum) = state.dataWindowManager->thetas(2 * k) - KelvinConv; + FenLaySurfTempFront(k, SurfNum) = state.dataWindowManager->thetas(2 * k - 1) - DataGlobalConstants::KelvinConv(); + FenLaySurfTempBack(k, SurfNum) = state.dataWindowManager->thetas(2 * k) - DataGlobalConstants::KelvinConv(); } } @@ -594,7 +594,7 @@ namespace WindowManager { // PURPOSE OF THIS SUBROUTINE: // Creates indoor environment object from surface properties in EnergyPlus - auto tin = m_Surface.getInsideAirTemperature(m_SurfNum) + KelvinConv; + auto tin = m_Surface.getInsideAirTemperature(m_SurfNum) + DataGlobalConstants::KelvinConv(); auto hcin = HConvIn(m_SurfNum); auto IR = m_Surface.getInsideIR(m_SurfNum); @@ -616,7 +616,7 @@ namespace WindowManager { // PURPOSE OF THIS SUBROUTINE: // Creates outdoor environment object from surface properties in EnergyPlus - double tout = m_Surface.getOutsideAirTemperature(m_SurfNum) + KelvinConv; + double tout = m_Surface.getOutsideAirTemperature(m_SurfNum) + DataGlobalConstants::KelvinConv(); double IR = m_Surface.getOutsideIR(state, m_SurfNum); // double dirSolRad = QRadSWOutIncident( t_SurfNum ) + QS( Surface( t_SurfNum ).Zone ); double swRadiation = m_Surface.getSWIncident(m_SurfNum); diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index b3f7c3d5e18..a60aa28f1f6 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -4949,7 +4949,7 @@ namespace ZoneEquipmentManager { } if (Ventilation(j).ModelType == VentilationWindAndStack) { - if (Ventilation(j).OpenEff != AutoCalculate) { + if (Ventilation(j).OpenEff != DataGlobalConstants::AutoCalculate()) { Cw = Ventilation(j).OpenEff; } else { // linear interpolation between effective angle and wind direction @@ -4957,7 +4957,7 @@ namespace ZoneEquipmentManager { if (angle > 180.0) angle -= 180.0; Cw = 0.55 + angle / 180.0 * (0.3 - 0.55); } - if (Ventilation(j).DiscCoef != AutoCalculate) { + if (Ventilation(j).DiscCoef != DataGlobalConstants::AutoCalculate()) { Cd = Ventilation(j).DiscCoef; } else { Cd = 0.40 + 0.0045 * std::abs(TempExt - ZMAT(NZ)); diff --git a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc index a5d191eec4d..7a85ea50125 100644 --- a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc +++ b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc @@ -366,7 +366,7 @@ TEST_F(EnergyPlusFixture, ChillerElectricEIR_EvaporativelyCooled_Calculate) thisEIRChiller.calculate(state, MyLoad, RunFlag); // calc evap-cooler water consumption rate Real64 EvapCondWaterVolFlowRate = thisEIRChiller.CondMassFlowRate * (thisEIRChiller.CondOutletHumRat - DataEnvironment::OutHumRat) / - Psychrometrics::RhoH2O(DataGlobals::InitConvTemp); + Psychrometrics::RhoH2O(DataGlobalConstants::InitConvTemp()); // check evap-cooled condenser water consumption rate EXPECT_NEAR(2.31460814, thisEIRChiller.CondMassFlowRate, 0.0000001); EXPECT_NEAR(6.22019725E-06, EvapCondWaterVolFlowRate, 0.000000001); diff --git a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc index 11d233dad37..f9591166477 100644 --- a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc +++ b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc @@ -5674,7 +5674,7 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_WaterCooled) EXPECT_DOUBLE_EQ(CondVolFlowRate, VRF(VRFCond).WaterCondVolFlowRate); rho = GetDensityGlycol(state, - PlantLoop(VRF(VRFCond).SourceLoopNum).FluidName, InitConvTemp, PlantLoop(VRF(VRFCond).SourceLoopNum).FluidIndex, RoutineName); + PlantLoop(VRF(VRFCond).SourceLoopNum).FluidName, DataGlobalConstants::InitConvTemp(), PlantLoop(VRF(VRFCond).SourceLoopNum).FluidIndex, RoutineName); EXPECT_DOUBLE_EQ(VRF(VRFCond).WaterCondenserDesignMassFlow, (VRF(VRFCond).WaterCondVolFlowRate * rho)); // set zone load to heating diff --git a/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc index 6a1583dfa0a..7fcb28da06c 100644 --- a/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc @@ -208,7 +208,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceKiva_SetInitialBCs) Real64 expectedResult1 = kv1.instance.bcs->slabConvectiveTemp; - EXPECT_NEAR(expectedResult1, zoneAssumedTemperature1 + DataGlobals::KelvinConv, 0.001); + EXPECT_NEAR(expectedResult1, zoneAssumedTemperature1 + DataGlobalConstants::KelvinConv(), 0.001); // Test using default Initial Indoor Temperature with Cooling/Heating Setpoints of 24C/20C @@ -223,7 +223,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceKiva_SetInitialBCs) Real64 expectedResult2 = kv2.instance.bcs->slabConvectiveTemp; - EXPECT_NEAR(expectedResult2, coolingSetpoint2 + DataGlobals::KelvinConv, 0.001); + EXPECT_NEAR(expectedResult2, coolingSetpoint2 + DataGlobalConstants::KelvinConv(), 0.001); // Test using default Initial Indoor Temperature with Cooling/Heating Setpoints of 100C/-100C @@ -241,7 +241,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceKiva_SetInitialBCs) Real64 expectedResult3 = kv3.instance.bcs->slabConvectiveTemp; - EXPECT_NEAR(expectedResult3, coolingSetpoint3 + DataGlobals::KelvinConv, 0.001); + EXPECT_NEAR(expectedResult3, coolingSetpoint3 + DataGlobalConstants::KelvinConv(), 0.001); // Test Initial Indoor Temperature input of 15C with Cooling/Heating Setpoints of 100C/-100C @@ -258,7 +258,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceKiva_SetInitialBCs) Real64 expectedResult4 = kv4.instance.bcs->slabConvectiveTemp; - EXPECT_NEAR(expectedResult4, zoneAssumedTemperature4 + DataGlobals::KelvinConv, 0.001); + EXPECT_NEAR(expectedResult4, zoneAssumedTemperature4 + DataGlobalConstants::KelvinConv(), 0.001); } } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc index 133097b46c1..007994fce56 100644 --- a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc @@ -1894,8 +1894,6 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestSurfPropertySrdSurfLWR) ScheduleManager::Schedule(3).CurrentValue = 22.0; // Grd temp int SurfNum; - Real64 const StefanBoltzmann(5.6697E-8); - Real64 const KelvinConv(273.15); for (SurfNum = 1; SurfNum <= 6; SurfNum++) { DataHeatBalSurface::TH(1, 1, SurfNum) = 20; // Surf temp DataSurfaces::Surface(SurfNum).OutDryBulbTemp = 22; // Air temp @@ -1913,17 +1911,17 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestSurfPropertySrdSurfLWR) EXPECT_DOUBLE_EQ(0.25, DataSurfaces::Surface(3).ViewFactorSkyIR); EXPECT_DOUBLE_EQ(0.25, DataSurfaces::Surface(3).ViewFactorGroundIR); // Test if sky and grd view factor and temperature correctly overwritten - EXPECT_DOUBLE_EQ((StefanBoltzmann * 0.9 * 0.3 * (pow_4(20.0 + KelvinConv) - pow_4(15.0 + KelvinConv)) / (20.0 - 15.0)), + EXPECT_DOUBLE_EQ((DataGlobalConstants::StefanBoltzmann() * 0.9 * 0.3 * (pow_4(20.0 + DataGlobalConstants::KelvinConv()) - pow_4(15.0 + DataGlobalConstants::KelvinConv())) / (20.0 - 15.0)), DataHeatBalSurface::HSkyExtSurf(1)); - EXPECT_DOUBLE_EQ((StefanBoltzmann * 0.9 * 0.1 * (pow_4(20.0 + KelvinConv) - pow_4(22.0 + KelvinConv)) / (20.0 - 22.0)), + EXPECT_DOUBLE_EQ((DataGlobalConstants::StefanBoltzmann() * 0.9 * 0.1 * (pow_4(20.0 + DataGlobalConstants::KelvinConv()) - pow_4(22.0 + DataGlobalConstants::KelvinConv())) / (20.0 - 22.0)), DataHeatBalSurface::HGrdExtSurf(1)); // Test if LWR from surrounding surfaces correctly calculated - EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * 0.6 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)), DataHeatBalSurface::QRadLWOutSrdSurfs(1)); - EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * - (0.3 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)) + 0.3 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv))), + EXPECT_DOUBLE_EQ(DataGlobalConstants::StefanBoltzmann() * 0.9 * 0.6 * (pow_4(25.0 + DataGlobalConstants::KelvinConv()) - pow_4(20.0 + DataGlobalConstants::KelvinConv())), DataHeatBalSurface::QRadLWOutSrdSurfs(1)); + EXPECT_DOUBLE_EQ(DataGlobalConstants::StefanBoltzmann() * 0.9 * + (0.3 * (pow_4(25.0 + DataGlobalConstants::KelvinConv()) - pow_4(20.0 + DataGlobalConstants::KelvinConv())) + 0.3 * (pow_4(25.0 + DataGlobalConstants::KelvinConv()) - pow_4(20.0 + DataGlobalConstants::KelvinConv()))), DataHeatBalSurface::QRadLWOutSrdSurfs(2)); - EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * 0.5 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)), DataHeatBalSurface::QRadLWOutSrdSurfs(3)); + EXPECT_DOUBLE_EQ(DataGlobalConstants::StefanBoltzmann() * 0.9 * 0.5 * (pow_4(25.0 + DataGlobalConstants::KelvinConv()) - pow_4(20.0 + DataGlobalConstants::KelvinConv())), DataHeatBalSurface::QRadLWOutSrdSurfs(3)); EXPECT_DOUBLE_EQ(0.0, DataHeatBalSurface::QRadLWOutSrdSurfs(4)); } diff --git a/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc b/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc index b794bf5859d..61ec0ec994e 100644 --- a/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc +++ b/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc @@ -366,7 +366,6 @@ TEST_F(EnergyPlusFixture, CheckEMPDCalc_Slope) auto const &material(dataMaterial.Material(1)); Real64 Tsat(0.0); - Real64 const KelvinConv(273.15); DataHeatBalSurface::TempSurfIn.allocate(surfNum); DataHeatBalSurface::TempSurfIn(surfNum) = 20.0; @@ -375,7 +374,7 @@ TEST_F(EnergyPlusFixture, CheckEMPDCalc_Slope) // Calculate RH for use in material property calculations. Real64 RV_Deep_Old = DataMoistureBalanceEMPD::RVdeepOld( surfNum ); Real64 RVaver = DataMoistureBalanceEMPD::RVSurfLayerOld(surfNum); - Real64 RHaver = RVaver * 461.52 * (Taver + KelvinConv) * std::exp(-23.7093 + 4111.0 / (Taver + 237.7)); + Real64 RHaver = RVaver * 461.52 * (Taver + DataGlobalConstants::KelvinConv()) * std::exp(-23.7093 + 4111.0 / (Taver + 237.7)); Real64 dU_dRH = material.MoistACoeff * material.MoistBCoeff * pow(RHaver, material.MoistBCoeff - 1) + material.MoistCCoeff * material.MoistDCoeff * pow(RHaver, material.MoistDCoeff - 1); diff --git a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc index 59f80057a50..50547bd214c 100644 --- a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc +++ b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc @@ -674,8 +674,8 @@ TEST_F(EnergyPlusFixture, OutdoorAirUnit_WaterCoolingCoilAutoSizeTest) Real64 DesWaterCoolingCoilLoad = DesAirMassFlow * (EnthalpyAirIn - EnthalpyAirOut) + FanCoolLoad; Real64 CoilDesWaterDeltaT = PlantSizData(1).DeltaT; - Real64 Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(1).FluidIndex, " "); - Real64 rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(1).FluidIndex, " "); + Real64 Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(1).FluidIndex, " "); + Real64 rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(1).FluidIndex, " "); Real64 DesCoolingCoilWaterVolFlowRate = DesWaterCoolingCoilLoad / (CoilDesWaterDeltaT * Cp * rho); // check water coil water flow rate calc EXPECT_EQ(DesWaterCoolingCoilLoad, state.dataWaterCoils->WaterCoil(1).DesWaterCoolingCoilRate); @@ -975,10 +975,10 @@ TEST_F(EnergyPlusFixture, OutdoorAirUnit_SteamHeatingCoilAutoSizeTest) Real64 DesSteamCoilLoad = DesAirMassFlow * CpAirAvg * (DesCoilOutTemp - DesCoilInTemp); // do steam flow rate sizing calculation - Real64 EnthSteamIn = GetSatEnthalpyRefrig(state, "STEAM", DataGlobals::SteamInitConvTemp, 1.0, SteamCoil(1).FluidIndex, ""); - Real64 EnthSteamOut = GetSatEnthalpyRefrig(state, "STEAM", DataGlobals::SteamInitConvTemp, 0.0, SteamCoil(1).FluidIndex, ""); - Real64 SteamDensity = GetSatDensityRefrig(state, "STEAM", DataGlobals::SteamInitConvTemp, 1.0, SteamCoil(1).FluidIndex, ""); - Real64 CpOfCondensate = GetSatSpecificHeatRefrig(state, "STEAM", DataGlobals::SteamInitConvTemp, 0.0, SteamCoil(1).FluidIndex, ""); + Real64 EnthSteamIn = GetSatEnthalpyRefrig(state, "STEAM", DataGlobalConstants::SteamInitConvTemp(), 1.0, SteamCoil(1).FluidIndex, ""); + Real64 EnthSteamOut = GetSatEnthalpyRefrig(state, "STEAM", DataGlobalConstants::SteamInitConvTemp(), 0.0, SteamCoil(1).FluidIndex, ""); + Real64 SteamDensity = GetSatDensityRefrig(state, "STEAM", DataGlobalConstants::SteamInitConvTemp(), 1.0, SteamCoil(1).FluidIndex, ""); + Real64 CpOfCondensate = GetSatSpecificHeatRefrig(state, "STEAM", DataGlobalConstants::SteamInitConvTemp(), 0.0, SteamCoil(1).FluidIndex, ""); Real64 LatentHeatChange = EnthSteamIn - EnthSteamOut; Real64 DesMaxSteamVolFlowRate = DesSteamCoilLoad / (SteamDensity * (LatentHeatChange + SteamCoil(1).DegOfSubcooling * CpOfCondensate)); diff --git a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc index f0aec31510f..7a39f3631c0 100644 --- a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc @@ -3747,9 +3747,9 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_GatherHeatEmissionReport) GatherHeatEmissionReport(state, OutputProcessor::TimeStepType::TimeStepSystem); EXPECT_EQ(reliefEnergy, DataHeatBalance::SysTotalHVACReliefHeatLoss); - EXPECT_EQ(reliefEnergy * DataGlobals::convertJtoGJ, BuildingPreDefRep.emiHVACRelief); + EXPECT_EQ(reliefEnergy * DataGlobalConstants::convertJtoGJ(), BuildingPreDefRep.emiHVACRelief); EXPECT_EQ(condenserReject, DataHeatBalance::SysTotalHVACRejectHeatLoss); - EXPECT_EQ(condenserReject * DataGlobals::convertJtoGJ, BuildingPreDefRep.emiHVACReject); + EXPECT_EQ(condenserReject * DataGlobalConstants::convertJtoGJ(), BuildingPreDefRep.emiHVACReject); DXCoils::NumDXCoils = 2; DXCoils::DXCoil.allocate(2); @@ -3771,9 +3771,9 @@ TEST_F(EnergyPlusFixture, OutputReportTabular_GatherHeatEmissionReport) Real64 coilReject = 1.0 * TimeStepSysSec + 200.0 + 10.0; GatherHeatEmissionReport(state, OutputProcessor::TimeStepType::TimeStepSystem); EXPECT_EQ(reliefEnergy, DataHeatBalance::SysTotalHVACReliefHeatLoss); - EXPECT_EQ(2 * reliefEnergy * DataGlobals::convertJtoGJ, BuildingPreDefRep.emiHVACRelief); + EXPECT_EQ(2 * reliefEnergy * DataGlobalConstants::convertJtoGJ(), BuildingPreDefRep.emiHVACRelief); EXPECT_EQ(condenserReject + coilReject, DataHeatBalance::SysTotalHVACRejectHeatLoss); - EXPECT_EQ(2 * condenserReject * DataGlobals::convertJtoGJ + coilReject * DataGlobals::convertJtoGJ, BuildingPreDefRep.emiHVACReject); + EXPECT_EQ(2 * condenserReject * DataGlobalConstants::convertJtoGJ() + coilReject * DataGlobalConstants::convertJtoGJ(), BuildingPreDefRep.emiHVACReject); } TEST_F(EnergyPlusFixture, OutputTableTimeBins_GetInput) diff --git a/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc b/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc index f283d530ae8..741521f67b3 100644 --- a/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc +++ b/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc @@ -139,17 +139,17 @@ TEST_F(EnergyPlusFixture, ChillerHeater_Autosize) // Calculate expected values Real64 rho_evap = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(PltSizNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(PltSizNum).FluidIndex, "ChillerHeater_Autosize_TEST"); Real64 Cp_evap = FluidProperties::GetSpecificHeatGlycol(state, DataPlant::PlantLoop(PltSizNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(PltSizNum).FluidIndex, "ChillerHeater_Autosize_TEST"); Real64 rho_cond = FluidProperties::GetDensityGlycol(state, DataPlant::PlantLoop(PltSizCondNum).FluidName, - DataGlobals::CWInitConvTemp, + DataGlobalConstants::CWInitConvTemp(), DataPlant::PlantLoop(PltSizCondNum).FluidIndex, "ChillerHeater_Autosize_TEST"); diff --git a/tst/EnergyPlus/unit/ThermalComfort.unit.cc b/tst/EnergyPlus/unit/ThermalComfort.unit.cc index cd7b974b7f8..14b2f6f2b38 100644 --- a/tst/EnergyPlus/unit/ThermalComfort.unit.cc +++ b/tst/EnergyPlus/unit/ThermalComfort.unit.cc @@ -970,7 +970,7 @@ TEST_F(EnergyPlusFixture, ThermalComfort_CalcThermalComfortPierceSET) Zone(People(1).ZonePtr).TotOccupants = People(1).NumberOfPeople; People(1).FractionRadiant = 0.3; People(1).FractionConvected = 1.0 - People(1).FractionRadiant; - People(1).UserSpecSensFrac = AutoCalculate; + People(1).UserSpecSensFrac = DataGlobalConstants::AutoCalculate(); People(1).CO2RateFactor = 3.82e-8; People(1).ActivityLevelPtr = -1; People(1).Show55Warning = true; diff --git a/tst/EnergyPlus/unit/UnitHeater.unit.cc b/tst/EnergyPlus/unit/UnitHeater.unit.cc index a1c83a71f55..dac1a714162 100644 --- a/tst/EnergyPlus/unit/UnitHeater.unit.cc +++ b/tst/EnergyPlus/unit/UnitHeater.unit.cc @@ -1147,11 +1147,11 @@ TEST_F(EnergyPlusFixture, UnitHeater_HWHeatingCoilUAAutoSizingTest) HWMaxVolFlowRate = state.dataWaterCoils->WaterCoil(CoilNum).MaxWaterVolFlowRate; HWDensity = GetDensityGlycol(state, PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidIndex, "xxx"); CpHW = GetSpecificHeatGlycol(state, PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidName, - DataGlobals::HWInitConvTemp, + DataGlobalConstants::HWInitConvTemp(), PlantLoop(UnitHeat(UnitHeatNum).HWLoopNum).FluidIndex, "xxx"); HWPlantDeltaTDesign = PlantSizData(PltSizHeatNum).DeltaT; diff --git a/tst/EnergyPlus/unit/WaterCoils.unit.cc b/tst/EnergyPlus/unit/WaterCoils.unit.cc index b67179f455b..cc8b57eb9ff 100644 --- a/tst/EnergyPlus/unit/WaterCoils.unit.cc +++ b/tst/EnergyPlus/unit/WaterCoils.unit.cc @@ -512,8 +512,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterUASizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); - rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); + Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); + rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); DesWaterFlowRate = state.dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (10.0 * Cp * rho); // check heating coil design water flow rate @@ -664,8 +664,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterLowAirFlowUASizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); - rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); + Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); + rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); DesWaterFlowRate = state.dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (10.0 * Cp * rho); // check heating coil design water flow rate @@ -821,8 +821,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterUASizingLowHwaterInletTemp) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); - rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); + Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); + rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); DesWaterFlowRate = state.dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (10.0 * Cp * rho); // check heating coil design water flow rate @@ -934,8 +934,8 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterSimpleSizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); - rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); + Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); + rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); DesWaterFlowRate = state.dataWaterCoils->WaterCoil(CoilNum).DesWaterCoolingCoilRate / (state.dataWaterCoils->WaterCoil(CoilNum).DesignWaterDeltaTemp * Cp * rho); // check cooling coil design water flow rate @@ -1049,8 +1049,8 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailedSizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); - rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobals::CWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); + Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); + rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::CWInitConvTemp(), PlantLoop(1).FluidIndex, "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); @@ -1146,8 +1146,8 @@ TEST_F(WaterCoilsTest, CoilHeatingWaterSimpleSizing) Real64 rho = 0; Real64 DesWaterFlowRate = 0; - Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); - rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobals::HWInitConvTemp, PlantLoop(1).FluidIndex, "Unit Test"); + Cp = GetSpecificHeatGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); + rho = GetDensityGlycol(state, PlantLoop(1).FluidName, DataGlobalConstants::HWInitConvTemp(), PlantLoop(1).FluidIndex, "Unit Test"); DesWaterFlowRate = state.dataWaterCoils->WaterCoil(CoilNum).DesWaterHeatingCoilRate / (11.0 * Cp * rho); // check heating coil design water flow rate diff --git a/tst/EnergyPlus/unit/WindowManager.unit.cc b/tst/EnergyPlus/unit/WindowManager.unit.cc index 2c1d4daa723..00cbce4a009 100644 --- a/tst/EnergyPlus/unit/WindowManager.unit.cc +++ b/tst/EnergyPlus/unit/WindowManager.unit.cc @@ -245,7 +245,7 @@ TEST_F(EnergyPlusFixture, WindowFrameTest) DataSurfaces::Surface(winNum).OutDryBulbTemp = T_out; DataHeatBalance::TempEffBulkAir(winNum) = T_in; - DataSurfaces::SurfWinIRfromParentZone(winNum) = DataGlobals::StefanBoltzmann * std::pow(T_in + DataGlobals::KelvinConv, 4); + DataSurfaces::SurfWinIRfromParentZone(winNum) = DataGlobalConstants::StefanBoltzmann() * std::pow(T_in + DataGlobalConstants::KelvinConv(), 4); DataHeatBalFanSys::ZoneAirHumRatAvg.dimension(1, 0.01); DataHeatBalFanSys::ZoneAirHumRat.dimension(1, 0.01); DataHeatBalFanSys::MAT.dimension(1, T_in); @@ -2824,14 +2824,12 @@ TEST_F(EnergyPlusFixture, WindowManager_SrdLWRTest) Real64 inSurfTemp; Real64 outSurfTemp; - Real64 const StefanBoltzmann(5.6697E-8); - Real64 const KelvinConv(273.15); ScheduleManager::Schedule(1).CurrentValue = 25.0; // Srd Srfs Temp // Claculate temperature based on supply flow rate WindowManager::CalcWindowHeatBalance(state, surfNum2, DataHeatBalance::HConvIn(surfNum2), inSurfTemp, outSurfTemp); // Test if LWR from surrounding surfaces correctly calculated - EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.84 * 0.6 * (pow_4(25.0 + KelvinConv) - pow_4(state.dataWindowManager->thetas(1))), DataHeatBalSurface::QRadLWOutSrdSurfs(surfNum2)); + EXPECT_DOUBLE_EQ(DataGlobalConstants::StefanBoltzmann() * 0.84 * 0.6 * (pow_4(25.0 + DataGlobalConstants::KelvinConv()) - pow_4(state.dataWindowManager->thetas(1))), DataHeatBalSurface::QRadLWOutSrdSurfs(surfNum2)); EXPECT_NEAR(-24.9342, DataHeatBalSurface::QHeatEmiReport(surfNum2),3); } TEST_F(EnergyPlusFixture, WindowMaterialComplexShadeTest)