LCOV - code coverage report
Current view: top level - EnergyPlus - DataSizing.hh (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 96.4 % 56 54
Test Date: 2025-05-22 16:09:37 Functions: 92.9 % 14 13

            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              : #ifndef DataSizing_hh_INCLUDED
      49              : #define DataSizing_hh_INCLUDED
      50              : 
      51              : // ObjexxFCL Headers
      52              : #include <ObjexxFCL/Array1D.hh>
      53              : #include <ObjexxFCL/Array2D.hh>
      54              : 
      55              : // EnergyPlus Headers
      56              : #include <EnergyPlus/Data/BaseData.hh>
      57              : #include <EnergyPlus/DataGlobals.hh>
      58              : #include <EnergyPlus/DataHVACGlobals.hh>
      59              : #include <EnergyPlus/DataStringGlobals.hh>
      60              : #include <EnergyPlus/EPVector.hh>
      61              : #include <EnergyPlus/EnergyPlus.hh>
      62              : #include <EnergyPlus/ScheduleManager.hh>
      63              : 
      64              : namespace EnergyPlus {
      65              : 
      66              : // Forward declarations
      67              : struct EnergyPlusData;
      68              : 
      69              : namespace DataSizing {
      70              : 
      71              :     enum class OAFlowCalcMethod
      72              :     // parameters for outside air flow method
      73              :     {
      74              :         Invalid = -1,
      75              :         PerPerson,    // set the outdoor air flow rate based on number of people in the zone
      76              :         PerZone,      // sum the outdoor air flow rate per zone based on user input
      77              :         PerArea,      // sum the outdoor air flow rate based on zone area
      78              :         ACH,          // sum the outdoor air flow rate based on number of air changes for the zone
      79              :         Sum,          // sum the outdoor air flow rate of the people component and the space floor area component
      80              :         Max,          // use the maximum of the outdoor air flow rate of the people component and the space floor area component
      81              :         IAQProcedure, // Use ASHRAE Standard 62.1-2007 IAQP to calculate the zone level outdoor air flow rates
      82              :         PCOccSch,     // ProportionalControlBasedOnOccupancySchedule, Use ASHRAE Standard 62.1-2004 or Trane Engineer's newsletter (volume 34-5) to
      83              :                       // calculate the zone level outdoor air flow rates based on scheduled occupancy
      84              :         PCDesOcc,     // ProportionalControlBasedOnDesignOccupancy, Use ASHRAE Standard 62.1-2004 or Trane Engineer's newsletter (volume 34-5) to
      85              :                       // calculate the zone level outdoor air flow rates based on design occupancy
      86              :         Num
      87              :     };
      88              : 
      89              :     constexpr std::array<std::string_view, static_cast<int>(OAFlowCalcMethod::Num)> OAFlowCalcMethodNames{
      90              :         "Flow/Person",
      91              :         "Flow/Zone",
      92              :         "Flow/Area",
      93              :         "AirChanges/Hour",
      94              :         "Sum",
      95              :         "Maximum",
      96              :         "IndoorAirQualityProcedure",
      97              :         "ProportionalControlBasedOnOccupancySchedule",
      98              :         "ProportionalControlBasedOnDesignOccupancy"};
      99              : 
     100              :     // parameters for outside air
     101              :     enum class OAControl
     102              :     {
     103              :         Invalid = -1,
     104              :         AllOA,
     105              :         MinOA,
     106              :         Num
     107              :     };
     108              : 
     109              :     // parameters for loop fluid type
     110              :     enum class TypeOfPlantLoop
     111              :     {
     112              :         Invalid = -1,
     113              :         Heating,
     114              :         Cooling,
     115              :         Condenser,
     116              :         Steam,
     117              :         Num
     118              :     };
     119              : 
     120              :     // parameters for sizing (keep this for now to avoid plant sizing output changes)
     121              :     constexpr int NonCoincident(1);
     122              :     constexpr int Coincident(2);
     123              : 
     124              :     // parameters for zone and system sizing concurrence method
     125              :     enum class SizingConcurrence
     126              :     {
     127              :         Invalid = -1,
     128              :         NonCoincident,
     129              :         Coincident,
     130              :         Num
     131              :     };
     132              : 
     133              :     constexpr std::array<std::string_view, static_cast<int>(SizingConcurrence::Num)> SizingConcurrenceNamesUC{"NONCOINCIDENT", "COINCIDENT"};
     134              : 
     135              :     // parameters for coil sizing concurrence method
     136              :     enum class CoilSizingConcurrence
     137              :     {
     138              :         Invalid = -1,
     139              :         NonCoincident,
     140              :         Coincident,
     141              :         Combination,
     142              :         NA,
     143              :         Num
     144              :     };
     145              : 
     146              :     constexpr std::array<std::string_view, static_cast<int>(CoilSizingConcurrence::Num)> CoilSizingConcurrenceNames{
     147              :         "Non-Coincident", "Coincident", "Combination", "N/A"};
     148              : 
     149              :     // parameters for Cooling Peak Load Type
     150              :     enum class PeakLoad
     151              :     {
     152              :         Invalid = -1,
     153              :         SensibleCooling,
     154              :         TotalCooling,
     155              :         Num
     156              :     };
     157              : 
     158              :     // parameters for Central Cooling Capacity Control Method
     159              :     enum class CapacityControl
     160              :     {
     161              :         Invalid = -1,
     162              :         VAV,
     163              :         Bypass,
     164              :         VT,
     165              :         OnOff,
     166              :         Num
     167              :     };
     168              : 
     169              :     // parameters for supply air flow rate method
     170              :     constexpr int SupplyAirTemperature(1);
     171              :     constexpr int TemperatureDifference(2);
     172              :     constexpr int SupplyAirHumidityRatio(3);
     173              :     constexpr int HumidityRatioDifference(4);
     174              : 
     175              :     // parameters for sizing
     176              :     enum class AirflowSizingMethod
     177              :     {
     178              :         Invalid = -1,
     179              :         FromDDCalc,
     180              :         InpDesAirFlow,
     181              :         DesAirFlowWithLim,
     182              :         Num
     183              :     };
     184              : 
     185              :     enum class DOASControl
     186              :     {
     187              :         Invalid = -1,
     188              :         NeutralSup,
     189              :         NeutralDehumSup,
     190              :         CoolSup,
     191              :         Num
     192              :     };
     193              : 
     194              :     // parameters for Type of Load to Size On
     195              :     enum class LoadSizing
     196              :     {
     197              :         Invalid = -1,
     198              :         Sensible,
     199              :         Latent,
     200              :         Total,
     201              :         Ventilation,
     202              :         Num
     203              :     };
     204              : 
     205              :     // parameter for autosize
     206              :     constexpr Real64 AutoSize(-99999.0);
     207              : 
     208              :     // parameter for (time-of-peak) sizing format
     209              :     static constexpr std::string_view PeakHrMinFmt("{:02}:{:02}:00");
     210              : 
     211              :     enum class SysOAMethod
     212              :     {
     213              :         Invalid = -1,
     214              :         ZoneSum, // Sum the outdoor air flow rates of all zones
     215              :         VRP,     // Use ASHRAE Standard 62.1-2007 to calculate the system level outdoor air flow rates
     216              :         IAQP,    // Use ASHRAE Standard 62.1-2007 IAQP to calculate the system level outdoor air flow rates based on the CO2 setpoint
     217              :         ProportionalControlSchOcc, // Use ASHRAE Standard 62.1-2004 or Trane Engineer's newsletter (volume 34-5) to calculate the system level outdoor
     218              :                                    // air flow rates based on scheduled occupancy
     219              :         IAQPGC,  // Use ASHRAE Standard 62.1-2004 IAQP to calculate the system level outdoor air flow rates based on the generic contaminant setpoint
     220              :         IAQPCOM, // Take the maximum outdoor air rate from both CO2 and generic contaminant controls based on the generic contaminant setpoint
     221              :         ProportionalControlDesOcc, // Use ASHRAE Standard 62.1-2004 or Trane Engineer's newsletter (volume 34-5) to calculate the system level outdoor
     222              :                                    // air flow rates based on design occupancy
     223              :         ProportionalControlDesOARate, // Calculate the system level outdoor air flow rates based on design OA rate
     224              :         SP,   // Use the ASHRAE Standard 62.1 Simplified Procedure to calculate the system level outdoor air flow rates considering the zone air
     225              :               // distribution effectiveness and the system ventilation efficiency
     226              :         VRPL, // Use ASHRAE Standard 62.1-2007 to calculate the system level outdoor air flow rates
     227              :         Num
     228              :     };
     229              : 
     230              :     constexpr std::array<std::string_view, static_cast<int>(SysOAMethod::Num)> SysOAMethodNames{"Zone Sum",
     231              :                                                                                                 "Ventilation Rate Procedure",
     232              :                                                                                                 "IAQ Proc",
     233              :                                                                                                 "Proportional - Sch Occupancy",
     234              :                                                                                                 "IAQ Proc - Generic Contaminant",
     235              :                                                                                                 "IAQ Proc - Max Gen Cont or CO2.",
     236              :                                                                                                 "Proportional - Des Occupancy",
     237              :                                                                                                 "Proportional - Des OA Rate",
     238              :                                                                                                 "Simplified Procure",
     239              :                                                                                                 "Ventilation Rate Procedure Level"};
     240              : 
     241              :     // Zone HVAC Equipment Sizing Option
     242              :     enum class DesignSizingType
     243              :     {
     244              :         Invalid = -1,
     245              :         Dummy1BasedOffset,
     246              :         None, // until all models use this enum this numeric must match with constexpr int None(1) below
     247              :         SupplyAirFlowRate,
     248              :         FlowPerFloorArea,
     249              :         FractionOfAutosizedCoolingAirflow,
     250              :         FractionOfAutosizedHeatingAirflow,
     251              :         FlowPerCoolingCapacity,
     252              :         FlowPerHeatingCapacity,
     253              :         CoolingDesignCapacity,
     254              :         HeatingDesignCapacity,
     255              :         CapacityPerFloorArea,
     256              :         FractionOfAutosizedCoolingCapacity,
     257              :         FractionOfAutosizedHeatingCapacity,
     258              :         Num
     259              : 
     260              :     };
     261              :     constexpr std::array<std::string_view, static_cast<int>(DesignSizingType::Num)> DesignSizingTypeNamesUC{"DUMMY1BASEDOFFSET",
     262              :                                                                                                             "NONE",
     263              :                                                                                                             "SUPPLYAIRFLOWRATE",
     264              :                                                                                                             "FLOWPERFLOORAREA",
     265              :                                                                                                             "FRACTIONOFAUTOSIZEDCOOLINGAIRFLOW",
     266              :                                                                                                             "FRACTIONOFAUTOSIZEDHEATINGAIRFLOW",
     267              :                                                                                                             "FLOWPERCOOLINGCAPACITY",
     268              :                                                                                                             "FLOWPERHEATINGCAPACITY",
     269              :                                                                                                             "COOLINGDESIGNCAPACITY",
     270              :                                                                                                             "HEATINGDESIGNCAPACITY",
     271              :                                                                                                             "CAPACITYPERFLOORAREA",
     272              :                                                                                                             "FRACTIONOFAUTOSIZEDCOOLINGCAPACITY",
     273              :                                                                                                             "FRACTIONOFAUTOSIZEDHEATINGCAPACITY"};
     274              : 
     275              :     constexpr int None(1);
     276              :     constexpr int SupplyAirFlowRate(2);
     277              :     constexpr int FlowPerFloorArea(3);
     278              :     constexpr int FractionOfAutosizedCoolingAirflow(4);
     279              :     constexpr int FractionOfAutosizedHeatingAirflow(5);
     280              :     constexpr int FlowPerCoolingCapacity(6);
     281              :     constexpr int FlowPerHeatingCapacity(7);
     282              : 
     283              :     constexpr int CoolingDesignCapacity(8);
     284              :     constexpr int HeatingDesignCapacity(9);
     285              :     constexpr int CapacityPerFloorArea(10);
     286              :     constexpr int FractionOfAutosizedCoolingCapacity(11);
     287              :     constexpr int FractionOfAutosizedHeatingCapacity(12);
     288              : 
     289              :     constexpr int NoSizingFactorMode(101);
     290              :     constexpr int GlobalHeatingSizingFactorMode(102);
     291              :     constexpr int GlobalCoolingSizingFactorMode(103);
     292              :     constexpr int LoopComponentSizingFactorMode(104);
     293              : 
     294              :     enum class ZoneSizing
     295              :     {
     296              :         Invalid = -1,
     297              :         Sensible,
     298              :         Latent,
     299              :         SensibleAndLatent,
     300              :         SensibleOnly,
     301              :         Num
     302              :     };
     303              :     constexpr std::array<std::string_view, static_cast<int>(ZoneSizing::Num)> ZoneSizingMethodNamesUC{
     304              :         "SENSIBLE LOAD", "LATENT LOAD", "SENSIBLE AND LATENT LOAD", "SENSIBLE LOAD ONLY NO LATENT LOAD"};
     305              : 
     306              :     // Types
     307              : 
     308              :     struct ZoneSizingInputData
     309              :     {
     310              :         // Members
     311              :         std::string ZoneName;      // name of a zone
     312              :         int ZoneNum = 0;           // index of the zone
     313              :         int ZnCoolDgnSAMethod = 0; // choice of how to get zone cooling design air temperature;
     314              :         //  1 = specify supply air temperature, 2 = calculate from the temperature difference
     315              :         int ZnHeatDgnSAMethod = 0; // choice of how to get zone heating design air temperature;
     316              :         //  1 = specify supply air temperature, 2 = calculate from the temperature difference
     317              :         Real64 CoolDesTemp = 0.0;        // zone design cooling supply air temperature [C]
     318              :         Real64 HeatDesTemp = 0.0;        // zone design heating supply air temperature [C]
     319              :         Real64 CoolDesTempDiff = 0.0;    // zone design cooling supply air temperature difference [deltaC]
     320              :         Real64 HeatDesTempDiff = 0.0;    // zone design heating supply air temperature difference [deltaC]
     321              :         Real64 CoolDesHumRat = 0.0;      // zone design cooling supply air humidity ratio [kgWater/kgDryAir]
     322              :         Real64 HeatDesHumRat = 0.0;      // zone design heating supply air humidity ratio [kgWater/kgDryAir]
     323              :         std::string DesignSpecOAObjName; // name of the DesignSpecification:OutdoorAir or DesignSpecification:OutdoorAir:SpaceList object
     324              :         AirflowSizingMethod CoolAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get zone cooling design air flow rates;
     325              :         //  0 = calc from des day simulation; 1 = m3/s per zone, user input' 2 = apply limits to air flow rate from DD calc
     326              :         Real64 DesCoolAirFlow = 0.0;           // design zone supply air flow rate [m3/s]
     327              :         Real64 DesCoolMinAirFlowPerArea = 0.0; // design cooling minimum air flow rate per zone area [m3/s / m2]
     328              :         Real64 DesCoolMinAirFlow = 0.0;        // design cooling minimum air flow rate [m3/s]
     329              :         Real64 DesCoolMinAirFlowFrac = 0.0;    // design cooling minimum air flow rate fraction
     330              :         //  (of the cooling design air flow rate)
     331              :         AirflowSizingMethod HeatAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get zone heating design air flow rates;
     332              :         //  0 = calc from des day simulation; 1 = m3/s per zone, user input; 2 = apply limits to air flow rate from DD calc
     333              :         Real64 DesHeatAirFlow = 0.0;           // design zone heating supply air flow rate [m3/s]
     334              :         Real64 DesHeatMaxAirFlowPerArea = 0.0; // design heating maximum air flow rate per zone area [m3/s / m2]
     335              :         Real64 DesHeatMaxAirFlow = 0.0;        // design heating maximum air flow rate [m3/s]
     336              :         Real64 DesHeatMaxAirFlowFrac = 0.0;    // design heating maximum air flow rate fraction (of the cooling design air flow rate)
     337              :         Real64 HeatSizingFactor = 0.0;         // the zone heating sizing ratio
     338              :         Real64 CoolSizingFactor = 0.0;         // the zone cooling sizing ratio
     339              :         Real64 ZoneADEffCooling = 0.0;
     340              :         Real64 ZoneADEffHeating = 0.0;
     341              :         std::string ZoneAirDistEffObjName;       // name of the zone air distribution effectiveness object name
     342              :         int ZoneAirDistributionIndex = 0;        // index to the zone air distribution object
     343              :         int ZoneDesignSpecOAIndex = 0;           // index to the zone design spec OA object
     344              :         Real64 ZoneSecondaryRecirculation = 0.0; // the zone secondary air recirculation fraction
     345              :         Real64 ZoneVentilationEff = 0.0;         // zone ventilation efficiency
     346              :         bool AccountForDOAS = false;             // False: do nothing; True: calculate the effect of a DOA system on the zone sizing arrays
     347              :         DOASControl DOASControlStrategy = DOASControl::Invalid; // 0=neutral ventilation air; 1=neutral dehumidified ventilation air, 2 = cooled air;
     348              :         Real64 DOASLowSetpoint = 0.0;                           // Dedicated Outside Air Low Setpoint for Design [C]
     349              :         Real64 DOASHighSetpoint = 0.0;                          // Dedicated Outside Air High Setpoint for Design [C]
     350              :         DataSizing::SizingConcurrence spaceConcurrence = DataSizing::SizingConcurrence::Coincident; // coincident or noncoincident space loads
     351              : 
     352              :         // zone latent sizing inputs
     353              :         bool zoneLatentSizing = false;
     354              :         Real64 zoneRHDehumidifySetPoint = 50.0;
     355              :         Real64 zoneRHHumidifySetPoint = 50.0;
     356              :         Real64 LatentCoolDesHumRat = 0.0;                  // zone design dehumidification supply air humidity ratio [kgw/kga]
     357              :         Real64 CoolDesHumRatDiff = 0.005;                  // zone design cooling supply air humidity ratio difference [deltakgw/kga]
     358              :         Real64 LatentHeatDesHumRat = 0.0;                  // zone design humidification supply air humidity ratio [kgw/kga]
     359              :         Real64 HeatDesHumRatDiff = 0.005;                  // zone design heating supply air humidity ratio temperature difference [deltakgw/kga]
     360              :         int ZnLatCoolDgnSAMethod = 0;                      // choice of how to get zone latent cooling design air humidity ratio;
     361              :         int ZnLatHeatDgnSAMethod = 0;                      // choice of how to get zone latent heating design air humidity ratio;
     362              :         Sched::Schedule *zoneRHDehumidifySched = nullptr;  // zone RH dehumidifying schedule used for zone sizing
     363              :         Sched::Schedule *zoneRHHumidifySched = nullptr;    // zone RH humidifying schedule used for zone sizing
     364              :         ZoneSizing zoneSizingMethod = ZoneSizing::Invalid; // load to sizing on: sensible, latent, sensibleandlatent, sensibleonlynolatent
     365              :     };
     366              : 
     367              :     // based on ZoneSizingData but only member variables that are actually used by terminal unit sizing
     368              :     struct TermUnitZoneSizingCommonData
     369              :     {
     370              :         std::string ZoneName;           // name of a zone
     371              :         std::string ADUName;            // Terminal Unit Name (air distribution unit or direct air unit) - only assigned for TermUnitFinalZoneSizing
     372              :         Real64 CoolDesTemp = 0.0;       // zone design cooling supply air temperature [C]
     373              :         Real64 HeatDesTemp = 0.0;       // zone design heating supply air temperature [C]
     374              :         Real64 CoolDesHumRat = 0.0;     // zone design cooling supply air humidity ratio [kgWater/kgDryAir]
     375              :         Real64 HeatDesHumRat = 0.0;     // zone design heating supply air humidity ratio [kgWater/kgDryAir]
     376              :         Real64 DesOAFlowPPer = 0.0;     // design outside air flow per person in zone [m3/s] (average for zone across spaces)
     377              :         Real64 DesOAFlowPerArea = 0.0;  // design outside air flow per zone area [m3/s / m2] (average for zone across spaces)
     378              :         Real64 DesCoolMinAirFlow = 0.0; // design cooling minimum air flow rate [m3/s]
     379              :         Real64 DesCoolMinAirFlowFrac = 0.0; // design cooling minimum air flow rate fraction (of the cooling design air flow rate)
     380              :         Real64 DesHeatMaxAirFlow = 0.0;     // design heating maximum air flow rate [m3/s]
     381              :         Real64 DesHeatMaxAirFlowFrac = 0.0; // design heating maximum air flow rate fraction (of the cooling design air flow rate)
     382              :         int ZoneNum = 0;                    // index into the Zone data array (in DataHeatBalance)
     383              :         Real64 DesHeatMassFlow = 0.0;       // zone design heating air mass flow rate [kg/s]
     384              :         Real64 DesHeatMassFlowNoOA = 0.0;   // zone design heating air mass flow rate without applying MinOA as a limit [kg/s]
     385              :         Real64 DesHeatOAFlowFrac = 0.0;     // zone design heating OA air volume fraction [-]
     386              :         Real64 DesCoolMassFlow = 0.0;       // zone design cooling air mass flow rate [kg/s]
     387              :         Real64 DesCoolMassFlowNoOA = 0.0;   // zone design cooling air mass flow rate without applying MinOA as a limit [kg/s]
     388              :         Real64 DesCoolOAFlowFrac = 0.0;     // zone design cooling OA air volume fraction [-]
     389              :         Real64 DesHeatLoad = 0.0;           // zone design heating load including sizing factor and scaled to match airflow sizing [W]
     390              :         Real64 NonAirSysDesHeatLoad = 0.0;  // base zone design heating load including sizing factor [W]
     391              :         Real64 DesCoolLoad = 0.0;           // zone design cooling load including sizing factor and scaled to match airflow sizing [W]
     392              :         Real64 NonAirSysDesCoolLoad = 0.0;  // base zone design cooling load including sizing factor [W]
     393              :         Real64 DesHeatVolFlow = 0.0;     // zone design heating air volume flow rate including sizing factor and scaled to match airflow sizing [m3/s]
     394              :         Real64 DesHeatVolFlowNoOA = 0.0; // zone design heating air volume flow rate including sizing factor and scaled to match airflow sizing
     395              :                                          // without MinOA limit [m3/s]
     396              :         Real64 NonAirSysDesHeatVolFlow = 0.0;    // base zone design heating air volume flow rate including sizing factor [m3/s]
     397              :         Real64 DesCoolVolFlow = 0.0;             // zone design cooling air volume flow rate [m3/s]
     398              :         Real64 DesCoolVolFlowNoOA = 0.0;         // zone design cooling air volume flow rate without applying MinOA as a limit [m3/s]
     399              :         Real64 NonAirSysDesCoolVolFlow = 0.0;    // base zone design cooling air volume flow rate including sizing factor [m3/s]
     400              :         Real64 DesHeatVolFlowMax = 0.0;          // zone design heating maximum air volume flow rate [m3/s]
     401              :         Real64 DesCoolVolFlowMin = 0.0;          // zone design cooling minimum air volume flow rate [m3/s]
     402              :         Real64 DesHeatCoilInTempTU = 0.0;        // zone heating coil design air inlet temperature (supply air)([C]
     403              :         Real64 DesCoolCoilInTempTU = 0.0;        // zone cooling coil design air inlet temperature (supply air)[C]
     404              :         Real64 DesHeatCoilInHumRatTU = 0.0;      // zone heating coil design air inlet humidity ratio  [kg/kg]
     405              :         Real64 DesCoolCoilInHumRatTU = 0.0;      // zone cooling coil design air inlet humidity ratio  [kg/kg]
     406              :         Real64 ZoneTempAtHeatPeak = 0.0;         // zone temp at max heating [C]
     407              :         Real64 ZoneRetTempAtHeatPeak = 0.0;      // zone return temp at max heating [C]
     408              :         Real64 ZoneTempAtCoolPeak = 0.0;         // zone temp at max cooling [C]
     409              :         Real64 ZoneRetTempAtCoolPeak = 0.0;      // zone return temp at max cooling [C]
     410              :         Real64 ZoneHumRatAtHeatPeak = 0.0;       // zone humidity ratio at max heating [kg/kg]
     411              :         Real64 ZoneHumRatAtCoolPeak = 0.0;       // zone humidity ratio at max cooling [kg/kg]
     412              :         int TimeStepNumAtHeatMax = 0;            // time step number (in day) at Heating peak
     413              :         int TimeStepNumAtCoolMax = 0;            // time step number (in day) at cooling peak
     414              :         int HeatDDNum = 0;                       // design day index of design day causing heating peak
     415              :         int CoolDDNum = 0;                       // design day index of design day causing cooling peak
     416              :         Real64 MinOA = 0.0;                      // design minimum outside air in m3/s
     417              :         Real64 DesCoolMinAirFlow2 = 0.0;         // design cooling minimum air flow rate [m3/s] derived from DesCoolMinAirFlowPerArea
     418              :         Real64 DesHeatMaxAirFlow2 = 0.0;         // design heating maximum air flow rate [m3/s] derived from DesHeatMaxAirFlowPerArea
     419              :         Array1D<Real64> HeatFlowSeq;             // daily sequence of zone heating air mass flow rate (zone time step) [kg/s]
     420              :         Array1D<Real64> HeatFlowSeqNoOA;         // daily sequence of zone heating air mass flow rate (zone time step) without MinOA limit [kg/s]
     421              :         Array1D<Real64> CoolFlowSeq;             // daily sequence of zone cooling air mass flow rate (zone time step) [kg/s]
     422              :         Array1D<Real64> CoolFlowSeqNoOA;         // daily sequence of zone cooling air mass flow rate (zone time step) without MinOA limit [kg/s]
     423              :         EPVector<Real64> HeatZoneTempSeq;        // daily sequence of zone temperatures (heating, zone time step)
     424              :         Array1D<Real64> HeatZoneRetTempSeq;      // daily sequence of zone return temperatures (heating, zone time step)
     425              :         EPVector<Real64> CoolZoneTempSeq;        // daily sequence of zone temperatures (cooling, zone time step)
     426              :         Array1D<Real64> CoolZoneRetTempSeq;      // daily sequence of zone return temperatures (cooling, zone time step)
     427              :         Real64 ZoneADEffCooling = 1.0;           // the zone air distribution effectiveness in cooling mode
     428              :         Real64 ZoneADEffHeating = 1.0;           // the zone air distribution effectiveness in heating mode
     429              :         Real64 ZoneSecondaryRecirculation = 0.0; // the zone secondary air recirculation fraction
     430              :         Real64 ZoneVentilationEff = 0.0;         // zone ventilation efficiency
     431              :         Real64 ZonePrimaryAirFraction = 0.0;     // the zone primary air fraction for cooling based calculations
     432              :         Real64 ZonePrimaryAirFractionHtg = 0.0;  // the zone primary air fraction for heating based calculations
     433              :         Real64 ZoneOAFracCooling = 0.0;          // OA fraction in cooling mode
     434              :         Real64 ZoneOAFracHeating = 0.0;          // OA fraction in heating mode
     435              :         Real64 TotalOAFromPeople = 0.0;          // Zone OA required due to people
     436              :         Real64 TotalOAFromArea = 0.0;            // Zone OA required based on floor area
     437              :         Real64 TotPeopleInZone = 0.0;            // total number of people in the zone
     438              :         Real64 TotalZoneFloorArea = 0.0;         // total zone floor area
     439              :         Real64 SupplyAirAdjustFactor = 1.0;      // supply air adjustment factor for next time step if OA is capped
     440              :         Real64 ZpzClgByZone = 0.0;               // OA Std 62.1 required fraction in cooling mode ? should this be ZdzClgByZone
     441              :         Real64 ZpzHtgByZone = 0.0;               // OA Std 62.1 required fraction in heating mode ? should this be ZdzHtgByZone
     442              :         Real64 VozClgByZone = 0.0; // value of required cooling vent to zone, used in 62.1 tabular report, already includes people diversity term
     443              :         Real64 VozHtgByZone = 0.0; // value of required heating vent to zone, used in 62.1 tabular report, already includes people diversity term
     444              :         bool VpzMinByZoneSPSized = false;    // is Vpz_min sized using the 62.1 Standard Simplified Procedure
     445              :         Real64 ZoneSizThermSetPtHi = 0.0;    // highest zone thermostat setpoint during zone sizing calcs
     446              :         Real64 ZoneSizThermSetPtLo = 1000.0; // lowest zone thermostat setpoint during zone sizing calcs
     447              :     };
     448              : 
     449              :     struct ZoneSizingData : TermUnitZoneSizingCommonData
     450              :     {
     451              :         // Members
     452              :         std::string CoolDesDay;    // name of a cooling design day
     453              :         std::string HeatDesDay;    // name of a heating design day
     454              :         int ZnCoolDgnSAMethod = 0; // choice of how to get zone cooling design air temperature;
     455              :         //  1 = specify supply air temperature, 2 = calculate from the temperature difference
     456              :         int ZnHeatDgnSAMethod = 0; // choice of how to get zone heating design air temperature;
     457              :         //  1 = specify supply air temperature, 2 = calculate from the temperature difference
     458              :         Real64 CoolDesTempDiff = 0.0;                                        // zone design cooling supply air temperature difference [deltaC]
     459              :         Real64 HeatDesTempDiff = 0.0;                                        // zone design heating supply air temperature difference [deltaC]
     460              :         int ZoneAirDistributionIndex = 0;                                    // index to DesignSpecification:ZoneAirDistribution object
     461              :         int ZoneDesignSpecOAIndex = 0;                                       // index to DesignSpecification:OutdoorAir object
     462              :         AirflowSizingMethod CoolAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get zone cooling design air flow rates;
     463              :         //  0 = calc from des day simulation; 1 = m3/s per zone, user input; 2 = apply limits to air flow rate from DD calc
     464              :         Real64 InpDesCoolAirFlow = 0.0;                                      // design zone supply air flow rate [m3/s]
     465              :         Real64 DesCoolMinAirFlowPerArea = 0.0;                               // design cooling minimum air flow rate per zone area [m3/s / m2]
     466              :         AirflowSizingMethod HeatAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get zone heating design air flow rates;
     467              :         //  1 = calc from des day simulation; 2 = m3/s per zone, user input
     468              :         //  3 = apply limits to air flow rate from DD calc
     469              :         Real64 InpDesHeatAirFlow = 0.0;        // design zone heating supply air flow rate [m3/s]
     470              :         Real64 DesHeatMaxAirFlowPerArea = 0.0; // design heating maximum air flow rate per zone area [m3/s / m2]
     471              :         Real64 HeatSizingFactor = 0.0;         // the zone heating sizing ratio
     472              :         Real64 CoolSizingFactor = 0.0;         // the zone cooling sizing ratio
     473              :         bool AccountForDOAS = false;           // False: do nothing; True: calculate the effect of a DOA system on the zone sizing arrays
     474              :         DOASControl DOASControlStrategy = DOASControl::Invalid; // 0=neutral ventilation air; 1=neutral dehumidified ventilation air, 2 = cooled air;
     475              :         // 3=supply cold ventilation air
     476              :         Real64 DOASLowSetpoint = 0.0;  // Dedicated Outside Air Low Setpoint for Design [C]
     477              :         Real64 DOASHighSetpoint = 0.0; // Dedicated Outside Air High Setpoint for Design [C]
     478              :         DataSizing::SizingConcurrence spaceConcurrence = DataSizing::SizingConcurrence::Coincident; // coincident or noncoincident space loads
     479              :         bool EMSOverrideDesHeatMassOn = false;                                                      // true if EMS is acting on this structure
     480              :         Real64 EMSValueDesHeatMassFlow = 0.0;  // Value EMS directing to use for Design Heating air mass flow [kg/s]
     481              :         bool EMSOverrideDesCoolMassOn = false; // true if EMS is acting on this structure
     482              :         Real64 EMSValueDesCoolMassFlow = 0.0;  // Value EMS directing to use for Design Cooling air mass flow [kg/s]
     483              :         bool EMSOverrideDesHeatLoadOn = false; // true if EMS is acting on this structure
     484              :         Real64 EMSValueDesHeatLoad = 0.0;      // Value EMS directing to use for zone design heating load  [W]
     485              :         bool EMSOverrideDesCoolLoadOn = false; // true if EMS is acting on this structure
     486              :         Real64 EMSValueDesCoolLoad = 0.0;      // Value EMS directing to use for zone design cooling load  [W]
     487              :         Real64 DesHeatDens = 0.0;              // zone design heating air density [kg/m3]
     488              :         Real64 DesCoolDens = 0.0;              // zone design cooling air density [kg/m3]
     489              :         bool EMSOverrideDesHeatVolOn = false;  // true if EMS is acting on this structure
     490              :         Real64 EMSValueDesHeatVolFlow = 0.0;   // Value EMS directing to use for Design Heating air volume flow [m3/s]
     491              :         bool EMSOverrideDesCoolVolOn = false;  // true if EMS is acting on this structure
     492              :         Real64 EMSValueDesCoolVolFlow = 0.0;   // Value EMS directing to use for Design cooling air volume flow [m3/s]
     493              :         Real64 DesHeatCoilInTemp = 0.0;        // zone heating coil design air inlet temperature [C]
     494              :         Real64 DesCoolCoilInTemp = 0.0;        // zone cooling coil design air inlet temperature [C]
     495              :         Real64 DesHeatCoilInHumRat = 0.0;      // zone heating coil design air inlet humidity ratio [kg/kg]
     496              :         Real64 DesCoolCoilInHumRat = 0.0;      // zone cooling coil design air inlet humidity ratio [kg/kg]
     497              :         Real64 HeatMassFlow = 0.0;             // current zone heating air mass flow rate (HVAC time step)
     498              :         Real64 CoolMassFlow = 0.0;             // current zone cooling air mass flow rate (HVAC time step)
     499              :         Real64 HeatLoad = 0.0;                 // current zone heating load (HVAC time step)
     500              :         Real64 CoolLoad = 0.0;                 // current zone heating load (HVAC time step)
     501              :         Real64 HeatZoneTemp = 0.0;             // current zone temperature (heating, time step)
     502              :         Real64 HeatOutTemp = 0.0;              // current outdoor temperature (heating, time step)
     503              :         Real64 HeatZoneRetTemp = 0.0;          // current zone return temperature (heating, time step)
     504              :         Real64 HeatTstatTemp = 0.0;            // current zone thermostat temperature (heating, time step)
     505              :         Real64 CoolZoneTemp = 0.0;             // current zone temperature (cooling, time step)
     506              :         Real64 CoolOutTemp = 0.0;              // current Outdoor temperature (cooling, time step)
     507              :         Real64 CoolZoneRetTemp = 0.0;          // current zone return temperature (cooling, time step)
     508              :         Real64 CoolTstatTemp = 0.0;            // current zone thermostat temperature (cooling, time step)
     509              :         Real64 HeatZoneHumRat = 0.0;           // current zone humidity ratio (heating, time step)
     510              :         Real64 CoolZoneHumRat = 0.0;           // current zone humidity ratio (cooling, time step)
     511              :         Real64 HeatOutHumRat = 0.0;            // current outdoor humidity ratio (heating, time step)
     512              :         Real64 CoolOutHumRat = 0.0;            // current outdoor humidity ratio (cooling, time step)
     513              :         Real64 OutTempAtHeatPeak = 0.0;        // outdoor temperature at max heating [C]
     514              :         Real64 OutTempAtCoolPeak = 0.0;        // outdoor temperature at max cooling [C]
     515              :         Real64 OutHumRatAtHeatPeak = 0.0;      // outdoor humidity at max heating [kg/kg]
     516              :         Real64 OutHumRatAtCoolPeak = 0.0;      // outdoor humidity at max cooling [kg/kg]
     517              :         std::string cHeatDDDate;               // date of design day causing heating peak
     518              :         std::string cCoolDDDate;               // date of design day causing cooling peak
     519              :         Array1D<Real64> HeatLoadSeq;           // daily sequence of zone heating load (zone time step)
     520              :         Array1D<Real64> CoolLoadSeq;           // daily sequence of zone cooling load (zone time step)
     521              :         Array1D<Real64> HeatOutTempSeq;        // daily sequence of outdoor temperatures (heating, zone time step)
     522              :         Array1D<Real64> HeatTstatTempSeq;      // daily sequence of zone thermostat temperatures (heating, zone time step)
     523              :         Array1D<Real64> DesHeatSetPtSeq;       // daily sequence of indoor set point temperatures (zone time step)
     524              :         Array1D<Real64> CoolOutTempSeq;        // daily sequence of outdoor temperatures (cooling, zone time step)
     525              :         Array1D<Real64> CoolTstatTempSeq;      // daily sequence of zone thermostat temperatures (cooling, zone time step)
     526              :         Array1D<Real64> DesCoolSetPtSeq;       // daily sequence of indoor set point temperatures (zone time step)
     527              :         Array1D<Real64> HeatZoneHumRatSeq;     // daily sequence of zone humidity ratios (heating, zone time step)
     528              :         Array1D<Real64> CoolZoneHumRatSeq;     // daily sequence of zone humidity ratios (cooling, zone time step)
     529              :         Array1D<Real64> HeatOutHumRatSeq;      // daily sequence of outdoor humidity ratios (heating, zone time step)
     530              :         Array1D<Real64> CoolOutHumRatSeq;      // daily sequence of outdoor humidity ratios (cooling, zone time step)
     531              :         Real64 ZonePeakOccupancy = 0.0;        // zone peak occupancy based on max schedule value
     532              :         Real64 DOASHeatLoad = 0.0;             // current heating load from DOAS supply air [W]
     533              :         Real64 DOASCoolLoad = 0.0;             // current cooling load from DOAS supply air [W]
     534              :         Real64 DOASHeatAdd = 0.0;              // current heat addition rate from DOAS supply air [W]
     535              :         Real64 DOASLatAdd = 0.0;               // current latent heat addition rate from DOAS supply air [W]
     536              :         Real64 DOASSupMassFlow = 0.0;          // current mass flow rate of DOAS supply air [kg/s]
     537              :         Real64 DOASSupTemp = 0.0;              // current DOAS supply air temperature [C]
     538              :         Real64 DOASSupHumRat = 0.0;            // current DOAS supply air humidity ratio [kgWater/kgDryAir]
     539              :         Real64 DOASTotCoolLoad = 0.0;          // current total cooling load imposed by DOAS supply air [W]
     540              :         Array1D<Real64> DOASHeatLoadSeq;       // daily sequence of zone DOAS heating load (zone time step) [W]
     541              :         Array1D<Real64> DOASCoolLoadSeq;       // daily sequence of zone DOAS cooling load (zone time step) [W]
     542              :         Array1D<Real64> DOASHeatAddSeq;        // daily sequence of zone DOAS heat addition rate (zone time step) [W]
     543              :         Array1D<Real64> DOASLatAddSeq;         // daily sequence of zone DOAS latent heat addition rate (zone time step) [W]
     544              :         Array1D<Real64> DOASSupMassFlowSeq;    // daily sequence of zone DOAS supply mass flow rate (zone time step) [Kg/s]
     545              :         Array1D<Real64> DOASSupTempSeq;        // daily sequence of zone DOAS supply temperature (zone time step) [C]
     546              :         Array1D<Real64> DOASSupHumRatSeq;      // daily sequence of zone DOAS supply humidity ratio (zone time step) [kgWater/kgDryAir]
     547              :         Array1D<Real64> DOASTotCoolLoadSeq;    // daily sequence of zone DOAS total cooling load (zone time step) [W]
     548              : 
     549              :         // Latent heat variables
     550              :         Real64 HeatLoadNoDOAS = 0.0;                       // current zone heating load no DOAS (HVAC time step)
     551              :         Real64 CoolLoadNoDOAS = 0.0;                       // current zone heating load no DOAS (HVAC time step)
     552              :         Real64 DesHeatLoadNoDOAS = 0.0;                    // design zone heating load no DOAS (HVAC time step)
     553              :         Real64 DesCoolLoadNoDOAS = 0.0;                    // design zone heating load no DOAS (HVAC time step)
     554              :         Real64 HeatLatentLoad = 0.0;                       // current zone humidification load (HVAC time step)
     555              :         Real64 CoolLatentLoad = 0.0;                       // current zone dehumidification load (HVAC time step)
     556              :         Real64 HeatLatentLoadNoDOAS = 0.0;                 // current zone humidification load without DOAS (HVAC time step)
     557              :         Real64 CoolLatentLoadNoDOAS = 0.0;                 // current zone dehumidification load without DOAS (HVAC time step)
     558              :         Real64 ZoneHeatLatentMassFlow = 0.0;               // current mass flow rate required to meet humidification load [kg/s]
     559              :         Real64 ZoneCoolLatentMassFlow = 0.0;               // current mass flow rate required to meet dehumidification load [kg/s]
     560              :         Real64 ZoneHeatLatentVolFlow = 0.0;                // current volume flow rate required to meet humidification load [m3/s]
     561              :         Real64 ZoneCoolLatentVolFlow = 0.0;                // current volume flow rate required to meet dehumidification load [m3/s]
     562              :         Real64 DesLatentHeatLoad = 0.0;                    // design zone humidification load (HVAC time step)
     563              :         Real64 DesLatentCoolLoad = 0.0;                    // design zone dehumidification load (HVAC time step)
     564              :         Real64 DesLatentHeatLoadNoDOAS = 0.0;              // design zone humidification load no DOAS (HVAC time step)
     565              :         Real64 DesLatentCoolLoadNoDOAS = 0.0;              // design zone dehumidification load no DOAS (HVAC time step)
     566              :         Real64 DesLatentHeatMassFlow = 0.0;                // design mass flow rate required to meet humidification load [kg/s]
     567              :         Real64 DesLatentCoolMassFlow = 0.0;                // design mass flow rate required to meet dehumidification load [kg/s]
     568              :         Real64 DesLatentHeatVolFlow = 0.0;                 // design volume flow rate required to meet humidification load [kg/s]
     569              :         Real64 DesLatentCoolVolFlow = 0.0;                 // design volume flow rate required to meet dehumidification load [kg/s]
     570              :         Real64 ZoneTempAtLatentCoolPeak = 0.0;             // zone temp at max latent cooling [C]
     571              :         Real64 OutTempAtLatentCoolPeak = 0.0;              // outdoor temp at max latent cooling [C]
     572              :         Real64 ZoneHumRatAtLatentCoolPeak = 0.0;           // zone humrat at max latent cooling [kg/kg]
     573              :         Real64 OutHumRatAtLatentCoolPeak = 0.0;            // outdoor humrat at max latent cooling [kg/kg]
     574              :         Real64 ZoneTempAtLatentHeatPeak = 0.0;             // zone temp at max latent heating [C]
     575              :         Real64 OutTempAtLatentHeatPeak = 0.0;              // outdoor temp at max latent heating [C]
     576              :         Real64 ZoneHumRatAtLatentHeatPeak = 0.0;           // zone humrat at max latent heating [kg/kg]
     577              :         Real64 OutHumRatAtLatentHeatPeak = 0.0;            // outdoor humrat at max latent heating [kg/kg]
     578              :         Real64 DesLatentHeatCoilInTemp = 0.0;              // zone latent heating coil design air inlet temperature [C]
     579              :         Real64 DesLatentCoolCoilInTemp = 0.0;              // zone latent cooling coil design air inlet temperature [C]
     580              :         Real64 DesLatentHeatCoilInHumRat = 0.0;            // zone latent heating coil design air inlet humidity ratio [kg/kg]
     581              :         Real64 DesLatentCoolCoilInHumRat = 0.0;            // zone latent cooling coil design air inlet humidity ratio [kg/kg]
     582              :         int TimeStepNumAtLatentHeatMax = 0;                // time step number (in day) at heating peak
     583              :         int TimeStepNumAtLatentCoolMax = 0;                // time step number (in day) at cooling peak
     584              :         int TimeStepNumAtLatentHeatNoDOASMax = 0;          // time step number (in day) at latent heating peak without DOAS
     585              :         int TimeStepNumAtLatentCoolNoDOASMax = 0;          // time step number (in day) at Latent cooling peak without DOAS
     586              :         int LatentHeatDDNum = 0;                           // design day index of design day causing heating peak
     587              :         int LatentCoolDDNum = 0;                           // design day index of design day causing cooling peak
     588              :         int LatentHeatNoDOASDDNum = 0;                     // design day index of design day causing latent heating peak with no DOAS
     589              :         int LatentCoolNoDOASDDNum = 0;                     // design day index of design day causing latent cooling peak with no DOAS
     590              :         std::string cLatentHeatDDDate;                     // date of design day causing heating peak
     591              :         std::string cLatentCoolDDDate;                     // date of design day causing cooling peak
     592              :         int TimeStepNumAtHeatNoDOASMax = 0;                // time step number (in day) at Heating peak without DOAS
     593              :         int TimeStepNumAtCoolNoDOASMax = 0;                // time step number (in day) at cooling peak without DOAS
     594              :         int HeatNoDOASDDNum = 0;                           // design day index of design day causing heating peak without DOAS
     595              :         int CoolNoDOASDDNum = 0;                           // design day index of design day causing cooling peak without DOAS
     596              :         std::string cHeatNoDOASDDDate;                     // date of design day causing heating peak without DOAS
     597              :         std::string cCoolNoDOASDDDate;                     // date of design day causing cooling peak without DOAS
     598              :         Array1D<Real64> HeatLoadNoDOASSeq;                 // daily sequence of zone heating load No DOAS (zone time step)
     599              :         Array1D<Real64> CoolLoadNoDOASSeq;                 // daily sequence of zone cooling load No DOAS (zone time step)
     600              :         Array1D<Real64> LatentHeatLoadSeq;                 // daily sequence of zone latent heating load (zone time step) [W]
     601              :         Array1D<Real64> LatentCoolLoadSeq;                 // daily sequence of zone latent cooling load (zone time step) [W]
     602              :         Array1D<Real64> HeatLatentLoadNoDOASSeq;           // daily sequence of zone latent heating load No DOAS (zone time step) [W]
     603              :         Array1D<Real64> CoolLatentLoadNoDOASSeq;           // daily sequence of zone latent cooling load No DOAS (zone time step) [W]
     604              :         Array1D<Real64> LatentCoolFlowSeq;                 // daily sequence of zone latent cooling supply mass flow rate (zone time step) [Kg/s]
     605              :         Array1D<Real64> LatentHeatFlowSeq;                 // daily sequence of zone latent heating supply mass flow rate (zone time step) [Kg/s]
     606              :         bool zoneLatentSizing = false;                     // trigger to do RH control during zone sizing
     607              :         Real64 zoneRHDehumidifySetPoint = 50.0;            // RH dehumidifying set point used during sizing, default to 50%
     608              :         Sched::Schedule *zoneRHDehumidifySched = nullptr;  // zone RH dehumidifying schedule used for zone sizing
     609              :         Real64 zoneRHHumidifySetPoint = 50.0;              // RH humidifying set point used during sizing, default to 50%
     610              :         Sched::Schedule *zoneRHHumidifySched = nullptr;    // zone RH humidifying schedule used for zone sizing
     611              :         Real64 LatentCoolDesHumRat = 0.0;                  // zone design dehumidification supply air humidity ratio [kgw/kga]
     612              :         Real64 CoolDesHumRatDiff = 0.005;                  // zone design cooling supply air humidity ratio difference [deltakgw/kga]
     613              :         Real64 LatentHeatDesHumRat = 0.0;                  // zone design humidification supply air humidity ratio [kgw/kga]
     614              :         Real64 HeatDesHumRatDiff = 0.005;                  // zone design heating supply air humidity ratio temperature difference [deltakgw/kga]
     615              :         int ZnLatCoolDgnSAMethod = 0;                      // choice of how to get zone latent cooling design air humidity ratio;
     616              :         int ZnLatHeatDgnSAMethod = 0;                      // choice of how to get zone latent heating design air humidity ratio;
     617              :         Real64 ZoneRetTempAtLatentCoolPeak = 0.0;          // zone return temp at latent cooling peak time step
     618              :         Real64 ZoneRetTempAtLatentHeatPeak = 0.0;          // zone return temp at latent heating peak time step
     619              :         std::string CoolNoDOASDesDay;                      // name of a cooling design day without DOAS
     620              :         std::string HeatNoDOASDesDay;                      // name of a heating design day without DOAS
     621              :         std::string LatCoolDesDay;                         // name of a cooling design day
     622              :         std::string LatHeatDesDay;                         // name of a heating design day
     623              :         std::string LatCoolNoDOASDesDay;                   // name of a cooling design day without DOAS
     624              :         std::string LatHeatNoDOASDesDay;                   // name of a heating design day without DOAS
     625              :         ZoneSizing zoneSizingMethod = ZoneSizing::Invalid; // load to sizing on: sensible, latent, sensibleandlatent, sensibleonlynolatent
     626              :         std::string CoolSizingType;                        // string reported to eio, Cooling or Latent Cooling
     627              :         std::string HeatSizingType;                        // string reported to eio, Heating or Latent Heating
     628              :         std::string CoolPeakDateHrMin;                     // date:hr:min of cooling peak
     629              :         std::string HeatPeakDateHrMin;                     // date:hr:min of heating peak
     630              :         std::string LatCoolPeakDateHrMin;                  // date:hr:min of latent cooling peak
     631              :         std::string LatHeatPeakDateHrMin;                  // date:hr:min of latent heating peak
     632              : 
     633              :         void zeroMemberData();
     634              :         void allocateMemberArrays(int numOfTimeStepInDay);
     635              :     };
     636              : 
     637              :     struct TermUnitZoneSizingData : TermUnitZoneSizingCommonData
     638              :     {
     639              :         void scaleZoneCooling(Real64 ratio);
     640              :         void scaleZoneHeating(Real64 ratio);
     641              :         void copyFromZoneSizing(DataSizing::ZoneSizingData const &sourceData);
     642              :         void allocateMemberArrays(int numOfTimeStepInDay);
     643              :     };
     644              : 
     645              :     struct TermUnitSizingData
     646              :     {
     647              :         // Members
     648              :         int CtrlZoneNum;               // Controlled zone number (index to FinalZoneSizing, etc.)
     649              :         std::string ADUName;           // Terminal Unit Name (air distribution unit or direct air unit)
     650              :         Real64 AirVolFlow;             // design air vol flow rate for single duct terminal unit [m3/s]
     651              :         Real64 MaxHWVolFlow;           // design Hot Water vol flow for single duct terminal unit [m3/s]
     652              :         Real64 MaxSTVolFlow;           // design Steam vol flow rate for single duct terminal unit [m3/s]
     653              :         Real64 MaxCWVolFlow;           // design Cold Water vol flow for single duct terminal unit [m3/s]
     654              :         Real64 MinPriFlowFrac;         // design minimum primary flow fraction for a terminal unit
     655              :         Real64 InducRat;               // design induction ratio for a terminal unit
     656              :         bool InducesPlenumAir;         // True if secondary air comes from the plenum
     657              :         Real64 ReheatAirFlowMult;      // multiplier for air flow in reheat coil UA calculation
     658              :         Real64 ReheatLoadMult;         // multiplier for load in reheat coil UA calculation
     659              :         Real64 DesCoolingLoad;         // design cooling load used for zone equipment [W]
     660              :         Real64 DesHeatingLoad;         // design heating load used for zone equipment [W]
     661              :         Real64 SpecDesSensCoolingFrac; // Fraction of Design Sensible Cooling Load from DesignSpecification:AirTerminal:Sizing
     662              :         Real64 SpecDesCoolSATRatio;    // Cooling Design Supply Air Temperature Difference Ratio from DesignSpecification:AirTerminal:Sizing
     663              :         Real64 SpecDesSensHeatingFrac; // Fraction of Design Sensible Heating Load from DesignSpecification:AirTerminal:Sizing
     664              :         Real64 SpecDesHeatSATRatio;    // Heating Design Supply Air Temperature Difference Ratio from DesignSpecification:AirTerminal:Sizing
     665              :         Real64 SpecMinOAFrac;          // Fraction of Minimum Outdoor Air Flow from DesignSpecification:AirTerminal:Sizing
     666              :         int plenumIndex = 0;           // plenum index for PIU inlet conditions
     667              : 
     668              :         // Default Constructor
     669          591 :         TermUnitSizingData()
     670         1182 :             : CtrlZoneNum(0), AirVolFlow(0.0), MaxHWVolFlow(0.0), MaxSTVolFlow(0.0), MaxCWVolFlow(0.0), MinPriFlowFrac(0.0), InducRat(0.0),
     671          591 :               InducesPlenumAir(false), ReheatAirFlowMult(1.0), ReheatLoadMult(1.0), DesCoolingLoad(0.0), DesHeatingLoad(0.0),
     672          591 :               SpecDesSensCoolingFrac(1.0), SpecDesCoolSATRatio(1.0), SpecDesSensHeatingFrac(1.0), SpecDesHeatSATRatio(1.0), SpecMinOAFrac(1.0)
     673              :         {
     674          591 :         }
     675              : 
     676              :         Real64 applyTermUnitSizingCoolFlow(Real64 coolFlowWithOA, // Cooling flow rate with MinOA limit applied
     677              :                                            Real64 coolFlowNoOA    // Cooling flow rate without MinOA limit applied
     678              :         );
     679              : 
     680              :         Real64 applyTermUnitSizingHeatFlow(Real64 heatFlowWithOA, // Heating flow rate with MinOA limit applied
     681              :                                            Real64 heatFlowNoOA    // Heating flow rate without MinOA limit applied
     682              :         );
     683              : 
     684         9840 :         Real64 applyTermUnitSizingCoolLoad(Real64 coolLoad) const
     685              :         {
     686         9840 :             return coolLoad * this->SpecDesSensCoolingFrac; // Apply DesignSpecification:AirTerminal:Sizing to cooling load
     687              :         }
     688              : 
     689         9840 :         Real64 applyTermUnitSizingHeatLoad(Real64 heatLoad) const
     690              :         {
     691         9840 :             return heatLoad * this->SpecDesSensHeatingFrac; // Apply DesignSpecification:AirTerminal:Sizing to heating load
     692              :         }
     693              :     };
     694              : 
     695              :     struct ZoneEqSizingData // data saved from zone eq component sizing and passed to subcomponents
     696              :     {
     697              :         // Members
     698              :         Real64 AirVolFlow;            // design air vol flow rate for zone equipment unit [m3/s]
     699              :         Real64 MaxHWVolFlow;          // design Hot Water vol flow for zone equipment unit [m3/s]
     700              :         Real64 MaxCWVolFlow;          // design Cold Water vol flow for zone equipment unit [m3/s]
     701              :         Real64 OAVolFlow;             // design outside air flow for zone equipment unit [m3/s]
     702              :         Real64 ATMixerVolFlow;        // design ventilation air flow rate from air terminal mixer (central DOAS) [m3/s]
     703              :         Real64 ATMixerCoolPriDryBulb; // design ventilation drybulb temperature from air terminal mixer during cooling (central DOAS) [C]
     704              :         Real64 ATMixerCoolPriHumRat;  // design ventilation humidity ratio from air terminal mixer during cooling (central DOAS) [kgWater/kgDryAir]
     705              :         Real64 ATMixerHeatPriDryBulb; // design ventilation drybulb temperature from air terminal mixer during heating (central DOAS) [C]
     706              :         Real64 ATMixerHeatPriHumRat;  // design ventilation humidity ratio from air terminal mixer during heating (central DOAS) [kgWater/kgDryAir]
     707              :         Real64 DesCoolingLoad;        // design cooling load used for zone equipment [W]
     708              :         Real64 DesHeatingLoad;        // design heating load used for zone equipment [W]
     709              :         Real64 CoolingAirVolFlow;     // design cooling air vol flow rate for equipment[m3/s]
     710              :         Real64 HeatingAirVolFlow;     // design heating air vol flow rate for equipment[m3/s]
     711              :         Real64 SystemAirVolFlow;      // design heating air vol flow rate for equipment[m3/s]
     712              :         bool AirFlow;                 // TRUE if AirloopHVAC system air flow rate is calculated
     713              :         bool CoolingAirFlow;          // TRUE if AirloopHVAC system cooling air flow rate is calculated
     714              :         bool HeatingAirFlow;          // TRUE if AirloopHVAC system heating air flow rate is calculated
     715              :         bool SystemAirFlow;           // TRUE if AirloopHVAC system heating air flow rate is calculated
     716              :         bool Capacity;                // TRUE if AirloopHVAC system capacity is calculated
     717              :         bool CoolingCapacity;         // TRUE if AirloopHVAC system cooling capacity is calculated
     718              :         bool HeatingCapacity;         // TRUE if AirloopHVAC system heating capacity is calculated
     719              :         bool SystemCapacity;          // TRUE if AirloopHVAC system heating capacity is calculated
     720              :         bool DesignSizeFromParent;    // TRUE if design size is set by parent object - normally false, set to true for special cases e.g. ERV
     721              :         int HVACSizingIndex;          // index to DesignSpecification:ZoneHVAC:Sizing
     722              :         Array1D_int SizingMethod;    // supply air flow rate sizing method (SupplyAirFlowRate, FlowPerFloorArea, FractionOfAutosizedCoolingAirflow and
     723              :                                      // FractionOfAutosizedHeatingAirflow)
     724              :         Array1D_int CapSizingMethod; // capacity sizing methods (HeatingDesignCapacity, CoolingDesignCapacity, CapacityPerFloorArea,
     725              :                                      // FractionOfAutosizedCoolingCapacity and FractionOfAutosizedHeatingCapacity )
     726              : 
     727              :         // Default Constructor
     728         1227 :         ZoneEqSizingData()
     729         1227 :             : AirVolFlow(0.0), MaxHWVolFlow(0.0), MaxCWVolFlow(0.0), OAVolFlow(0.0),
     730         1227 :               ATMixerVolFlow(0.0),         // design ventilation air flow rate from air terminal mixer (central DOAS) [m3/s]
     731         1227 :               ATMixerCoolPriDryBulb(0.0),  // design air terminal mixer cooling outlet temperature [C]
     732         1227 :               ATMixerCoolPriHumRat(0.0),   // design air terminal mixer cooling outlet humidity ratio [kgWater/kgDryAir]
     733         1227 :               ATMixerHeatPriDryBulb(0.0),  // design air terminal mixer heating outlet temperature [C]
     734         1227 :               ATMixerHeatPriHumRat(0.0),   // design air terminal mixer heating outlet humidity ratio [kgWater/kgDryAir]
     735         1227 :               DesCoolingLoad(0.0),         // design cooling load used for zone equipment [W]
     736         1227 :               DesHeatingLoad(0.0),         // design heating load used for zone equipment [W]
     737         1227 :               CoolingAirVolFlow(0.0),      // design cooling air vol flow rate for equipment[m3/s]
     738         1227 :               HeatingAirVolFlow(0.0),      // design heating air vol flow rate for equipment[m3/s]
     739         1227 :               SystemAirVolFlow(0.0),       // design heating air vol flow rate for equipment[m3/s]
     740         1227 :               AirFlow(false),              // TRUE if AirloopHVAC system air flow rate is calculated
     741         1227 :               CoolingAirFlow(false),       // TRUE if AirloopHVAC system cooling air flow rate is calculated
     742         1227 :               HeatingAirFlow(false),       // TRUE if AirloopHVAC system heating air flow rate is calculated
     743         1227 :               SystemAirFlow(false),        // TRUE if AirloopHVAC system heating air flow rate is calculated
     744         1227 :               Capacity(false),             // TRUE if AirloopHVAC system capacity is calculated
     745         1227 :               CoolingCapacity(false),      // TRUE if AirloopHVAC system cooling capacity is calculated
     746         1227 :               HeatingCapacity(false),      // TRUE if AirloopHVAC system heating capacity is calculated
     747         1227 :               SystemCapacity(false),       // TRUE if AirloopHVAC system heating capacity is calculated
     748         1227 :               DesignSizeFromParent(false), // TRUE if design size is set by parent object - normally false, set to true for special cases e.g. ERV
     749         1227 :               HVACSizingIndex(0)           // index to DesignSpecification:ZoneHVAC:Sizing
     750              :         {
     751         1227 :         }
     752              :     };
     753              : 
     754              :     // Data Structure for Zone HVAC sizing, referenced by various ZoneHVAC Equipment
     755              :     struct ZoneHVACSizingData
     756              :     {
     757              :         // Members
     758              :         std::string Name;
     759              :         int CoolingSAFMethod;           // - Method for cooling supply air flow rate sizing calculation (SupplyAirFlowRate,FlowPerFloorArea,
     760              :                                         // FractionOfAutoSizedCoolingValue, FlowPerCoolingCapacity)
     761              :         int HeatingSAFMethod;           // - Method for heating supply air flow rate sizing calculation (SupplyAirFlowRate,FlowPerFloorArea,
     762              :                                         // FractionOfAutoSizedHeatingValue, FlowPerHeatingCapacity,
     763              :         int NoCoolHeatSAFMethod;        // - Method for supply air flow sizing during no cooling and heating calculation (SupplyAirFlowRate,
     764              :                                         // FractionOfAutoSizedCoolingValue, FractionOfAutoSizedHeatingValue)
     765              :         int CoolingCapMethod;           // - Method for cooling capacity scaledsizing calculation (CoolingDesignCapacity, CapacityPerFloorArea,
     766              :                                         // FractionOfAutosizedHeatingCapacity)
     767              :         int HeatingCapMethod;           // - Method for heatiing capacity scaledsizing calculation (HeatingDesignCapacity, CapacityPerFloorArea,
     768              :                                         // FracOfAutosizedHeatingCapacity)
     769              :         Real64 MaxCoolAirVolFlow;       // - maximum cooling supply air flow rate, m3/s
     770              :         Real64 MaxHeatAirVolFlow;       // - maximum heating supply air flow rate, m3/s
     771              :         Real64 MaxNoCoolHeatAirVolFlow; // - maximum supply air flow rate when no cooling or heating, m3/s
     772              :         Real64 ScaledCoolingCapacity;   // - scaled maximum cooling capacity of zone HVAC equipment, W
     773              :         Real64 ScaledHeatingCapacity;   // - scaled maximum heating capacity of zone HVAC equipment, W
     774              :         bool RequestAutoSize;           // - true if autosizing is requested
     775              : 
     776              :         // Default Constructor
     777           55 :         ZoneHVACSizingData()
     778          110 :             : CoolingSAFMethod(0), HeatingSAFMethod(0), NoCoolHeatSAFMethod(0), CoolingCapMethod(0), HeatingCapMethod(0), MaxCoolAirVolFlow(0.0),
     779           55 :               MaxHeatAirVolFlow(0.0), MaxNoCoolHeatAirVolFlow(0.0), ScaledCoolingCapacity(0.0), ScaledHeatingCapacity(0.0), RequestAutoSize(false)
     780              :         {
     781           55 :         }
     782              :     };
     783              : 
     784              :     // Data Structure for air terminal sizing, referenced by ZoneHVAC:AirDistributionUnit
     785              :     struct AirTerminalSizingSpecData
     786              :     {
     787              :         // Members
     788              :         std::string Name;
     789              :         Real64 DesSensCoolingFrac; // Fraction of Design Sensible Cooling Load
     790              :         Real64 DesCoolSATRatio;    // Cooling Design Supply Air Temperature Difference Ratio
     791              :         Real64 DesSensHeatingFrac; // Fraction of Design Sensible Heating Load
     792              :         Real64 DesHeatSATRatio;    // Heating Design Supply Air Temperature Difference Ratio
     793              :         Real64 MinOAFrac;          // Fraction of Minimum Outdoor Air Flow
     794              : 
     795              :         // Default Constructor
     796            0 :         AirTerminalSizingSpecData() : DesSensCoolingFrac(1.0), DesCoolSATRatio(1.0), DesSensHeatingFrac(1.0), DesHeatSATRatio(1.0), MinOAFrac(1.0)
     797              :         {
     798            0 :         }
     799              :     };
     800              : 
     801              :     struct SystemSizingInputData
     802              :     {
     803              :         // Members
     804              :         std::string AirPriLoopName;                      // name of an AirLoopHVAC object
     805              :         int AirLoopNum = 0;                              // index number of air loop
     806              :         LoadSizing loadSizingType = LoadSizing::Invalid; // type of load to size on sensible, latent, total, ventilation
     807              :         DataSizing::SizingConcurrence SizingOption = DataSizing::SizingConcurrence::NonCoincident; // noncoincident, coincident
     808              :         OAControl CoolOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for cooling sizing
     809              :         OAControl HeatOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for heating sizing
     810              :         Real64 DesOutAirVolFlow = 0.0;               // design (minimum) outside air flow rate [m3/s]
     811              :         Real64 SysAirMinFlowRat = 0.0;               // minimum system air flow ratio for heating, Central Heating Maximum System Air Flow Ratio
     812              :         bool SysAirMinFlowRatWasAutoSized = false;   // true if central heating maximum system air flow ratio was autosize on input
     813              :         Real64 PreheatTemp = 0.0;                    // preheat design set temperature [C]
     814              :         Real64 PrecoolTemp = 0.0;                    // precool design set temperature [C]
     815              :         Real64 PreheatHumRat = 0.0;                  // preheat design humidity ratio [kg water/kg dry air]
     816              :         Real64 PrecoolHumRat = 0.0;                  // precool design humidity ratio [kg water/kg dry air]
     817              :         Real64 CoolSupTemp = 0.0;                    // cooling design supply air temperature [C]
     818              :         Real64 HeatSupTemp = 0.0;                    // heating design supply air temperature [C]
     819              :         Real64 CoolSupHumRat = 0.0;                  // cooling design supply air humidity ratio [kg water/kg dry air]
     820              :         Real64 HeatSupHumRat = 0.0;                  // heating design supply air humidity ratio [kg water/kg dry air]
     821              :         AirflowSizingMethod CoolAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get system cooling design air flow rates;
     822              :         //  1 = calc from des day simulation; 2=m3/s per system, user input
     823              :         Real64 DesCoolAirFlow = 0.0;                                         // design system supply air flow rate for cooling[m3/s]
     824              :         AirflowSizingMethod HeatAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get system heating design air flow rates;
     825              :         //  1 = calc from des day simulation; 2=m3/s per zone, user input
     826              :         Real64 DesHeatAirFlow = 0.0; // design system heating supply air flow rate [m3/s]
     827              :         int ScaleCoolSAFMethod = 0;  // choice of how to get system cooling scalable air flow rates; // (FlowPerFloorArea,
     828              :                                      // FractionOfAutosizedCoolingAirflow, FlowPerCoolingCapacity)
     829              :         int ScaleHeatSAFMethod = 0;  // choice of how to get system heating scalable air flow rates; // (FlowPerFloorArea,
     830              :                                      // FractionOfAutosizedCoolingAirflow, FractionOfAutosizedHeatingAirflow, FlowPerHeatingCapacity)
     831              :         SysOAMethod SystemOAMethod = SysOAMethod::Invalid; // System Outdoor Air Method; 1 = SOAM_ZoneSum, 2 = SOAM_VRP, 9 = SOAM_SP
     832              :         Real64 MaxZoneOAFraction = 0.0;                    // maximum value of min OA for zones served by system
     833              :         bool OAAutoSized = false;                          // Set to true if design OA vol flow is set to 'autosize' in Sizing:System
     834              :         int CoolingCapMethod = 0;           // - Method for cooling capacity scaledsizing calculation (CoolingDesignCapacity, CapacityPerFloorArea,
     835              :                                             // FractionOfAutosizedCoolingCapacity)
     836              :         int HeatingCapMethod = 0;           // - Method for heatiing capacity scaledsizing calculation (HeatingDesignCapacity, CapacityPerFloorArea,
     837              :                                             // FracOfAutosizedHeatingCapacity)
     838              :         Real64 ScaledCoolingCapacity = 0.0; // - scaled maximum cooling capacity of cooling coil in an air loop
     839              :         Real64 ScaledHeatingCapacity = 0.0; // - scaled maximum heating capacity of cooling coil in an air loop
     840              :         Real64 FloorAreaOnAirLoopCooled = 0.0; // total floor of cooled zones served by an airloop
     841              :         Real64 FloorAreaOnAirLoopHeated = 0.0; // total floor of heated zones served by an airloop
     842              :         Real64 FlowPerFloorAreaCooled = 0.0;   // ratio of cooling supply air flow rate to total floor area of cooled zones served by an airloop
     843              :         Real64 FlowPerFloorAreaHeated = 0.0;   // ratio of cooling supply air flow rate to total floor area of cooled zones served by an airloop
     844              :         Real64 FractionOfAutosizedCoolingAirflow = 1.0;            // fraction of of cooling supply air flow rate an airloop
     845              :         Real64 FractionOfAutosizedHeatingAirflow = 1.0;            // fraction of of heating supply air flow rate an airloop
     846              :         Real64 FlowPerCoolingCapacity = 0.0;                       // ratio of cooling supply air flow rate to cooling capacity of an airloop
     847              :         Real64 FlowPerHeatingCapacity = 0.0;                       // ratio of heating supply air flow rate to heating capacity of an airloop
     848              :         PeakLoad coolingPeakLoad = PeakLoad::Invalid;              // Type of peak to size cooling coils on SensibleCooling or TotalCooling
     849              :         CapacityControl CoolCapControl = CapacityControl::Invalid; // type of control of cooling coil  VAV, Bypass, VT, OnOff
     850              :         Real64 OccupantDiversity = 0.0;                            // occupant diversity
     851              :     };
     852              : 
     853              :     struct SystemSizingData // Contains data for system sizing
     854              :     {
     855              :         // Members
     856              :         std::string AirPriLoopName;                      // name of an AirLoopHVAC object
     857              :         std::string CoolDesDay;                          // name of a cooling design day
     858              :         std::string HeatDesDay;                          // name of a heating design day
     859              :         LoadSizing loadSizingType = LoadSizing::Invalid; // type of load to size on Sensible, Latent, Total, Ventilation
     860              :         DataSizing::SizingConcurrence SizingOption = DataSizing::SizingConcurrence::NonCoincident; // noncoincident, coincident.
     861              :         OAControl CoolOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for cooling sizing
     862              :         OAControl HeatOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for heating sizing
     863              :         Real64 DesOutAirVolFlow = 0.0;               // design (minimum) outside air flow rate [m3/s]
     864              :         Real64 SysAirMinFlowRat = 0.0;               // minimum system air flow ratio for heating, Central Heating Maximum System Air Flow Ratio
     865              :         bool SysAirMinFlowRatWasAutoSized = false;   // true if central heating maximum system air flow ratio was autosize on input
     866              :         Real64 PreheatTemp = 0.0;                    // preheat design set temperature
     867              :         Real64 PrecoolTemp = 0.0;                    // precool design set temperature [C]
     868              :         Real64 PreheatHumRat = 0.0;                  // preheat design humidity ratio [kg water/kg dry air]
     869              :         Real64 PrecoolHumRat = 0.0;                  // precool design humidity ratio [kg water/kg dry air]
     870              :         Real64 CoolSupTemp = 0.0;                    // cooling design supply air temperature [C]
     871              :         Real64 HeatSupTemp = 0.0;                    // heating design supply air temperature[C]
     872              :         Real64 CoolSupHumRat = 0.0;                  // cooling design supply air humidity ratio [kg water/kg dry air]
     873              :         Real64 HeatSupHumRat = 0.0;                  // heating design supply air humidity ratio [kg water/kg dry air]
     874              :         AirflowSizingMethod CoolAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get system design cooling air flow rates;
     875              :         //  1 = calc from des day simulation; 2=m3/s per system, user input
     876              :         AirflowSizingMethod HeatAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get system design heating air flow rates;
     877              :         //  1 = calc from des day simulation; 2=m3/s per system, user input
     878              :         Real64 InpDesCoolAirFlow = 0.0;                // input design system supply air flow rate [m3/s]
     879              :         Real64 InpDesHeatAirFlow = 0.0;                // input design system heating supply air flow rate [m3/s]
     880              :         Real64 CoinCoolMassFlow = 0.0;                 // coincident peak cooling mass flow rate [kg/s]
     881              :         bool EMSOverrideCoinCoolMassFlowOn = false;    // If true, EMS to change coincident peak cooling mass flow rate
     882              :         Real64 EMSValueCoinCoolMassFlow = 0.0;         // Value EMS wants for coincident peak cooling mass flow rate [kg/s]
     883              :         Real64 CoinHeatMassFlow = 0.0;                 // coincident peak heating mass flow rate [kg/s]
     884              :         bool EMSOverrideCoinHeatMassFlowOn = false;    // If true, EMS to set coincident peak heating mass flow rate
     885              :         Real64 EMSValueCoinHeatMassFlow = 0.0;         // Value EMS wants for coincident peak heating mass flow rate [kg/s]
     886              :         Real64 NonCoinCoolMassFlow = 0.0;              // noncoincident peak cooling mass flow rate [kg/s]
     887              :         bool EMSOverrideNonCoinCoolMassFlowOn = false; // true, EMS to set noncoincident peak cooling mass flow rate
     888              :         Real64 EMSValueNonCoinCoolMassFlow = 0.0;      // Value EMS for noncoincident peak cooling mass flow rate [kg/s]
     889              :         Real64 NonCoinHeatMassFlow = 0.0;              // noncoincident peak heating mass flow rate [kg/s]
     890              :         bool EMSOverrideNonCoinHeatMassFlowOn = false; // true, EMS to set noncoincident peak heating mass flow rate
     891              :         Real64 EMSValueNonCoinHeatMassFlow = 0.0;      // Value EMS for noncoincident peak heating mass flow rate [kg/s]
     892              :         Real64 DesMainVolFlow = 0.0;                   // design main supply duct volume flow [m3/s]
     893              :         bool EMSOverrideDesMainVolFlowOn = false;      // If true, EMS is acting to change DesMainVolFlow
     894              :         Real64 EMSValueDesMainVolFlow = 0.0;           // Value EMS providing for design main supply duct volume flow [m3/s]
     895              :         Real64 DesHeatVolFlow = 0.0;                   // design heat supply duct volume flow [m3/s]
     896              :         bool EMSOverrideDesHeatVolFlowOn = false;      // If true, EMS is acting to change DesCoolVolFlow
     897              :         Real64 EMSValueDesHeatVolFlow = 0.0;           // Value EMS providing for design cool  supply duct volume flow [m3/s]
     898              :         Real64 DesCoolVolFlow = 0.0;                   // design cool  supply duct volume flow [m3/s]
     899              :         bool EMSOverrideDesCoolVolFlowOn = false;      // If true, EMS is acting to change DesCoolVolFlow
     900              :         Real64 EMSValueDesCoolVolFlow = 0.0;           // Value EMS providing for design cool  supply duct volume flow [m3/s]
     901              :         Real64 SensCoolCap = 0.0;                      // design sensible cooling capacity [W]
     902              :         Real64 TotCoolCap = 0.0;                       // design total cooling capacity [W]
     903              :         Real64 HeatCap = 0.0;                          // design heating capacity [W]
     904              :         Real64 PreheatCap = 0.0;                       // design preheat capacity [W]
     905              :         Real64 MixTempAtCoolPeak = 0.0;                // design mixed air temperature for cooling [C]
     906              :         Real64 MixHumRatAtCoolPeak = 0.0;              // design mixed air hum ratio for cooling [kg water/kg dry air]
     907              :         Real64 RetTempAtCoolPeak = 0.0;                // design return air temperature for cooling [C]
     908              :         Real64 RetHumRatAtCoolPeak = 0.0;              // design return air hum ratio for cooling [kg water/kg dry air]
     909              :         Real64 OutTempAtCoolPeak = 0.0;                // design outside air temperature for cooling [C]
     910              :         Real64 OutHumRatAtCoolPeak = 0.0;              // design outside air hum ratio for cooling [kg water/kg dry air]
     911              :         Real64 MassFlowAtCoolPeak = 0.0;               // air mass flow rate at the cooling peak [kg/s]
     912              :         Real64 HeatMixTemp = 0.0;                      // design mixed air temperature for heating [C]
     913              :         Real64 HeatMixHumRat = 0.0;                    // design mixed air hum ratio for heating [kg water/kg dry air]
     914              :         Real64 HeatRetTemp = 0.0;                      // design return air temperature for heating [C]
     915              :         Real64 HeatRetHumRat = 0.0;                    // design return air hum ratio for heating [kg water/kg dry air]
     916              :         Real64 HeatOutTemp = 0.0;                      // design outside air temperature for heating [C]
     917              :         Real64 HeatOutHumRat = 0.0;                    // design outside air hum ratio for Heating [kg water/kg dry air]
     918              :         Real64 DesCoolVolFlowMin = 0.0;                // design minimum system cooling flow rate [m3/s]
     919              :         Array1D<Real64> HeatFlowSeq;                   // daily sequence of system heating air mass flow rate
     920              :         //  (zone time step)
     921              :         Array1D<Real64> SumZoneHeatLoadSeq; // daily sequence of zones summed heating load [W]
     922              :         //  (zone time step)
     923              :         Array1D<Real64> CoolFlowSeq; // daily sequence of system cooling air mass flow rate
     924              :         //  (zone time step)
     925              :         Array1D<Real64> SumZoneCoolLoadSeq; // daily sequence of zones summed cooling load [W]
     926              :         //  (zone time step)
     927              :         Array1D<Real64> CoolZoneAvgTempSeq; // daily sequence of zones flow weighted average temperature [C]
     928              :         //  (zone time step)
     929              :         Array1D<Real64> HeatZoneAvgTempSeq; // daily sequence of zones flow weighted average temperature [C]
     930              :         //  (zone time step)
     931              :         Array1D<Real64> SensCoolCapSeq; // daily sequence of system sensible cooling capacity
     932              :         //  (zone time step)
     933              :         Array1D<Real64> TotCoolCapSeq; // daily sequence of system total cooling capacity
     934              :         //  (zone time step)
     935              :         Array1D<Real64> HeatCapSeq;        // daily sequence of system heating capacity [zone time step]
     936              :         Array1D<Real64> PreheatCapSeq;     // daily sequence of system preheat capacity [zone time step]
     937              :         Array1D<Real64> SysCoolRetTempSeq; // daily sequence of system cooling return temperatures [C]
     938              :         //  [zone time step]
     939              :         Array1D<Real64> SysCoolRetHumRatSeq; // daily sequence of system cooling return humidity ratios
     940              :         //  [kg water/kg dry air] [zone time step]
     941              :         Array1D<Real64> SysHeatRetTempSeq; // daily sequence of system heating return temperatures [C]
     942              :         //   [zone time step]
     943              :         Array1D<Real64> SysHeatRetHumRatSeq; // daily sequence of system heating return humidity ratios
     944              :         //  [kg water/kg dry air] [zone time step]
     945              :         Array1D<Real64> SysCoolOutTempSeq; // daily sequence of system cooling outside temperatures [C]
     946              :         //  [zone time step]
     947              :         Array1D<Real64> SysCoolOutHumRatSeq; // daily sequence of system cooling outside humidity ratios
     948              :         //  [kg water/kg dry air] [zone time step]
     949              :         Array1D<Real64> SysHeatOutTempSeq; // daily sequence of system heating outside temperatures [C]
     950              :         //  [zone time step]
     951              :         Array1D<Real64> SysHeatOutHumRatSeq; // daily sequence of system heating outside humidity ratios
     952              :         //   [kg water/kg dry air] [zone time step]
     953              :         Array1D<Real64> SysDOASHeatAddSeq;                 // daily sequence of heat addition rate from DOAS supply air [W]
     954              :         Array1D<Real64> SysDOASLatAddSeq;                  // daily sequence of latent heat addition rate from DOAS supply air [W]
     955              :         SysOAMethod SystemOAMethod = SysOAMethod::Invalid; // System Outdoor Air Method; 1 = SOAM_ZoneSum, 2 = SOAM_VRP, 9 = SOAM_SP
     956              :         Real64 MaxZoneOAFraction = 0.0;                    // maximum value of min OA for zones served by system
     957              :         Real64 SysUncOA = 0.0;                             // uncorrected system outdoor air flow based on zone people and zone area
     958              :         bool OAAutoSized = false;                          // Set to true if design OA vol flow is set to 'autosize'
     959              :         int ScaleCoolSAFMethod = 0;                        // choice of how to get system cooling scalable air flow rates; (FlowPerFloorArea,
     960              :                                                            // FractionOfAutosizedCoolingAirflow,
     961              :                                                            // FlowPerCoolingCapacity)
     962              :         int ScaleHeatSAFMethod = 0;                        // choice of how to get system heating scalable air flow rates; (FlowPerFloorArea,
     963              :                                                            // FractionOfAutosizedCoolingAirflow,
     964              :                                                            // FractionOfAutosizedHeatingAirflow, FlowPerHeatingCapacity)
     965              :         int CoolingCapMethod = 0;           // - Method for cooling capacity scaledsizing calculation (CoolingDesignCapacity, CapacityPerFloorArea,
     966              :                                             // FractionOfAutosizedCoolingCapacity)
     967              :         int HeatingCapMethod = 0;           // - Method for heatiing capacity scaledsizing calculation (HeatingDesignCapacity, CapacityPerFloorArea,
     968              :                                             // FracOfAutosizedHeatingCapacity)
     969              :         Real64 ScaledCoolingCapacity = 0.0; // - scaled maximum cooling capacity of cooling coil in an air loop
     970              :         Real64 ScaledHeatingCapacity = 0.0; // - scaled maximum heating capacity of cooling coil in an air loop
     971              :         Real64 FloorAreaOnAirLoopCooled = 0.0; // total floor of cooled zones served by an airloop
     972              :         Real64 FloorAreaOnAirLoopHeated = 0.0; // total floor of heated zones served by an airloop
     973              :         Real64 FlowPerFloorAreaCooled = 0.0;   // ratio of cooling supply air flow rate to total floor area of cooled zones served by an airloop
     974              :         Real64 FlowPerFloorAreaHeated = 0.0;   // ratio of cooling supply air flow rate to total floor area of cooled zones served by an airloop
     975              :         Real64 FractionOfAutosizedCoolingAirflow = 0.0;            // fraction of of cooling supply air flow rate an airloop
     976              :         Real64 FractionOfAutosizedHeatingAirflow = 0.0;            // fraction of of heating supply air flow rate an airloop
     977              :         Real64 FlowPerCoolingCapacity = 0.0;                       // ratio of cooling supply air flow rate to cooling capacity of an airloop
     978              :         Real64 FlowPerHeatingCapacity = 0.0;                       // ratio of heating supply air flow rate to heating capacity of an airloop
     979              :         Real64 FractionOfAutosizedCoolingCapacity = 0.0;           // fraction of of cooling total capacity
     980              :         Real64 FractionOfAutosizedHeatingCapacity = 0.0;           // fraction of of heating total capacity
     981              :         Real64 CoolingTotalCapacity = 0.0;                         // system total cooling capacity
     982              :         Real64 HeatingTotalCapacity = 0.0;                         // system total heating capacity
     983              :         PeakLoad coolingPeakLoad = PeakLoad::Invalid;              // Type of peak to size cooling coils on SensibleCooling or TotalCooling
     984              :         CapacityControl CoolCapControl = CapacityControl::Invalid; // type of control of cooling coil  VAV, Bypass, VT, OnOff
     985              :         bool sysSizeHeatingDominant = false;
     986              :         bool sysSizeCoolingDominant = false;
     987              : 
     988              :         Real64 CoinCoolCoilMassFlow = 0.0; // coincident volume flow at time of cooling coil sensible+latent peak [m3/s]
     989              :         Real64 CoinHeatCoilMassFlow = 0.0; // coincident volume flow at time of heating coil sensible peak [m3/s]
     990              :         Real64 DesCoolCoilVolFlow = 0.0;   // design cooling air volume flow rate at time of coil sens+latent peak [m3/s]
     991              :         Real64 DesHeatCoilVolFlow = 0.0;   // design heating air volume flow rate at time of coil sens peak [m3/s]
     992              :         Real64 DesMainCoilVolFlow = 0.0;   // design main supply duct volume flow at time of coil peak [m3/s]
     993              :         // These are for reporting purposes
     994              : 
     995              :         int SysHeatCoilTimeStepPk = 0; // timestep in day of heating coil peak
     996              :         int SysHeatAirTimeStepPk = 0;  // timestep in day of heating airflow peak
     997              :         int HeatDDNum = 0;             // index of design day for heating
     998              :         int CoolDDNum = 0;             // index of design day for cooling
     999              : 
    1000              :         Real64 SysCoolCoinSpaceSens = 0.0; // sum of zone space sensible cooling loads at coincident peak
    1001              :         Real64 SysHeatCoinSpaceSens = 0.0; //  sum of zone space sensible heating loads at coincident peak
    1002              :         Real64 SysDesCoolLoad = 0.0;       // system peak load with coincident
    1003              :         int SysCoolLoadTimeStepPk = 0;     // timestep in day of cooling load peak
    1004              :         Real64 SysDesHeatLoad = 0.0;       // system peak load with coincident
    1005              :         int SysHeatLoadTimeStepPk = 0;     // timestep in day of cooling load peak
    1006              :     };
    1007              : 
    1008              :     struct SysSizPeakDDNumData
    1009              :     {
    1010              :         // Members
    1011              :         int SensCoolPeakDD;                // design day containing the sensible cooling peak
    1012              :         std::string cSensCoolPeakDDDate;   // date string of design day causing sensible cooling peak
    1013              :         int TotCoolPeakDD;                 // design day containing total cooling peak
    1014              :         std::string cTotCoolPeakDDDate;    // date string of design day causing total cooling peak
    1015              :         int CoolFlowPeakDD;                // design day containing the cooling air flow peak
    1016              :         std::string cCoolFlowPeakDDDate;   // date string of design day causing cooling air flow peak
    1017              :         int HeatPeakDD;                    // design day containing the heating peak
    1018              :         std::string cHeatPeakDDDate;       // date string of design day causing heating peak
    1019              :         Array1D<int> TimeStepAtSensCoolPk; // time step of the sensible cooling peak
    1020              :         Array1D<int> TimeStepAtTotCoolPk;  // time step of the total cooling peak
    1021              :         Array1D<int> TimeStepAtCoolFlowPk; // time step of the cooling air flow peak
    1022              :         Array1D<int> TimeStepAtHeatPk;     // time step of the heating peak
    1023              : 
    1024              :         // Default Constructor
    1025          111 :         SysSizPeakDDNumData() : SensCoolPeakDD(0), TotCoolPeakDD(0), CoolFlowPeakDD(0), HeatPeakDD(0)
    1026              :         {
    1027          111 :         }
    1028              :     };
    1029              : 
    1030              :     struct PlantSizingData
    1031              :     {
    1032              :         // Members
    1033              :         std::string PlantLoopName;                           // name of PLANT LOOP or CONDENSER LOOP object
    1034              :         TypeOfPlantLoop LoopType = TypeOfPlantLoop::Invalid; // type of loop: 1=heating, 2=cooling, 3=condenser
    1035              :         Real64 ExitTemp = 0.0;                               // loop design exit (supply) temperature [C]
    1036              :         Real64 DeltaT = 0.0;                                 // loop design temperature drop (or rise) [DelK]
    1037              :         int ConcurrenceOption = 0;                           // sizing option for coincident or noncoincident
    1038              :         int NumTimeStepsInAvg = 0;                           // number of zone timesteps in the averaging window for coincident plant flow
    1039              :         int SizingFactorOption = 0;                          // option for what sizing factor to apply
    1040              :         // Calculated
    1041              :         Real64 DesVolFlowRate = 0.0; // loop design flow rate in m3/s
    1042              :         bool VolFlowSizingDone = 0;  // flag to indicate when this loop has finished sizing flow rate
    1043              :         Real64 PlantSizFac = 0.0;    // hold the loop and pump sizing factor
    1044              :         Real64 DesCapacity = 0.0;    // final capacity in W
    1045              :     };
    1046              : 
    1047              :     // based on ZoneSizingData but only have member variables that are related to the CheckSum/
    1048              :     struct FacilitySizingData
    1049              :     {
    1050              :         // Members
    1051              :         int CoolDDNum;                    // design day index of design day causing heating peak
    1052              :         int HeatDDNum;                    // design day index of design day causing heating peak
    1053              :         int TimeStepNumAtCoolMax;         // time step number (in day) at cooling peak
    1054              :         Array1D<Real64> DOASHeatAddSeq;   // daily sequence of zone DOAS heat addition rate (zone time step) [W]
    1055              :         Array1D<Real64> DOASLatAddSeq;    // daily sequence of zone DOAS latent heat addition rate (zone time step) [W]
    1056              :         Array1D<Real64> CoolOutHumRatSeq; // daily sequence of outdoor humidity ratios (cooling, zone time step)
    1057              :         Array1D<Real64> CoolOutTempSeq;   // daily sequence of outdoor temperatures (cooling, zone time step)
    1058              :         Array1D<Real64> CoolZoneTempSeq;  // daily sequence of zone temperatures (cooling, zone time step)
    1059              :         Array1D<Real64> CoolLoadSeq;      // daily sequence of cooling load (cooling, zone time step)
    1060              :         Real64 DesCoolLoad;               // zone design cooling load [W]
    1061              :         int TimeStepNumAtHeatMax;         // time step number (in day) at Heating peak
    1062              :         Array1D<Real64> HeatOutHumRatSeq; // daily sequence of outdoor humidity ratios (heating, zone time step)
    1063              :         Array1D<Real64> HeatOutTempSeq;   // daily sequence of outdoor temperatures (heating, zone time step)
    1064              :         Array1D<Real64> HeatZoneTempSeq;  // daily sequence of zone temperatures (heating, zone time step)
    1065              :         Array1D<Real64> HeatLoadSeq;      // daily sequence of heating load (cooling, zone time step)
    1066              :         Real64 DesHeatLoad;               // zone design heating load [W]
    1067              : 
    1068              :         // Default Constructor
    1069         4368 :         FacilitySizingData() : CoolDDNum(0), HeatDDNum(0), TimeStepNumAtCoolMax(0), DesCoolLoad(0.0), TimeStepNumAtHeatMax(0), DesHeatLoad(0.0)
    1070              :         {
    1071         4368 :         }
    1072              :     };
    1073              : 
    1074              :     struct DesDayWeathData
    1075              :     {
    1076              :         // Members
    1077              :         std::string DateString; // date of design day weather values
    1078              :         Array1D<Real64> Temp;   // design day temperatures at the major time step
    1079              :         Array1D<Real64> HumRat; // design day humidity ratios at the major time step
    1080              :         Array1D<Real64> Press;  // design day barometric pressure at the major time step
    1081              :     };
    1082              : 
    1083              :     struct CompDesWaterFlowData // design water flow rate for components that use water as an
    1084              :     {
    1085              :         // Members
    1086              :         //  energy source or sink
    1087              :         int SupNode;           // water inlet node number (condenser side for water / water)
    1088              :         Real64 DesVolFlowRate; // water design flow rate [m3/s]
    1089              : 
    1090              :         // Default Constructor
    1091          302 :         CompDesWaterFlowData() : SupNode(0), DesVolFlowRate(0.0)
    1092              :         {
    1093          302 :         }
    1094              : 
    1095              :         // Member Constructor
    1096          137 :         CompDesWaterFlowData(int SupNode,          // water inlet node number (condenser side for water / water)
    1097              :                              Real64 DesVolFlowRate // water design flow rate [m3/s]
    1098              :                              )
    1099          137 :             : SupNode(SupNode), DesVolFlowRate(DesVolFlowRate)
    1100              :         {
    1101          137 :         }
    1102              :     };
    1103              : 
    1104              :     struct OARequirementsData
    1105              :     {
    1106              :         // Holds complete data for a single DesignSpecification:OutdoorAir object or
    1107              :         // a list of indexes from a DesignSpecification:OutdoorAir:SpaceList object
    1108              :         std::string Name;                     // Name of DesignSpecification:OutdoorAir or DesignSpecification:OutdoorAir:SpaceList object
    1109              :         int numDSOA = 0;                      // Number of DesignSpecification:OutdoorAir objects for this instance (zero if not a list)
    1110              :         EPVector<int> dsoaIndexes;            // Indexes to DesignSpecification:OutdoorAir objects (if this is a DSOA:SpaceList object)
    1111              :         EPVector<std::string> dsoaSpaceNames; // Names of spaces if this is a (if this is a DSOA:SpaceList object)
    1112              :         EPVector<int> dsoaSpaceIndexes;       // Indexes to Spaces (if this is a DSOA:SpaceList object)
    1113              :         OAFlowCalcMethod OAFlowMethod =
    1114              :             OAFlowCalcMethod::PerPerson;            // - Method for OA flow calculation (Flow/Person, Flow/Zone, Flow/Area, FlowACH, Sum, Maximum)
    1115              :         Real64 OAFlowPerPerson = 0.0;               // - OA requirement per person
    1116              :         Real64 OAFlowPerArea = 0.0;                 // - OA requirement per zone area
    1117              :         Real64 OAFlowPerZone = 0.0;                 // - OA requirement per zone
    1118              :         Real64 OAFlowACH = 0.0;                     // - OA requirement per zone per hour
    1119              :         Sched::Schedule *oaFlowFracSched = nullptr; // - Fraction schedule applied to total OA requirement
    1120              :         Sched::Schedule *oaPropCtlMinRateSched = nullptr; // - Fraction schedule applied to Proportional Control Minimum Outdoor Air Flow Rate
    1121              :         int CO2MaxMinLimitErrorCount = 0; // Counter when max CO2 concentration < min CO2 concentration for SOAM_ProportionalControlSchOcc
    1122              :         int CO2MaxMinLimitErrorIndex = 0; // Index for max CO2 concentration < min CO2 concentration recurring error message for
    1123              :                                           // SOAM_ProportionalControlSchOcc
    1124              :         int CO2GainErrorCount = 0;        // Counter when CO2 generation from people is zero for SOAM_ProportionalControlSchOcc
    1125              :         int CO2GainErrorIndex = 0; // Index for recurring error message when CO2 generation from people is zero for SOAM_ProportionalControlSchOcc
    1126              :         bool myEnvrnFlag = true;
    1127              : 
    1128              :         Real64 oaFlowArea(EnergyPlusData &state,
    1129              :                           int const zoneNum,
    1130              :                           bool const useMinOASchFlag = true, // Use min OA schedule in DesignSpecification:OutdoorAir object
    1131              :                           int const spaceNum = 0);           // Space index (if applicable)
    1132              : 
    1133              :         Real64 floorArea(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
    1134              : 
    1135              :         Real64 desFlowPerZoneArea(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
    1136              : 
    1137              :         Real64 oaFlowPeople(EnergyPlusData &state,
    1138              :                             int const zoneNum,                 // Zone index
    1139              :                             bool const useOccSchFlag = true,   // Use occupancy schedule
    1140              :                             bool const useMinOASchFlag = true, // Use min OA schedule in DesignSpecification:OutdoorAir object
    1141              :                             int const spaceNum = 0);           // Space index (if applicable)
    1142              : 
    1143              :         Real64 people(EnergyPlusData &state,
    1144              :                       int const zoneNum,               // Zone index
    1145              :                       bool const useOccSchFlag = true, // Use occupancy schedule
    1146              :                       int const spaceNum = 0);         // Space index (if applicable)
    1147              : 
    1148              :         Real64 desFlowPerZonePerson(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
    1149              : 
    1150              :         Real64 desFlowPerZone(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
    1151              : 
    1152              :         Real64 desFlowPerACH(EnergyPlusData &state, int const zoneNum, int const spaceNum = 0);
    1153              : 
    1154              :         Real64 calcOAFlowRate(EnergyPlusData &state,
    1155              :                               int ActualZoneNum,               // Zone index
    1156              :                               bool UseOccSchFlag,              // Zone occupancy schedule will be used instead of using total zone occupancy
    1157              :                               bool UseMinOASchFlag,            // Use min OA schedule in DesignSpecification:OutdoorAir object
    1158              :                               bool const PerPersonNotSet,      // when calculation should not include occupants (e.g., dual duct)
    1159              :                               bool const MaxOAVolFlowFlag,     // TRUE when calculation uses occupancy schedule  (e.g., dual duct)
    1160              :                               int const spaceNum = 0,          // Space index (if applicable)
    1161              :                               bool const calcIAQMethods = true // For IAQProcedure, PCOccSch, and PCDesOcc, calculate if true, return zero if false
    1162              :         );
    1163              : 
    1164              :         Sched::Schedule *getZoneFlowFracSched(EnergyPlusData &state, bool notAllSame);
    1165              : 
    1166              :         Sched::Schedule *getZonePropCtlMinRateSched(EnergyPlusData &state, bool notAllSame);
    1167              :     };
    1168              : 
    1169              :     struct ZoneAirDistributionData
    1170              :     {
    1171              :         // Members
    1172              :         std::string Name;
    1173              :         std::string ZoneADEffSchName;              // - Zone air distribution effectiveness schedule name
    1174              :         Real64 ZoneADEffCooling;                   // - Zone air distribution effectiveness in cooling mode
    1175              :         Real64 ZoneADEffHeating;                   // - Zone air distribution effectiveness in heating mode
    1176              :         Real64 ZoneSecondaryRecirculation;         // - Zone air secondary recirculation ratio
    1177              :         Sched::Schedule *zoneADEffSched = nullptr; // - Zone air distribution effectiveness schedule index
    1178              :         Real64 ZoneVentilationEff;                 // Zone ventilation effectiveness
    1179              : 
    1180              :         // Default Constructor
    1181           49 :         ZoneAirDistributionData() : ZoneADEffCooling(1.0), ZoneADEffHeating(1.0), ZoneSecondaryRecirculation(0.0), ZoneVentilationEff(0.0)
    1182              :         {
    1183           49 :         }
    1184              : 
    1185              :         Real64 calculateEz(EnergyPlusData &state, int ZoneNum); // Zone index
    1186              :     };
    1187              : 
    1188              :     // Resets Data globals so that previously set variables are not used in other equipment models
    1189              :     void resetHVACSizingGlobals(EnergyPlusData &state,
    1190              :                                 int curZoneEqNum,
    1191              :                                 int curSysNum,
    1192              :                                 bool &firstPassFlag // Can be set to false during the routine
    1193              :     );
    1194              : 
    1195              :     void GetCoilDesFlowT(EnergyPlusData &state,
    1196              :                          int SysNum,           // central air system index
    1197              :                          Real64 CpAir,         // specific heat to be used in calculations [J/kgC]
    1198              :                          Real64 &DesFlow,      // returned design mass flow [kg/s]
    1199              :                          Real64 &DesExitTemp,  // returned design coil exit temperature [kg/s]
    1200              :                          Real64 &DesExitHumRat // returned design coil exit humidity ratio [kg/kg]
    1201              :     );
    1202              : 
    1203              :     Real64 calcDesignSpecificationOutdoorAir(
    1204              :         EnergyPlusData &state,
    1205              :         int const DSOAPtr,                   // Pointer to DesignSpecification:OutdoorAir object
    1206              :         int const ActualZoneNum,             // Zone index
    1207              :         bool const UseOccSchFlag,            // Zone occupancy schedule will be used instead of using total zone occupancy
    1208              :         bool const UseMinOASchFlag,          // Use min OA schedule in DesignSpecification:OutdoorAir object
    1209              :         bool const PerPersonNotSet = false,  // when calculation should not include occupants (e.g., dual duct)
    1210              :         bool const MaxOAVolFlowFlag = false, // TRUE when calculation uses occupancy schedule  (e.g., dual duct)
    1211              :         int const spaceNum = 0,              // Space index (if applicable)
    1212              :         bool const calcIAQMethods = true);   // For IAQProcedure, PCOccSch, and PCDesOcc, calculate if true, return zero if false
    1213              : 
    1214              :     int getDefaultOAReq(EnergyPlusData &state); // get index to default OA requirements - used by Controller:MechanicalVentilation
    1215              : 
    1216              : } // namespace DataSizing
    1217              : 
    1218              : struct SizingData : BaseGlobalStruct
    1219              : {
    1220              :     int NumOARequirements = 0;                                  // Number of OA Requirements objects
    1221              :     int OARequirements_Default = 0;                             // Index to default DesignSpecification:OutdoorAir
    1222              :     int NumZoneAirDistribution = 0;                             // Number of zone air distribution objects
    1223              :     int NumZoneSizingInput = 0;                                 // Number of Zone Sizing objects
    1224              :     int NumSysSizInput = 0;                                     // Number of System Sizing objects
    1225              :     int NumPltSizInput = 0;                                     // Number of Plant Sizing objects
    1226              :     int CurSysNum = 0;                                          // Current Air System index (0 if not in air loop)
    1227              :     int CurOASysNum = 0;                                        // Current outside air system index (0 if not in OA Sys)
    1228              :     int CurZoneEqNum = 0;                                       // Current Zone Equipment index (0 if not simulating ZoneEq)
    1229              :     int CurTermUnitSizingNum = 0;                               // Current terminal unit sizing index for TermUnitSizing and TermUnitFinalZoneSizing
    1230              :     int CurBranchNum = 0;                                       // Index of branch being simulated (or 0 if not air loop)
    1231              :     HVAC::AirDuctType CurDuctType = HVAC::AirDuctType::Invalid; // Duct type of current branch
    1232              :     int CurLoopNum = 0;                                         // the current plant loop index
    1233              :     int CurCondLoopNum = 0;                                     // the current condenser loop number
    1234              :     int CurEnvirNumSimDay = 0;                                  // current environment number for day simulated
    1235              :     int CurOverallSimDay = 0;                                   // current day of simulation
    1236              :     int NumTimeStepsInAvg = 0;                                  // number of time steps in the averaging window for the design flow and load sequences
    1237              :     int SaveNumPlantComps = 0;                                  // Number of components using water as an energy source or sink (e.g. water coils)
    1238              :     int DataTotCapCurveIndex = 0;                               // index to total capacity as a function of temperature curve
    1239              :     Real64 DataTotCapCurveValue = 0;                            // value of total capacity as a function of temperature curve for CoilVRF_FluidTCtrl_*
    1240              :     int DataPltSizCoolNum = 0;                                  // index to cooling plant sizing data
    1241              :     int DataPltSizHeatNum = 0;                                  // index to heating plant sizing data
    1242              :     int DataWaterLoopNum = 0;                                   // index to plant water loop
    1243              :     int DataCoilNum = 0;                                        // index to coil object
    1244              :     HVAC::FanOp DataFanOp = HVAC::FanOp::Invalid;               // fan operating mode (FanOp::Continuous or FanOp::Cycling)
    1245              :     bool DataCoilIsSuppHeater = false;                          // TRUE if heating coil used as supplemental heater
    1246              :     bool DataIsDXCoil = false;                                  // TRUE if direct-expansion coil
    1247              :     bool DataAutosizable = true;                                // TRUE if component is autosizable
    1248              :     bool DataEMSOverrideON = false;                             // boolean determines if user relies on EMS to override autosizing
    1249              :     bool DataScalableSizingON = false;                          // boolean determines scalable flow sizing is specified
    1250              :     bool DataScalableCapSizingON = false;                       // boolean determines scalable capacity sizing is specified
    1251              :     bool DataSysScalableFlowSizingON = false;                   // boolean determines scalable system flow sizing is specified
    1252              :     bool DataSysScalableCapSizingON = false;                    // boolean determines scalable system capacity sizing is specified
    1253              :     bool SysSizingRunDone = false;                              // True if a system sizing run is successfully completed.
    1254              :     bool TermUnitSingDuct = false;                              // TRUE if a non-induction single duct terminal unit
    1255              :     bool TermUnitPIU = false;                                   // TRUE if a powered induction terminal unit
    1256              :     bool TermUnitIU = false;                                    // TRUE if an unpowered induction terminal unit
    1257              :     bool ZoneEqFanCoil = false;                                 // TRUE if a 4 pipe fan coil unit is being simulated
    1258              :     bool ZoneEqOutdoorAirUnit = false;                          // TRUE if an OutdoorAirUnit is being simulated
    1259              :     bool ZoneEqUnitHeater = false;                              // TRUE if a unit heater is being simulated
    1260              :     bool ZoneEqUnitVent = false;                                // TRUE if a unit ventilator unit is being simulated
    1261              :     bool ZoneEqVentedSlab = false;                              // TRUE if a ventilated slab is being simulated
    1262              :     bool ZoneEqDXCoil = false;                                  // TRUE if a ZoneHVAC DX coil is being simulated
    1263              :     bool ZoneEqUnitarySys = false;                              // TRUE if a zone UnitarySystem is being simulated
    1264              :     bool ZoneCoolingOnlyFan = false;                            // TRUE if a ZoneHVAC DX cooling coil is only coil in parent
    1265              :     bool ZoneHeatingOnlyFan = false;                            // TRUE if zone unit only does heating and contains a fam (such as Unit Heater)
    1266              :     bool ZoneSizingRunDone = false;                             // True if a zone sizing run has been successfully completed.
    1267              :     bool DataErrorsFound = false;                               // used for simulation termination when errors are found
    1268              :     bool DataDXCoolsLowSpeedsAutozize = false;                  // true allows reporting lower speed CoilCoolingCurveFits Autosize
    1269              :     Real64 AutoVsHardSizingThreshold = 0.1;                     // criteria threshold used to determine if user hard size and autosize disagree 10%
    1270              :     Real64 AutoVsHardSizingDeltaTempThreshold = 1.5;            // temperature criteria threshold for autosize versus hard size [C]
    1271              :     Real64 DataCoilSizingAirInTemp = 0.0;                       // saves sizing data for use in coil object reporting
    1272              :     Real64 DataCoilSizingAirInHumRat = 0.0;                     // saves sizing data for use in coil object reporting
    1273              :     Real64 DataCoilSizingAirOutTemp = 0.0;                      // saves sizing data for use in coil object reporting
    1274              :     Real64 DataCoilSizingAirOutHumRat = 0.0;                    // saves sizing data for use in coil object reporting
    1275              :     Real64 DataCoilSizingFanCoolLoad = 0.0;                     // saves sizing data for use in coil object reporting
    1276              :     Real64 DataCoilSizingCapFT = 1.0;                           // saves sizing data for use in coil object reporting
    1277              :     bool DataDesAccountForFanHeat = true;                       // include fan heat when true
    1278              :     Real64 DataDesInletWaterTemp = 0.0;                         // coil inlet water temperature used for warning messages
    1279              :     Real64 DataDesInletAirHumRat = 0.0;                         // coil inlet air humidity ratio used for warning messages
    1280              :     Real64 DataDesInletAirTemp = 0.0;                           // coil inlet air temperature used for warning messages
    1281              :     Real64 DataDesOutletAirTemp = 0.0;                          // coil outlet air temperature used for sizing
    1282              :     Real64 DataDesOutletAirHumRat = 0.0;                        // coil air outlet humidity ratio used in sizing calculations [kg water / kg dry air]
    1283              :     Real64 DataCoolCoilCap = 0.0;                               // cooling coil capacity used for sizing with scalable inputs [W]
    1284              :     Real64 DataFlowUsedForSizing = 0.0;                         // air flow rate used for sizing with scalable inputs [m3/s]
    1285              :     Real64 DataAirFlowUsedForSizing = 0.0;                      // air flow rate used for sizing with scalable inputs [m3/s]
    1286              :     Real64 DataWaterFlowUsedForSizing = 0.0;                    // water flow rate used for sizing with scalable inputs [m3/s]
    1287              :     Real64 DataCapacityUsedForSizing = 0.0;                     // capacity used for sizing with scalable inputs [W]
    1288              :     Real64 DataDesignCoilCapacity = 0.0;                        // calculated capacity of coil at end of UA calculation
    1289              :     Real64 DataHeatSizeRatio = 1.0;                             // heating coil size as a ratio of cooling coil capacity
    1290              :     Real64 DataEMSOverride = 0.0;                               // value of EMS variable used to override autosizing
    1291              :     Real64 DataBypassFrac = 0.0;                                // value of bypass fraction for Coil:Cooling:DX:TwoStageWithHumidityControlMode coils
    1292              :     Real64 DataFracOfAutosizedCoolingAirflow = 1.0;             // fraction of design cooling supply air flow rate
    1293              :     Real64 DataFracOfAutosizedHeatingAirflow = 1.0;             // fraction of design heating supply air flow rate
    1294              :     Real64 DataFlowPerCoolingCapacity = 0.0;                    // cooling supply air flow per unit cooling capacity
    1295              :     Real64 DataFlowPerHeatingCapacity = 0.0;                    // heating supply air flow per unit heating capacity
    1296              :     Real64 DataFracOfAutosizedCoolingCapacity = 1.0;            // fraction of autosized cooling capacity
    1297              :     Real64 DataFracOfAutosizedHeatingCapacity = 1.0;            // fraction of autosized heating capacit
    1298              :     Real64 DataAutosizedCoolingCapacity = 0.0;                  // Autosized cooling capacity used for multiplying flow per capacity to get flow rate
    1299              :     Real64 DataAutosizedHeatingCapacity = 0.0;                  // Autosized heating capacit used for multiplying flow per capacity to get flow rate
    1300              :     Real64 DataConstantUsedForSizing = 0.0;                     // base value used for sizing inputs that are ratios of other inputs
    1301              :     Real64 DataFractionUsedForSizing = 0.0;               // fractional value of base value used for sizing inputs that are ratios of other inputs
    1302              :     Real64 DataNonZoneNonAirloopValue = 0.0;              // used when equipment is not located in a zone or airloop
    1303              :     Real64 DataSizingFraction = 1.0;                      // used when ratios of sizing is required
    1304              :     int DataZoneUsedForSizing = 0;                        // pointer to control zone for air loop equipment
    1305              :     int DataZoneNumber = 0;                               // a pointer to a served by zoneHVAC equipment
    1306              :     int NumZoneHVACSizing = 0;                            // Number of design specification zone HVAC sizing objects
    1307              :     int NumAirTerminalSizingSpec = 0;                     // Number of design specfication air terminal sizing objects
    1308              :     int NumAirTerminalUnits = 0;                          // Number of air terminal units (same as total number of zone inlet nodes)
    1309              :     Real64 DXCoolCap = 0.0;                               // The rated cooling capacity of a DX unit.
    1310              :     Real64 GlobalHeatSizingFactor = 0.0;                  // the global heating sizing ratio
    1311              :     Real64 GlobalCoolSizingFactor = 0.0;                  // the global cooling sizing ratio
    1312              :     Real64 SuppHeatCap = 0.0;                             // the heating capacity of the supplemental heater in a unitary system
    1313              :     Real64 UnitaryHeatCap = 0.0;                          // the heating capacity of a unitary system
    1314              :     char SizingFileColSep = DataStringGlobals::CharComma; // Character to separate columns in sizing outputs
    1315              :     int DataDesicDehumNum = 0;                            // index to desiccant dehumidifier
    1316              :     bool DataDesicRegCoil = false;                        // TRUE if heating coil desiccant regeneration coil
    1317              :     bool HRFlowSizingFlag = false;                        // True, if it is a heat recovery heat exchanger flow sizing
    1318              :     Real64 DataWaterCoilSizCoolDeltaT = 0.0;              // used for sizing cooling coil water design flow rate
    1319              :     Real64 DataWaterCoilSizHeatDeltaT = 0.0;              // used for sizing heating coil water design flow rate
    1320              :     bool DataNomCapInpMeth = false;                       // True if heating coil is sized by CoilPerfInpMeth == NomCa
    1321              :     HVAC::FanType DataFanType = HVAC::FanType::Invalid;   // Fan type used during sizing
    1322              :     int DataFanIndex = -1;                                // Fan index used during sizing
    1323              :     HVAC::FanPlace DataFanPlacement = HVAC::FanPlace::Invalid; // identifies location of fan wrt coil
    1324              :     int DataDXSpeedNum = 0;
    1325              :     int DataCoolCoilType = -1;
    1326              :     int DataCoolCoilIndex = -1;
    1327              :     EPVector<DataSizing::OARequirementsData> OARequirements;
    1328              :     EPVector<DataSizing::ZoneAirDistributionData> ZoneAirDistribution;
    1329              :     EPVector<DataSizing::ZoneSizingInputData> ZoneSizingInput;            // Input data for zone sizing
    1330              :     Array2D<DataSizing::ZoneSizingData> ZoneSizing;                       // Data for zone sizing (all data, all design)
    1331              :     EPVector<DataSizing::ZoneSizingData> FinalZoneSizing;                 // Final data for zone sizing including effects
    1332              :     Array2D<DataSizing::ZoneSizingData> CalcZoneSizing;                   // Data for zone sizing (all data)
    1333              :     EPVector<DataSizing::ZoneSizingData> CalcFinalZoneSizing;             // Final data for zone sizing (calculated only)
    1334              :     Array2D<DataSizing::ZoneSizingData> SpaceSizing;                      // Data for space sizing (all data, all design)
    1335              :     EPVector<DataSizing::ZoneSizingData> FinalSpaceSizing;                // Final data for space sizing including effects
    1336              :     Array2D<DataSizing::ZoneSizingData> CalcSpaceSizing;                  // Data for space sizing (all data)
    1337              :     EPVector<DataSizing::ZoneSizingData> CalcFinalSpaceSizing;            // Final data for space sizing (calculated only)
    1338              :     EPVector<DataSizing::TermUnitZoneSizingData> TermUnitFinalZoneSizing; // Final data for sizing terminal units (indexed per terminal unit)
    1339              :     EPVector<DataSizing::SystemSizingInputData> SysSizInput;              // Input data array for system sizing object
    1340              :     Array2D<DataSizing::SystemSizingData> SysSizing;                      // Data array for system sizing (all data)
    1341              :     EPVector<DataSizing::SystemSizingData> FinalSysSizing;                // Data array for system sizing (max heat/cool)
    1342              :     EPVector<DataSizing::SystemSizingData> CalcSysSizing;                 // Data array for system sizing (max heat/cool)
    1343              :     EPVector<DataSizing::SysSizPeakDDNumData> SysSizPeakDDNum;            // data array for peak des day indices
    1344              :     EPVector<DataSizing::TermUnitSizingData> TermUnitSizing;              // Data added in sizing routines (indexed per terminal unit)
    1345              :     EPVector<DataSizing::ZoneEqSizingData> ZoneEqSizing;                  // Data added in zone eq component sizing routines
    1346              :     EPVector<DataSizing::ZoneEqSizingData> UnitarySysEqSizing;            // Data added in unitary system sizing routines
    1347              :     EPVector<DataSizing::ZoneEqSizingData> OASysEqSizing;                 // Data added in unitary system sizing routines
    1348              :     EPVector<DataSizing::PlantSizingData> PlantSizData;                   // Input data array for plant sizing
    1349              :     EPVector<DataSizing::DesDayWeathData> DesDayWeath;                    // design day weather saved at major time step
    1350              :     EPVector<DataSizing::CompDesWaterFlowData> CompDesWaterFlow;          // array to store components' design water flow
    1351              :     EPVector<DataSizing::ZoneHVACSizingData> ZoneHVACSizing;              // Input data for zone HVAC sizing
    1352              :     EPVector<DataSizing::AirTerminalSizingSpecData>
    1353              :         AirTerminalSizingSpec;                                   // Input data for zone HVAC sizing used only for Facility Load Component Summary
    1354              :     EPVector<DataSizing::FacilitySizingData> CalcFacilitySizing; // Data for zone sizing
    1355              :     DataSizing::FacilitySizingData CalcFinalFacilitySizing;      // Final data for zone sizing
    1356              :     Array1D<Real64> VbzByZone;                                   // saved value of ZoneOAUnc which is Vbz used in 62.1 tabular report
    1357              :     Array1D<Real64> VdzClgByZone;    // saved value of cooling based ZoneSA which is Vdz used in 62.1 tabular report (also used for zone level Vps)
    1358              :     Array1D<Real64> VdzMinClgByZone; // minimum discharge flow for cooling, Vdz includes secondary and primary flows for dual path
    1359              :     Array1D<Real64> VdzHtgByZone;    // saved value of heating based ZoneSA which is Vdz used in 62.1 tabular report (also used for zone level Vps)
    1360              :     Array1D<Real64> VdzMinHtgByZone; // minimum discharge flow for heating, Vdz includes secondary and primary flows for dual path
    1361              :     Array1D<Real64> ZdzClgByZone;    // minimum discharge outdoor-air fraction for cooling
    1362              :     Array1D<Real64> ZdzHtgByZone;    // minimum discharge outdoor-air fraction for heating
    1363              :     Array1D<Real64> VpzClgByZone;    // saved value of cooling based ZonePA which is Vpz used in 62.1 tabular report
    1364              :     Array1D<Real64> VpzMinClgByZone; // saved value of minimum cooling based ZonePA which is VpzClg-min used in 62.1 tabular report
    1365              :     Array1D<Real64> VpzHtgByZone;    // saved value of heating based ZonePA which is Vpz used in 62.1 tabular report
    1366              :     Array1D<Real64> VpzMinHtgByZone; // saved value of minimum heating based ZonePA which is VpzHtg-min used in 62.1 tabular report
    1367              :     Array1D<Real64> VpzClgSumBySys;  // sum of saved value of cooling based ZonePA which is Vpz-sum used in 62.1 tabular report
    1368              :     Array1D<Real64> VpzHtgSumBySys;  // sum of saved value of heating based ZonePA which is Vpz-sum used in 62.1 tabular report
    1369              :     Array1D<Real64> PzSumBySys;      // sum of design people for system, Pz_sum
    1370              :     Array1D<Real64> PsBySys;         // sum of peak concurrent people by system, Ps
    1371              :     Array1D<Real64> DBySys;          // Population Diversity by system
    1372              :     Array1D<Real64> SumRpxPzBySys;   // Sum of per person OA times number of people by system, No D yet
    1373              :     Array1D<Real64> SumRaxAzBySys;   // sum of per area OA time zone area by system, does not get altered by D
    1374              :     Array1D<std::string> PeakPsOccurrenceDateTimeStringBySys;    // string describing when Ps peak occurs
    1375              :     Array1D<std::string> PeakPsOccurrenceEnvironmentStringBySys; // string describing Environment when Ps peak occurs
    1376              :     Array1D<Real64> VouBySys;                                    // uncorrected system outdoor air requirement, for std 62.1 VRP
    1377              :     Array1D<Real64> VpsClgBySys;                                 // System primary airflow Vps, for cooling for std 62.1 VRP
    1378              :     Array1D<Real64> VpsHtgBySys;                                 // system primary airflow Vps, for heating for std 62.1 VRP
    1379              :     Array1D<Real64> FaByZoneHeat;                                // saved value of Fa used in 62.1 tabular report
    1380              :     Array1D<Real64> FbByZoneCool;                                // saved value of Fb used in 62.1 tabular report
    1381              :     Array1D<Real64> FbByZoneHeat;                                // saved value of Fb used in 62.1 tabular report
    1382              :     Array1D<Real64> FcByZoneCool;                                // saved value of Fc used in 62.1 tabular report
    1383              :     Array1D<Real64> FcByZoneHeat;                                // saved value of Fc used in 62.1 tabular report
    1384              :     Array1D<Real64> XsBySysCool;                                 // saved value of Xs used in 62.1 tabular report
    1385              :     Array1D<Real64> XsBySysHeat;                                 // saved value of Xs used in 62.1 tabular report
    1386              :     Array1D<Real64> EvzByZoneCool;                               // saved value of Evz (zone vent effy) used in 62.1 tabular report
    1387              :     Array1D<Real64> EvzByZoneHeat;                               // saved value of Evz (zone vent effy) used in 62.1 tabular report
    1388              :     Array1D<Real64> EvzByZoneCoolPrev;                           // saved value of Evz (zone vent effy) used in 62.1 tabular report
    1389              :     Array1D<Real64> EvzByZoneHeatPrev;                           // saved value of Evz (zone vent effy) used in 62.1 tabular report
    1390              :     Array1D<Real64> VotClgBySys;     // saved value of cooling ventilation required at primary AHU, used in 62.1 tabular report
    1391              :     Array1D<Real64> VotHtgBySys;     // saved value of heating ventilation required at primary AHU, used in 62.1 tabular report
    1392              :     Array1D<Real64> VozSumClgBySys;  // saved value of cooling ventilation required at clg zones
    1393              :     Array1D<Real64> VozSumHtgBySys;  // saved value of cooling ventilation required at htg zones
    1394              :     Array1D<Real64> TotCoolCapTemp;  // scratch variable used for calculating peak load [W]
    1395              :     Array1D<Real64> EvzMinBySysHeat; // saved value of EvzMin used in 62.1 tabular report
    1396              :     Array1D<Real64> EvzMinBySysCool; // saved value of EvzMin used in 62.1 tabular report
    1397              :     Array1D<Real64> FaByZoneCool;    // triggers allocation in UpdateSysSizing
    1398              :     Array1D<Real64> SensCoolCapTemp; // triggers allocation in UpdateSysSizing
    1399              : 
    1400         2126 :     void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
    1401              :     {
    1402         2126 :     }
    1403              : 
    1404         1152 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
    1405              :     {
    1406         1152 :     }
    1407              : 
    1408         2100 :     void clear_state() override
    1409              :     {
    1410         2100 :         new (this) SizingData();
    1411         2100 :     }
    1412              : };
    1413              : 
    1414              : } // namespace EnergyPlus
    1415              : 
    1416              : #endif
        

Generated by: LCOV version 2.0-1