diff --git a/src/EnergyPlus/Autosizing/Base.cc b/src/EnergyPlus/Autosizing/Base.cc index 921465213f6..cd1332cb118 100644 --- a/src/EnergyPlus/Autosizing/Base.cc +++ b/src/EnergyPlus/Autosizing/Base.cc @@ -906,7 +906,7 @@ void BaseSizer::calcCoilWaterFlowRates(EnergyPlusData &state, } auto &plntCoilData = state.dataPlnt->PlantLoop(loopNum).compDesWaterFlowRate; if (arrayIndex == -1) { - size_t arrayIndex = plntCoilData.size() + 1; + arrayIndex = plntCoilData.size() + 1; plntCoilData.resize(arrayIndex); plntCoilData[arrayIndex - 1].tsDesWaterFlowRate.resize(size_t(timeStepInDay)); plntCoilData[arrayIndex - 1].tsDesWaterFlowRate = tmpFlowData; diff --git a/src/EnergyPlus/DemandManager.cc b/src/EnergyPlus/DemandManager.cc index 794392d05db..f4621a486f7 100644 --- a/src/EnergyPlus/DemandManager.cc +++ b/src/EnergyPlus/DemandManager.cc @@ -1524,9 +1524,9 @@ void LoadInterface(EnergyPlusData &state, DemandAction const Action, int const M if (state.dataZoneCtrls->NumComfortControlledZones > 0) { auto &comfortZone = state.dataZoneCtrls->ComfortControlledZone(LoadPtr); if (state.dataHeatBalFanSys->ComfortControlType(comfortZone.ActualZoneNum) != HVAC::SetptType::Uncontrolled) { - auto &zoneTstatSetpt = s_dhbf->zoneTstatSetpts(comfortZone.ActualZoneNum); + auto &cmftzoneTstatSetpt = s_dhbf->zoneTstatSetpts(comfortZone.ActualZoneNum); if (Action == DemandAction::CheckCanReduce) { - if (zoneTstatSetpt.setptLo > demandMgr.LowerLimit || zoneTstatSetpt.setptHi < demandMgr.UpperLimit) { + if (cmftzoneTstatSetpt.setptLo > demandMgr.LowerLimit || cmftzoneTstatSetpt.setptHi < demandMgr.UpperLimit) { CanReduceDemand = true; // Heating } } else if (Action == DemandAction::SetLimit) { diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index c0d96746b26..a05f33ab536 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -13928,11 +13928,12 @@ void VRFCondenserEquipment::VRFOU_CompSpd( CompSpdUB = CounterCompSpdTemp; Real64 deltaCAP = CompEvaporatingCAPSpd(CompSpdUB) - CompEvaporatingCAPSpd(CompSpdLB); Real64 deltaPWR = CompEvaporatingPWRSpd(CompSpdUB) - CompEvaporatingPWRSpd(CompSpdLB); - Real64 r = ((Q_cond_req - CompEvaporatingPWRSpd(CompSpdLB)) * C_cap_operation - CompEvaporatingCAPSpd(CompSpdLB)) / - (deltaCAP + deltaPWR * C_cap_operation); - if (r < 1.0) { - CompSpdActual = this->CompressorSpeed(CompSpdLB) + (this->CompressorSpeed(CompSpdUB) - this->CompressorSpeed(CompSpdLB)) * r; - Q_evap_req = Q_cond_req - deltaPWR * r - CompEvaporatingPWRSpd(CompSpdLB); + Real64 interpRatio = ((Q_cond_req - CompEvaporatingPWRSpd(CompSpdLB)) * C_cap_operation - CompEvaporatingCAPSpd(CompSpdLB)) / + (deltaCAP + deltaPWR * C_cap_operation); + if (interpRatio < 1.0) { + CompSpdActual = + this->CompressorSpeed(CompSpdLB) + (this->CompressorSpeed(CompSpdUB) - this->CompressorSpeed(CompSpdLB)) * interpRatio; + Q_evap_req = Q_cond_req - deltaPWR * interpRatio - CompEvaporatingPWRSpd(CompSpdLB); break; } } diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.cc b/src/EnergyPlus/HeatBalFiniteDiffManager.cc index 87f8d655787..ddaf020dd58 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -2086,8 +2086,6 @@ namespace HeatBalFiniteDiffManager { } // update report variables - auto &surfFD = s_hbfd->SurfaceFD(SurfNum); - // only includes internal heat source surfFD.heatSourceInternalFluxLayerReport(Lay) = QSSFlux * surface.Area; surfFD.heatSourceInternalFluxEnergyLayerReport(Lay) = QSSFlux * surface.Area * state.dataGlobal->TimeStepZoneSec; diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.cc b/src/EnergyPlus/HeatBalanceHAMTManager.cc index d28d139afd9..1661afc7153 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.cc +++ b/src/EnergyPlus/HeatBalanceHAMTManager.cc @@ -660,7 +660,6 @@ namespace HeatBalanceHAMTManager { static constexpr std::string_view RoutineName("InitCombinedHeatAndMoistureFiniteElement: "); // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int sid; int conid; int errorCount; @@ -946,9 +945,9 @@ namespace HeatBalanceHAMTManager { cell1.adjsl(adj1) = adj2; cell2.adjsl(adj2) = adj1; - sid = cell1.sid; - cell1.overlap(adj1) = state.dataSurface->Surface(sid).Area; - cell2.overlap(adj2) = state.dataSurface->Surface(sid).Area; + int const surfNum = cell1.sid; + cell1.overlap(adj1) = state.dataSurface->Surface(surfNum).Area; + cell2.overlap(adj2) = state.dataSurface->Surface(surfNum).Area; cell1.dist(adj1) = cell1.length(1) / 2.0; cell2.dist(adj2) = cell2.length(1) / 2.0; } diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index a4ea11e9de6..88ce19dbe54 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -1698,7 +1698,6 @@ namespace HeatBalanceManager { if (ConstructNumAlpha <= 2) { } else { - auto const *mat = s_mat->materials(state.dataConstruction->Construct(TotRegConstructs + ConstrNum).LayerPoint(Layer)); state.dataHeatBal->NominalRforNominalUCalculation(TotRegConstructs + ConstrNum) += mat->NominalR; } } @@ -1774,15 +1773,15 @@ namespace HeatBalanceManager { WConstructNames.deallocate(); // set some (default) properties of the Construction Derived Type - for (int ConstrNum = 1; ConstrNum <= state.dataHeatBal->TotConstructs; ++ConstrNum) { + for (int ConstrIndex = 1; ConstrIndex <= state.dataHeatBal->TotConstructs; ++ConstrIndex) { - auto &thisConstruct = state.dataConstruction->Construct(ConstrNum); + auto &thisConstruct = state.dataConstruction->Construct(ConstrIndex); // For air boundaries, skip TypeIsAirBoundary if (thisConstruct.TypeIsAirBoundary) { continue; } - if (state.dataHeatBal->NominalRforNominalUCalculation(ConstrNum) != 0.0) { - state.dataHeatBal->NominalU(ConstrNum) = 1.0 / state.dataHeatBal->NominalRforNominalUCalculation(ConstrNum); + if (state.dataHeatBal->NominalRforNominalUCalculation(ConstrIndex) != 0.0) { + state.dataHeatBal->NominalU(ConstrIndex) = 1.0 / state.dataHeatBal->NominalRforNominalUCalculation(ConstrIndex); } else { if (!thisConstruct.WindowTypeEQL) { ShowSevereError(state, format("Nominal U is zero, for construction={}", thisConstruct.Name)); @@ -1790,7 +1789,7 @@ namespace HeatBalanceManager { } } - DataHeatBalance::CheckAndSetConstructionProperties(state, ConstrNum, ErrorsFound); + DataHeatBalance::CheckAndSetConstructionProperties(state, ConstrIndex, ErrorsFound); } // End of ConstrNum DO loop } diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index e4dbd32136a..44dba8c4457 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -3632,7 +3632,6 @@ void InitSolarHeatGains(EnergyPlusData &state) auto const *screen = dynamic_cast(s_mat->materials(screenNum)); assert(screen != nullptr); - auto &surf = state.dataSurface->Surface(SurfNum); Real64 phi, theta; Material::GetRelativePhiTheta( surf.Tilt * Constant::DegToRad, surf.Azimuth * Constant::DegToRad, state.dataEnvrn->SOLCOS, phi, theta); diff --git a/src/EnergyPlus/PlantLoadProfile.cc b/src/EnergyPlus/PlantLoadProfile.cc index 6282a7fb0fb..d5da70cdf77 100644 --- a/src/EnergyPlus/PlantLoadProfile.cc +++ b/src/EnergyPlus/PlantLoadProfile.cc @@ -311,10 +311,10 @@ void PlantProfileData::InitPlantProfile(EnergyPlusData &state) } } auto &plntCoilData = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).compDesWaterFlowRate; - size_t arrayIndex = plntCoilData.size() + 1; - plntCoilData.resize(arrayIndex); - plntCoilData[arrayIndex - 1].tsDesWaterFlowRate.resize(size_t(24 * state.dataGlobal->TimeStepsInHour)); - plntCoilData[arrayIndex - 1].tsDesWaterFlowRate = tmpFlowData; + size_t newEntryIndex = plntCoilData.size() + 1; + plntCoilData.resize(newEntryIndex); + plntCoilData[newEntryIndex - 1].tsDesWaterFlowRate.resize(size_t(24 * state.dataGlobal->TimeStepsInHour)); + plntCoilData[newEntryIndex - 1].tsDesWaterFlowRate = tmpFlowData; } // if PeakVolFlowRate is ever autosized this will need the else this->InitSizing = false; // if PeakVolFlowRate is ever autosized this will need to repeat } diff --git a/src/EnergyPlus/SZVAVModel.cc b/src/EnergyPlus/SZVAVModel.cc index db74d0488c6..e8bcf457627 100644 --- a/src/EnergyPlus/SZVAVModel.cc +++ b/src/EnergyPlus/SZVAVModel.cc @@ -760,19 +760,19 @@ namespace SZVAVModel { } if ((CoolingLoad && TempSensOutput < ZoneLoad) || (HeatingLoad && TempSensOutput > ZoneLoad)) { // low speed fan can meet load - auto f = [&state, - SysIndex, - FirstHVACIteration, - ZoneLoad, - &SZVAVModel, - OnOffAirFlowRatio, - AirLoopNum, - coilFluidInletNode, - lowSpeedFanRatio, - maxCoilFluidFlow, - minAirMassFlow, - maxAirMassFlow, - CoolingLoad](Real64 const PartLoadRatio) { + auto fR1 = [&state, + SysIndex, + FirstHVACIteration, + ZoneLoad, + &SZVAVModel, + OnOffAirFlowRatio, + AirLoopNum, + coilFluidInletNode, + lowSpeedFanRatio, + maxCoilFluidFlow, + minAirMassFlow, + maxAirMassFlow, + CoolingLoad](Real64 const PartLoadRatio) { return UnitarySystems::UnitarySys::calcUnitarySystemWaterFlowResidual(state, PartLoadRatio, // coil part load ratio SysIndex, @@ -790,7 +790,7 @@ namespace SZVAVModel { CoolingLoad, 1.0); }; - General::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, f, 0.0, 1.0); + General::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, fR1, 0.0, 1.0); if (SolFlag < 0) { MessagePrefix = "Step 1: "; } @@ -821,19 +821,19 @@ namespace SZVAVModel { AirMassFlow = max(minAirMassFlow, AirMassFlow); SZVAVModel.FanPartLoadRatio = ((AirMassFlow - (maxAirMassFlow * lowSpeedFanRatio)) / ((1.0 - lowSpeedFanRatio) * maxAirMassFlow)); - auto f = [&state, - SysIndex, - FirstHVACIteration, - ZoneLoad, - &SZVAVModel, - OnOffAirFlowRatio, - AirLoopNum, - coilFluidInletNode, - lowSpeedFanRatio, - AirMassFlow, - maxAirMassFlow, - CoolingLoad, - maxCoilFluidFlow](Real64 const PartLoadRatio) { + auto fR2 = [&state, + SysIndex, + FirstHVACIteration, + ZoneLoad, + &SZVAVModel, + OnOffAirFlowRatio, + AirLoopNum, + coilFluidInletNode, + lowSpeedFanRatio, + AirMassFlow, + maxAirMassFlow, + CoolingLoad, + maxCoilFluidFlow](Real64 const PartLoadRatio) { return UnitarySystems::UnitarySys::calcUnitarySystemWaterFlowResidual(state, PartLoadRatio, // coil part load ratio SysIndex, @@ -851,7 +851,7 @@ namespace SZVAVModel { CoolingLoad, 1.0); }; - General::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, f, 0.0, 1.0); + General::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, fR2, 0.0, 1.0); if (SolFlag == -2 && ((CoolingLoad && SZVAVModel.m_CoolingSpeedNum < SZVAVModel.m_NumOfSpeedCooling) || (HeatingLoad && SZVAVModel.m_HeatingSpeedNum < SZVAVModel.m_NumOfSpeedHeating))) { // attempt to meet the load with the next speed @@ -972,18 +972,18 @@ namespace SZVAVModel { } // otherwise iterate on load - auto f = [&state, - SysIndex, - FirstHVACIteration, - ZoneLoad, - &SZVAVModel, - OnOffAirFlowRatio, - AirLoopNum, - coilFluidInletNode, - lowSpeedFanRatio, - maxCoilFluidFlow, - maxAirMassFlow, - CoolingLoad](Real64 const PartLoadRatio) { + auto fR3 = [&state, + SysIndex, + FirstHVACIteration, + ZoneLoad, + &SZVAVModel, + OnOffAirFlowRatio, + AirLoopNum, + coilFluidInletNode, + lowSpeedFanRatio, + maxCoilFluidFlow, + maxAirMassFlow, + CoolingLoad](Real64 const PartLoadRatio) { return UnitarySystems::UnitarySys::calcUnitarySystemWaterFlowResidual(state, PartLoadRatio, // coil part load ratio SysIndex, @@ -1001,7 +1001,7 @@ namespace SZVAVModel { CoolingLoad, 1.0); }; - General::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, f, 0.0, 1.0); + General::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, fR3, 0.0, 1.0); // Par[12] = maxAirMassFlow; // operating air flow rate, minAirMassFlow indicates low speed air flow rate, // maxAirMassFlow indicates full // // air flow diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 951c0257f29..3fa6ef8a773 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -367,7 +367,6 @@ namespace Sched { int EndDay; int StartPointer; int EndPointer; - int NumPointer; bool ErrorsFound(false); bool NumErrorFlag; @@ -1010,9 +1009,9 @@ namespace Sched { int hr = 0; int begMin = 0; int endMin = MinutesPerItem - 1; - for (int NumFields = 2; NumFields <= NumNumbers; ++NumFields) { + for (int fieldNum = 2; fieldNum <= NumNumbers; ++fieldNum) { for (int iMin = begMin; iMin <= endMin; ++iMin) { - minuteVals[hr * Constant::iMinutesInHour + iMin] = Numbers(NumFields); + minuteVals[hr * Constant::iMinutesInHour + iMin] = Numbers(fieldNum); } begMin = endMin + 1; endMin += MinutesPerItem; @@ -1190,24 +1189,24 @@ namespace Sched { // Process for month, day int StartMonth = int(Numbers(NumPointer + 1)); int StartDay = int(Numbers(NumPointer + 2)); - int EndMonth = int(Numbers(NumPointer + 3)); - int EndDay = int(Numbers(NumPointer + 4)); + int endMonth = int(Numbers(NumPointer + 3)); + int endDay = int(Numbers(NumPointer + 4)); NumPointer += 4; - int StartPointer = General::OrdinalDay(StartMonth, StartDay, 1); - int EndPointer = General::OrdinalDay(EndMonth, EndDay, 1); - if (StartPointer <= EndPointer) { - for (int Count = StartPointer; Count <= EndPointer; ++Count) { - ++daysInYear[Count]; - sched->weekScheds[Count] = weekSched; + int startPointer = General::OrdinalDay(StartMonth, StartDay, 1); + int endPointer = General::OrdinalDay(endMonth, endDay, 1); + if (startPointer <= endPointer) { + for (int day = startPointer; day <= endPointer; ++day) { + ++daysInYear[day]; + sched->weekScheds[day] = weekSched; } } else { - for (int Count = StartPointer; Count <= 366; ++Count) { - ++daysInYear[Count]; - sched->weekScheds[Count] = weekSched; + for (int day = startPointer; day <= 366; ++day) { + ++daysInYear[day]; + sched->weekScheds[day] = weekSched; } - for (int Count = 1; Count <= EndPointer; ++Count) { - ++daysInYear[Count]; - sched->weekScheds[Count] = weekSched; + for (int day = 1; day <= endPointer; ++day) { + ++daysInYear[day]; + sched->weekScheds[day] = weekSched; } } } @@ -1297,8 +1296,6 @@ namespace Sched { ShowContinueError(state, "Schedule will not be validated."); } - NumPointer = 0; - std::array daysInYear; std::fill(daysInYear.begin() + 1, daysInYear.end(), 0); // Process the "complex" fields -- so named because they are not a 1:1 correspondence @@ -1645,21 +1642,21 @@ namespace Sched { } // is it a sub-hourly schedule or not? - int MinutesPerItem = Constant::iMinutesInHour; + int minutesPerItem = Constant::iMinutesInHour; if (NumNumbers > 3) { - MinutesPerItem = int(Numbers(4)); + minutesPerItem = int(Numbers(4)); // int NumExpectedItems = 1440 / MinutesPerItem; - if (mod(Constant::iMinutesInHour, MinutesPerItem) != 0) { + if (mod(Constant::iMinutesInHour, minutesPerItem) != 0) { ShowSevereCustom( - state, eoh, format("Requested {} field value ({}) not evenly divisible into 60", cNumericFields(4), MinutesPerItem)); + state, eoh, format("Requested {} field value ({}) not evenly divisible into 60", cNumericFields(4), minutesPerItem)); ErrorsFound = true; continue; } } int numHourlyValues = Numbers(3); - int rowLimitCount = (Numbers(3) * Constant::rMinutesInHour) / MinutesPerItem; - int hrLimitCount = Constant::iMinutesInHour / MinutesPerItem; + int rowLimitCnt = (Numbers(3) * Constant::rMinutesInHour) / minutesPerItem; + int hrLimitCount = Constant::iMinutesInHour / minutesPerItem; std::string contextString = format("{}=\"{}\", {}: ", CurrentModuleObject, Alphas(1), cAlphaFields(3)); @@ -1774,13 +1771,13 @@ namespace Sched { numerrors)); } - if (rowCnt < rowLimitCount) { + if (rowCnt < rowLimitCnt) { ShowWarningCustom(state, eoh, format("less than {} hourly values read from file." "..Number read={}.", numHourlyValues, - (rowCnt * Constant::iMinutesInHour) / MinutesPerItem)); + (rowCnt * Constant::iMinutesInHour) / minutesPerItem)); } // process the data into the normal schedule data structures @@ -1813,7 +1810,7 @@ namespace Sched { // schedule is pointing to the week schedule sched->weekScheds[iDay] = weekSched; - if (MinutesPerItem == Constant::iMinutesInHour) { + if (minutesPerItem == Constant::iMinutesInHour) { for (int hr = 0; hr < Constant::iHoursInDay; ++hr) { Real64 curHrVal = column_values[ifld]; // hourlyFileValues((hDay - 1) * 24 + jHour) ++ifld; @@ -1824,16 +1821,16 @@ namespace Sched { } } else { // Minutes Per Item < 60 for (int hr = 0; hr < Constant::iHoursInDay; ++hr) { - int endMin = MinutesPerItem - 1; + int endMin = minutesPerItem - 1; int begMin = 0; - for (int NumFields = 1; NumFields <= hrLimitCount; ++NumFields) { + for (int fieldIdx = 1; fieldIdx <= hrLimitCount; ++fieldIdx) { for (int iMin = begMin; iMin <= endMin; ++iMin) { minuteVals[hr * Constant::iMinutesInHour + iMin] = column_values[ifld]; } ++ifld; begMin = endMin + 1; - endMin += MinutesPerItem; + endMin += minutesPerItem; } } @@ -2214,8 +2211,8 @@ namespace Sched { std::set reportLevelSet; // RptSchedule=.FALSE. - for (int Count = 1; Count <= NumFields; ++Count) { - s_ip->getObjectItem(state, CurrentModuleObject, Count, Alphas, NumAlphas, Numbers, NumNumbers, Status); + for (int count = 1; count <= NumFields; ++count) { + s_ip->getObjectItem(state, CurrentModuleObject, count, Alphas, NumAlphas, Numbers, NumNumbers, Status); ErrorObjectHeader eoh{routineName, CurrentModuleObject, Alphas(1)}; diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index db035b3a6bb..5c7fabb0cd6 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -79,7 +79,6 @@ #include #include #include -// #include #include #include #include @@ -2910,14 +2909,14 @@ void CHKGSS(EnergyPlusData &state, if (DOTP > state.dataSolarShading->TolValue) { Vector const &vertex_C_2 = vertex_C(2); - Vector const AVec(vertex_C(1) - vertex_C_2); - Vector const BVec(vertex_C(3) - vertex_C_2); + Vector const AVector(vertex_C(1) - vertex_C_2); + Vector const BVector(vertex_C(3) - vertex_C_2); - Vector const CVec(cross(BVec, AVec)); + Vector const CVector(cross(BVector, AVector)); int const NVRS = surface_R.Sides; // Number of vertices of the receiving surface for (int I = 1; I <= NVRS; ++I) { - DOTP = dot(CVec, vertex_R(I) - vertex_C_2); + DOTP = dot(CVector, vertex_R(I) - vertex_C_2); if (DOTP > state.dataSolarShading->TolValue) { CannotShade = false; break; // DO loop @@ -6668,18 +6667,18 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Real64 BackBeamAbs; // Blind solar back beam absorptance if (s_surf->SurfWinWindowModelType(SurfNum) != WindowModel::EQL && ANY_BLIND(ShadeFlag)) { - auto const &surfShade = s_surf->surfShades(SurfNum); - [[maybe_unused]] auto const *matBlind = dynamic_cast(s_mat->materials(surfShade.blind.matNum)); + auto const &surfaceShade = s_surf->surfShades(SurfNum); + [[maybe_unused]] auto const *matBlind = dynamic_cast(s_mat->materials(surfaceShade.blind.matNum)); assert(matBlind != nullptr); - int profIdxLo = surfShade.blind.profAngIdxLo; - int profIdxHi = surfShade.blind.profAngIdxHi; - Real64 profInterpFac = surfShade.blind.profAngInterpFac; + int profIdxLo = surfaceShade.blind.profAngIdxLo; + int profIdxHi = surfaceShade.blind.profAngIdxHi; + Real64 profInterpFac = surfaceShade.blind.profAngInterpFac; - FrontDiffDiffTrans = surfShade.blind.TAR.Sol.Ft.Df.Tra; + FrontDiffDiffTrans = surfaceShade.blind.TAR.Sol.Ft.Df.Tra; if (SunLitFract > 0.0 || SunlitFracWithoutReveal) { - auto const &btar1 = surfShade.blind.TAR; + auto const &btar1 = surfaceShade.blind.TAR; auto const &btarFront1Lo = btar1.Sol.Ft.Bm[profIdxLo]; auto const &btarFront1Hi = btar1.Sol.Ft.Bm[profIdxHi]; @@ -6834,8 +6833,6 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) auto const *screen = dynamic_cast(s_mat->materials(ScNum)); assert(screen != nullptr); - auto &surf = s_surf->Surface(SurfNum); - Real64 solPhi = std::acos(state.dataEnvrn->SOLCOS.z); Real64 solTheta = std::atan2(state.dataEnvrn->SOLCOS.x, state.dataEnvrn->SOLCOS.y); Real64 winPhi = surf.Tilt * Constant::DegToRad; @@ -6972,7 +6969,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Real64 rf3 = Window::POLYF(CosInc, thisConstruct.rfBareSolCoef(3)); Real64 afd3 = thisConstruct.afBareSolDiff(3); Real64 rfd3 = thisConstruct.rfBareSolDiff(3); - Real64 td2 = thisConstruct.tBareSolDiff(2); + td2 = thisConstruct.tBareSolDiff(2); AbWinSh(1) = CosInc * FracSunLit * (af1 + t1 * rf2 * ab1 + t1t2 * tfshBB * rf3 * tbshBB * t2 * ab1 + t1t2 * (rfshB * td2 + rfshB * rbd2 * rfshd * td2 + tfshBd * rfd3 * tbshd * td2) * abd1); @@ -7275,7 +7272,6 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) auto const *screen = dynamic_cast(s_mat->materials(ScNum)); assert(screen != nullptr); - auto &surf = s_surf->Surface(SurfNum); Real64 solPhi = std::acos(state.dataEnvrn->SOLCOS.z); Real64 solTheta = std::atan2(state.dataEnvrn->SOLCOS.x, state.dataEnvrn->SOLCOS.y); Real64 winPhi = surf.Tilt * Constant::DegToRad; @@ -7559,24 +7555,24 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // Beam-beam transmittance of exterior window Real64 TBm; // Window beam-beam transmittance Real64 TBmDenom; // TBmDenominator - Real64 TBmBmSc = s_surf->SurfWinScGlSysTsolBmBm(SurfNum); - Real64 TBmBmBl = s_surf->SurfWinBlGlSysTsolBmBm(SurfNum); - Real64 TBmBm = s_surf->SurfWinGlTsolBmBm(SurfNum); + Real64 tBmBmSc = s_surf->SurfWinScGlSysTsolBmBm(SurfNum); + Real64 tBmBmBl = s_surf->SurfWinBlGlSysTsolBmBm(SurfNum); + Real64 tBmBm = s_surf->SurfWinGlTsolBmBm(SurfNum); - Real64 InOutProjSLFracMult = s_surf->SurfaceWindow(SurfNum).InOutProjSLFracMult[state.dataGlobal->HourOfDay]; + Real64 inOutProjSLFracMult = s_surf->SurfaceWindow(SurfNum).InOutProjSLFracMult[state.dataGlobal->HourOfDay]; int InShelfSurf = 0; // Inside daylighting shelf surface number int ShelfNum = s_surf->SurfDaylightingShelfInd(SurfNum); if (ShelfNum > 0) { // Daylighting shelf InShelfSurf = state.dataDaylightingDevicesData->Shelf(ShelfNum).InSurf; } if (ANY_BLIND(ShadeFlag)) { - TBm = TBmBmBl; // Interior, exterior or between-glass blind on + TBm = tBmBmBl; // Interior, exterior or between-glass blind on } else if (ShadeFlag == WinShadingType::ExtScreen) { - TBm = TBmBmSc; // Exterior screen on + TBm = tBmBmSc; // Exterior screen on } else { - TBm = TBmBm; // Bare glass or switchable glazing + TBm = tBmBm; // Bare glass or switchable glazing // Correction for beam absorbed by inside reveal - TBmDenom = (SunLitFract * CosInc * surf.Area * InOutProjSLFracMult); + TBmDenom = (SunLitFract * CosInc * surf.Area * inOutProjSLFracMult); if (TBmDenom != 0.0) { // when =0.0, no correction TBm -= s_surf->SurfWinBmSolAbsdInsReveal(SurfNum) / TBmDenom; } @@ -7592,7 +7588,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // Inside daylighting shelves assume that no beam will pass the end of the shelf. // Since all beam is absorbed on the shelf, this might cause them to get unrealistically hot at times. // BTOTWinZone - Transmitted beam solar factor for a window [m2] - Real64 BTOTWinZone = TBm * SunLitFract * surf.Area * CosInc * InOutProjSLFracMult; + Real64 BTOTWinZone = TBm * SunLitFract * surf.Area * CosInc * inOutProjSLFracMult; // Shelf surface area is divided by 2 because only one side sees beam (Area was multiplied by 2 during init) s_surf->SurfOpaqAI(InShelfSurf) += BTOTWinZone / (0.5 * s_surf->Surface(InShelfSurf).Area); //[-] BABSZone += BTOTWinZone; //[m2] @@ -7927,7 +7923,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) auto const *screen = dynamic_cast(s_mat->materials(ScNum)); assert(screen != nullptr); - auto &surf = s_surf->Surface(SurfNum); + // auto &surf = s_surf->Surface(SurfNum); Real64 solPhi = std::acos(state.dataEnvrn->SOLCOS.z); Real64 solTheta = std::atan2(state.dataEnvrn->SOLCOS.x, state.dataEnvrn->SOLCOS.y); Real64 winPhi = surf.Tilt * Constant::DegToRad; @@ -8363,7 +8359,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } int const FlConstrNum = s_surf->SurfActiveConstruction(FloorNum); - Real64 BTOTWinZone = TBm * SunLitFract * surf.Area * CosInc * InOutProjSLFracMult; //[m2] + Real64 BTOTWinZone = TBm * SunLitFract * surf.Area * CosInc * inOutProjSLFracMult; //[m2] Real64 AbsBeamTotWin = 0.0; if (state.dataConstruction->Construct(FlConstrNum).TransDiff <= 0.0) { @@ -9610,7 +9606,6 @@ void WindowShadingManager(EnergyPlusData &state) if (s_surf->SurfWinShadingFlag(ISurf) == WinShadingType::IntShade) { auto &surfShade = s_surf->surfShades(ISurf); - auto &construction = state.dataConstruction->Construct(s_surf->Surface(ISurf).Construction); const int TotLay = construction.TotLayers; int ShadingLayerPtr = construction.LayerPoint(TotLay); @@ -10044,7 +10039,7 @@ void WindowShadingManager(EnergyPlusData &state) if (matBlind->SlatWidth > matBlind->SlatSeparation && BeamSolarOnWindow > 0.0) { ProfAng = surfShade.blind.profAng; - Real64 ThetaBase = std::acos(std::cos(ProfAng) * matBlind->SlatSeparation / matBlind->SlatWidth); + ThetaBase = std::acos(std::cos(ProfAng) * matBlind->SlatSeparation / matBlind->SlatWidth); // There are two solutions for the slat angle that just blocks beam radiation ThetaBlock1 = ProfAng + ThetaBase; ThetaBlock2 = ProfAng + Constant::Pi - ThetaBase; @@ -11994,11 +11989,11 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // View factor from current (sending) window DifTransSurfNum to current (receiving) surface // HeatTransSurfNum int const HTenclosureSurfNum = surf.SolarEnclSurfIndex; // HT surface index for EnclSolInfo.SurfacePtr and F arrays - int const enclosureNum = surf.SolarEnclIndex; // index for EnclSolInfo + int const enclosureIndex = surf.SolarEnclIndex; // index for EnclSolInfo int const DTenclSurfNum = s_surf->Surface(DifTransSurfNum).SolarEnclSurfIndex; // Window surface index for EnclSolInfo.SurfacePtr and F arrays - ViewFactor = state.dataViewFactor->EnclSolInfo(enclosureNum).F(HTenclosureSurfNum, DTenclSurfNum); + ViewFactor = state.dataViewFactor->EnclSolInfo(enclosureIndex).F(HTenclosureSurfNum, DTenclSurfNum); // debug ViewFactorTotal // ViewFactorTotal += ViewFactor; // debug @@ -12044,7 +12039,7 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // Accumulate total reflected distributed diffuse solar for each zone for subsequent // interreflection calcs - state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureNum) += DifSolarReflW; // [W] + state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureIndex) += DifSolarReflW; // [W] // Accumulate Window and Zone total distributed diffuse solar to check for conservation of // energy For opaque surfaces all incident diffuse is either absorbed or reflected @@ -12089,7 +12084,7 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // Accumulate total reflected distributed diffuse solar for each zone for subsequent // interreflection calcs - state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureNum) += DifSolarReflW; // [W] + state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureIndex) += DifSolarReflW; // [W] //------------------------------------------------------------------------------ // DISTRIBUTE TRANSMITTED DIFFUSE SOLAR THROUGH INTERIOR WINDOW TO ADJACENT ZONE @@ -12172,7 +12167,7 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // Accumulate total reflected distributed diffuse solar for each zone for subsequent // interreflection calcs - state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureNum) += DifSolarReflW; // [W] + state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureIndex) += DifSolarReflW; // [W] // Accumulate transmitted Window and Zone total distributed diffuse solar to check for // conservation of energy This is not very effective since it assigns whatever @@ -12222,10 +12217,10 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) InsideDifReflectance = state.dataConstruction->Construct(ConstrNum).ReflectSolDiffBack; if ((ShadeFlag == WinShadingType::IntBlind) || (ShadeFlag == WinShadingType::ExtBlind)) { auto const &constr = state.dataConstruction->Construct(ConstrNum); - auto const &surfShade = state.dataSurface->surfShades(HeatTransSurfNum); + // auto const &surfShade = state.dataSurface->surfShades(HeatTransSurfNum); auto const &btarSlatLo = constr.blindTARs[surfShade.blind.slatAngIdxLo]; auto const &btarSlatHi = constr.blindTARs[surfShade.blind.slatAngIdxHi]; - Real64 slatInterpFac = surfShade.blind.slatAngInterpFac; + slatInterpFac = surfShade.blind.slatAngInterpFac; // Diffuse back solar reflectance, blind present, vs. slat angle InsideDifReflectance = Interp(btarSlatLo.Sol.Bk.Df.Ref, btarSlatHi.Sol.Bk.Df.Ref, slatInterpFac); } @@ -12233,17 +12228,17 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // Accumulate total reflected distributed diffuse solar for each zone for subsequent // interreflection calcs - state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureNum) += DifSolarReflW; // [W] + state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureIndex) += DifSolarReflW; // [W] // Now calc diffuse solar absorbed by shade/blind itself if (ANY_SHADE_SCREEN(ShadeFlag)) { // Calc diffuse solar absorbed by shade or screen [W] ShBlDifSolarAbsW = WinDifSolarTrans_Factor * constrSh.AbsDiffBackShade; } else if (ANY_BLIND(ShadeFlag)) { - auto const &surfShade = state.dataSurface->surfShades(HeatTransSurfNum); + // auto const &surfShade = state.dataSurface->surfShades(HeatTransSurfNum); auto const &btarSlatLo = constrSh.blindTARs[surfShade.blind.slatAngIdxLo]; auto const &btarSlatHi = constrSh.blindTARs[surfShade.blind.slatAngIdxHi]; - Real64 slatInterpFac = surfShade.blind.slatAngInterpFac; + slatInterpFac = surfShade.blind.slatAngInterpFac; AbsDiffBkBl = Interp(btarSlatLo.Sol.Bk.Df.Abs, btarSlatHi.Sol.Bk.Df.Abs, slatInterpFac); ShBlDifSolarAbsW = WinDifSolarTrans_Factor * AbsDiffBkBl; } @@ -12308,7 +12303,7 @@ void CalcWinTransDifSolInitialDistribution(EnergyPlusData &state) // Accumulate total reflected distributed diffuse solar for each zone for subsequent // interreflection calcs - state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureNum) += DifSolarReflW; // [W] + state.dataHeatBal->EnclSolInitialDifSolReflW(enclosureIndex) += DifSolarReflW; // [W] //------------------------------------------------------------------------------ // DISTRIBUTE TRANSMITTED DIFFUSE SOLAR THROUGH INTERIOR WINDOW TO ADJACENT ZONE diff --git a/src/EnergyPlus/SteamCoils.cc b/src/EnergyPlus/SteamCoils.cc index c3ff9632f62..7f2ac2e3622 100644 --- a/src/EnergyPlus/SteamCoils.cc +++ b/src/EnergyPlus/SteamCoils.cc @@ -720,14 +720,14 @@ namespace SteamCoils { CompName = state.dataSteamCoils->SteamCoil(CoilNum).Name; bPRINT = false; HeatingCoilDesAirInletTempSizer sizerHeatingDesInletTemp; - bool ErrorsFound = false; + bool localErrorsFound = false; sizerHeatingDesInletTemp.initializeWithinEP(state, CompType, CompName, bPRINT, RoutineName); - state.dataSize->DataDesInletAirTemp = sizerHeatingDesInletTemp.size(state, DataSizing::AutoSize, ErrorsFound); + state.dataSize->DataDesInletAirTemp = sizerHeatingDesInletTemp.size(state, DataSizing::AutoSize, localErrorsFound); HeatingCoilDesAirOutletTempSizer sizerHeatingDesOutletTemp; - ErrorsFound = false; + localErrorsFound = false; sizerHeatingDesOutletTemp.initializeWithinEP(state, CompType, CompName, bPRINT, RoutineName); - state.dataSize->DataDesOutletAirTemp = sizerHeatingDesOutletTemp.size(state, DataSizing::AutoSize, ErrorsFound); + state.dataSize->DataDesOutletAirTemp = sizerHeatingDesOutletTemp.size(state, DataSizing::AutoSize, localErrorsFound); if (state.dataSize->CurOASysNum > 0) { auto &OASysEqSizing = state.dataSize->OASysEqSizing; diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index baff4fbf031..599c9769a87 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -6737,19 +6737,21 @@ namespace SurfaceGeometry { // \units m ++SurfNum; - auto &surfTemp = state.dataSurfaceGeometry->SurfaceTmp(SurfNum); - surfTemp.Name = s_ipsc->cAlphaArgs(1) + " Right"; // Set the Surface Name in the Derived Type - surfTemp.Class = SurfaceClass::Shading; - surfTemp.HeatTransSurf = false; + auto &surfTemp_Rfin = state.dataSurfaceGeometry->SurfaceTmp(SurfNum); + surfTemp_Rfin.Name = s_ipsc->cAlphaArgs(1) + " Right"; // Set the Surface Name in the Derived Type + surfTemp_Rfin.Class = SurfaceClass::Shading; + surfTemp_Rfin.HeatTransSurf = false; BaseSurfNum = state.dataSurfaceGeometry->SurfaceTmp(Found).BaseSurf; - surfTemp.BaseSurfName = state.dataSurfaceGeometry->SurfaceTmp(Found).BaseSurfName; - surfTemp.ExtBoundCond = state.dataSurfaceGeometry->SurfaceTmp(Found).ExtBoundCond; - surfTemp.ExtSolar = state.dataSurfaceGeometry->SurfaceTmp(Found).ExtSolar; - surfTemp.ExtWind = state.dataSurfaceGeometry->SurfaceTmp(Found).ExtWind; - surfTemp.Zone = state.dataSurfaceGeometry->SurfaceTmp(Found).Zone; // Necessary to do relative coordinates in GetVertices below - surfTemp.ZoneName = state.dataSurfaceGeometry->SurfaceTmp(Found).ZoneName; // Necessary to have surface drawn in OutputReports - - surfTemp.shadowSurfSched = nullptr; + surfTemp_Rfin.BaseSurfName = state.dataSurfaceGeometry->SurfaceTmp(Found).BaseSurfName; + surfTemp_Rfin.ExtBoundCond = state.dataSurfaceGeometry->SurfaceTmp(Found).ExtBoundCond; + surfTemp_Rfin.ExtSolar = state.dataSurfaceGeometry->SurfaceTmp(Found).ExtSolar; + surfTemp_Rfin.ExtWind = state.dataSurfaceGeometry->SurfaceTmp(Found).ExtWind; + surfTemp_Rfin.Zone = + state.dataSurfaceGeometry->SurfaceTmp(Found).Zone; // Necessary to do relative coordinates in GetVertices below + surfTemp_Rfin.ZoneName = + state.dataSurfaceGeometry->SurfaceTmp(Found).ZoneName; // Necessary to have surface drawn in OutputReports + + surfTemp_Rfin.shadowSurfSched = nullptr; Length = s_ipsc->rNumericArgs(7) + s_ipsc->rNumericArgs(8) + state.dataSurfaceGeometry->SurfaceTmp(Found).Height; if (Item == 3) { Depth = s_ipsc->rNumericArgs(10); @@ -6787,16 +6789,16 @@ namespace SurfaceGeometry { Zp * state.dataSurfaceGeometry->SurfaceTmp(BaseSurfNum).SinTilt; TiltAngle = state.dataSurfaceGeometry->SurfaceTmp(Found).Tilt; - surfTemp.Tilt = TiltAngle; - surfTemp.convOrientation = Convect::GetSurfConvOrientation(surfTemp.Tilt); - surfTemp.Azimuth = state.dataSurfaceGeometry->SurfaceTmp(Found).Azimuth - (180.0 - s_ipsc->rNumericArgs(9)); - surfTemp.CosAzim = std::cos(surfTemp.Azimuth * Constant::DegToRad); - surfTemp.SinAzim = std::sin(surfTemp.Azimuth * Constant::DegToRad); - surfTemp.CosTilt = std::cos(surfTemp.Tilt * Constant::DegToRad); - surfTemp.SinTilt = std::sin(surfTemp.Tilt * Constant::DegToRad); + surfTemp_Rfin.Tilt = TiltAngle; + surfTemp_Rfin.convOrientation = Convect::GetSurfConvOrientation(surfTemp_Rfin.Tilt); + surfTemp_Rfin.Azimuth = state.dataSurfaceGeometry->SurfaceTmp(Found).Azimuth - (180.0 - s_ipsc->rNumericArgs(9)); + surfTemp_Rfin.CosAzim = std::cos(surfTemp_Rfin.Azimuth * Constant::DegToRad); + surfTemp_Rfin.SinAzim = std::sin(surfTemp_Rfin.Azimuth * Constant::DegToRad); + surfTemp_Rfin.CosTilt = std::cos(surfTemp_Rfin.Tilt * Constant::DegToRad); + surfTemp_Rfin.SinTilt = std::sin(surfTemp_Rfin.Tilt * Constant::DegToRad); - surfTemp.Sides = 4; - surfTemp.Vertex.allocate(surfTemp.Sides); + surfTemp_Rfin.Sides = 4; + surfTemp_Rfin.Vertex.allocate(surfTemp_Rfin.Sides); MakeRelativeRectangularVertices(state, BaseSurfNum, @@ -6810,8 +6812,8 @@ namespace SurfaceGeometry { // SurfaceTmp(SurfNum)%BaseSurfName=' ' // SurfaceTmp(SurfNum)%ZoneName=' ' - surfTemp.BaseSurf = 0; - surfTemp.Zone = 0; + surfTemp_Rfin.BaseSurf = 0; + surfTemp_Rfin.Zone = 0; // and mirror if (state.dataReportFlag->MakeMirroredAttachedShading) { diff --git a/src/EnergyPlus/SystemReports.cc b/src/EnergyPlus/SystemReports.cc index 9ac29658fb1..a9ec6d1d610 100644 --- a/src/EnergyPlus/SystemReports.cc +++ b/src/EnergyPlus/SystemReports.cc @@ -1062,7 +1062,6 @@ void FindFirstLastPtr(EnergyPlusData &state, int &LoopType, int &LoopNum, int &A int DemandSideLoopNum; int DemandSideBranchNum; int DemandSideCompNum; - int SupplySideCompNum; int DemandSideLoopType; bool found; @@ -1146,7 +1145,7 @@ void FindFirstLastPtr(EnergyPlusData &state, int &LoopType, int &LoopNum, int &A } else if (LoopType == 2) { for (int BranchNum = 1; BranchNum <= state.dataPlnt->VentRepCond[static_cast(LoopSideLocation::Supply)](LoopNum).TotalBranches; ++BranchNum) { - for (SupplySideCompNum = 1; + for (int SupplySideCompNum = 1; SupplySideCompNum <= state.dataPlnt->VentRepCond[static_cast(LoopSideLocation::Supply)](LoopNum).Branch(BranchNum).TotalComponents; ++SupplySideCompNum) { diff --git a/src/EnergyPlus/UFADManager.cc b/src/EnergyPlus/UFADManager.cc index e8989499775..cf6d7a67b27 100644 --- a/src/EnergyPlus/UFADManager.cc +++ b/src/EnergyPlus/UFADManager.cc @@ -1385,7 +1385,7 @@ namespace RoomAir { } HeightFrac = min(1.0, HeightFrac); state.dataRoomAir->HeightTransition(ZoneNum) = HeightFrac * CeilingHeight; - Real64 GainsFrac = zoneU.A_Kc * std::pow(Gamma, zoneU.B_Kc) + zoneU.C_Kc + zoneU.D_Kc * Gamma + zoneU.E_Kc * pow_2(Gamma); + GainsFrac = zoneU.A_Kc * std::pow(Gamma, zoneU.B_Kc) + zoneU.C_Kc + zoneU.D_Kc * Gamma + zoneU.E_Kc * pow_2(Gamma); GainsFrac = max(0.7, min(GainsFrac, 1.0)); if (zoneU.ShadeDown) { GainsFrac -= 0.2; diff --git a/src/EnergyPlus/VariableSpeedCoils.cc b/src/EnergyPlus/VariableSpeedCoils.cc index 8127bb19ce1..25718e7a9cd 100644 --- a/src/EnergyPlus/VariableSpeedCoils.cc +++ b/src/EnergyPlus/VariableSpeedCoils.cc @@ -401,13 +401,14 @@ namespace VariableSpeedCoils { varSpeedCoil.MSWasteHeatFrac(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); std::string fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); - std::string cFieldName = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); + std::string cFieldName_curve = + format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); std::string const coolCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapFTCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSCCapFTemp(I) = Curve::GetCurveIndex(state, coolCapFTCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, coolCapFTCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, coolCapFTCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is BiQuadratic @@ -417,26 +418,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletWetBulbTemp, RatedInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); std::string const coolCapFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapFFCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSCCapAirFFlow(I) = Curve::GetCurveIndex(state, coolCapFFCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, coolCapFFCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, coolCapFFCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is Quadratic @@ -446,26 +448,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_water_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Water Flow Fraction Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Water Flow Fraction Curve Name"); std::string const coolCapWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapWFFCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSCCapWaterFFlow(I) = Curve::GetCurveIndex(state, coolCapWFFCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, coolCapWFFCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, coolCapWFFCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is BiQuadratic @@ -475,26 +478,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); std::string const coolEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolEIRFTCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSEIRFTemp(I) = Curve::GetCurveIndex(state, coolEIRFTCurveName)) == 0) { - ShowSevereInvalidBool(state, eoh, cFieldName, coolEIRFTCurveName); + ShowSevereInvalidBool(state, eoh, cFieldName_curve, coolEIRFTCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is BiQuadratic @@ -504,26 +508,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletWetBulbTemp, RatedInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); std::string const coolEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolEIRFFFCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSEIRAirFFlow(I) = Curve::GetCurveIndex(state, coolEIRFFFCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, coolEIRFFFCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, coolEIRFFFCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is Quadratic @@ -533,26 +538,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_water_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); std::string const coolEIRWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolEIRWFFCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSEIRWaterFFlow(I) = Curve::GetCurveIndex(state, coolEIRWFFCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, coolEIRWFFCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, coolEIRWFFCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is Quadratic @@ -562,13 +568,14 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } @@ -576,13 +583,13 @@ namespace VariableSpeedCoils { // Read waste heat modifier curve name fieldValue = format("speed_{}{}", std::to_string(I), "_waste_heat_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature Curve Name"); std::string const wasteHFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (wasteHFTCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSWasteHeat(I) = Curve::GetCurveIndex(state, wasteHFTCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, wasteHFTCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, wasteHFTCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal types are BiQuadratic @@ -592,13 +599,14 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSWasteHeat(I), RatedInletWaterTemp, RatedInletAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } @@ -960,13 +968,14 @@ namespace VariableSpeedCoils { } std::string fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); - std::string cFieldName = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); + std::string cFieldName_curve = + format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); std::string const cCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cCapFTCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSCCapFTemp(I) = Curve::GetCurveIndex(state, cCapFTCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, cCapFTCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, cCapFTCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is BiQuadratic @@ -976,26 +985,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletWetBulbTemp, RatedAmbAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); std::string const cCapFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cCapFFFCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSCCapAirFFlow(I) = Curve::GetCurveIndex(state, cCapFFFCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, cCapFFFCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, cCapFFFCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is Quadratic @@ -1005,26 +1015,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); std::string const cEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cEIRFTCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSEIRFTemp(I) = Curve::GetCurveIndex(state, cEIRFTCurveName)) == 0) { - ShowSevereInvalidBool(state, eoh, cFieldName, cEIRFTCurveName); + ShowSevereInvalidBool(state, eoh, cFieldName_curve, cEIRFTCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is BiQuadratic @@ -1034,26 +1045,27 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletWetBulbTemp, RatedAmbAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } } fieldValue = format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); + cFieldName_curve = format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); std::string const cEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cEIRFFFCurveName.empty()) { - ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); + ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); ErrorsFound = true; } else if ((varSpeedCoil.MSEIRAirFFlow(I) = Curve::GetCurveIndex(state, cEIRFFFCurveName)) == 0) { - ShowSevereItemNotFound(state, eoh, cFieldName, cEIRFFFCurveName); + ShowSevereItemNotFound(state, eoh, cFieldName_curve, cEIRFFFCurveName); ErrorsFound = true; } else { // Verify Curve Object, only legal type is Quadratic @@ -1063,13 +1075,14 @@ namespace VariableSpeedCoils { RoutineName, // Routine name CurrentModuleObject, // Object Type varSpeedCoil.Name, // Object Name - cFieldName); // Field Name + cFieldName_curve); // Field Name if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, + format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); ShowContinueError(state, format("...Curve output at rated conditions = {:.3T}", CurveVal)); } } @@ -1260,7 +1273,6 @@ namespace VariableSpeedCoils { } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { - std::string cFieldName; std::string fieldName; std::string fieldValue; fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); @@ -1744,7 +1756,6 @@ namespace VariableSpeedCoils { } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { - std::string cFieldName; std::string fieldValue; std::string fieldName; fieldName = format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); diff --git a/src/EnergyPlus/WaterThermalTanks.cc b/src/EnergyPlus/WaterThermalTanks.cc index ae629fd9ca8..86e8a2beffd 100644 --- a/src/EnergyPlus/WaterThermalTanks.cc +++ b/src/EnergyPlus/WaterThermalTanks.cc @@ -6239,7 +6239,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA // Inlet and outlet nodes are initialized. Scheduled values are retrieved for the current timestep. static constexpr std::string_view RoutineName("InitWaterThermalTank"); - static constexpr std::string_view GetWaterThermalTankInput("GetWaterThermalTankInput"); + static constexpr std::string_view GetTankInputString("GetWaterThermalTankInput"); static constexpr std::string_view SizeTankForDemand("SizeTankForDemandSide"); if (this->scanPlantLoopsFlag && allocated(state.dataPlnt->PlantLoop)) { @@ -6286,7 +6286,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if (this->SetLoopIndexFlag && allocated(state.dataPlnt->PlantLoop)) { if ((this->UseInletNode > 0) && (this->HeatPumpNum == 0)) { Real64 rho = - state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetWaterThermalTankInput); + state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetTankInputString); this->PlantUseMassFlowRateMax = this->UseDesignVolFlowRate * rho; this->Mass = this->Volume * rho; this->UseSidePlantSizNum = state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).PlantSizNum; @@ -6298,7 +6298,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA } if ((this->UseInletNode > 0) && (this->HeatPumpNum > 0)) { Real64 rho = - state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetWaterThermalTankInput); + state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetTankInputString); this->PlantUseMassFlowRateMax = this->UseDesignVolFlowRate * rho; this->Mass = this->Volume * rho; this->UseSidePlantSizNum = state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).PlantSizNum; @@ -6310,7 +6310,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA } if ((this->SourceInletNode > 0) && (this->DesuperheaterNum == 0) && (this->HeatPumpNum == 0)) { Real64 rho = - state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetWaterThermalTankInput); + state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetTankInputString); this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; this->SourceSidePlantSizNum = state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).PlantSizNum; if ((this->SourceDesignVolFlowRateWasAutoSized) && (this->SourceSidePlantSizNum == 0)) { @@ -6374,7 +6374,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if (this->UseInletNode > 0 && this->UseOutletNode > 0) { state.dataLoopNodes->Node(this->UseInletNode).Temp = 0.0; Real64 rho = - state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetWaterThermalTankInput); + state.dataPlnt->PlantLoop(this->UseSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetTankInputString); this->MassFlowRateMin = this->VolFlowRateMin * rho; this->PlantUseMassFlowRateMax = this->UseDesignVolFlowRate * rho; PlantUtilities::InitComponentNodes(state, this->MassFlowRateMin, this->PlantUseMassFlowRateMax, this->UseInletNode, this->UseOutletNode); @@ -6388,7 +6388,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if ((this->SourceInletNode > 0) && (this->DesuperheaterNum == 0) && (this->HeatPumpNum == 0)) { Real64 rho = - state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetWaterThermalTankInput); + state.dataPlnt->PlantLoop(this->SrcSidePlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, GetTankInputString); this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; PlantUtilities::InitComponentNodes(state, 0.0, this->PlantSourceMassFlowRateMax, this->SourceInletNode, this->SourceOutletNode); @@ -7485,7 +7485,7 @@ void WaterThermalTankData::CalcWaterThermalTankMixed(EnergyPlusData &state) // W TimeNeeded = TimeRemaining; // Calculate the steady-state venting rate needed to maintain the tank at maximum temperature - Real64 Qloss = LossCoeff_loc * (AmbientTemp_loc - MaxTemp); + Qloss = LossCoeff_loc * (AmbientTemp_loc - MaxTemp); Quse = UseMassFlowRate_loc * Cp * (UseInletTemp_loc - MaxTemp); Qsource = SourceMassFlowRate_loc * Cp * (SourceInletTemp_loc - MaxTemp); Qvent = -Quse - Qsource - Qloss - Qoffcycheat; @@ -9147,11 +9147,11 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b DesupHtr.DesuperheaterPLR = partLoadRatio; DesupHtr.HeaterRate = QHeatRate * partLoadRatio; this->CalcWaterThermalTank(state); - Real64 NewTankTemp = this->TankTemp; + Real64 tankTemp = this->TankTemp; - if (NewTankTemp > desupHtrSetPointTemp) { + if (tankTemp > desupHtrSetPointTemp) { // Only revert to floating mode if the tank temperature is higher than the cut out temperature - if (NewTankTemp > DesupHtr.SetPointTemp) { + if (tankTemp > DesupHtr.SetPointTemp) { DesupHtr.Mode = TankOperatingMode::Floating; } int SolFla; @@ -9159,8 +9159,8 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b this->Mode = DesupHtr.SaveWHMode; this->SourceMassFlowRate = MdotWater * HPPartLoadRatio; this->CalcWaterThermalTank(state); - Real64 NewTankTemp = this->TankTemp; - Real64 PLRResidualWaterThermalTank = desupHtrSetPointTemp - NewTankTemp; + Real64 tankTemp_local = this->TankTemp; + Real64 PLRResidualWaterThermalTank = desupHtrSetPointTemp - tankTemp_local; return PLRResidualWaterThermalTank; }; General::SolveRoot(state, Acc, MaxIte, SolFla, partLoadRatio, f, 0.0, DesupHtr.DXSysPLR); @@ -9188,7 +9188,7 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b } } else if (SolFla == -2) { partLoadRatio = - max(0.0, min(DesupHtr.DXSysPLR, (desupHtrSetPointTemp - this->SavedTankTemp) / (NewTankTemp - this->SavedTankTemp))); + max(0.0, min(DesupHtr.DXSysPLR, (desupHtrSetPointTemp - this->SavedTankTemp) / (tankTemp - this->SavedTankTemp))); this->SourceMassFlowRate = MdotWater * partLoadRatio; this->CalcWaterThermalTank(state); if (!state.dataGlobal->WarmupFlag) { diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc index 1767ae066bd..f9d8d61581a 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc @@ -685,8 +685,8 @@ namespace WaterToAirHeatPumpSimple { ShowFatalError(state, format("{} Errors found getting input. Program terminates.", RoutineName)); } - for (int HPNum = 1; HPNum <= state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs; ++HPNum) { - auto &simpleWAHP = state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNum); + for (int HPNumIdx = 1; HPNumIdx <= state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs; ++HPNumIdx) { + auto &simpleWAHP = state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(HPNumIdx); if (simpleWAHP.WAHPPlantType == DataPlant::PlantEquipmentType::CoilWAHPCoolingEquationFit) { // COOLING COIL Setup Report variables for the Heat Pump SetupOutputVariable(state, diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index 1ae25350ff2..99aa34a509b 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -751,7 +751,7 @@ namespace Weather { RoutineName)); } - // Throw a Fatal now that we have said it'll terminalte + // Throw a Fatal now that we have said it'll terminate if (ErrorsFound) { CloseWeatherFile(state); // will only close if opened. ShowFatalError(state, format("{}Errors found in Weather Data Input. Program terminates.", RoutineName)); @@ -3964,10 +3964,10 @@ namespace Weather { switch (state.dataWeather->WPSkyTemperature(envCurr.WP_Type1).skyTempModel) { case SkyTempModel::ScheduleValue: { std::vector const &dayVals = state.dataWeather->WPSkyTemperature(envCurr.WP_Type1).sched->getDayVals(state); - auto &desDayModsEnvrn = state.dataWeather->desDayMods(EnvrnNum); + auto &desDayModsEnv = state.dataWeather->desDayMods(EnvrnNum); for (int hr = 0; hr < Constant::iHoursInDay; ++hr) { for (int ts = 0; ts < state.dataGlobal->TimeStepsInHour; ++ts) { - state.dataWeather->wvarsHrTsTomorrow(ts + 1, hr + 1).SkyTemp = desDayModsEnvrn(ts + 1, hr + 1).SkyTemp = + state.dataWeather->wvarsHrTsTomorrow(ts + 1, hr + 1).SkyTemp = desDayModsEnv(ts + 1, hr + 1).SkyTemp = dayVals[hr * state.dataGlobal->TimeStepsInHour]; } } @@ -3975,11 +3975,11 @@ namespace Weather { case SkyTempModel::DryBulbDelta: { std::vector const &dayVals = state.dataWeather->WPSkyTemperature(envCurr.WP_Type1).sched->getDayVals(state); - auto &desDayModsEnvrn = state.dataWeather->desDayMods(EnvrnNum); + auto &desDayModsEnv = state.dataWeather->desDayMods(EnvrnNum); for (int hr = 0; hr < Constant::iHoursInDay; ++hr) { for (int ts = 0; ts < state.dataGlobal->TimeStepsInHour; ++ts) { auto &tomorrowTS = state.dataWeather->wvarsHrTsTomorrow(ts + 1, hr + 1); - desDayModsEnvrn(ts + 1, hr + 1).SkyTemp = dayVals[hr * state.dataGlobal->TimeStepsInHour + ts]; + desDayModsEnv(ts + 1, hr + 1).SkyTemp = dayVals[hr * state.dataGlobal->TimeStepsInHour + ts]; tomorrowTS.SkyTemp = tomorrowTS.OutDryBulbTemp - dayVals[hr * state.dataGlobal->TimeStepsInHour + ts]; } } @@ -3987,11 +3987,11 @@ namespace Weather { case SkyTempModel::DewPointDelta: { std::vector const &dayVals = state.dataWeather->WPSkyTemperature(envCurr.WP_Type1).sched->getDayVals(state); - auto &desDayModsEnvrn = state.dataWeather->desDayMods(EnvrnNum); + auto &desDayModsEnv = state.dataWeather->desDayMods(EnvrnNum); for (int hr = 0; hr < Constant::iHoursInDay; ++hr) { for (int ts = 0; ts < state.dataGlobal->TimeStepsInHour; ++ts) { auto &tomorrowTS = state.dataWeather->wvarsHrTsTomorrow(ts + 1, hr + 1); - desDayModsEnvrn(ts + 1, hr + 1).SkyTemp = dayVals[hr * state.dataGlobal->TimeStepsInHour + ts]; + desDayModsEnv(ts + 1, hr + 1).SkyTemp = dayVals[hr * state.dataGlobal->TimeStepsInHour + ts]; tomorrowTS.SkyTemp = tomorrowTS.OutDewPointTemp - dayVals[hr * state.dataGlobal->TimeStepsInHour + ts]; } } @@ -5372,7 +5372,7 @@ namespace Weather { if (runPerInput1.dayOfWeek != 0 && !ErrorsFound) { SetupWeekDaysByMonth(state, runPerInput1.startMonth, runPerInput1.startDay, runPerInput1.dayOfWeek, runPerInput1.monWeekDay); } - } else if (nRunPeriods > 1 && state.dataSysVars->FullAnnualRun) { + } else { nRunPeriods = 1; } } diff --git a/src/EnergyPlus/ZoneTempPredictorCorrector.cc b/src/EnergyPlus/ZoneTempPredictorCorrector.cc index 56902829e05..7034d975e78 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.cc @@ -357,10 +357,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) TStatObjects(Item).ZoneListActive = false; TStatObjects(Item).ZoneOrZoneListPtr = Item1; } else if (ZLItem > 0) { - auto const &ZoneList = state.dataHeatBal->ZoneList(ZLItem); + auto const &ZnItem = state.dataHeatBal->ZoneList(ZLItem); TStatObjects(Item).TempControlledZoneStartPtr = state.dataZoneCtrls->NumTempControlledZones + 1; - state.dataZoneCtrls->NumTempControlledZones += ZoneList.NumOfZones; - TStatObjects(Item).NumOfZones = ZoneList.NumOfZones; + state.dataZoneCtrls->NumTempControlledZones += ZnItem.NumOfZones; + TStatObjects(Item).NumOfZones = ZnItem.NumOfZones; TStatObjects(Item).ZoneListActive = true; TStatObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { @@ -429,12 +429,12 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (!TStatObjects(Item).ZoneListActive) { tempZone.Name = s_ipsc->cAlphaArgs(1); } else { - auto &ZoneList = state.dataHeatBal->ZoneList(TStatObjects(Item).ZoneOrZoneListPtr); + auto &ZnList = state.dataHeatBal->ZoneList(TStatObjects(Item).ZoneOrZoneListPtr); CheckCreatedZoneItemName(state, RoutineName, s_ipsc->cCurrentModuleObject, - Zone(ZoneList.Zone(Item1)).Name, - ZoneList.MaxZoneNameLength, + Zone(ZnList.Zone(Item1)).Name, + ZnList.MaxZoneNameLength, TStatObjects(Item).Name, state.dataZoneCtrls->TempControlledZone, TempControlledZoneNum - 1, @@ -711,8 +711,8 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // Now, Check the schedule values/indices for validity - for (int TempControlledZoneNum = 1; TempControlledZoneNum <= state.dataZoneCtrls->NumTempControlledZones; ++TempControlledZoneNum) { - auto &tempZone = state.dataZoneCtrls->TempControlledZone(TempControlledZoneNum); + for (int TempCtrlZoneNum = 1; TempCtrlZoneNum <= state.dataZoneCtrls->NumTempControlledZones; ++TempCtrlZoneNum) { + auto &tempZone = state.dataZoneCtrls->TempControlledZone(TempCtrlZoneNum); if (tempZone.setptTypeSched == nullptr) { continue; // error will be caught elsewhere @@ -727,7 +727,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) ShowContinueError(state, "..specifies control type 0 for all entries."); ShowContinueError(state, "All zones using this Control Type Schedule have no heating or cooling available."); } - CTSchedMapToControlledZone(TempControlledZoneNum) = tempZone.setptTypeSched->Num; + CTSchedMapToControlledZone(TempCtrlZoneNum) = tempZone.setptTypeSched->Num; } for (HVAC::SetptType setptType : HVAC::controlledSetptTypes) { @@ -905,10 +905,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) ComfortTStatObjects(Item).ZoneListActive = false; ComfortTStatObjects(Item).ZoneOrZoneListPtr = Item1; } else if (ZLItem > 0) { - auto const &ZoneList = state.dataHeatBal->ZoneList(ZLItem); + auto const &ZnList = state.dataHeatBal->ZoneList(ZLItem); ComfortTStatObjects(Item).ComfortControlledZoneStartPtr = state.dataZoneCtrls->NumComfortControlledZones + 1; - state.dataZoneCtrls->NumComfortControlledZones += ZoneList.NumOfZones; - ComfortTStatObjects(Item).NumOfZones = ZoneList.NumOfZones; + state.dataZoneCtrls->NumComfortControlledZones += ZnList.NumOfZones; + ComfortTStatObjects(Item).NumOfZones = ZnList.NumOfZones; ComfortTStatObjects(Item).ZoneListActive = true; ComfortTStatObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { @@ -1414,21 +1414,21 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } // for (setptType) } // for (ComfortControlledZoneNum) - for (int ComfortControlledZoneNum = 1; ComfortControlledZoneNum <= state.dataZoneCtrls->NumComfortControlledZones; ++ComfortControlledZoneNum) { + for (int ComfortCtrlZoneNum = 1; ComfortCtrlZoneNum <= state.dataZoneCtrls->NumComfortControlledZones; ++ComfortCtrlZoneNum) { - auto &comfortZone = state.dataZoneCtrls->ComfortControlledZone(ComfortControlledZoneNum); + auto &comfortZone = state.dataZoneCtrls->ComfortControlledZone(ComfortCtrlZoneNum); ActualZoneNum = comfortZone.ActualZoneNum; if (comfortZone.setptTypeSched == nullptr) { continue; } for (HVAC::SetptType setptType : HVAC::controlledSetptTypes) { - if (TComfortControlTypes(ComfortControlledZoneNum).MustHave[(int)setptType] && - TComfortControlTypes(ComfortControlledZoneNum).DidHave[(int)setptType]) { + if (TComfortControlTypes(ComfortCtrlZoneNum).MustHave[(int)setptType] && + TComfortControlTypes(ComfortCtrlZoneNum).DidHave[(int)setptType]) { continue; } - if (!TComfortControlTypes(ComfortControlledZoneNum).MustHave[(int)setptType]) { + if (!TComfortControlTypes(ComfortCtrlZoneNum).MustHave[(int)setptType]) { continue; } @@ -1458,12 +1458,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) int NumZoneCapaMultiplier = s_ip->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); // Number of ZonesCapacityMultiplier object if (NumZoneCapaMultiplier == 0) { // Assign default multiplier values to all zones - for (int ZoneNum = 1; ZoneNum <= NumOfZones; ZoneNum++) { - auto &Zone = state.dataHeatBal->Zone(ZoneNum); - Zone.ZoneVolCapMultpSens = ZoneVolCapMultpSens; - Zone.ZoneVolCapMultpMoist = ZoneVolCapMultpMoist; - Zone.ZoneVolCapMultpCO2 = ZoneVolCapMultpCO2; - Zone.ZoneVolCapMultpGenContam = ZoneVolCapMultpGenContam; + for (auto &zn : state.dataHeatBal->Zone) { + zn.ZoneVolCapMultpSens = ZoneVolCapMultpSens; + zn.ZoneVolCapMultpMoist = ZoneVolCapMultpMoist; + zn.ZoneVolCapMultpCO2 = ZoneVolCapMultpCO2; + zn.ZoneVolCapMultpGenContam = ZoneVolCapMultpGenContam; } } else { @@ -1530,12 +1529,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // Assign default multiplier values to all the other zones for (int ZoneNum = 1; ZoneNum <= NumOfZones; ZoneNum++) { - auto &Zone = state.dataHeatBal->Zone(ZoneNum); - if (!Zone.FlagCustomizedZoneCap) { - Zone.ZoneVolCapMultpSens = ZoneVolCapMultpSens; - Zone.ZoneVolCapMultpMoist = ZoneVolCapMultpMoist; - Zone.ZoneVolCapMultpCO2 = ZoneVolCapMultpCO2; - Zone.ZoneVolCapMultpGenContam = ZoneVolCapMultpGenContam; + if (!Zone(ZoneNum).FlagCustomizedZoneCap) { + Zone(ZoneNum).ZoneVolCapMultpSens = ZoneVolCapMultpSens; + Zone(ZoneNum).ZoneVolCapMultpMoist = ZoneVolCapMultpMoist; + Zone(ZoneNum).ZoneVolCapMultpCO2 = ZoneVolCapMultpCO2; + Zone(ZoneNum).ZoneVolCapMultpGenContam = ZoneVolCapMultpGenContam; } } @@ -1547,11 +1545,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) Real64 ZoneVolCapMultpGenContam_temp = 0.0; for (int ZoneNum = 1; ZoneNum <= NumOfZones; ZoneNum++) { - auto const &Zone = state.dataHeatBal->Zone(ZoneNum); - ZoneVolCapMultpSens_temp += Zone.ZoneVolCapMultpSens; - ZoneVolCapMultpMoist_temp += Zone.ZoneVolCapMultpMoist; - ZoneVolCapMultpCO2_temp += Zone.ZoneVolCapMultpCO2; - ZoneVolCapMultpGenContam_temp += Zone.ZoneVolCapMultpGenContam; + ZoneVolCapMultpSens_temp += Zone(ZoneNum).ZoneVolCapMultpSens; + ZoneVolCapMultpMoist_temp += Zone(ZoneNum).ZoneVolCapMultpMoist; + ZoneVolCapMultpCO2_temp += Zone(ZoneNum).ZoneVolCapMultpCO2; + ZoneVolCapMultpGenContam_temp += Zone(ZoneNum).ZoneVolCapMultpGenContam; } if (NumOfZones > 0) { @@ -1590,9 +1587,9 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // find matching name of ZONECONTROL:THERMOSTAT object if ((found = Util::FindItem(s_ipsc->cAlphaArgs(1), TStatObjects)) != 0) { - auto const &TStatObjects = state.dataZoneCtrls->TStatObjects(found); - for (Item = 1; Item <= TStatObjects.NumOfZones; ++Item) { - TempControlledZoneNum = TStatObjects.TempControlledZoneStartPtr + Item - 1; + auto const &TStatObj = state.dataZoneCtrls->TStatObjects(found); + for (Item = 1; Item <= TStatObj.NumOfZones; ++Item) { + TempControlledZoneNum = TStatObj.TempControlledZoneStartPtr + Item - 1; if (state.dataZoneCtrls->NumTempControlledZones == 0) { continue; } @@ -1843,8 +1840,8 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } } else { - for (int Item = 1; Item <= TStatObjects(found).NumOfZones; ++Item) { - TempControlledZoneNum = TStatObjects(found).TempControlledZoneStartPtr + Item - 1; + for (int item = 1; item <= TStatObjects(found).NumOfZones; ++item) { + TempControlledZoneNum = TStatObjects(found).TempControlledZoneStartPtr + item - 1; auto &tempZone = state.dataZoneCtrls->TempControlledZone(TempControlledZoneNum); @@ -1860,13 +1857,13 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (s_ipsc->cAlphaArgs(3) == "NONE") { tempZone.OvercoolCtrl = DataZoneControls::TempCtrl::None; } else if (s_ipsc->cAlphaArgs(3) != "OVERCOOL") { - if (Item == 1) { + if (item == 1) { ShowSevereInvalidKey(state, eoh, s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3)); ErrorsFound = true; } } else if ((tempZone.OvercoolCtrl = static_cast( getEnumValue(DataZoneControls::tempCtrlNamesUC, s_ipsc->cAlphaArgs(4)))) == DataZoneControls::TempCtrl::Invalid) { - if (Item == 1) { + if (item == 1) { ShowSevereInvalidKey(state, eoh, s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4)); ErrorsFound = true; } @@ -1876,24 +1873,24 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (tempZone.OvercoolCtrl == DataZoneControls::TempCtrl::Scheduled) { if (s_ipsc->lAlphaFieldBlanks(6)) { - if (Item == 1) { + if (item == 1) { ShowSevereEmptyField(state, eoh, s_ipsc->cAlphaFieldNames(6)); ErrorsFound = true; } } else if ((tempZone.zoneOvercoolRangeSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(6))) == nullptr) { - if (Item == 1) { + if (item == 1) { ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6)); ErrorsFound = true; } } else if (!tempZone.zoneOvercoolRangeSched->checkMinMaxVals(state, Clusive::In, 0.0, Clusive::In, 3.0)) { - if (Item == 1) { + if (item == 1) { Sched::ShowSevereBadMinMax( state, eoh, s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6), Clusive::In, 0.0, Clusive::In, 3.0); ErrorsFound = true; } } } else { // tempZone.OvercoolCntrlModeScheduled - if (Item == 1) { + if (item == 1) { if (tempZone.ZoneOvercoolConstRange < 0.0) { ShowSevereBadMin(state, eoh, s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1), Clusive::In, 0.0); ErrorsFound = true; @@ -1907,7 +1904,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) tempZone.ZoneOvercoolControlRatio = s_ipsc->rNumericArgs(2); // check Overcool Control Ratio limits if (tempZone.ZoneOvercoolControlRatio < 0.0) { - if (Item == 1) { + if (item == 1) { ShowSevereBadMin(state, eoh, s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2), Clusive::In, 0.0); ErrorsFound = true; } diff --git a/testfiles/RefrigeratedWarehouse.idf b/testfiles/RefrigeratedWarehouse.idf index e787dd44c50..68775f41ba2 100644 --- a/testfiles/RefrigeratedWarehouse.idf +++ b/testfiles/RefrigeratedWarehouse.idf @@ -4,7 +4,7 @@ ! and ZoneRefrigerationDoorMixing objects ! ! Basic File Description: -! Building Name Benchmark Large Refridgerated Warehouse +! Building Name Benchmark Large Refrigerated Warehouse ! Total Floor Area (m2) 26693 m2 (287334 ft2) ! Building Shape Rectangle ! Aspect Ratio 2.2