Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct VAV maximum air flow fraction during reheat for heating dominated use cases #10763

Merged
38 changes: 31 additions & 7 deletions src/EnergyPlus/SingleDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2877,8 +2877,15 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state)

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

MaxAirVolFlowRateDes = max(state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesCoolVolFlow,
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);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If ReverseWithLimits uses a different heating air flow rate from the zone design heating air flow rate then that flow rate should be used as the value for the VAV box heating air flow rate.

Copy link
Contributor Author

@rraustad rraustad Sep 24, 2024

Choose a reason for hiding this comment

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

Well, I was expecting DesHeatVolFlowMax to always be less than DesHeatVolFlow. For 5ZoneBoilerOutsideAirReset that's not the case. The diffs show that Zone 5 TU max air flow rate increased, I was only expecting decreases in max air flow rate for heating dominated zones. Zone cooling design air flow is greater than zone heating design air flow, but DesHeatVolFlowMax is larger than both of these.

image

image

// set the zone maximum heating supply air flow rate. This will be used for autosizing VAV terminal unit
// max heating flow rates
zsFinalSizing.DesHeatVolFlowMax = max(zsFinalSizing.DesHeatMaxAirFlow,
                                      zsFinalSizing.DesHeatMaxAirFlow2,
                                      max(zsFinalSizing.DesCoolVolFlow, zsFinalSizing.DesHeatVolFlow) * zsFinalSizing.DesHeatMaxAirFlowFrac);

zsFinalSizing.DesHeatMaxAirFlow2 = zsFinalSizing.DesHeatMaxAirFlowPerArea * floorArea * zoneMult;
                                 = 0.002032 * 182.49 * 1 = 0.37082

N8 , \field Maximum Flow Fraction During Reheat
     \type real
     \autosizable
     \default autosize
     \note Used only when Reheat Coil Object Type = Coil:Heating:Water and Damper Heating Action = ReverseWithLimits
     \note When autocalculating, the maximum flow fraction is set to the ratio of
     \note 0.002032 m3/s-m2 (0.4 cfm/sqft) multiplied by the zone floor area and the
     \note Maximum Air Flow Rate.
     \note This optional field limits the maximum flow allowed in reheat mode.
     \note At no time will the maximum flow rate calculated here exceed the value of
     \note Maximum Air Flow Rate.

So is DesHeatVolFlowMax just an upper limit? or is it the expected heating air flow rate?

Copy link
Contributor Author

@rraustad rraustad Sep 24, 2024

Choose a reason for hiding this comment

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

So, since DesHeatVolFlowMax looks like a limit and not a flow rate, maybe I should change this line and line 3224 to?:

Real64 heatingMaxFlow = (DesHeatVolFlowMax > DesHeatVolFlow) ? state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow :
    state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on this discussion I changed to treat DesHeatVolFlowMax as an upper limit. This should still correct the issue and result in fewer diffs.


