Skip to content

Commit

Permalink
Update 2 unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Sep 24, 2024
1 parent 73fcfff commit d29faa1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 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
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

4 comments on commit d29faa1

@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: OK (2913 of 2913 tests passed, 0 test warnings)

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 (2891 of 2891 tests passed, 0 test warnings)

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-UnitTestsCoverage-RelWithDebInfo: OK (2097 of 2097 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@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-IntegrationCoverage-RelWithDebInfo: OK (799 of 799 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.