From 9646be1bd6cd4f153460851b9fa74194b9a9733d Mon Sep 17 00:00:00 2001 From: Brent Griffith Date: Thu, 3 Oct 2024 09:48:43 -0600 Subject: [PATCH] Fix DOAS system sizing and add reporting --- src/EnergyPlus/AirLoopHVACDOAS.cc | 45 ++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index b382733e760..b4ee4f7edf1 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -50,6 +50,7 @@ // EnergyPlus Headers #include +#include #include #include #include @@ -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); 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; @@ -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)