Skip to content

Commit

Permalink
Unrelated, but place the fluid coolers on the SUPPLY side of the plan…
Browse files Browse the repository at this point in the history
…t loop

This makes no difference in test results, but it was bothering me that they were on the demand side as it's not logical
  • Loading branch information
jmarrec committed Dec 13, 2024
1 parent 61c4c5d commit 93c4e0b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 48 deletions.
68 changes: 34 additions & 34 deletions tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ TEST_F(EnergyPlusFixture, EvapFluidCoolerSpecs_getDesignCapacitiesTest)
thisEFC.WaterOutletNodeNum = 2;
thisEFC.OutdoorAirInletNodeNum = 0;
thisEFC.plantLoc.loopNum = 1;
thisEFC.plantLoc.loopSideNum = DataPlant::LoopSideLocation::Demand;
thisEFC.plantLoc.loopSideNum = DataPlant::LoopSideLocation::Supply;
thisEFC.plantLoc.branchNum = 1;
thisEFC.plantLoc.compNum = 1;
PlantLocation pl;
Expand All @@ -110,12 +110,12 @@ TEST_F(EnergyPlusFixture, EvapFluidCoolerSpecs_getDesignCapacitiesTest)
state->dataLoopNodes->Node(1).MassFlowRateMax = 0.05;
state->dataLoopNodes->Node(1).MassFlowRateMaxAvail = 0.05;
state->dataPlnt->PlantLoop.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).FlowLock = DataPlant::FlowLock::Locked;
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).MyLoad = 1.0;
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).ON = false;
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).CurOpSchemeType = DataPlant::OpScheme::Invalid;
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Supply).FlowLock = DataPlant::FlowLock::Locked;
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Supply).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Supply).Branch(1).Comp.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).MyLoad = 1.0;
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).ON = false;
state->dataPlnt->PlantLoop(1).LoopSide(DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).CurOpSchemeType = DataPlant::OpScheme::Invalid;
thisEFC.DesignWaterFlowRateWasAutoSized = false;
thisEFC.LowSpeedAirFlowRateWasAutoSized = false;
thisEFC.HighSpeedEvapFluidCoolerUAWasAutoSized = false;
Expand All @@ -140,7 +140,7 @@ TEST_F(EnergyPlusFixture, EvapFluidCoolerSpecs_getDesignCapacitiesTest)
ExpectedMinLoad = 0.0;

// Call the routine to be tested and see if the fix is correct
PlantLocation loc = PlantLocation(1, DataPlant::LoopSideLocation::Demand, 1, 1);
PlantLocation loc = PlantLocation(1, DataPlant::LoopSideLocation::Supply, 1, 1);
thisEFC.onInitLoopEquip(*state, loc);
thisEFC.getDesignCapacities(*state, pl, MaxLoad, MinLoad, OptLoad);
EXPECT_NEAR(MaxLoad, ExpectedMaxLoad, 0.01);
Expand Down Expand Up @@ -173,10 +173,10 @@ TEST_F(EnergyPlusFixture, ExerciseSingleSpeedEvapFluidCooler)
EvapFluidCoolerSpecs *ptr =
EvapFluidCoolerSpecs::factory(*state, DataPlant::PlantEquipmentType::EvapFluidCooler_SingleSpd, "BIG EVAPORATIVEFLUIDCOOLER");

PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Demand, 1, 1};
PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Supply, 1, 1};
state->dataPlnt->PlantLoop.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp.allocate(1);

Real64 max, opt, min = 0.0;
ptr->getDesignCapacities(*state, pl, max, min, opt);
Expand All @@ -185,17 +185,17 @@ TEST_F(EnergyPlusFixture, ExerciseSingleSpeedEvapFluidCooler)
EXPECT_NEAR(opt, 1000.0, 1.0);

state->dataPlnt->TotNumLoops = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).TotalBranches = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).TotalComponents = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).TotalBranches = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).TotalComponents = 1;
state->dataPlnt->PlantLoop(1).LoopDemandCalcScheme = DataPlant::LoopDemandCalcScheme::SingleSetPoint;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = ptr->WaterInletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumOut = ptr->WaterOutletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type =
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).NodeNumIn = ptr->WaterInletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).NodeNumOut = ptr->WaterOutletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).Type =
DataPlant::PlantEquipmentType::EvapFluidCooler_SingleSpd;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = ptr->Name;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).Name = ptr->Name;
state->dataPlnt->PlantLoop(1).MaxVolFlowRate = 3;
state->dataPlnt->PlantLoop(1).MaxMassFlowRate = 3;
state->dataSize->CurLoopNum = 1;
Expand All @@ -209,7 +209,7 @@ TEST_F(EnergyPlusFixture, ExerciseSingleSpeedEvapFluidCooler)
bool firstHVAC = true;
Real64 curLoad = 0.0;
ptr->plantLoc.loopNum = 1;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Demand;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Supply;
ptr->plantLoc.branchNum = 1;
ptr->plantLoc.compNum = 1;
ptr->DesWaterMassFlowRate = 3.141;
Expand Down Expand Up @@ -257,10 +257,10 @@ TEST_F(EnergyPlusFixture, ExerciseTwoSpeedEvapFluidCooler)

EvapFluidCoolerSpecs *ptr = EvapFluidCoolerSpecs::factory(*state, DataPlant::PlantEquipmentType::EvapFluidCooler_TwoSpd, "CENTRAL TOWER");

PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Demand, 1, 1};
PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Supply, 1, 1};
state->dataPlnt->PlantLoop.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp.allocate(1);

Real64 max, opt, min = 0.0;
ptr->getDesignCapacities(*state, pl, max, min, opt);
Expand All @@ -269,17 +269,17 @@ TEST_F(EnergyPlusFixture, ExerciseTwoSpeedEvapFluidCooler)
EXPECT_NEAR(opt, 1000.0, 1.0);

state->dataPlnt->TotNumLoops = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).TotalBranches = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).TotalComponents = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).TotalBranches = 1;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).TotalComponents = 1;
state->dataPlnt->PlantLoop(1).LoopDemandCalcScheme = DataPlant::LoopDemandCalcScheme::SingleSetPoint;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumIn = ptr->WaterInletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).NodeNumOut = ptr->WaterOutletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Type =
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).NodeNumIn = ptr->WaterInletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).NodeNumOut = ptr->WaterOutletNodeNum;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).Type =
DataPlant::PlantEquipmentType::EvapFluidCooler_TwoSpd;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).Name = ptr->Name;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).Name = ptr->Name;
state->dataPlnt->PlantLoop(1).MaxVolFlowRate = 3;
state->dataPlnt->PlantLoop(1).MaxMassFlowRate = 3;
state->dataSize->CurLoopNum = 1;
Expand All @@ -297,7 +297,7 @@ TEST_F(EnergyPlusFixture, ExerciseTwoSpeedEvapFluidCooler)
bool firstHVAC = true;
Real64 curLoad = 0.0;
ptr->plantLoc.loopNum = 1;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Demand;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Supply;
ptr->plantLoc.branchNum = 1;
ptr->plantLoc.compNum = 1;
ptr->DesWaterMassFlowRate = 3.141;
Expand Down
28 changes: 14 additions & 14 deletions tst/EnergyPlus/unit/FluidCoolers.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ TEST_F(EnergyPlusFixture, ExerciseSingleSpeedFluidCooler)

FluidCoolerspecs *ptr = FluidCoolerspecs::factory(*state, DataPlant::PlantEquipmentType::FluidCooler_SingleSpd, "DRY COOLER");

PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Demand, 1, 1};
PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Supply, 1, 1};
state->dataPlnt->PlantLoop.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp.allocate(1);

Real64 max, opt, min = 0.0;
ptr->getDesignCapacities(*state, pl, max, min, opt);
Expand All @@ -401,9 +401,9 @@ TEST_F(EnergyPlusFixture, ExerciseSingleSpeedFluidCooler)
EXPECT_NEAR(opt, 58601.0, 1.0);

state->dataPlnt->PlantLoop(1).LoopDemandCalcScheme = DataPlant::LoopDemandCalcScheme::SingleSetPoint;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).MaxVolFlowRate = 3;
state->dataPlnt->PlantLoop(1).MaxMassFlowRate = 3;

Expand All @@ -422,7 +422,7 @@ TEST_F(EnergyPlusFixture, ExerciseSingleSpeedFluidCooler)
bool firstHVAC = true;
Real64 curLoad = 0.0;
ptr->plantLoc.loopNum = 1;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Demand;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Supply;
ptr->plantLoc.branchNum = 1;
ptr->plantLoc.compNum = 1;
ptr->DesWaterMassFlowRate = 3.141;
Expand Down Expand Up @@ -460,10 +460,10 @@ TEST_F(EnergyPlusFixture, ExerciseTwoSpeedFluidCooler)

FluidCoolerspecs *ptr = FluidCoolerspecs::factory(*state, DataPlant::PlantEquipmentType::FluidCooler_TwoSpd, "BIG FLUIDCOOLER");

PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Demand, 1, 1};
PlantLocation pl{1, EnergyPlus::DataPlant::LoopSideLocation::Supply, 1, 1};
state->dataPlnt->PlantLoop.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch.allocate(1);
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp.allocate(1);

Real64 max, opt, min = 0.0;
ptr->getDesignCapacities(*state, pl, max, min, opt);
Expand All @@ -472,9 +472,9 @@ TEST_F(EnergyPlusFixture, ExerciseTwoSpeedFluidCooler)
EXPECT_NEAR(opt, 58601.0, 1.0);

state->dataPlnt->PlantLoop(1).LoopDemandCalcScheme = DataPlant::LoopDemandCalcScheme::SingleSetPoint;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Demand).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).TempSetPoint = 2.0;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).MyLoad = 1000;
state->dataPlnt->PlantLoop(1).LoopSide(EnergyPlus::DataPlant::LoopSideLocation::Supply).Branch(1).Comp(1).ON = true;
state->dataPlnt->PlantLoop(1).MaxVolFlowRate = 3;
state->dataPlnt->PlantLoop(1).MaxMassFlowRate = 3;

Expand All @@ -493,7 +493,7 @@ TEST_F(EnergyPlusFixture, ExerciseTwoSpeedFluidCooler)
bool firstHVAC = true;
Real64 curLoad = 0.0;
ptr->plantLoc.loopNum = 1;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Demand;
ptr->plantLoc.loopSideNum = EnergyPlus::DataPlant::LoopSideLocation::Supply;
ptr->plantLoc.branchNum = 1;
ptr->plantLoc.compNum = 1;
ptr->DesWaterMassFlowRate = 3.141;
Expand Down

0 comments on commit 93c4e0b

Please sign in to comment.