if (MaxAirVolFlowRateDes < SmallAirVolFlow) {
MaxAirVolFlowRateDes = 0.0;
Expand Down Expand Up @@ -2927,7 +2934,13 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state)
}
} else {
CheckZoneSizing(state, this->sysType, this->SysName);
MaxHeatAirVolFlowRateDes = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow;
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;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Below at line 3224, ReverseWithLimits uses DesHeatVolFlowMax. That value should also be used here.

3224: MaxAirVolFlowRateDuringReheatDes = state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlowMax;

Copy link
Contributor Author

@rraustad rraustad Sep 25, 2024

Choose a reason for hiding this comment

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

As discussed above, these 2 areas of code, above (2937) and below (3231), were changed to use DesHeatVolFlowMax as a limit.

if (MaxHeatAirVolFlowRateDes < SmallAirVolFlow) {
MaxHeatAirVolFlowRateDes = 0.0;
}
Expand Down Expand Up @@ -3215,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 >
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why we need this same (or very similar logic) in multiple places, but not holding up this PR for that. It works as-is.

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 Expand Up @@ -3411,9 +3430,14 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state)
max(state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).NonAirSysDesHeatVolFlow,
this->MaxAirVolFlowRate * this->ZoneTurndownMinAirFrac);
} else {
TermUnitSizing(state.dataSize->CurTermUnitSizingNum).AirVolFlow =
max(state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).NonAirSysDesHeatVolFlow,
this->MaxAirVolFlowRate * this->ZoneMinAirFracDes * this->ZoneTurndownMinAirFrac);
if (this->SysType_Num == SysType::SingleDuctVAVReheat && this->DamperHeatingAction == Action::ReverseWithLimits) {
TermUnitSizing(state.dataSize->CurTermUnitSizingNum).AirVolFlow =
max(this->MaxAirVolFlowRateDuringReheat, this->MaxAirVolFlowRate * this->ZoneTurndownMinAirFrac);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

So, what if MaxAirVolFlowRateDuringReheat > NonAirSysDesHeatVolFlow as it is for Space4-1 in 5ZoneAirCooled-ReverseWithLimits? Will this reheat coil be oversized?

And why is NonAirSysDesHeatVolFlow being used here instead of DesHeatVolFlow?

Copy link
Contributor Author

@rraustad rraustad Oct 24, 2024

Choose a reason for hiding this comment

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

I think I'm landing on falling back on the choices. Normal should size to the minimum flow rate. If that doesn't meet the load then the Reverse or ReverseWithLimits should be used instead. That's what the docs say. And then Reverse and ReverseWithLmits use the corresponding max reheat air flow rate. But that is historically different so I'm stuck with what to do.

Regarding the size choice your right. The coil could be over or undersized. I'm not sure the developer should make that sizing choice (i.e., there's plenty of inputs to get it right). One or more of these choices should meet the load. I've also been thinking about heating coil sizing. Zone heating flow rate is SAT - Tzone. TU heating coil sizing is Tout - Tzone. So at the zone heating flow rate you meet the load and that's why NonAirSysDesHeatVolFlow is used. When using actual air flow Reverse should always meet the load, ReverseWithLimits may not. Normal may not meet the load but that's understood with a typical 0.3 minimum stop selection and depends on heating to cooling flow rate ratio. Where's the choice for the user to oversize the heating coil when it operates at a lower flow rate? There is a disconnect between TU heating air flow and heating capacity. Using NonAirSysDesHeatVolFlow to size the coil should always size the coil to meet the load but it seems odd to use a flow rate that differs from the TU and you create a coil outlet temperature that does not match the design criteria. That's when the coil sizing details don't line up with the TU flow rate for maximum flow rate during reheat but you get the right SAT. Some users notice that and question why. There was a lot of testing of these choices and things weren't lining up which created this issue. I'll look at the coil sizing details to see if the issue of TU heating flow rate versus heating coil sizing air flow shows itself. What do you think about a new input to use either the zone or TU heating flow rate? It could default to zone and not change coil capacity (Use Zone Heating Flow Rate to Size Heating Coil, Yes/No).

Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding the reheat coil sizing, there have been many adjustments in the past to make sure that the coil is not way oversized. The airflow is one thing, but I think it uses the zone heating load in the sizing calcs (plus an offset for entering air temp). But that's just my recollection without looking at the code. So, maybe what you have a this point is ok, for ReverseWithLimits, anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte the last comment on sizing of reheat coil for Space2-1 at 0.177 max TU flow rate versus 0.107 is happening right here at line 3434. Here:

MaxAirVolFlowRateDuringReheat = 0.10735
MaxAirVolFlowRate = 0.17747
ZoneTurndownMinAirFrac = 1.0

I thought the damper was allowed to open all the way up when ReverseWithLimits is used? Yes this would create a larger heating coil, but the user specified to allow the damper to open that far. Another thought is, if Normal is used then the reheat coil is some size, if ReverseWithLimits is used then the reheat coil would need to be larger. Thoughts?

