Skip to content

Commit

Permalink
resolve errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dareumnam committed Jun 21, 2024
1 parent 8bbaeef commit b420467
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ TEST_F(EnergyPlusFixture, VSParallelPIUStagedHeat)
state->dataLoopNodes->Node(7).MassFlowRateMax = thisPIU.MaxSecAirMassFlow; // Fan node
state->dataLoopNodes->Node(7).MassFlowRateMin = thisPIU.MinSecAirMassFlow;
PoweredInductionUnits::CalcParallelPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatFirstStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatFirstStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_GT(thisPIU.SecMassFlowRate, thisPIU.MinSecAirMassFlow);
EXPECT_EQ(thisPIU.DischargeAirTemp, state->dataLoopNodes->Node(thisPIU.HCoilInAirNode).Temp); // no reheat
Expand All @@ -2159,7 +2159,7 @@ TEST_F(EnergyPlusFixture, VSParallelPIUStagedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 1000.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 1000.0;
PoweredInductionUnits::CalcParallelPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatSecondStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatSecondStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_EQ(thisPIU.SecMassFlowRate, thisPIU.MaxSecAirMassFlow);
}
Expand Down Expand Up @@ -2347,7 +2347,7 @@ TEST_F(EnergyPlusFixture, VSParallelPIUModulatedHeat)
state->dataLoopNodes->Node(7).MassFlowRateMax = thisPIU.MaxSecAirMassFlow; // Fan node
state->dataLoopNodes->Node(7).MassFlowRateMin = thisPIU.MinSecAirMassFlow;
PoweredInductionUnits::CalcParallelPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatFirstStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatFirstStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_EQ(thisPIU.SecMassFlowRate, thisPIU.MinSecAirMassFlow);
EXPECT_LT(thisPIU.DischargeAirTemp, thisPIU.designHeatingDAT);
Expand All @@ -2360,7 +2360,7 @@ TEST_F(EnergyPlusFixture, VSParallelPIUModulatedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 1000.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 1000.0;
PoweredInductionUnits::CalcParallelPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatSecondStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatSecondStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_LT(thisPIU.SecMassFlowRate, thisPIU.MaxSecAirMassFlow);
EXPECT_GT(thisPIU.SecMassFlowRate, thisPIU.MinSecAirMassFlow);
Expand All @@ -2374,7 +2374,7 @@ TEST_F(EnergyPlusFixture, VSParallelPIUModulatedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 1500.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 1500.0;
PoweredInductionUnits::CalcParallelPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_EQ(thisPIU.SecMassFlowRate, thisPIU.MaxSecAirMassFlow);
EXPECT_LT(thisPIU.DischargeAirTemp, thisPIU.highLimitDAT);
Expand All @@ -2400,7 +2400,7 @@ TEST_F(EnergyPlusFixture, VSParallelPIUModulatedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 2000.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 2000.0;
PoweredInductionUnits::CalcParallelPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage);
EXPECT_NEAR(thisPIU.DischargeAirTemp, thisPIU.highLimitDAT, 0.0001);
}

Expand Down Expand Up @@ -2587,7 +2587,7 @@ TEST_F(EnergyPlusFixture, VSSeriesPIUStagedHeat)
state->dataLoopNodes->Node(7).MassFlowRateMax = thisPIU.MaxTotAirMassFlow; // Fan node
state->dataLoopNodes->Node(7).MassFlowRateMin = thisPIU.MinTotAirMassFlow;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatFirstStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatFirstStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_LT(thisPIU.SecMassFlowRate, thisPIU.MaxTotAirMassFlow - thisPIU.MinPriAirMassFlow);
EXPECT_GT(thisPIU.SecMassFlowRate, thisPIU.MinSecAirMassFlow);
Expand All @@ -2600,7 +2600,7 @@ TEST_F(EnergyPlusFixture, VSSeriesPIUStagedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 2500.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 2500.0;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatSecondStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::StagedHeatSecondStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_EQ(thisPIU.SecMassFlowRate, thisPIU.MaxTotAirMassFlow - thisPIU.MinPriAirMassFlow);
EXPECT_GT(thisPIU.DischargeAirTemp, state->dataLoopNodes->Node(thisPIU.HCoilInAirNode).Temp); // reheat
Expand Down Expand Up @@ -2791,7 +2791,7 @@ TEST_F(EnergyPlusFixture, VSSeriesPIUModulatedHeat)
state->dataLoopNodes->Node(7).MassFlowRateMax = thisPIU.MaxTotAirMassFlow; // Fan node
state->dataLoopNodes->Node(7).MassFlowRateMin = thisPIU.MinTotAirMassFlow;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatFirstStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatFirstStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_EQ(thisPIU.SecMassFlowRate, thisPIU.MinTotAirMassFlow - thisPIU.MinPriAirMassFlow);
EXPECT_LT(thisPIU.DischargeAirTemp, thisPIU.designHeatingDAT);
Expand All @@ -2804,7 +2804,7 @@ TEST_F(EnergyPlusFixture, VSSeriesPIUModulatedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 1500.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 1500.0;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatSecondStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatSecondStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_LT(thisPIU.SecMassFlowRate, thisPIU.MaxSecAirMassFlow);
EXPECT_GT(thisPIU.SecMassFlowRate, thisPIU.MinSecAirMassFlow);
Expand All @@ -2818,7 +2818,7 @@ TEST_F(EnergyPlusFixture, VSSeriesPIUModulatedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 3300.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 3300.0;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage);
EXPECT_EQ(thisPIU.PriMassFlowRate, PriMinMassFlow);
EXPECT_EQ(state->dataLoopNodes->Node(thisPIU.OutAirNode).MassFlowRate, thisPIU.MaxTotAirMassFlow);
EXPECT_LT(thisPIU.DischargeAirTemp, thisPIU.highLimitDAT);
Expand All @@ -2840,7 +2840,7 @@ TEST_F(EnergyPlusFixture, VSSeriesPIUModulatedHeat)
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = 4800.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToHeatSP = 4800.0;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage));
EXPECT_ENUM_EQ(thisPIU.heatingOperatingMode, PoweredInductionUnits::HeatOpModeType::ModulatedHeatThirdStage);
EXPECT_NEAR(thisPIU.DischargeAirTemp, thisPIU.highLimitDAT, 0.0001);
}

