Skip to content

Commit 49fc066

Browse files
committed
Updated warning message and test.
1 parent ecbc41a commit 49fc066

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/EnergyPlus/VariableSpeedCoils.cc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4749,16 +4749,20 @@ namespace VariableSpeedCoils {
47494749
TotCapTempModFac =
47504750
Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(varSpeedCoil.NormSpedLevel), MixWetBulb, RatedSourceTempCool);
47514751

4752-
if (MixEnth > SupEnth) {
4753-
CoolCapAtPeak = (rhoair * VolFlowRate * (MixEnth - SupEnth)) + FanCoolLoad;
4754-
} else {
4755-
CoolCapAtPeak = (rhoair * VolFlowRate * (48000.0 - SupEnth)) + FanCoolLoad;
4756-
}
4757-
if ((CoolCapAtPeak < 0) && (MixTemp < SupTemp)) {
4752+
CoolCapAtPeak = (rhoair * VolFlowRate * (MixEnth - SupEnth)) + FanCoolLoad;
4753+
if (CoolCapAtPeak < 0) { // This conditional will also catch the initialization value, -999.0
47584754
ShowWarningError(
47594755
state,
4760-
format("On design day {}, cooling coil entering air temperature {:.2R} is less than design supply air temperature {:.2R}. This would "
4761-
"yield negative coil capacity sizing for {}.", state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).CoolDesDay, MixTemp, SupTemp, varSpeedCoil.Name));
4756+
format(
4757+
"In calculating capacity for coil {} on design day {}, the air state would yield negative coil capacity sizing.",
4758+
varSpeedCoil.Name,
4759+
state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).CoolDesDay));
4760+
ShowContinueError(state, format("The air properties are: T_mix = {:.4R}", MixTemp));
4761+
ShowContinueError(state, format(" T_supply = {:.4R}", SupTemp));
4762+
ShowContinueError(state, format(" H_mix = {:.4R}", MixEnth));
4763+
ShowContinueError(state, format(" H_supply = {:.4R}", SupEnth));
4764+
ShowContinueError(state, format(" W_mix = {:.4R}", MixHumRat));
4765+
ShowContinueError(state, format(" W_supply = {:.4R}", SupHumRat));
47624766
ShowContinueError(state, "Cooling capacity is set to zero during sizing; simulation continues.");
47634767
}
47644768
CoolCapAtPeak = max(0.0, CoolCapAtPeak);

tst/EnergyPlus/unit/UnitarySystem.unit.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6767,7 +6767,7 @@ TEST_F(EnergyPlusFixture, VSCoilUnitary_NoNegativeCapacity)
67676767
Real64 constexpr SpeedRatio{0.0};
67686768
int constexpr SpeedCal{1};
67696769
VariableSpeedCoils::InitVarSpeedCoil(*state, DXCoilNum, SensLoad, LatentLoad, fanOp, OnOffAirFlowRatio, SpeedRatio, SpeedCal);
6770-
EXPECT_TRUE(compare_err_stream_substring("This will yield negative coil capacity sizing", true));
6770+
EXPECT_TRUE(compare_err_stream_substring("the air state would yield negative coil capacity sizing", true));
67716771
// Cooling design day name should be populated, but is not. This appears to be a separate issue that should be addressed at a later time.
67726772
// EXPECT_TRUE(compare_err_stream_substring("Annual Cooling 1 %", true));
67736773
}

0 commit comments

Comments
 (0)