Zone Sizing Information, SPACE2-1, Cooling, 2110.05356, 2110.05356, 0.17747, 0.17747
Zone Sizing Information, SPACE2-1, Heating, 1635.59910, 1635.59910, 0.10735, 0.10735

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought the damper was allowed to open all the way up when ReverseWithLimits is used?

From the I/O Ref:
For ReverseWithLimitss the damper can only partially open to a maximum flow rate given by the following two fields. These options are used if the minimum air flow rate is not adequate to serve the peak heating load.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New results for 5ZoneAirCooled-ReverseWithLimits

Zone Sizing Information, SPACE1-1, Cooling, 1991.75827, 1991.75827, 0.16753, 0.16753
Zone Sizing Information, SPACE1-1, Heating, 3970.36898, 3970.36898, 0.26058, 0.26058
Zone Sizing Information, SPACE2-1, Cooling, 2110.05356, 2110.05356, 0.17747, 0.17747
Zone Sizing Information, SPACE2-1, Heating, 1635.59910, 1635.59910, 0.10735, 0.10735
Zone Sizing Information, SPACE3-1, Cooling, 1822.43896, 1822.43896, 0.15328, 0.15328
Zone Sizing Information, SPACE3-1, Heating, 3862.85865, 3862.85865, 0.25352, 0.25352
Zone Sizing Information, SPACE4-1, Cooling, 2411.91565, 2411.91565, 0.20286, 0.20286
Zone Sizing Information, SPACE4-1, Heating, 1630.01391, 1630.01391, 0.10698, 0.10698
Zone Sizing Information, SPACE5-1, Cooling, 1144.55309, 1144.55309, 9.62850E-002, 0.13906
Zone Sizing Information, SPACE5-1, Heating, 3259.03012, 3259.03012, 0.21389, 0.21389

Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE1-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.20149
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE1-1 VAV REHEAT, Design Size Maximum Flow Fraction during Reheat [], 1.00000
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE1-1 VAV REHEAT, Design Size Reheat Coil Sizing Air Volume Flow Rate [m3/s], 0.20149
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE2-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.17747
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE2-1 VAV REHEAT, Design Size Maximum Flow Fraction during Reheat [], 0.60486
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE2-1 VAV REHEAT, Design Size Reheat Coil Sizing Air Volume Flow Rate [m3/s], 0.10735
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE3-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.19605
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE3-1 VAV REHEAT, Design Size Maximum Flow Fraction during Reheat [], 1.00000
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE3-1 VAV REHEAT, Design Size Reheat Coil Sizing Air Volume Flow Rate [m3/s], 0.19605
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE4-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.20286
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE4-1 VAV REHEAT, Design Size Maximum Flow Fraction during Reheat [], 0.52735
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE4-1 VAV REHEAT, Design Size Reheat Coil Sizing Air Volume Flow Rate [m3/s], 0.10698
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE5-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.21389
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE5-1 VAV REHEAT, Design Size Maximum Flow Fraction during Reheat [], 1.00000
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE5-1 VAV REHEAT, Design Size Reheat Coil Sizing Air Volume Flow Rate [m3/s], 0.21389

