From 7d7be48ebf80cd85fb19d1e36779222a6b11b433 Mon Sep 17 00:00:00 2001 From: Bereket Nigusse Date: Sun, 14 Jul 2024 02:31:38 -0400 Subject: [PATCH 1/4] Fixed numeric field names used for reporting --- src/EnergyPlus/DXCoils.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 05ab55bc696..c2fcfaef4a0 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -8290,7 +8290,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) CompType = thisDXCoil.DXCoilType; // Sizing rated air flow rate if (Mode == thisDXCoil.NumOfSpeeds) { - FieldNum = 12 + (Mode - 1) * 5; + FieldNum = 12 + (Mode - 1) * 6; SizingString = state.dataDXCoils->DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; TempSize = thisDXCoil.MSRatedAirVolFlowRate(Mode); state.dataSize->DataEMSOverrideON = thisDXCoil.RatedAirVolFlowRateEMSOverrideON(Mode); @@ -8313,7 +8313,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) bPRINT = true; } } else { - FieldNum = 12 + (Mode - 1) * 5; + FieldNum = 12 + (Mode - 1) * 6; SizingString = state.dataDXCoils->DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; if (IsAutoSize || !HardSizeNoDesRun) { SizingMethod = HVAC::AutoCalculateSizing; @@ -8407,7 +8407,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (Mode == thisDXCoil.NumOfSpeeds) { SizingMethod = HVAC::HeatingCapacitySizing; state.dataSize->DataFlowUsedForSizing = thisDXCoil.MSRatedAirVolFlowRate(Mode); - FieldNum = 10 + (Mode - 1) * 5; + FieldNum = 10 + (Mode - 1) * 6; SizingString = state.dataDXCoils->DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [W]"; state.dataSize->DataTotCapCurveIndex = thisDXCoil.MSCCapFTemp(Mode); if (IsAutoSize || !HardSizeNoDesRun) { @@ -8448,7 +8448,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) } else { PrintFlag = true; SizingMethod = HVAC::HeatingCapacitySizing; - FieldNum = 10 + (Mode - 1) * 5; + FieldNum = 10 + (Mode - 1) * 6; SizingString = state.dataDXCoils->DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [W]"; if (IsAutoSize || !HardSizeNoDesRun) { SizingMethod = HVAC::AutoCalculateSizing; From b315fd296867d75103053c86a78234fcce19532c Mon Sep 17 00:00:00 2001 From: Bereket Nigusse Date: Fri, 19 Jul 2024 07:52:14 -0400 Subject: [PATCH 2/4] Modified unit tests failed due to the fix --- tst/EnergyPlus/unit/DXCoils.unit.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index c4a7daa5334..1e6bdeeb19b 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -107,7 +107,7 @@ TEST_F(EnergyPlusFixture, DXCoils_Test1) state->dataDXCoils->DXCoilNumericFields.allocate(state->dataDXCoils->NumDXCoils); state->dataDXCoils->DXCoilNumericFields(2).PerfMode.allocate(1); - state->dataDXCoils->DXCoilNumericFields(2).PerfMode(1).FieldNames.allocate(17); + state->dataDXCoils->DXCoilNumericFields(2).PerfMode(1).FieldNames.allocate(18); state->dataDXCoils->DXCoil(2).DefrostStrategy = StandardRatings::DefrostStrat::Resistive; state->dataDXCoils->DXCoil(2).DefrostCapacity = 5000.0; state->dataDXCoils->DXCoil(2).Name = "DX Heating coil"; @@ -4648,9 +4648,9 @@ TEST_F(EnergyPlusFixture, TestMultiSpeedCoilsAutoSizingOutput) EXPECT_NEAR(16365.95, state->dataDXCoils->DXCoil(2).MSRatedTotCap(1), 0.01); // Check EIO reporting const std::string htg_coil_eio_output = - R"EIO( Component Sizing Information, Coil:Heating:DX:MultiSpeed, ASHP HTG COIL, Design Size Speed 2 Gross Rated Heating COP [m3/s], 1.75000 + R"EIO( Component Sizing Information, Coil:Heating:DX:MultiSpeed, ASHP HTG COIL, Design Size Speed 2 Rated Air Flow Rate [m3/s], 1.75000 Component Sizing Information, Coil:Heating:DX:MultiSpeed, ASHP HTG COIL, Design Size Speed 1 Rated Air Flow Rate [m3/s], 0.87500 - Component Sizing Information, Coil:Heating:DX:MultiSpeed, ASHP HTG COIL, Design Size Speed 1 Rated Waste Heat Fraction of Power Input [W], 32731.91226 + Component Sizing Information, Coil:Heating:DX:MultiSpeed, ASHP HTG COIL, Design Size Speed 2 Gross Rated Heating Capacity [W], 32731.91226 Component Sizing Information, Coil:Heating:DX:MultiSpeed, ASHP HTG COIL, Design Size Speed 1 Gross Rated Heating Capacity [W], 16365.95613 Component Sizing Information, Coil:Heating:DX:MultiSpeed, ASHP HTG COIL, Design Size Resistive Defrost Heater Capacity, 0.00000 ! , Component Type, Component Name, High Temperature Heating (net) Rating Capacity {W}, Low Temperature Heating (net) Rating Capacity {W}, HSPF {Btu/W-h}, Region Number From ede530325426ec7d0b4a7605790018f78f88cc8e Mon Sep 17 00:00:00 2001 From: rraustad Date: Fri, 19 Jul 2024 16:39:01 -0400 Subject: [PATCH 3/4] Relax CTF time step limit --- src/EnergyPlus/Construction.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EnergyPlus/Construction.cc b/src/EnergyPlus/Construction.cc index 133f0de868f..0fdd793bd68 100644 --- a/src/EnergyPlus/Construction.cc +++ b/src/EnergyPlus/Construction.cc @@ -131,15 +131,15 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E // greater than this, then the coefficients will not yield a valid steady // state solution. - constexpr Real64 MaxAllowedTimeStep(4.0); // Sets the maximum allowed time step - // for CTF calculations to be 4 hours. This is done in response to some + constexpr Real64 MaxAllowedTimeStep = 7.0; // Sets the maximum allowed time step + // for CTF calculations to be 7 hours. This is done in response to some // rare situations where odd or faulty input will cause the routine to // go off and get some huge time step (in excess of 20 hours). This value // is a compromise that does not really solve any input problems. One run // indicated that 2 meters of concrete will result in a time step of slightly - // more than 3 hours. So, 4 hours was arbitrarily picked as a ceiling for + // more than 3 hours. So, 7 hours was arbitrarily picked as a ceiling for // time steps so that an error message can be produced to warn the user - // that something isn't right. Note that the 4 hour limit does not guarantee + // that something isn't right. Note that the 7 hour limit does not guarantee // that problems won't exist and it does not necessarily avoid any problems // that interpolated temperature histories might cause. From baa89d4a3d259aaac1611381b17a512b8bd9b0e9 Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Mon, 29 Jul 2024 14:31:06 -0500 Subject: [PATCH 4/4] Fix false warnings --- src/EnergyPlus/FluidProperties.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/FluidProperties.cc b/src/EnergyPlus/FluidProperties.cc index a27751e06b6..2fb88c72643 100644 --- a/src/EnergyPlus/FluidProperties.cc +++ b/src/EnergyPlus/FluidProperties.cc @@ -2843,13 +2843,13 @@ namespace FluidProperties { // and linearly interpolates the corresponding saturation temperature values. // Return value - Real64 ReturnValue; + Real64 ReturnValue = 0.0; // FUNCTION PARAMETER DEFINITIONS: static constexpr std::string_view routineName = "RefrigProps::getSatTemperature"; // FUNCTION LOCAL VARIABLE DECLARATIONS: - bool ErrorFlag; // error flag for current call + bool ErrorFlag = false; // error flag for current call auto &df = state.dataFluidProps;