Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/EnergyPlus/VariableSpeedCoils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4749,18 +4749,18 @@ namespace VariableSpeedCoils {
TotCapTempModFac =
Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(varSpeedCoil.NormSpedLevel), MixWetBulb, RatedSourceTempCool);

if (MixTemp < SupTemp) {
ShowSevereError(
state,
"On design day, cooling coil entering air temperature is less than design outlet air temperature. This will "
"yield negative coil capacity sizing.");
ShowContinueError(state, "Cooling capacity is set to zero during sizing; simulation continues.");
}
if (MixEnth > SupEnth) {
CoolCapAtPeak = (rhoair * VolFlowRate * (MixEnth - SupEnth)) + FanCoolLoad;
} else {
CoolCapAtPeak = (rhoair * VolFlowRate * (48000.0 - SupEnth)) + FanCoolLoad;
}
if ((CoolCapAtPeak < 0) && (MixTemp < SupTemp)) {
ShowWarningError(
state,
format("On design day {}, cooling coil entering air temperature {:.2R} is less than design supply air temperature {:.2R}. This would "
"yield negative coil capacity sizing for {}.", state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).CoolDesDay, MixTemp, SupTemp, varSpeedCoil.Name));
ShowContinueError(state, "Cooling capacity is set to zero during sizing; simulation continues.");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coil sizing is based on enthalpy. Given the sneaky use of a standard capacity if enthalpies are not correct CoilCapAtPeak should never be negative here. I would like to see the 48000 removed (i.e., delete the else) since it just forces a non-zero coil capacity. There is nothing wrong with the coil sizing to 0 if FinalSysSizing conditions warrant that result.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Not knowing where it came from, I was reticent to touch a "magic number."

CoolCapAtPeak = max(0.0, CoolCapAtPeak);
if (TotCapTempModFac > 0.0) {
RatedCapCoolTotalDes = CoolCapAtPeak / TotCapTempModFac;
Expand Down
32 changes: 16 additions & 16 deletions tst/EnergyPlus/unit/UnitarySystem.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5953,18 +5953,18 @@ TEST_F(EnergyPlusFixture, VSCoilUnitary_NoNegativeCapacity)

"Sizing:System,",
"Heat Pump Sys 1, !- AirLoop Name",
"sensible, !- Type of Load to Size On",
"VentilationRequirement, !- Type of Load to Size On",
"autosize, !- Design Outdoor Air Flow Rate {m3/s}",
"0.0, !- Central Heating Maximum System Air Flow Ratio",
"7.0, !- Preheat Design Temperature {C}",
"1.0, !- Central Heating Maximum System Air Flow Ratio",
"27.0, !- Preheat Design Temperature {C}",
"0.008, !- Preheat Design Humidity Ratio {kgWater/kgDryAir}",
"25.0, !- Precool Design Temperature {C}",
"32.222, !- Precool Design Temperature {C}",
"0.008, !- Precool Design Humidity Ratio {kgWater/kgDryAir}",
"25., !- Central Cooling Design Supply Air Temperature {C}",
"50., !- Central Heating Design Supply Air Temperature {C}",
"32.222, !- Central Cooling Design Supply Air Temperature {C}",
"12.777, !- Central Heating Design Supply Air Temperature {C}",
"noncoincident, !- Type of Zone Sum to Use",
"no, !- 100% Outdoor Air in Cooling",
"no, !- 100% Outdoor Air in Heating",
"yes, !- 100% Outdoor Air in Cooling",
"yes, !- 100% Outdoor Air in Heating",
"0.008, !- Central Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}",
"0.008, !- Central Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}",
"DesignDay, !- Cooling Supply Air Flow Rate Method",
Expand All @@ -5978,17 +5978,17 @@ TEST_F(EnergyPlusFixture, VSCoilUnitary_NoNegativeCapacity)
", !- Heating Fraction of Autosized Heating Supply Air Flow Rate",
", !- Heating Fraction of Autosized Cooling Supply Air Flow Rate",
", !- Heating Supply Air Flow Rate Per Unit Heating Capacity {m3/s-W}",
", !- System Outdoor Air Method",
"1.0, !- Zone Maximum Outdoor Air Fraction {dimensionless}",
"CoolingDesignCapacity, !- Cooling Design Capacity Method",
"autosize, !- Cooling Design Capacity {W}",
"ZoneSum, !- System Outdoor Air Method",
", !- Zone Maximum Outdoor Air Fraction {dimensionless}",
", !- Cooling Design Capacity Method",
", !- Cooling Design Capacity {W}",
", !- Cooling Design Capacity Per Floor Area {W/m2}",
", !- Fraction of Autosized Cooling Design Capacity",
"HeatingDesignCapacity, !- Heating Design Capacity Method",
"autosize, !- Heating Design Capacity {W}",
", !- Heating Design Capacity Method",
", !- Heating Design Capacity {W}",
", !- Heating Design Capacity Per Floor Area {W/m2}",
", !- Fraction of Autosized Heating Design Capacity",
"VAV; !- Central Cooling Capacity Control Method",
"; !- Central Cooling Capacity Control Method",

"Curve:Cubic,",
"HPACHeatCapFT, !- Name",
Expand Down Expand Up @@ -6767,7 +6767,7 @@ TEST_F(EnergyPlusFixture, VSCoilUnitary_NoNegativeCapacity)
Real64 constexpr SpeedRatio{0.0};
int constexpr SpeedCal{1};
VariableSpeedCoils::InitVarSpeedCoil(*state, DXCoilNum, SensLoad, LatentLoad, fanOp, OnOffAirFlowRatio, SpeedRatio, SpeedCal);
EXPECT_TRUE(compare_err_stream_substring("entering air temperature is less than design outlet air temperature", true));
EXPECT_TRUE(compare_err_stream_substring("This will yield negative coil capacity sizing", true));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unit test should fail. The old message used "will" and the new warning message above uses:

This would yield negative coil capacity sizing

}

TEST_F(EnergyPlusFixture, UnitarySystemModel_SetOnOffMassFlowRateTest)
Expand Down