TermUnitSizing(state.dataSize->CurTermUnitSizingNum).AirVolFlow =
max(state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).NonAirSysDesHeatVolFlow,
this->MaxAirVolFlowRate * this->ZoneMinAirFracDes * this->ZoneTurndownMinAirFrac);
}
}
} else {
if (this->SysType_Num == SysType::SingleDuctVAVReheatVSFan) {
Expand Down
64 changes: 55 additions & 9 deletions tst/EnergyPlus/unit/SingleDuct.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ TEST_F(EnergyPlusFixture, SingleDuct_ZeroFloorAreaTest)
// zone floor area of zone 1 = 0, zone 2 > 0. Expect TU MaxAirVolFlowRateDuringReheat = 0 only for zone 1.
// this test isn't relevant anymore since defaulting is done differently
Real64 MaxAirVolFlowRateDuringReheatDes =
min(state->dataSize->FinalZoneSizing(1).DesHeatVolFlowMax, state->dataSingleDuct->sd_airterminal(1).MaxAirVolFlowRate);
min(state->dataSize->FinalZoneSizing(1).DesHeatVolFlow, state->dataSingleDuct->sd_airterminal(1).MaxAirVolFlowRate);
// Real64 MaxAirVolFlowRateDuringReheatDes = min( 0.002032 * state->dataSingleDuct->sd_airterminal( 1 ).ZoneFloorArea,
// state->dataSingleDuct->sd_airterminal( 1 ).MaxAirVolFlowRate ); apply limit based on min stop
MaxAirVolFlowRateDuringReheatDes =
Expand All @@ -1291,7 +1291,7 @@ TEST_F(EnergyPlusFixture, SingleDuct_ZeroFloorAreaTest)

// This isn't relevant any more since the default is calculated differently
Real64 MaxAirVolFractionDuringReheatDes =
min(1.0, (state->dataSize->FinalZoneSizing(1).DesHeatVolFlowMax / state->dataSingleDuct->sd_airterminal(1).MaxAirVolFlowRate));
min(1.0, (state->dataSize->FinalZoneSizing(1).DesHeatVolFlow / state->dataSingleDuct->sd_airterminal(1).MaxAirVolFlowRate));
// Real64 MaxAirVolFractionDuringReheatDes = min( 1.0, ( 0.002032 * state->dataSingleDuct->sd_airterminal( 1 ).ZoneFloorArea /
// state->dataSingleDuct->sd_airterminal( 1 ).MaxAirVolFlowRate )
// ); apply limit based on min stop
Expand All @@ -1306,12 +1306,12 @@ TEST_F(EnergyPlusFixture, SingleDuct_ZeroFloorAreaTest)
EXPECT_NEAR(MaxAirVolFractionDuringReheatDes, state->dataSingleDuct->sd_airterminal(1).MaxAirVolFractionDuringReheat, 0.0000000000001);

MaxAirVolFlowRateDuringReheatDes =
min(state->dataSize->FinalZoneSizing(2).DesHeatVolFlowMax, state->dataSingleDuct->sd_airterminal(2).MaxAirVolFlowRate);
min(state->dataSize->FinalZoneSizing(2).DesHeatVolFlow, state->dataSingleDuct->sd_airterminal(2).MaxAirVolFlowRate);
MaxAirVolFlowRateDuringReheatDes =
max(MaxAirVolFlowRateDuringReheatDes,
(state->dataSingleDuct->sd_airterminal(2).MaxAirVolFlowRate * state->dataSingleDuct->sd_airterminal(2).ZoneMinAirFrac));
MaxAirVolFractionDuringReheatDes =
min(1.0, (state->dataSize->FinalZoneSizing(2).DesHeatVolFlowMax / state->dataSingleDuct->sd_airterminal(2).MaxAirVolFlowRate));
min(1.0, (state->dataSize->FinalZoneSizing(2).DesHeatVolFlow / state->dataSingleDuct->sd_airterminal(2).MaxAirVolFlowRate));
MaxAirVolFractionDuringReheatDes = max(MaxAirVolFractionDuringReheatDes, state->dataSingleDuct->sd_airterminal(2).ZoneMinAirFrac);
MaxAirVolFlowRateDuringReheatDes =
min(max(MaxAirVolFlowRateDuringReheatDes, MaxAirVolFractionDuringReheatDes * state->dataSingleDuct->sd_airterminal(2).MaxAirVolFlowRate),
Expand Down Expand Up @@ -2737,23 +2737,69 @@ TEST_F(EnergyPlusFixture, VAVReheatTerminal_SizeMinFrac)
EXPECT_TRUE(compare_err_stream(""));

int SysNum = 1;
auto &thisSys = state->dataSingleDuct->sd_airterminal(SysNum);

// First test - design min flow < max flow
state->dataSize->ZoneSizingRunDone = true;
state->dataSize->CurZoneEqNum = 1;
state->dataSize->CurTermUnitSizingNum = 1;
state->dataSize->TermUnitFinalZoneSizing(1).DesCoolVolFlowMin = 0.5;
state->dataSingleDuct->sd_airterminal(SysNum).SizeSys(*state);
EXPECT_EQ(0.5, state->dataSingleDuct->sd_airterminal(SysNum).ZoneMinAirFracDes);
thisSys.SizeSys(*state);
EXPECT_EQ(0.5, thisSys.ZoneMinAirFracDes);

// Second test - design min flow > max flow
state->dataSize->ZoneSizingRunDone = true;
state->dataSize->CurZoneEqNum = 1;
state->dataSize->CurTermUnitSizingNum = 1;
state->dataSingleDuct->sd_airterminal(SysNum).ZoneMinAirFracDes = AutoSize; // need to reset this so it sizes again
thisSys.ZoneMinAirFracDes = AutoSize; // need to reset this so it sizes again
state->dataSize->TermUnitFinalZoneSizing(1).DesCoolVolFlowMin = 1.5;
state->dataSingleDuct->sd_airterminal(SysNum).SizeSys(*state);
EXPECT_EQ(1.0, state->dataSingleDuct->sd_airterminal(SysNum).ZoneMinAirFracDes);
thisSys.SizeSys(*state);
EXPECT_EQ(1.0, thisSys.ZoneMinAirFracDes);

// test Maximum Flow Fraction During Reheat for heating dominated
thisSys.MaxAirVolFlowRate = DataSizing::AutoSize;
thisSys.ZoneMinAirFracDes = DataSizing::AutoSize;
thisSys.MaxAirVolFlowRateDuringReheat = DataSizing::AutoSize;
thisSys.MaxAirVolFractionDuringReheat = DataSizing::AutoSize;
state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlow = 1.7;
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;
thisSys.MaxAirVolFlowRateDuringReheat = DataSizing::AutoSize;
thisSys.MaxAirVolFractionDuringReheat = DataSizing::AutoSize;
state->dataSize->TermUnitFinalZoneSizing(1).DesHeatVolFlow = 1.4;
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);
EXPECT_EQ(expectedMaxAirVolFractionDuringReheat, thisSys.MaxAirVolFractionDuringReheat);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added 3 new tests for maximum air flow fraction during reheat to this unit test.

}

TEST_F(EnergyPlusFixture, setATMixerSizingProperties_Test)
Expand Down
6 changes: 5 additions & 1 deletion tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,12 @@ TEST_F(EnergyPlusFixture, VAVDefMinMaxFlowTestSizing2)
state->dataSingleDuct->sd_airterminal(1).ZoneFloorArea = state->dataHeatBal->Zone(1).FloorArea;
UpdateTermUnitFinalZoneSizing(*state); // Fills the TermUnitFinalZoneSizing array
state->dataSingleDuct->sd_airterminal(1).SizeSys(*state);
Real64 heatVolFlow = (state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).DesHeatVolFlow >
state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).DesHeatVolFlowMax)
? state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).DesHeatVolFlowMax
: state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).DesHeatVolFlow;
EXPECT_NEAR(state->dataSingleDuct->sd_airterminal(state->dataSize->CurZoneEqNum).ZoneMinAirFracDes, 0.348739, 0.000001);
EXPECT_NEAR(state->dataSingleDuct->sd_airterminal(state->dataSize->CurZoneEqNum).MaxAirVolFlowRateDuringReheat, 0.196047, 0.000001);
EXPECT_NEAR(state->dataSingleDuct->sd_airterminal(state->dataSize->CurZoneEqNum).MaxAirVolFlowRateDuringReheat, heatVolFlow, 0.000001);

state->dataLoopNodes->Node.deallocate();
state->dataZoneEquip->ZoneEquipConfig.deallocate();
Expand Down
Loading