LCOV - code coverage report
Current view: top level - EnergyPlus/Autosizing - CoolingAirFlowSizing.cc (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 36.1 % 291 105
Test Date: 2025-06-02 07:23:51 Functions: 50.0 % 2 1

            Line data    Source code
       1              : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
       2              : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
       3              : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
       4              : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
       5              : // contributors. All rights reserved.
       6              : //
       7              : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
       8              : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
       9              : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
      10              : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
      11              : // derivative works, and perform publicly and display publicly, and to permit others to do so.
      12              : //
      13              : // Redistribution and use in source and binary forms, with or without modification, are permitted
      14              : // provided that the following conditions are met:
      15              : //
      16              : // (1) Redistributions of source code must retain the above copyright notice, this list of
      17              : //     conditions and the following disclaimer.
      18              : //
      19              : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
      20              : //     conditions and the following disclaimer in the documentation and/or other materials
      21              : //     provided with the distribution.
      22              : //
      23              : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
      24              : //     the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
      25              : //     used to endorse or promote products derived from this software without specific prior
      26              : //     written permission.
      27              : //
      28              : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
      29              : //     without changes from the version obtained under this License, or (ii) Licensee makes a
      30              : //     reference solely to the software portion of its product, Licensee must refer to the
      31              : //     software as "EnergyPlus version X" software, where "X" is the version number Licensee
      32              : //     obtained under this License and may not use a different name for the software. Except as
      33              : //     specifically required in this Section (4), Licensee shall not use in a company name, a
      34              : //     product name, in advertising, publicity, or other promotional activities any name, trade
      35              : //     name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
      36              : //     similar designation, without the U.S. Department of Energy's prior written consent.
      37              : //
      38              : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
      39              : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
      40              : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
      41              : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      42              : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      43              : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      44              : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
      45              : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      46              : // POSSIBILITY OF SUCH DAMAGE.
      47              : 
      48              : #include <EnergyPlus/Autosizing/CoolingAirFlowSizing.hh>
      49              : #include <EnergyPlus/Data/EnergyPlusData.hh>
      50              : #include <EnergyPlus/DataEnvironment.hh>
      51              : #include <EnergyPlus/DataHVACGlobals.hh>
      52              : #include <EnergyPlus/General.hh>
      53              : #include <EnergyPlus/OutputReportPredefined.hh>
      54              : #include <EnergyPlus/UtilityRoutines.hh>
      55              : #include <EnergyPlus/WeatherManager.hh>
      56              : 
      57              : namespace EnergyPlus {
      58              : 
      59         3806 : Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bool &errorsFound)
      60              : {
      61         3806 :     if (!this->checkInitialized(state, errorsFound)) {
      62            0 :         return 0.0;
      63              :     }
      64         3806 :     this->preSize(state, _originalValue);
      65         3806 :     bool coolingFlow = false;
      66         3806 :     bool heatingFlow = false;
      67              : 
      68         3806 :     if (this->dataEMSOverrideON) {
      69            0 :         this->autoSizedValue = this->dataEMSOverride;
      70         3806 :     } else if (this->dataConstantUsedForSizing > 0 && this->dataFractionUsedForSizing > 0) {
      71           41 :         this->autoSizedValue = this->dataConstantUsedForSizing * this->dataFractionUsedForSizing;
      72              :     } else {
      73         3765 :         if (this->curZoneEqNum > 0) {
      74         1312 :             if (!this->wasAutoSized && !this->sizingDesRunThisZone) {
      75            2 :                 this->autoSizedValue = _originalValue;
      76            2 :                 if (Util::SameString(this->compType, "Coil:Cooling:DX:TwoStageWithHumidityControlMode")) {
      77            0 :                     this->autoSizedValue /= (1.0 - this->dataBypassFrac); // back out bypass fraction applied in GetInput
      78            0 :                     this->originalValue /= (1.0 - this->dataBypassFrac);  // back out bypass fraction applied in GetInput
      79              :                 }
      80         1310 :             } else if (this->zoneEqSizing(this->curZoneEqNum).DesignSizeFromParent) {
      81          162 :                 this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).AirVolFlow;
      82              :             } else {
      83         1148 :                 switch (this->zoneEqSizing(this->curZoneEqNum).SizingMethod(HVAC::CoolingAirflowSizing)) {
      84            5 :                 case DataSizing::SupplyAirFlowRate:
      85              :                 case DataSizing::None:
      86              :                 case DataSizing::FlowPerFloorArea: {
      87            5 :                     if (this->zoneEqSizing(this->curZoneEqNum).SystemAirFlow) {
      88            1 :                         this->autoSizedValue = max(this->zoneEqSizing(this->curZoneEqNum).AirVolFlow,
      89            1 :                                                    this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
      90            1 :                                                    this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
      91            1 :                         coolingFlow = true;
      92              :                     } else {
      93            4 :                         if (state.dataSize->ZoneCoolingOnlyFan) {
      94            0 :                             this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
      95            0 :                             coolingFlow = true;
      96            4 :                         } else if (state.dataSize->ZoneHeatingOnlyFan) {
      97            0 :                             this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
      98            0 :                             heatingFlow = true;
      99            4 :                         } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
     100            0 :                             this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
     101            0 :                             coolingFlow = true;
     102            4 :                         } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     103            0 :                             this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow;
     104            0 :                             heatingFlow = true;
     105            4 :                         } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     106            1 :                             this->autoSizedValue = max(this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
     107            1 :                                                        this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
     108            1 :                             if (this->autoSizedValue == this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow) {
     109            1 :                                 coolingFlow = true;
     110            0 :                             } else if (this->autoSizedValue == this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) {
     111            0 :                                 heatingFlow = true;
     112              :                             }
     113              :                         } else {
     114            3 :                             this->autoSizedValue = max(this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow,
     115            3 :                                                        this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
     116            3 :                             if (this->autoSizedValue == this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow) {
     117            3 :                                 coolingFlow = true;
     118            0 :                             } else if (this->autoSizedValue == this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) {
     119            0 :                                 heatingFlow = true;
     120              :                             }
     121              :                         }
     122              :                     }
     123            5 :                 } break;
     124            1 :                 case DataSizing::FractionOfAutosizedCoolingAirflow: {
     125            1 :                     if (state.dataSize->ZoneCoolingOnlyFan) {
     126            0 :                         this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
     127            0 :                         coolingFlow = true;
     128            1 :                     } else if (state.dataSize->ZoneHeatingOnlyFan) {
     129            0 :                         this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
     130            0 :                         heatingFlow = true;
     131            1 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
     132            0 :                         this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
     133            0 :                         coolingFlow = true;
     134            1 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     135            0 :                         this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow;
     136            0 :                         heatingFlow = true;
     137            1 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     138            0 :                         this->autoSizedValue =
     139            0 :                             max(this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
     140            0 :                                 this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
     141            0 :                         if (this->autoSizedValue ==
     142            0 :                             this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow) {
     143            0 :                             coolingFlow = true;
     144            0 :                         } else if (this->autoSizedValue ==
     145            0 :                                    this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) {
     146            0 :                             heatingFlow = true;
     147              :                         }
     148              :                     } else {
     149            1 :                         this->autoSizedValue =
     150            1 :                             max(this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow,
     151            1 :                                 this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
     152            2 :                         if (this->autoSizedValue ==
     153            1 :                             this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow) {
     154            1 :                             coolingFlow = true;
     155            0 :                         } else if (this->autoSizedValue ==
     156            0 :                                    this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) {
     157            0 :                             heatingFlow = true;
     158              :                         }
     159              :                     }
     160            1 :                 } break;
     161            0 :                 case DataSizing::FractionOfAutosizedHeatingAirflow: {
     162            0 :                     if (state.dataSize->ZoneCoolingOnlyFan) {
     163            0 :                         this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
     164            0 :                         coolingFlow = true;
     165            0 :                     } else if (state.dataSize->ZoneHeatingOnlyFan) {
     166            0 :                         this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
     167            0 :                         heatingFlow = true;
     168            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
     169            0 :                         this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
     170            0 :                         coolingFlow = true;
     171            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     172            0 :                         this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow;
     173            0 :                         heatingFlow = true;
     174            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     175            0 :                         this->autoSizedValue =
     176            0 :                             max(this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
     177            0 :                                 this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
     178            0 :                         if (this->autoSizedValue ==
     179            0 :                             this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow) {
     180            0 :                             coolingFlow = true;
     181            0 :                         } else if (this->autoSizedValue ==
     182            0 :                                    this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) {
     183            0 :                             heatingFlow = true;
     184              :                         }
     185              :                     } else {
     186            0 :                         this->autoSizedValue =
     187            0 :                             max(this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow,
     188            0 :                                 this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
     189            0 :                         if (this->autoSizedValue ==
     190            0 :                             this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow) {
     191            0 :                             coolingFlow = true;
     192            0 :                         } else if (this->autoSizedValue ==
     193            0 :                                    this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) {
     194            0 :                             heatingFlow = true;
     195              :                         }
     196              :                     }
     197            0 :                 } break;
     198            0 :                 case DataSizing::FlowPerCoolingCapacity: {
     199            0 :                     if (state.dataSize->ZoneCoolingOnlyFan) {
     200            0 :                         this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
     201            0 :                         coolingFlow = true;
     202            0 :                     } else if (state.dataSize->ZoneHeatingOnlyFan) {
     203            0 :                         this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
     204            0 :                         heatingFlow = true;
     205            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
     206            0 :                         this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
     207            0 :                         coolingFlow = true;
     208            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     209            0 :                         this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
     210            0 :                         heatingFlow = true;
     211            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     212            0 :                         this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
     213            0 :                                                    this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
     214            0 :                         if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
     215            0 :                             coolingFlow = true;
     216            0 :                         } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
     217            0 :                             heatingFlow = true;
     218              :                         }
     219              :                     } else {
     220            0 :                         this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
     221            0 :                                                    this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
     222            0 :                         if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
     223            0 :                             coolingFlow = true;
     224            0 :                         } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
     225            0 :                             heatingFlow = true;
     226              :                         }
     227              :                     }
     228            0 :                 } break;
     229            0 :                 case DataSizing::FlowPerHeatingCapacity: {
     230            0 :                     if (state.dataSize->ZoneCoolingOnlyFan) {
     231            0 :                         this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
     232            0 :                         coolingFlow = true;
     233            0 :                     } else if (state.dataSize->ZoneHeatingOnlyFan) {
     234            0 :                         this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
     235            0 :                         heatingFlow = true;
     236            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
     237            0 :                         this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
     238            0 :                         coolingFlow = true;
     239            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     240            0 :                         this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
     241            0 :                         heatingFlow = true;
     242            0 :                     } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     243            0 :                         this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
     244            0 :                                                    this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
     245            0 :                         if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
     246            0 :                             coolingFlow = true;
     247            0 :                         } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
     248            0 :                             heatingFlow = true;
     249              :                         }
     250              :                     } else {
     251            0 :                         this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
     252            0 :                                                    this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
     253            0 :                         if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
     254            0 :                             coolingFlow = true;
     255            0 :                         } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
     256            0 :                             heatingFlow = true;
     257              :                         }
     258              :                     }
     259            0 :                 } break;
     260         1142 :                 default: {
     261         1142 :                     if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
     262          568 :                         this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
     263          574 :                     } else if (state.dataSize->ZoneCoolingOnlyFan) {
     264           79 :                         this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
     265          495 :                     } else if (this->termUnitIU && (this->curTermUnitSizingNum > 0)) {
     266            8 :                         this->autoSizedValue = this->termUnitSizing(this->curTermUnitSizingNum).AirVolFlow;
     267          487 :                     } else if (this->zoneEqFanCoil) {
     268            0 :                         this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).AirVolFlow;
     269          487 :                     } else if (this->zoneHeatingOnlyFan) {
     270            0 :                         this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
     271              :                     } else {
     272          487 :                         this->autoSizedValue =
     273          487 :                             max(this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow, this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
     274              :                     }
     275         1142 :                 } break;
     276              :                 }
     277              :             }
     278         2453 :         } else if (this->curSysNum > 0) {
     279         2453 :             if (!this->wasAutoSized && !this->sizingDesRunThisAirSys) {
     280          255 :                 this->autoSizedValue = _originalValue;
     281          262 :                 if (Util::SameString(this->compType, "Coil:Cooling:DX:TwoStageWithHumidityControlMode")) {
     282            7 :                     this->autoSizedValue /= (1.0 - this->dataBypassFrac); // back out bypass fraction applied in GetInput
     283            7 :                     this->originalValue /= (1.0 - this->dataBypassFrac);  // back out bypass fraction applied in GetInput
     284              :                 }
     285              :             } else {
     286         2198 :                 if (this->curOASysNum > 0) {
     287           66 :                     if (this->oaSysEqSizing(this->curOASysNum).AirFlow) {
     288              :                         // Parent object sets flow rate
     289            0 :                         this->autoSizedValue = this->oaSysEqSizing(this->curOASysNum).AirVolFlow;
     290           66 :                     } else if (this->oaSysEqSizing(this->curOASysNum).CoolingAirFlow) {
     291              :                         // Parent object sets flow rate
     292            4 :                         this->autoSizedValue = this->oaSysEqSizing(this->curOASysNum).CoolingAirVolFlow;
     293           62 :                     } else if (outsideAirSys(this->curOASysNum).AirLoopDOASNum > -1) {
     294            2 :                         this->autoSizedValue =
     295            2 :                             this->airloopDOAS[outsideAirSys(this->curOASysNum).AirLoopDOASNum].SizingMassFlow / state.dataEnvrn->StdRhoAir;
     296              :                     } else {
     297           60 :                         this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesOutAirVolFlow;
     298              :                     }
     299         2132 :                 } else if (this->dataAirFlowUsedForSizing > 0.0) {
     300          355 :                     this->autoSizedValue = this->dataAirFlowUsedForSizing;
     301              :                 } else {
     302         1777 :                     if (this->unitarySysEqSizing(this->curSysNum).AirFlow) {
     303          116 :                         this->autoSizedValue = this->unitarySysEqSizing(this->curSysNum).AirVolFlow;
     304         1661 :                     } else if (this->unitarySysEqSizing(this->curSysNum).CoolingAirFlow) {
     305          792 :                         this->autoSizedValue = this->unitarySysEqSizing(this->curSysNum).CoolingAirVolFlow;
     306              :                     } else {
     307          869 :                         if (this->curDuctType == HVAC::AirDuctType::Main) {
     308          768 :                             this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow;
     309          101 :                         } else if (this->curDuctType == HVAC::AirDuctType::Cooling) {
     310          100 :                             this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesCoolVolFlow;
     311            1 :                         } else if (this->curDuctType == HVAC::AirDuctType::Heating) {
     312            1 :                             this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesHeatVolFlow;
     313            0 :                         } else if (this->curDuctType == HVAC::AirDuctType::Other) {
     314            0 :                             this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow;
     315              :                         } else {
     316            0 :                             this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow;
     317              :                         }
     318              :                     }
     319              :                 }
     320              :             }
     321            0 :         } else if (this->dataNonZoneNonAirloopValue > 0) {
     322            0 :             this->autoSizedValue = this->dataNonZoneNonAirloopValue;
     323            0 :         } else if (!this->wasAutoSized) {
     324            0 :             this->autoSizedValue = this->originalValue;
     325              :         } else {
     326            0 :             std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete.";
     327            0 :             ShowSevereError(state, msg);
     328            0 :             this->addErrorMessage(msg);
     329            0 :             msg = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue);
     330            0 :             ShowContinueError(state, msg);
     331            0 :             this->addErrorMessage(msg);
     332            0 :             errorsFound = true;
     333            0 :         }
     334              : 
     335              :         // override sizing string
     336         3765 :         if (this->overrideSizeString) {
     337         1291 :             if (Util::SameString(this->compType, "ZoneHVAC:FourPipeFanCoil")) {
     338            0 :                 this->sizingString = "Maximum Supply Air Flow Rate [m3/s]";
     339            0 :                 if (this->isEpJSON) {
     340            0 :                     this->sizingString = "maximum_supply_air_flow_rate [m3/s]";
     341              :                 }
     342         1291 :             } else if (this->coilType_Num == HVAC::CoilDX_CoolingTwoSpeed) {
     343            0 :                 if (this->dataDXSpeedNum == 1) { // mode 1 is high speed in DXCoils loop
     344            0 :                     if (this->isEpJSON) {
     345            0 :                         this->sizingString = "high_speed_rated_air_flow_rate [m3/s]";
     346              :                     } else {
     347            0 :                         this->sizingString = "High Speed Rated Air Flow Rate [m3/s]";
     348              :                     }
     349            0 :                 } else if (this->dataDXSpeedNum == 2) {
     350            0 :                     if (this->isEpJSON) {
     351            0 :                         this->sizingString = "low_speed_rated_air_flow_rate [m3/s]";
     352              :                     } else {
     353            0 :                         this->sizingString = "Low Speed Rated Air Flow Rate [m3/s]";
     354              :                     }
     355              :                 }
     356         1291 :             } else if (this->isEpJSON) {
     357            3 :                 this->sizingString = "cooling_supply_air_flow_rate [m3/s]";
     358              :             }
     359              :         }
     360         3765 :         if (this->dataScalableSizingON) {
     361            6 :             if (this->zoneAirFlowSizMethod == DataSizing::SupplyAirFlowRate || this->zoneAirFlowSizMethod == DataSizing::None) {
     362            0 :                 this->sizingStringScalable = "(scaled by flow / zone) ";
     363            6 :             } else if (this->zoneAirFlowSizMethod == DataSizing::FlowPerFloorArea) {
     364            3 :                 this->sizingStringScalable = "(scaled by flow / area) ";
     365            3 :             } else if (this->zoneAirFlowSizMethod == DataSizing::FractionOfAutosizedCoolingAirflow ||
     366            0 :                        this->zoneAirFlowSizMethod == DataSizing::FractionOfAutosizedHeatingAirflow) {
     367            3 :                 this->sizingStringScalable = "(scaled by fractional multiplier) ";
     368            0 :             } else if (this->zoneAirFlowSizMethod == DataSizing::FlowPerCoolingCapacity ||
     369            0 :                        this->zoneAirFlowSizMethod == DataSizing::FlowPerHeatingCapacity) {
     370            0 :                 this->sizingStringScalable = "(scaled by flow / capacity) ";
     371              :             }
     372              :         }
     373              :     }
     374         3806 :     if (this->dataDXCoolsLowSpeedsAutozize) {
     375           67 :         this->autoSizedValue *= this->dataFractionUsedForSizing;
     376              :     }
     377         3806 :     this->select2StgDXHumCtrlSizerOutput(state, errorsFound);
     378              : 
     379         3806 :     if (this->isCoilReportObject) {
     380              :         // SizingResult is airflow in m3/s
     381         2101 :         state.dataRptCoilSelection->coilSelectionReportObj->setCoilAirFlow(
     382         2101 :             state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized);
     383              :     }
     384         3806 :     if (this->isFanReportObject) {
     385              :         //  fill fan peak day and time here
     386            0 :         std::string DDNameFanPeak;
     387            0 :         std::string dateTimeFanPeak;
     388            0 :         if (this->dataScalableSizingON) {
     389            0 :             DDNameFanPeak = "Scaled size, not from any peak";
     390            0 :             dateTimeFanPeak = "Scaled size, not from any peak";
     391              :         } else {
     392            0 :             if (coolingFlow) {
     393            0 :                 if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 &&
     394            0 :                     this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) {
     395            0 :                     DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title;
     396            0 :                     dateTimeFanPeak = format("{}/{} {}",
     397            0 :                                              state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month,
     398            0 :                                              state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth,
     399            0 :                                              state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(
     400            0 :                                                  state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax));
     401              :                 }
     402            0 :             } else if (heatingFlow) {
     403            0 :                 if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 &&
     404            0 :                     this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) {
     405            0 :                     DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title;
     406            0 :                     dateTimeFanPeak = format("{}/{} {}",
     407            0 :                                              state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month,
     408            0 :                                              state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth,
     409            0 :                                              state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(
     410            0 :                                                  state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax));
     411              :                 }
     412              :             }
     413              :         }
     414              : 
     415            0 :         OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchFanDesDay, this->compName, DDNameFanPeak);
     416            0 :         OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchFanPkTime, this->compName, dateTimeFanPeak);
     417            0 :     }
     418         3806 :     return this->autoSizedValue;
     419              : }
     420              : 
     421            0 : void CoolingAirFlowSizer::clearState()
     422              : {
     423            0 :     BaseSizerWithScalableInputs::clearState();
     424            0 : }
     425              : 
     426              : } // namespace EnergyPlus
        

Generated by: LCOV version 2.0-1