Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dareumnam committed Sep 15, 2023
1 parent 5682d7e commit ca16188
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/EnergyPlus/OutsideEnergySources.cc
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,8 @@ void OutsideEnergySourceSpecs::calculate(EnergyPlusData &state, bool runFlag, Re
FluidProperties::GetSatTemperatureRefrig(state, loop.FluidName, DataEnvironment::StdPressureSeaLevel, loop.FluidIndex, RoutineName);
Real64 CpCondensate = FluidProperties::GetSpecificHeatGlycol(state, loop.FluidName, this->InletTemp, loop.FluidIndex, RoutineName);
Real64 deltaTsensible = SatTempAtmPress - this->InletTemp;
Real64 EnthSteamInDry =
FluidProperties::GetSatEnthalpyRefrig(state, loop.FluidName, DataEnvironment::StdPressureSeaLevel, 1.0, loop.FluidIndex, RoutineName);
Real64 EnthSteamOutWet =
FluidProperties::GetSatEnthalpyRefrig(state, loop.FluidName, DataEnvironment::StdPressureSeaLevel, 0.0, loop.FluidIndex, RoutineName);
Real64 EnthSteamInDry = FluidProperties::GetSatEnthalpyRefrig(state, loop.FluidName, this->InletTemp, 1.0, loop.FluidIndex, RoutineName);
Real64 EnthSteamOutWet = FluidProperties::GetSatEnthalpyRefrig(state, loop.FluidName, this->InletTemp, 0.0, loop.FluidIndex, RoutineName);
Real64 LatentHeatSteam = EnthSteamInDry - EnthSteamOutWet;
this->MassFlowRate = MyLoad / (LatentHeatSteam + (CpCondensate * deltaTsensible));
PlantUtilities::SetComponentFlowRate(state, this->MassFlowRate, this->InletNodeNum, this->OutletNodeNum, this->plantLoc);
Expand Down
10 changes: 5 additions & 5 deletions tst/EnergyPlus/unit/OutsideEnergySources.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ TEST_F(EnergyPlusFixture, DistrictCoolingandHeating)
auto &thisDistrictHeatingSteam = state->dataOutsideEnergySrcs->EnergySource(3);

// Tests for GetOutsideEnergySourcesInput()
EXPECT_EQ(thisDistrictHeatingWater.EnergyType, DataPlant::PlantEquipmentType::PurchHotWater);
EXPECT_EQ(thisDistrictCooling.EnergyType, DataPlant::PlantEquipmentType::PurchChilledWater);
EXPECT_EQ(thisDistrictHeatingSteam.EnergyType, DataPlant::PlantEquipmentType::PurchSteam);
EXPECT_TRUE(compare_enums(thisDistrictHeatingWater.EnergyType, DataPlant::PlantEquipmentType::PurchHotWater));
EXPECT_TRUE(compare_enums(thisDistrictCooling.EnergyType, DataPlant::PlantEquipmentType::PurchChilledWater));
EXPECT_TRUE(compare_enums(thisDistrictHeatingSteam.EnergyType, DataPlant::PlantEquipmentType::PurchSteam));

EXPECT_EQ(thisDistrictHeatingWater.NomCap, 1000000.0);
EXPECT_EQ(thisDistrictCooling.NomCap, 900000.0);
Expand Down Expand Up @@ -210,9 +210,9 @@ TEST_F(EnergyPlusFixture, DistrictCoolingandHeating)
*state, thisSteamLoop.FluidName, thisDistrictHeatingSteam.InletTemp, thisSteamLoop.FluidIndex, RoutineName);
Real64 deltaTsensible = SatTempAtmPress - thisDistrictHeatingSteam.InletTemp;
Real64 EnthSteamInDry = FluidProperties::GetSatEnthalpyRefrig(
*state, thisSteamLoop.FluidName, DataEnvironment::StdPressureSeaLevel, 1.0, thisSteamLoop.FluidIndex, RoutineName);
*state, thisSteamLoop.FluidName, thisDistrictHeatingSteam.InletTemp, 1.0, thisSteamLoop.FluidIndex, RoutineName);
Real64 EnthSteamOutWet = FluidProperties::GetSatEnthalpyRefrig(
*state, thisSteamLoop.FluidName, DataEnvironment::StdPressureSeaLevel, 0.0, thisSteamLoop.FluidIndex, RoutineName);
*state, thisSteamLoop.FluidName, thisDistrictHeatingSteam.InletTemp, 0.0, thisSteamLoop.FluidIndex, RoutineName);
Real64 LatentHeatSteam = EnthSteamInDry - EnthSteamOutWet;
Real64 calOutletMdot = MyLoad / (LatentHeatSteam + (CpCondensate * deltaTsensible));

Expand Down
4 changes: 2 additions & 2 deletions tst/EnergyPlus/unit/PlantLoadProfile.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ TEST_F(EnergyPlusFixture, LoadProfile_GetInput)

// Tests for LoadProfile on Water loop
EXPECT_EQ(state->dataPlantLoadProfile->PlantProfile(1).Name, "LOAD PROFILE WATER");
EXPECT_EQ(state->dataPlantLoadProfile->PlantProfile(1).FluidType, PlantLoopFluidType::Water);
EXPECT_TRUE(compare_enums(state->dataPlantLoadProfile->PlantProfile(1).FluidType, PlantLoopFluidType::Water));
EXPECT_EQ(state->dataPlantLoadProfile->PlantProfile(1).PeakVolFlowRate, 0.002);

// Tests for LoadProfile on Steam loop
EXPECT_EQ(state->dataPlantLoadProfile->PlantProfile(2).Name, "LOAD PROFILE STEAM");
EXPECT_EQ(state->dataPlantLoadProfile->PlantProfile(2).FluidType, PlantLoopFluidType::Steam);
EXPECT_TRUE(compare_enums(state->dataPlantLoadProfile->PlantProfile(2).FluidType, PlantLoopFluidType::Steam));
EXPECT_EQ(state->dataPlantLoadProfile->PlantProfile(2).PeakVolFlowRate, 0.008);
EXPECT_EQ(state->dataPlantLoadProfile->PlantProfile(2).DegOfSubcooling,
5.0); // check if the default value is assigned in cases where there is no input
Expand Down

5 comments on commit ca16188

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

SteamPart1Followup (dareumnam) - Win64-Windows-10-VisualStudio-16: OK (2735 of 2735 tests passed, 0 test warnings)

Build Badge Test Badge

@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.

SteamPart1Followup (dareumnam) - x86_64-MacOS-10.17-clang-14.0.0: OK (3520 of 3520 tests passed, 0 test warnings)

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.

SteamPart1Followup (dareumnam) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3561 of 3561 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: Table small diffs.

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.

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

Failures:\n

API Test Summary

  • Passed: 5
  • Failed: 1
  • Subprocess aborted: 9

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.

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

Failures:\n

integration Test Summary

  • Passed: 758
  • Failed: 30

Build Badge Test Badge Coverage Badge

Please sign in to comment.