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

Fix DOAS system sizing and add reporting #10783

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 32 additions & 13 deletions src/EnergyPlus/AirLoopHVACDOAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

// EnergyPlus Headers
#include <EnergyPlus/AirLoopHVACDOAS.hh>
#include <EnergyPlus/Autosizing/Base.hh>
#include <EnergyPlus/BranchNodeConnections.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/DataAirLoop.hh>
Expand Down Expand Up @@ -980,32 +981,35 @@ namespace AirLoopHVACDOAS {

void AirLoopDOAS::SizingAirLoopDOAS(EnergyPlusData &state)
{
Real64 sizingMassFlow = 0;
Real64 sizingVolumeFlow = 0;

for (int AirLoop = 1; AirLoop <= this->NumOfAirLoops; AirLoop++) {
int AirLoopNum = this->m_AirLoopNum[AirLoop - 1];
this->m_OACtrlNum.push_back(state.dataAirLoop->AirLoopControlInfo(AirLoopNum).OACtrlNum);

if (this->m_OACtrlNum[AirLoop - 1] > 0) {
sizingMassFlow += state.dataMixedAir->OAController(this->m_OACtrlNum[AirLoop - 1]).MaxOA;
sizingVolumeFlow +=
state.dataMixedAir->OAController(this->m_OACtrlNum[AirLoop - 1]).MaxOA; // this is a volume flow rate not a mass flow rate
}
}
this->SizingMassFlow = sizingMassFlow;
this->SizingMassFlow = sizingVolumeFlow * state.dataEnvrn->StdRhoAir;

BaseSizer::reportSizerOutput(state, "AirLoopHVAC:DedicatedOutdoorAirSystem", this->Name, "Design Volume Flow Rate [m3/s]", sizingVolumeFlow);
Copy link
Contributor

Choose a reason for hiding this comment

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

Most (all?) other equipment reports sizing as "Design Size Air Flow Rate [m3/s]" or "Design Size Maximum Air Flow Rate". This should probably use similar language. @rraustad ?

Copy link
Contributor

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

Usually it's "Design Size" or User-Specified" pre-pended on the front end of the field names which are not uniform. But this object doesn't have a field for air flow so it's a sum of this field. I have no preference for this object since it's not autosized or hard-sized but I guess it could match what the air loop reports since that's what gets summed.

AirLoopHVAC,
   N1, \field Design Supply Air Flow Rate

The air loop doesn't follow this naming convention either.

Component Sizing Information, AirLoopHVAC, VAV SYS 1, Design Supply Air Flow Rate [m3/s], 1.08612

Unitary System looks like this:

Component Sizing Information, AirLoopHVAC:UnitarySystem, DX COOLING COIL, Design Size Cooling Supply Air Flow Rate [m3/s], 1.34859
Component Sizing Information, AirLoopHVAC:UnitarySystem, HEATPUMP DX COIL 1, Design Size Heating Supply Air Flow Rate [m3/s], 1.34859

TUs:

Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE1-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.20149

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it's this field that gets summed:

Controller:OutdoorAir,
  N2 , \field Maximum Outdoor Air Flow Rate

Component Sizing Information, Controller:OutdoorAir, OA CONTROLLER 1, Maximum Outdoor Air Flow Rate [m3/s], 1.08612
Component Sizing Information, Controller:OutdoorAir, OA CONTROLLER 1, Minimum Outdoor Air Flow Rate [m3/s], 0.26412

this->GetDesignDayConditions(state);

if (this->m_FanIndex > 0 && this->m_FanTypeNum == SimAirServingZones::CompType::Fan_System_Object) {
state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate = sizingMassFlow / state.dataEnvrn->StdRhoAir;
state.dataLoopNodes->Node(this->m_FanInletNodeNum).MassFlowRateMaxAvail = sizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMaxAvail = sizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMax = sizingMassFlow;
if (this->m_FanIndex > -1 && this->m_FanTypeNum == SimAirServingZones::CompType::Fan_System_Object) {
state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate = sizingVolumeFlow;
state.dataLoopNodes->Node(this->m_FanInletNodeNum).MassFlowRateMaxAvail = this->SizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMaxAvail = this->SizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMax = this->SizingMassFlow;
}
if (this->m_FanIndex > 0 && this->m_FanTypeNum == SimAirServingZones::CompType::Fan_ComponentModel) {
state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate = sizingMassFlow / state.dataEnvrn->StdRhoAir;
state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate = sizingVolumeFlow;
state.dataFans->fans(this->m_FanIndex)->minAirFlowRate = 0.0;
state.dataFans->fans(this->m_FanIndex)->maxAirMassFlowRate = sizingMassFlow;
state.dataLoopNodes->Node(this->m_FanInletNodeNum).MassFlowRateMaxAvail = sizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMaxAvail = sizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMax = sizingMassFlow;
state.dataFans->fans(this->m_FanIndex)->maxAirMassFlowRate = this->SizingMassFlow;
state.dataLoopNodes->Node(this->m_FanInletNodeNum).MassFlowRateMaxAvail = this->SizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMaxAvail = this->SizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMax = this->SizingMassFlow;
}

state.dataSize->CurSysNum = state.dataHVACGlobal->NumPrimaryAirSys + this->m_AirLoopDOASNum + 1;
Expand Down Expand Up @@ -1044,6 +1048,21 @@ namespace AirLoopHVACDOAS {
}
}
}

BaseSizer::reportSizerOutput(
state, "AirLoopHVAC:DedicatedOutdoorAirSystem", this->Name, "Design Cooling Outdoor Air Temperature [C]", this->SizingCoolOATemp);
BaseSizer::reportSizerOutput(state,
"AirLoopHVAC:DedicatedOutdoorAirSystem",
this->Name,
"Design Cooling Outdoor Air Humidity Ratio [kgWater/kgDryAir]",
this->SizingCoolOAHumRat);
BaseSizer::reportSizerOutput(
state, "AirLoopHVAC:DedicatedOutdoorAirSystem", this->Name, "Design Heating Outdoor Air Temperature [C]", this->HeatOutTemp);
BaseSizer::reportSizerOutput(state,
"AirLoopHVAC:DedicatedOutdoorAirSystem",
this->Name,
"Design Heating Outdoor Air Humidity Ratio [kgWater/kgDryAir]",
this->HeatOutHumRat);
}

void CheckConvergence(EnergyPlusData &state)
Expand Down
4 changes: 2 additions & 2 deletions tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10069,9 +10069,9 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOAS_TestFanHeatAddeToCoolingCoilSize)
SimulationManager::ManageSimulation(*state); // run the design day over the warmup period (24 hrs, 25 days)

// OA flow rate
EXPECT_NEAR(state->dataUnitarySystems->unitarySys[0].m_MaxCoolAirVolFlow, 0.55713, 0.001);
EXPECT_NEAR(state->dataUnitarySystems->unitarySys[0].m_MaxCoolAirVolFlow, 0.65598, 0.001);
// Cooling capacity
EXPECT_NEAR(state->dataUnitarySystems->unitarySys[0].m_DesignCoolingCapacity, 21135.6226, 0.01);
EXPECT_NEAR(state->dataUnitarySystems->unitarySys[0].m_DesignCoolingCapacity, 24885.6323, 0.01);
}

TEST_F(EnergyPlusFixture, AirLoopHVACDOAS_TestOACompConnectionError)
Expand Down
Loading