Expand Down Expand Up @@ -3025,14 +3025,14 @@ TEST_F(EnergyPlusFixture, VSSeriesPIUCool)
state->dataLoopNodes->Node(7).MassFlowRateMax = thisPIU.MaxTotAirMassFlow; // Fan node
state->dataLoopNodes->Node(7).MassFlowRateMin = thisPIU.MinTotAirMassFlow;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.coolingOperatingMode, PoweredInductionUnits::CoolOpModeType::CoolFirstStage));
EXPECT_ENUM_EQ(thisPIU.coolingOperatingMode, PoweredInductionUnits::CoolOpModeType::CoolFirstStage);
EXPECT_LT(state->dataLoopNodes->Node(thisPIU.OutAirNode).MassFlowRate, thisPIU.MaxTotAirMassFlow);

// second stage cooling, expects:
// - total flow rate: maximum value
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputRequired = -800.0;
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(ZoneNodeNum).RemainingOutputReqToCoolSP = -800.0;
PoweredInductionUnits::CalcSeriesPIU(*state, SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration);
EXPECT_TRUE(compare_enums(thisPIU.coolingOperatingMode, PoweredInductionUnits::CoolOpModeType::CoolSecondStage));
EXPECT_ENUM_EQ(thisPIU.coolingOperatingMode, PoweredInductionUnits::CoolOpModeType::CoolSecondStage);
EXPECT_EQ(state->dataLoopNodes->Node(thisPIU.OutAirNode).MassFlowRate, thisPIU.MaxTotAirMassFlow);
}

5 comments on commit b420467

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

variable_speed_piu (dareumnam) - x86_64-MacOS-10.18-clang-15.0.0: OK (3594 of 3604 tests passed, 3 test warnings)

Messages:\n

  • 13 tests had: AUD diffs.
  • 13 tests had: RDD diffs.
  • 10 tests had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 779
  • Failed: 10

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.

variable_speed_piu (dareumnam) - Win64-Windows-10-VisualStudio-16: OK (2814 of 2814 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.

variable_speed_piu (dareumnam) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3635 of 3645 tests passed, 3 test warnings)

Messages:\n

  • 13 tests had: AUD diffs.
  • 13 tests had: RDD diffs.
  • 10 tests had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 799
  • Failed: 10

Build Badge Test 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.

variable_speed_piu (dareumnam) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2024 of 2024 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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.

variable_speed_piu (dareumnam) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (793 of 793 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.