Skip to content

Commit

Permalink
Revised based on using DesHeatVolFlowMax as limit
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Sep 24, 2024
1 parent 90f2846 commit 73fcfff
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/EnergyPlus/SingleDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2877,9 +2877,14 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state)

CheckZoneSizing(state, this->sysType, this->SysName);

Real64 heatingMaxFlow = (this->DamperHeatingAction == Action::ReverseWithLimits)
? state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax
: state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow;
Real64 heatingMaxFlow;
if (this->DamperHeatingAction == Action::ReverseWithLimits &&
state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow >
state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax) {
heatingMaxFlow = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax;
} else {
heatingMaxFlow = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow;
}
MaxAirVolFlowRateDes = max(state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesCoolVolFlow, heatingMaxFlow);

if (MaxAirVolFlowRateDes < SmallAirVolFlow) {
Expand Down Expand Up @@ -2929,7 +2934,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state)
}
} else {
CheckZoneSizing(state, this->sysType, this->SysName);
if (this->DamperHeatingAction == Action::ReverseWithLimits) {
if (this->DamperHeatingAction == Action::ReverseWithLimits &&
state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow >
state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax) {
MaxHeatAirVolFlowRateDes = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax;
} else {
MaxHeatAirVolFlowRateDes = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow;
Expand Down Expand Up @@ -3221,7 +3228,13 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state)
if (state.dataSize->ZoneSizingRunDone) {
if (state.dataSize->CurTermUnitSizingNum > 0) {
// if zone sizing run done, set the design max reheat air flow to the value from the design calcs
MaxAirVolFlowRateDuringReheatDes = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax;
if (state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow >
state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax) {
MaxAirVolFlowRateDuringReheatDes =
state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax;
} else {
MaxAirVolFlowRateDuringReheatDes = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow;
}
}
} else {
// if no design calc use 0.002032 [m3/s-m2] times floor area. That's .40 cfm/ft2
Expand Down
17 changes: 17 additions & 0 deletions tst/EnergyPlus/unit/SingleDuct.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2765,11 +2765,27 @@ TEST_F(EnergyPlusFixture, VAVReheatTerminal_SizeMinFrac)
state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlowMax = 1.6;
thisSys.SizeSys(*state);
Real64 expectedZoneMinAirFracDes = std::min(1.0, state->dataSize->TermUnitFinalZoneSizing(1).DesCoolVolFlowMin / thisSys.MaxAirVolFlowRate);
// DesHeatVolFlowMax is limiting flow rate
Real64 expectedMaxAirVolFractionDuringReheat = state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlowMax / thisSys.MaxAirVolFlowRate;
EXPECT_EQ(expectedZoneMinAirFracDes, thisSys.ZoneMinAirFracDes);
EXPECT_EQ(1.0, thisSys.MaxAirVolFractionDuringReheat);
EXPECT_EQ(expectedMaxAirVolFractionDuringReheat, thisSys.MaxAirVolFractionDuringReheat);

// switch magnitude of DesHeatVolFlow and DesHeatVolFlowMax, still heating dominated
thisSys.MaxAirVolFlowRate = DataSizing::AutoSize;
thisSys.ZoneMinAirFracDes = DataSizing::AutoSize;
thisSys.MaxAirVolFlowRateDuringReheat = DataSizing::AutoSize;
thisSys.MaxAirVolFractionDuringReheat = DataSizing::AutoSize;
state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlow = 1.6;
state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlowMax = 1.7;
thisSys.SizeSys(*state);
expectedZoneMinAirFracDes = std::min(1.0, state->dataSize->TermUnitFinalZoneSizing(1).DesCoolVolFlowMin / thisSys.MaxAirVolFlowRate);
// DesHeatVolFlowMax is NOT limiting flow rate
expectedMaxAirVolFractionDuringReheat = state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlow / thisSys.MaxAirVolFlowRate;
EXPECT_EQ(expectedZoneMinAirFracDes, thisSys.ZoneMinAirFracDes);
EXPECT_EQ(1.0, thisSys.MaxAirVolFractionDuringReheat);
EXPECT_EQ(expectedMaxAirVolFractionDuringReheat, thisSys.MaxAirVolFractionDuringReheat);

// test Maximum Flow Fraction During Reheat for cooling dominated
thisSys.MaxAirVolFlowRate = DataSizing::AutoSize;
thisSys.ZoneMinAirFracDes = DataSizing::AutoSize;
Expand All @@ -2779,6 +2795,7 @@ TEST_F(EnergyPlusFixture, VAVReheatTerminal_SizeMinFrac)
state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlowMax = 1.3;
thisSys.SizeSys(*state);
expectedZoneMinAirFracDes = std::min(1.0, state->dataSize->TermUnitFinalZoneSizing(1).DesCoolVolFlowMin / thisSys.MaxAirVolFlowRate);
// DesHeatVolFlowMax is limiting flow rate
expectedMaxAirVolFractionDuringReheat = state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlowMax / thisSys.MaxAirVolFlowRate;
EXPECT_EQ(expectedZoneMinAirFracDes, thisSys.ZoneMinAirFracDes);
EXPECT_EQ(1.0, thisSys.MaxAirVolFractionDuringReheat);
Expand Down

4 comments on commit 73fcfff

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

10762-VAV-Reheat-shows-reheat-fraction-less-than-1 (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2911 of 2913 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1601
  • Failed: 2

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

10762-VAV-Reheat-shows-reheat-fraction-less-than-1 (rraustad) - Win64-Windows-10-VisualStudio-16: OK (2889 of 2891 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1599
  • Failed: 2

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

10762-VAV-Reheat-shows-reheat-fraction-less-than-1 (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (799 of 799 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

10762-VAV-Reheat-shows-reheat-fraction-less-than-1 (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2095 of 2097 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1601
  • Failed: 2

Build Badge Test Badge Coverage Badge

Please sign in to comment.