LCOV - code coverage report
Current view: top level - EnergyPlus - DataHeatBalance.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 54 57 94.7 %
Date: 2023-01-17 19:17:23 Functions: 93 124 75.0 %

          Line data    Source code
       1             : // EnergyPlus, Copyright (c) 1996-2023, 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 DataHeatBalance_hh_INCLUDED
      49             : #define DataHeatBalance_hh_INCLUDED
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array1D.hh>
      53             : #include <ObjexxFCL/Array2D.hh>
      54             : #include <ObjexxFCL/Array3D.hh>
      55             : #include <ObjexxFCL/Array4D.hh>
      56             : #include <ObjexxFCL/Optional.hh>
      57             : #include <ObjexxFCL/Reference.hh>
      58             : 
      59             : // EnergyPlus Headers
      60             : #include <EnergyPlus/ConvectionConstants.hh>
      61             : #include <EnergyPlus/Data/BaseData.hh>
      62             : #include <EnergyPlus/DataComplexFenestration.hh>
      63             : #include <EnergyPlus/DataGlobals.hh>
      64             : #include <EnergyPlus/DataSurfaces.hh>
      65             : #include <EnergyPlus/DataVectorTypes.hh>
      66             : #include <EnergyPlus/DataWindowEquivalentLayer.hh>
      67             : #include <EnergyPlus/EPVector.hh>
      68             : #include <EnergyPlus/EnergyPlus.hh>
      69             : #include <EnergyPlus/ExteriorEnergyUse.hh>
      70             : 
      71             : namespace EnergyPlus {
      72             : 
      73             : // Forward declarations
      74             : struct EnergyPlusData;
      75             : 
      76             : namespace DataHeatBalance {
      77             : 
      78             :     // Using/Aliasing
      79             :     using namespace DataComplexFenestration;
      80             :     using DataComplexFenestration::GapDeflectionState;
      81             :     using DataComplexFenestration::GapSupportPillar;
      82             :     using DataComplexFenestration::WindowComplexShade;
      83             :     using DataComplexFenestration::WindowThermalModelParams;
      84             :     using DataSurfaces::MaxSlatAngs;
      85             :     using DataVectorTypes::Vector;
      86             : 
      87             :     // Parameters to indicate material group type for use with the Material
      88             :     // derived type (see below):
      89             :     enum class MaterialGroup
      90             :     {
      91             :         Invalid = -1,
      92             :         RegularMaterial,
      93             :         Air,
      94             :         Shade,
      95             :         WindowGlass,
      96             :         WindowGas,
      97             :         WindowBlind,
      98             :         WindowGasMixture,
      99             :         Screen,
     100             :         EcoRoof,
     101             :         IRTMaterial,
     102             :         WindowSimpleGlazing,
     103             :         ComplexWindowShade,
     104             :         ComplexWindowGap,
     105             :         GlassEquivalentLayer,
     106             :         ShadeEquivalentLayer,
     107             :         DrapeEquivalentLayer,
     108             :         BlindEquivalentLayer,
     109             :         ScreenEquivalentLayer,
     110             :         GapEquivalentLayer,
     111             :         Num
     112             :     };
     113             : 
     114             :     // Parameters for Interior and Exterior Solar Distribution
     115             :     enum class Shadowing
     116             :     {
     117             :         Invalid = -1,
     118             :         Minimal,              // all incoming solar hits floor, no exterior shadowing except reveals
     119             :         FullExterior,         // all incoming solar hits floor, full exterior shadowing
     120             :         FullInteriorExterior, // full interior solar distribution, full exterior solar shadowing
     121             :         FullExteriorWithRefl, // all incoming solar hits floor, full exterior shadowing and reflections
     122             :         Num
     123             :     };
     124             : 
     125             :     // Parameters to indicate the zone type for use with the Zone derived
     126             :     // type (see below--Zone%OfType):
     127             :     constexpr int StandardZone(1);
     128             : 
     129             :     // Parameters for WarmupDays
     130             :     constexpr int DefaultMaxNumberOfWarmupDays(25); // Default maximum number of warmup days allowed
     131             :     constexpr int DefaultMinNumberOfWarmupDays(1);  // Default minimum number of warmup days allowed
     132             : 
     133             :     // Parameters for ZoneAirSolutionAlgo
     134             :     enum class SolutionAlgo
     135             :     {
     136             :         Invalid = -1,
     137             :         ThirdOrder,
     138             :         AnalyticalSolution,
     139             :         EulerMethod,
     140             :         Num
     141             :     };
     142             : 
     143             :     // Parameter for MRT calculation type
     144             :     enum class CalcMRT
     145             :     {
     146             :         Invalid = -1,
     147             :         ZoneAveraged,
     148             :         SurfaceWeighted,
     149             :         AngleFactor,
     150             :         Num
     151             :     };
     152             : 
     153             :     // Parameters for Ventilation
     154             :     enum class VentilationType
     155             :     {
     156             :         Invalid = -1,
     157             :         Natural,
     158             :         Intake,
     159             :         Exhaust,
     160             :         Balanced,
     161             :         Num
     162             :     };
     163             : 
     164             :     // Parameters for hybrid ventilation using Ventilation and Mixing objects
     165             :     enum class HybridCtrlType
     166             :     {
     167             :         Invalid = -1,
     168             :         Indiv,
     169             :         Close,
     170             :         Global,
     171             :         Num
     172             :     };
     173             : 
     174             :     // System type, detailed refrigeration or refrigerated case rack
     175             :     enum class RefrigSystemType
     176             :     {
     177             :         Invalid = -1,
     178             :         Detailed,
     179             :         Rack,
     180             :         Num
     181             :     };
     182             : 
     183             :     // Refrigeration condenser type
     184             :     enum class RefrigCondenserType
     185             :     {
     186             :         Invalid = -1,
     187             :         Air,
     188             :         Evap,
     189             :         Water,
     190             :         Cascade,
     191             :         WaterHeater,
     192             :         Num
     193             :     };
     194             : 
     195             :     // Parameters for type of infiltration model
     196             :     enum class InfiltrationModelType
     197             :     {
     198             :         Invalid = -1,
     199             :         DesignFlowRate,
     200             :         ShermanGrimsrud,
     201             :         AIM2,
     202             :         Num
     203             :     };
     204             : 
     205             :     // Parameters for type of ventilation model
     206             :     enum class VentilationModelType
     207             :     {
     208             :         Invalid = -1,
     209             :         DesignFlowRate,
     210             :         WindAndStack,
     211             :         Num
     212             :     };
     213             : 
     214             :     // Parameters for type of zone air balance model
     215             :     enum class AirBalance
     216             :     {
     217             :         Invalid = -1,
     218             :         None,
     219             :         Quadrature,
     220             :         Num
     221             :     };
     222             : 
     223             :     // Parameter for source zone air flow mass balance infiltration treatment
     224             :     enum class InfiltrationFlow
     225             :     {
     226             :         Invalid = -1,
     227             :         No,
     228             :         Add,
     229             :         Adjust,
     230             :         Num
     231             :     };
     232             : 
     233             :     enum class InfiltrationZoneType
     234             :     {
     235             :         Invalid = -1,
     236             :         MixingSourceZonesOnly,
     237             :         AllZones,
     238             :         Num
     239             :     };
     240             : 
     241             :     // zone air flow balancing method
     242             :     enum class AdjustmentType
     243             :     {
     244             :         Invalid = -1,
     245             :         AdjustMixingOnly,
     246             :         AdjustReturnOnly,
     247             :         AdjustMixingThenReturn,
     248             :         AdjustReturnThenMixing,
     249             :         NoAdjustReturnAndMixing,
     250             :         Num
     251             :     };
     252             : 
     253             :     enum class IntGainType
     254             :     {
     255             :         Invalid = -1,
     256             :         People,
     257             :         Lights,
     258             :         ElectricEquipment,
     259             :         GasEquipment,
     260             :         HotWaterEquipment,
     261             :         SteamEquipment,
     262             :         OtherEquipment,
     263             :         ZoneBaseboardOutdoorTemperatureControlled,
     264             :         ZoneContaminantSourceAndSinkCarbonDioxide,
     265             :         WaterUseEquipment,
     266             :         DaylightingDeviceTubular,
     267             :         WaterHeaterMixed,
     268             :         WaterHeaterStratified,
     269             :         ThermalStorageChilledWaterMixed,
     270             :         ThermalStorageChilledWaterStratified,
     271             :         GeneratorFuelCell,
     272             :         GeneratorMicroCHP,
     273             :         ElectricLoadCenterTransformer,
     274             :         ElectricLoadCenterInverterSimple,
     275             :         ElectricLoadCenterInverterFunctionOfPower,
     276             :         ElectricLoadCenterInverterLookUpTable,
     277             :         ElectricLoadCenterStorageLiIonNmcBattery,
     278             :         ElectricLoadCenterStorageBattery,
     279             :         ElectricLoadCenterStorageSimple,
     280             :         PipeIndoor,
     281             :         RefrigerationCase,
     282             :         RefrigerationCompressorRack,
     283             :         RefrigerationSystemAirCooledCondenser,
     284             :         RefrigerationTransSysAirCooledGasCooler,
     285             :         RefrigerationSystemSuctionPipe,
     286             :         RefrigerationTransSysSuctionPipeMT,
     287             :         RefrigerationTransSysSuctionPipeLT,
     288             :         RefrigerationSecondaryReceiver,
     289             :         RefrigerationSecondaryPipe,
     290             :         RefrigerationWalkIn,
     291             :         Pump_VarSpeed,
     292             :         Pump_ConSpeed,
     293             :         Pump_Cond,
     294             :         PumpBank_VarSpeed,
     295             :         PumpBank_ConSpeed,
     296             :         ZoneContaminantSourceAndSinkGenericContam,
     297             :         PlantComponentUserDefined,
     298             :         CoilUserDefined,
     299             :         ZoneHVACForcedAirUserDefined,
     300             :         AirTerminalUserDefined,
     301             :         PackagedTESCoilTank,
     302             :         ElectricEquipmentITEAirCooled,
     303             :         SecCoolingDXCoilSingleSpeed,
     304             :         SecHeatingDXCoilSingleSpeed,
     305             :         SecCoolingDXCoilTwoSpeed,
     306             :         SecCoolingDXCoilMultiSpeed,
     307             :         SecHeatingDXCoilMultiSpeed,
     308             :         ElectricLoadCenterConverter,
     309             :         FanSystemModel,
     310             :         Num
     311             :     };
     312             : 
     313             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::AirBalance::Num)> AirBalanceTypeNamesUC = {"NONE", "QUADRATURE"};
     314             : 
     315             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::InfiltrationFlow::Num)> InfiltrationFlowTypeNamesUC = {
     316             :         "NONE", "ADDINFILTRATIONFLOW", "ADJUSTINFILTRATIONFLOW"};
     317             : 
     318             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::InfiltrationFlow::Num)> InfiltrationFlowTypeNamesCC = {
     319             :         "None", "AddInfiltrationFlow", "AdjustInfiltrationFlow"};
     320             : 
     321             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::InfiltrationZoneType::Num)> InfiltrationZoneTypeNamesUC = {
     322             :         "MIXINGSOURCEZONESONLY", "ALLZONES"};
     323             : 
     324             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::InfiltrationZoneType::Num)> InfiltrationZoneTypeNamesCC = {
     325             :         "MixingSourceZonesOnly", "AllZones"};
     326             : 
     327             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::AdjustmentType::Num)> AdjustmentTypeNamesUC = {
     328             :         "ADJUSTMIXINGONLY", "ADJUSTRETURNONLY", "ADJUSTMIXINGTHENRETURN", "ADJUSTRETURNTHENMIXING", "NONE"};
     329             : 
     330             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::AdjustmentType::Num)> AdjustmentTypeNamesCC = {
     331             :         "AdjustMixingOnly", "AdjustReturnOnly", "AdjustMixingThenReturn", "AdjustReturnThenMixing", "None"};
     332             : 
     333             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::IntGainType::Num)> IntGainTypeNamesUC = {
     334             :         "PEOPLE",
     335             :         "LIGHTS",
     336             :         "ELECTRICEQUIPMENT",
     337             :         "GASEQUIPMENT",
     338             :         "HOTWATEREQUIPMENT",
     339             :         "STEAMEQUIPMENT",
     340             :         "OTHEREQUIPMENT",
     341             :         "ZONEBASEBOARD:OUTDOORTEMPERATURECONTROLLED",
     342             :         "ZONECONTAMINANTSOURCEANDSINK:CARBONDIOXIDE",
     343             :         "WATERUSE:EQUIPMENT",
     344             :         "DAYLIGHTINGDEVICE:TUBULAR",
     345             :         "WATERHEATER:MIXED",
     346             :         "WATERHEATER:STRATIFIED",
     347             :         "THERMALSTORAGE:CHILLEDWATER:MIXED",
     348             :         "THERMALSTORAGE:CHILLEDWATER:STRATIFIED",
     349             :         "GENERATOR:FUELCELL",
     350             :         "GENERATOR:MICROCHP",
     351             :         "ELECTRICLOADCENTER:TRANSFORMER",
     352             :         "ELECTRICLOADCENTER:INVERTER:SIMPLE",
     353             :         "ELECTRICLOADCENTER:INVERTER:FUNCTIONOFPOWER",
     354             :         "ELECTRICLOADCENTER:INVERTER:LOOKUPTABLE",
     355             :         "ELECTRICLOADCENTER:STORAGE:LIIONNMCBATTERY",
     356             :         "ELECTRICLOADCENTER:STORAGE:BATTERY",
     357             :         "ELECTRICLOADCENTER:STORAGE:SIMPLE",
     358             :         "PIPE:INDOOR",
     359             :         "REFRIGERATION:CASE",
     360             :         "REFRIGERATION:COMPRESSORRACK",
     361             :         "REFRIGERATION:SYSTEM:CONDENSER:AIRCOOLED",
     362             :         "REFRIGERATION:TRANSCRITICALSYSTEM:GASCOOLER:AIRCOOLED",
     363             :         "REFRIGERATION:SYSTEM:SUCTIONPIPE",
     364             :         "REFRIGERATION:TRANSCRITICALSYSTEM:SUCTIONPIPEMT",
     365             :         "REFRIGERATION:TRANSCRITICALSYSTEM:SUCTIONPIPELT",
     366             :         "REFRIGERATION:SECONDARYSYSTEM:RECEIVER",
     367             :         "REFRIGERATION:SECONDARYSYSTEM:PIPE",
     368             :         "REFRIGERATION:WALKIN",
     369             :         "PUMP:VARIABLESPEED",
     370             :         "PUMP:CONSTANTSPEED",
     371             :         "PUMP:VARIABLESPEED:CONDENSATE",
     372             :         "HEADEREDPUMPS:VARIABLESPEED",
     373             :         "HEADEREDPUMPS:CONSTANTSPEED",
     374             :         "ZONECONTAMINANTSOURCEANDSINK:GENERICCONTAMINANT",
     375             :         "PLANTCOMPONENT:USERDEFINED",
     376             :         "COIL:USERDEFINED",
     377             :         "ZONEHVAC:FORCEDAIR:USERDEFINED",
     378             :         "AIRTERMINAL:SINGLEDUCT:USERDEFINED",
     379             :         "COIL:COOLING:DX:SINGLESPEED:THERMALSTORAGE",
     380             :         "ELECTRICEQUIPMENT:ITE:AIRCOOLED",
     381             :         "COIL:COOLING:DX:SINGLESPEED",
     382             :         "COIL:HEATING:DX:SINGLESPEED",
     383             :         "COIL:COOLING:DX:TWOSPEED",
     384             :         "COIL:COOLING:DX:MULTISPEED",
     385             :         "COIL:HEATING:DX:MULTISPEED",
     386             :         "ELECTRICLOADCENTER:STORAGE:CONVERTER",
     387             :         "FAN:SYSTEMMODEL"};
     388             : 
     389             :     static constexpr std::array<std::string_view, static_cast<int>(DataHeatBalance::IntGainType::Num)> IntGainTypeNamesCC = {
     390             :         "People",
     391             :         "Lights",
     392             :         "ElectricEquipment",
     393             :         "GasEquipment",
     394             :         "HotWaterEquipment",
     395             :         "SteamEquipment",
     396             :         "OtherEquipment",
     397             :         "ZoneBaseboard:OutdoorTemperatureControlled",
     398             :         "ZoneContaminantSourceAndSink:CarbonDioxide",
     399             :         "WaterUse:Equipment",
     400             :         "DaylightingDevice:Tubular",
     401             :         "WaterHeater:Mixed",
     402             :         "WaterHeater:Stratified",
     403             :         "ThermalStorage:ChilledWater:Mixed",
     404             :         "ThermalStorage:ChilledWater:Stratified",
     405             :         "Generator:FuelCell",
     406             :         "Generator:MicroCHP",
     407             :         "ElectricLoadCenter:Transformer",
     408             :         "ElectricLoadCenter:Inverter:Simple",
     409             :         "ElectricLoadCenter:Inverter:FunctionOfPower",
     410             :         "ElectricLoadCenter:Inverter:LookUpTable",
     411             :         "ElectricLoadCenter:Storage:LiIonNMCBattery",
     412             :         "ElectricLoadCenter:Storage:Battery",
     413             :         "ElectricLoadCenter:Storage:Simple",
     414             :         "Pipe:Indoor",
     415             :         "Refrigeration:Case",
     416             :         "Refrigeration:CompressorRack",
     417             :         "Refrigeration:System:Condenser:AirCooled",
     418             :         "Refrigeration:TranscriticalSystem:GasCooler:AirCooled",
     419             :         "Refrigeration:System:SuctionPipe",
     420             :         "Refrigeration:TranscriticalSystem:SuctionPipeMT",
     421             :         "Refrigeration:TranscriticalSystem:SuctionPipeLT",
     422             :         "Refrigeration:SecondarySystem:Receiver",
     423             :         "Refrigeration:SecondarySystem:Pipe",
     424             :         "Refrigeration:WalkIn",
     425             :         "Pump:VariableSpeed",
     426             :         "Pump:ConstantSpeed",
     427             :         "Pump:VariableSpeed:Condensate",
     428             :         "HeaderedPumps:VariableSpeed",
     429             :         "HeaderedPumps:ConstantSpeed",
     430             :         "ZoneContaminantSourceAndSink:GenericContaminant",
     431             :         "PlantComponent:UserDefined",
     432             :         "Coil:UserDefined",
     433             :         "ZoneHVAC:ForcedAir:UserDefined",
     434             :         "AirTerminal:SingleDuct:UserDefined",
     435             :         "Coil:Cooling:DX:SingleSpeed:ThermalStorage",
     436             :         "ElectricEquipment:ITE:AirCooled",
     437             :         "Coil:Cooling:DX:SingleSpeed",
     438             :         "Coil:Heating:DX:SingleSpeed",
     439             :         "Coil:Cooling:DX:TwoSpeed",
     440             :         "Coil:Cooling:DX:MultiSpeed",
     441             :         "Coil:Heating:DX:MultiSpeed",
     442             :         "ElectricLoadCenter:Storage:Converter",
     443             :         "Fan:SystemModel"};
     444             : 
     445             :     // Parameters for checking surface heat transfer models
     446             :     constexpr Real64 HighDiffusivityThreshold(1.e-5);   // used to check if Material properties are out of line.
     447             :     constexpr Real64 ThinMaterialLayerThreshold(0.003); // 3 mm lower limit to expected material layers
     448             : 
     449             :     // Const for initialization
     450             :     constexpr Real64 ZoneInitialTemp(23.0);       // Zone temperature for initialization
     451             :     constexpr Real64 SurfInitialTemp(23.0);       // Surface temperature for initialization
     452             :     constexpr Real64 SurfInitialConvCoeff(3.076); // Surface convective coefficient for initialization
     453             : 
     454             :     // Air       Argon     Krypton   Xenon
     455             :     // Gas conductivity coefficients for gases in a mixture
     456             :     static constexpr std::array<std::array<Real64, 10>, 3> GasCoeffsCon = {{{2.873e-3, 2.285e-3, 9.443e-4, 4.538e-4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
     457             :                                                                             {7.760e-5, 5.149e-5, 2.826e-5, 1.723e-5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
     458             :                                                                             {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}};
     459             : 
     460             :     // Air       Argon     Krypton   Xenon
     461             :     // Gas viscosity coefficients for gases in a mixture
     462             :     static constexpr std::array<std::array<Real64, 10>, 3> GasCoeffsVis = {{{3.723e-6, 3.379e-6, 2.213e-6, 1.069e-6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
     463             :                                                                             {4.940e-8, 6.451e-8, 7.777e-8, 7.414e-8, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
     464             :                                                                             {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}};
     465             : 
     466             :     // Air       Argon     Krypton   Xenon
     467             :     // Gas specific heat coefficients for gases in a mixture
     468             :     static constexpr std::array<std::array<Real64, 10>, 3> GasCoeffsCp = {{
     469             :         {1002.737, 521.929, 248.091, 158.340, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
     470             :         {1.2324e-2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
     471             :         {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
     472             :     }};
     473             : 
     474             :     // Air       Argon     Krypton   Xenon
     475             :     static constexpr std::array<Real64, 10> GasWght = {
     476             :         28.97, 39.948, 83.8, 131.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; // Gas molecular weights for gases in a mixture
     477             : 
     478             :     // Gas specific heat ratios.  Used for gasses in low pressure
     479             :     static constexpr std::array<Real64, 10> GasSpecificHeatRatio = {1.4, 1.67, 1.68, 1.66, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     480             : 
     481           4 :     struct TCGlazingsType
     482             :     {
     483             :         // Members
     484             :         std::string Name;         // Name
     485             :         int NumGlzMat = 0;        // Number of TC glazing materials
     486             :         Array1D_int LayerPoint;   // Layer pointer
     487             :         Array1D<Real64> SpecTemp; // Temperature corresponding to the specified TC glazing optical data
     488             :         Array1D_string LayerName; // Name of the referenced WindowMaterial:Glazing object
     489             :     };
     490             : 
     491        1020 :     struct SpectralDataProperties
     492             :     {
     493             :         // Members
     494             :         std::string Name;           // Name of spectral data set
     495             :         int NumOfWavelengths = 0;   // Number of wavelengths in the data set
     496             :         Array1D<Real64> WaveLength; // Wavelength (microns)
     497             :         Array1D<Real64> Trans;      // Transmittance at normal incidence
     498             :         Array1D<Real64> ReflFront;  // Front reflectance at normal incidence
     499             :         Array1D<Real64> ReflBack;   // Back reflectance at normal incidence
     500             :     };
     501             : 
     502       31224 :     struct ZoneSpaceData
     503             :     {
     504             :         // Base class for zones and spaces.
     505             :         // For now, only including fields that are new to Space to avoid excess changes
     506             :         // due to case differences between existing space and zone field names.
     507             :         std::string Name;
     508             :         Real64 CeilingHeight = DataGlobalConstants::AutoCalculate; // Ceiling Height entered by user [m] or calculated
     509             :         Real64 Volume = DataGlobalConstants::AutoCalculate;        // Volume entered by user [m3] or calculated
     510             :         Real64 ExtGrossWallArea = 0.0;                             // Exterior Wall Area for Zone (Gross)
     511             :         Real64 ExteriorTotalSurfArea = 0.0;                        // Total surface area of all exterior surfaces for Zone
     512             :         int SystemZoneNodeNumber = 0;                              // This is the zone or space node number for the system for a controlled zone
     513             :     };
     514             : 
     515       15240 :     struct SpaceData : ZoneSpaceData
     516             :     {
     517             :         int zoneNum = 0;                                                  // Pointer to Zone wich contains this space
     518             :         Real64 userEnteredFloorArea = DataGlobalConstants::AutoCalculate; // User input floor area for this space
     519             :         std::string spaceType = "General";                                // Space type tag
     520             :         int spaceTypeNum = 0;                                             // Points to spaceType for this space
     521             :         EPVector<std::string> tags;                                       // Optional tags for reporting
     522             :         EPVector<int> surfaces;                                           // Pointers to surfaces in this space
     523             :         Real64 calcFloorArea = 0.0;                                       // Calculated floor area used for this space
     524             :         Real64 floorArea = 0.0;                                           // Floor area used for this space
     525             :         bool hasFloor = false;                                            // Has "Floor" surface
     526             :         Real64 fracZoneFloorArea = 0.0;                                   // fraction of total floor area for all spaces in zone
     527             :         Real64 fracZoneVolume = 0.0;                                      // fraction of total volume for all spaces in zone
     528             :         Real64 extWindowArea = 0.0;                                       // Exterior Window Area for space
     529             :         Real64 totalSurfArea = 0.0;                                       // Total surface area for space
     530             :         int radiantEnclosureNum = 0;                                      // Radiant exchange enclosure this space belongs to
     531             :         int solarEnclosureNum = 0;                                        // Solar distribution enclosure this space belongs to
     532             :         Real64 totOccupants = 0.0;     // total design occupancy (sum of NumberOfPeople for the space People objects, not multiplied)
     533             :         Real64 minOccupants = 0.0;     // minimum occupancy (sum of NomMinNumberPeople for the space People objects, not multiplied)
     534             :         Real64 maxOccupants = 0.0;     // maximum occupancy (sum of NomMaxNumberPeople for the space People objects, not multiplied)
     535             :         bool isRemainderSpace = false; // True if this space is auto-generated "-Remainder" space
     536             :         std::vector<ExteriorEnergyUse::ExteriorFuelUsage> otherEquipFuelTypeNums; // List of fuel types used by other equipment in this space
     537             :         std::vector<std::string> otherEquipFuelTypeNames;                         // List of fuel types used by other equipment in this space
     538             : 
     539             :         // Pointers to Surface Data Structure
     540             :         // |AllSurfF                                                                      |AllSurfL
     541             :         // |            |HTSurfF                                                          |HTSurfL
     542             :         // |            |OpaqOrWinMassSurfF                              |OpaqOrWinSurfL  |
     543             :         // |            |OpaqOrIntMassSurfF      |OpaqOrIntMassSurfL                      |
     544             :         // |            |                        ||WindowSurfF           |WindowSurfL     |
     545             :         // |            |                        ||                      ||DomeF          |DomeL
     546             :         // {[ SurfAir ] [(   SurfOpaqOrIntMass   )( SurfWinOrTDDDiffuser )( TDDDome       )]}
     547             :         // HTSurfaceFirst == OpaqOrWinMassSurfaceFirst == OpaqOrIntMassSurfaceFirst
     548             :         // WindowSurfaceFirst == OpaqOrIntMassSurfaceLast + 1
     549             :         // TDDDomeFirst == OpaqOrWinSurfaceLast + 1 == WindowSurfaceLast + 1
     550             :         // AllSurfaceLast == HTSurfaceLast = TDDDomeLast
     551             :         int AllSurfaceFirst = 0;           // First surface in space including air boundaries
     552             :         int AllSurfaceLast = -1;           // Last  surface in space including air boundaries
     553             :         int HTSurfaceFirst = 0;            // First Heat Transfer Surface in space
     554             :         int HTSurfaceLast = -1;            // Last  Heat Transfer Surface in space
     555             :         int OpaqOrIntMassSurfaceFirst = 0; // First Opaque or Interior Mass Heat Transfer Surface (including opaque doors) in space
     556             :         int OpaqOrIntMassSurfaceLast = -1; // Last  Opaque or Interior Mass Heat Transfer Surface (including opaque doors) in space
     557             :         int WindowSurfaceFirst = 0;        // First Window Heat Transfer Surface in space
     558             :         int WindowSurfaceLast = -1;        // Last  Window Heat Transfer Surface in space
     559             :         int OpaqOrWinSurfaceFirst = 0;     // First opaque (including IntMass) or window (non TDD Dome) Surface in space
     560             :         int OpaqOrWinSurfaceLast = -1;     // Last  opaque (including IntMass) or window (non TDD Dome) Surface in space
     561             :         int TDDDomeFirst = 0;              // First TDD Dome Surface in space
     562             :         int TDDDomeLast = -1;              // Last  TDD Dome Surface in space
     563             : 
     564             :         Real64 sumHATsurf(EnergyPlusData &state);
     565             :     };
     566             : 
     567           8 :     struct SpaceListData
     568             :     {
     569             :         std::string Name;                               // Space List name
     570             :         int numListSpaces = 0;                          // Number of spaces in the list
     571             :         std::string::size_type maxSpaceNameLength = 0u; // Max Name length of Spaces in the list
     572             :         EPVector<int> spaces;                           // Pointers to Spaces in the list
     573             :     };
     574             : 
     575             :     //    number of columns in resilience report tables
     576             :     constexpr int numColumnThermalTbl(5);
     577             :     constexpr int numColumnUnmetDegreeHourTbl(6);
     578             :     constexpr int numColumnDiscomfortWtExceedHourTbl(4);
     579             :     constexpr int numColumnCO2Tbl(3);
     580             :     constexpr int numColumnVisualTbl(4);
     581             : 
     582             :     struct ZoneResilience
     583             :     {
     584             :         Real64 ZoneNumOcc;
     585             :         Real64 ColdStressTempThresh;
     586             :         Real64 HeatStressTempThresh;
     587             :         Real64 PierceSET;
     588             :         Real64 PMV;
     589             :         Real64 ZonePierceSET;
     590             :         Real64 ZonePierceSETLastStep;
     591             :         Real64 ZoneHeatIndex;
     592             :         Real64 ZoneHumidex;
     593             :         bool CrossedColdThresh;
     594             :         bool CrossedHeatThresh;
     595             : 
     596             :         std::array<Real64, numColumnThermalTbl> ZoneHeatIndexHourBins = {0.0};
     597             :         std::array<Real64, numColumnThermalTbl> ZoneHeatIndexOccuHourBins = {0.0};
     598             :         std::array<Real64, numColumnThermalTbl> ZoneHeatIndexOccupiedHourBins = {0.0};
     599             :         std::array<Real64, numColumnThermalTbl> ZoneHumidexHourBins = {0.0};
     600             :         std::array<Real64, numColumnThermalTbl> ZoneHumidexOccuHourBins = {0.0};
     601             :         std::array<Real64, numColumnThermalTbl> ZoneHumidexOccupiedHourBins = {0.0};
     602             :         std::array<Real64, numColumnThermalTbl> ZoneLowSETHours = {0.0};
     603             :         std::array<Real64, numColumnThermalTbl> ZoneHighSETHours = {0.0};
     604             :         std::array<Real64, numColumnThermalTbl> ZoneColdHourOfSafetyBins = {0.0};
     605             :         std::array<Real64, numColumnThermalTbl> ZoneHeatHourOfSafetyBins = {0.0};
     606             :         std::array<Real64, numColumnUnmetDegreeHourTbl> ZoneUnmetDegreeHourBins = {0.0};
     607             :         std::array<Real64, numColumnDiscomfortWtExceedHourTbl> ZoneDiscomfortWtExceedOccuHourBins = {0.0};
     608             :         std::array<Real64, numColumnDiscomfortWtExceedHourTbl> ZoneDiscomfortWtExceedOccupiedHourBins = {0.0};
     609             : 
     610             :         std::array<Real64, numColumnCO2Tbl> ZoneCO2LevelHourBins = {0.0};
     611             :         std::array<Real64, numColumnCO2Tbl> ZoneCO2LevelOccuHourBins = {0.0};
     612             :         std::array<Real64, numColumnCO2Tbl> ZoneCO2LevelOccupiedHourBins = {0.0};
     613             : 
     614             :         std::array<Real64, numColumnVisualTbl> ZoneLightingLevelHourBins = {0.0};
     615             :         std::array<Real64, numColumnVisualTbl> ZoneLightingLevelOccuHourBins = {0.0};
     616             :         std::array<Real64, numColumnVisualTbl> ZoneLightingLevelOccupiedHourBins = {0.0};
     617             : 
     618             :         // Default Constructor
     619        5585 :         ZoneResilience()
     620        5585 :             : ZoneNumOcc(0.0), ColdStressTempThresh(15.56), HeatStressTempThresh(30.0), PierceSET(-999.0), PMV(0.0), ZonePierceSET(-1.0),
     621        5585 :               ZonePierceSETLastStep(-1.0), ZoneHeatIndex(0.0), ZoneHumidex(0.0), CrossedColdThresh(false), CrossedHeatThresh(false)
     622             :         {
     623        5585 :         }
     624             :     };
     625       10399 :     struct ZoneData : ZoneSpaceData
     626             :     {
     627             :         // Members
     628             :         int Multiplier = 1;     // Used in reporting and for systems calculations
     629             :         int ListMultiplier = 1; // For Zone Group object:  used in reporting and systems calculations
     630             :         int ListGroup = 0;      // used only in Zone Group verification.  and for error message.
     631             :         Real64 RelNorth = 0.0;  // Relative North (to building north) [Degrees]
     632             :         Real64 OriginX = 0.0;   // X origin  [m]
     633             :         Real64 OriginY = 0.0;   // Y origin  [m]
     634             :         Real64 OriginZ = 0.0;   // Z origin  [m]
     635             :         int OfType = 1;         // 1=Standard Zone, Not yet used:
     636             :         // 2=Plenum Zone, 11=Solar Wall, 12=Roof Pond
     637             :         Real64 UserEnteredFloorArea = DataGlobalConstants::AutoCalculate; // User input floor area for this zone
     638             :         // Calculated after input
     639             :         Real64 FloorArea = 0.0;     // Floor area used for this zone
     640             :         Real64 CalcFloorArea = 0.0; // Calculated floor area used for this zone
     641             :         Real64 CeilingArea = 0.0;   // Ceiling area for the zone
     642             :         bool HasFloor = false;      // Has "Floor" surface
     643             :         bool HasRoof = false;       // Has "Roof" or "Ceiling" Surface
     644             :         bool HasWindow = false;     // Window(s) present in this zone
     645             :         Real64 AirCapacity = 0.0;
     646             :         Real64 ExtWindowArea = 0.0;               // Exterior Window Area for Zone
     647             :         Real64 ExtWindowArea_Multiplied = 0.0;    // Exterior Window Area for Zone with multipliers
     648             :         Real64 ExtGrossWallArea_Multiplied = 0.0; // Exterior Wall Area for Zone (Gross) with multipliers
     649             :         Real64 ExtNetWallArea = 0.0;              // Exterior Wall Area for Zone (Net)
     650             :         Real64 TotalSurfArea = 0.0;               // Total surface area for Zone
     651             :         // (ignoring windows as they will be included in their base surfaces)
     652             :         Real64 ExteriorTotalGroundSurfArea = 0.0;       // Total surface area of all surfaces for Zone with ground contact
     653             :         Real64 ExtGrossGroundWallArea = 0.0;            // Ground contact Wall Area for Zone (Gross)
     654             :         Real64 ExtGrossGroundWallArea_Multiplied = 0.0; // Ground contact Wall Area for Zone (Gross) with multipliers
     655             :         bool IsControlled = false;                      // True when this is a controlled zone.
     656             :         bool IsSupplyPlenum = false;                    // True when this zone is a supply plenum
     657             :         bool IsReturnPlenum = false;                    // True when this zone is a return plenum
     658             :         int PlenumCondNum = 0;                          // Supply or return plenum conditions number, 0 if this is not a plenum zone
     659             :         int TempControlledZoneIndex = 0;                // this is the index number for TempControlledZone structure for lookup
     660             :         int humidityControlZoneIndex = 0;               // this is the index number for HumidityControlZone structure for lookup
     661             :         int AllSurfaceFirst = 0;                        // First surface in zone including air boundaries
     662             :         int AllSurfaceLast = -1;                        // Last  surface in zone including air boundaries
     663             :         int InsideConvectionAlgo = ConvectionConstants::HcInt_ASHRAESimple; // Ref: appropriate values for Inside Convection solution
     664             :         int NumSurfaces = 0;                                                // Number of surfaces for this zone
     665             :         int NumSubSurfaces = 0;     // Number of subsurfaces for this zone (windows, doors, tdd dome and diffusers)
     666             :         int NumShadingSurfaces = 0; // Number of shading surfaces for this zone
     667             :         int OutsideConvectionAlgo = ConvectionConstants::HcExt_ASHRAESimple; // Ref: appropriate values for Outside Convection solution
     668             :         Vector Centroid;                                                     // Center of the zone found by averaging wall, floor, and roof centroids
     669             :         Real64 MinimumX = 0.0;                                               // Minimum X value for entire zone
     670             :         Real64 MaximumX = 0.0;                                               // Maximum X value for entire zone
     671             :         Real64 MinimumY = 0.0;                                               // Minimum Y value for entire zone
     672             :         Real64 MaximumY = 0.0;                                               // Maximum Y value for entire zone
     673             :         Real64 MinimumZ = 0.0;                                               // Minimum Z value for entire zone
     674             :         Real64 MaximumZ = 0.0;                                               // Maximum Z value for entire zone
     675             :         std::vector<int> ZoneHTSurfaceList;          // List of HT surfaces related to this zone (includes adjacent interzone surfaces)
     676             :         std::vector<int> ZoneIZSurfaceList;          // List of interzone surfaces in this zone
     677             :         std::vector<int> ZoneHTNonWindowSurfaceList; // List of non-window HT surfaces related to this zone (includes adjacent interzone surfaces)
     678             :         std::vector<int> ZoneHTWindowSurfaceList;    // List of window surfaces related to this zone (includes adjacent interzone surfaces)
     679             :         int zoneRadEnclosureFirst = -1;              // For Zone resimulation, need a range of enclosures for CalcInteriorRadExchange
     680             :         int zoneRadEnclosureLast = -1;               // For Zone resimulation, need a range of enclosures for CalcInteriorRadExchange
     681             : 
     682             :         Real64 OutDryBulbTemp = 0.0;                 // Zone outside dry bulb air temperature (C)
     683             :         bool OutDryBulbTempEMSOverrideOn = false;    // if true, EMS is calling to override the surface's outdoor air temp
     684             :         Real64 OutDryBulbTempEMSOverrideValue = 0.0; // value to use for EMS override of outdoor air drybulb temp (C)
     685             :         Real64 OutWetBulbTemp = 0.0;                 // Zone outside wet bulb air temperature (C)
     686             :         bool OutWetBulbTempEMSOverrideOn = false;    // if true, EMS is calling to override the surface's outdoor wetbulb
     687             :         Real64 OutWetBulbTempEMSOverrideValue = 0.0; // value to use for EMS override of outdoor air wetbulb temp (C)
     688             :         Real64 WindSpeed = 0.0;                      // Zone outside wind speed (m/s)
     689             :         bool WindSpeedEMSOverrideOn = false;         // if true, EMS is calling to override the surface's outside wind speed
     690             :         Real64 WindSpeedEMSOverrideValue = 0.0;      // value to use for EMS override of the surface's outside wind speed
     691             :         Real64 WindDir = 0.0;                        // Zone outside wind direction (degree)
     692             :         bool WindDirEMSOverrideOn = false;           // if true, EMS is calling to override the surface's outside wind direction
     693             :         Real64 WindDirEMSOverrideValue = 0.0;        // value to use for EMS override of the surface's outside wind speed
     694             : 
     695             :         int LinkedOutAirNode = 0; // Index of the an OutdoorAir:Node,, zero if none
     696             : 
     697             :         bool isPartOfTotalArea = true;           // Count the zone area when determining the building total floor area
     698             :         bool isNominalOccupied = false;          // has occupancy nominally specified
     699             :         bool isNominalControlled = false;        // has Controlled Zone Equip Configuration reference
     700             :         Real64 TotOccupants = 0.0;               // total design occupancy (sum of NumberOfPeople for the zone People objects, not multiplied)
     701             :         Real64 minOccupants = 0.0;               // minimum occupancy (sum of NomMinNumberPeople for the zone People objects, not multiplied)
     702             :         Real64 maxOccupants = 0.0;               // maximum occupancy (sum of NomMaxNumberPeople for the zone People objects, not multiplied)
     703             :         int AirHBimBalanceErrIndex = 0;          // error management counter
     704             :         bool NoHeatToReturnAir = false;          // TRUE means that heat to return air should be added to the zone load
     705             :         bool RefrigCaseRA = false;               // TRUE means there is potentially heat removal from return air
     706             :         bool HasAdjustedReturnTempByITE = false; // TRUE means that return temp to return air is adjusted by return temperature of ITE object
     707             :         Real64 AdjustedReturnTempByITE = 0.0;    // Diff of the return temp from the zone mixed air temp adjusted by ITE object
     708             : 
     709             :         bool HasLtsRetAirGain = false;       // TRUE means that zone lights return air heat > 0.0 calculated from plenum temperature
     710             :         bool HasAirFlowWindowReturn = false; // TRUE means that zone has return air flow from windows
     711             :         // from refrigeration cases for this zone
     712             :         Real64 InternalHeatGains = 0.0;         // internal loads (W)
     713             :         Real64 NominalInfilVent = 0.0;          // internal infiltration/ventilation
     714             :         Real64 NominalMixing = 0.0;             // internal mixing/cross mixing
     715             :         bool TempOutOfBoundsReported = false;   // if any temp out of bounds errors, first will show zone details.
     716             :         bool EnforcedReciprocity = false;       // if zone/space required forced reciprocity -- less out of bounds temp errors allowed
     717             :         int ZoneMinCO2SchedIndex = 0;           // Index for the schedule the schedule which determines minimum CO2 concentration
     718             :         int ZoneMaxCO2SchedIndex = 0;           // Index for the schedule the schedule which determines maximum CO2 concentration
     719             :         int ZoneContamControllerSchedIndex = 0; // Index for this schedule
     720             :         bool FlagCustomizedZoneCap = false;     // True if customized Zone Capacitance Multiplier is used
     721             :         std::vector<ExteriorEnergyUse::ExteriorFuelUsage> otherEquipFuelTypeNums; // List of fuel types used by other equipment in this zone
     722             :         std::vector<std::string> otherEquipFuelTypeNames;                         // List of fuel types used by other equipment in this zone
     723             : 
     724             :         // Hybrid Modeling
     725             :         Real64 ZoneMeasuredTemperature = 0.0;               // Measured zone air temperature input by user
     726             :         Real64 ZoneMeasuredHumidityRatio = 0.0;             // Measured zone air humidity ratio by user
     727             :         Real64 ZoneMeasuredCO2Concentration = 0.0;          // Measured zone air CO2 concentration input by user
     728             :         Real64 ZoneMeasuredSupplyAirTemperature = 0.0;      // Measured zone supply air temperature input by user
     729             :         Real64 ZoneMeasuredSupplyAirFlowRate = 0.0;         // Measured zone supply air flow rate input by user
     730             :         Real64 ZoneMeasuredSupplyAirHumidityRatio = 0.0;    // Measured zone supply air flow rate input by user
     731             :         Real64 ZoneMeasuredSupplyAirCO2Concentration = 0.0; // Measured zone supply air flow rate input by user
     732             :         Real64 ZonePeopleActivityLevel = 0.0;               // People activity level input by user
     733             :         Real64 ZonePeopleSensibleHeatFraction = 0.0;        // People activity level input by user
     734             :         Real64 ZonePeopleRadiantHeatFraction = 0.0;         // People activity level input by user
     735             :         Real64 ZoneVolCapMultpSens = 1.0;                   // Zone temperature capacity multiplier, i.e. internal thermal mass multiplier
     736             :         Real64 ZoneVolCapMultpMoist = 1.0;                  // Zone humidity capacity multiplier
     737             :         Real64 ZoneVolCapMultpCO2 = 1.0;                    // Zone carbon dioxide capacity multiplier
     738             :         Real64 ZoneVolCapMultpGenContam = 1.0;              // Zone generic contaminant capacity multiplier
     739             :         Real64 ZoneVolCapMultpSensHM = 1.0;                 // Calculated temperature capacity multiplier by hybrid model
     740             :         Real64 ZoneVolCapMultpSensHMSum = 0.0;              // for temperature capacity multiplier average calculation
     741             :         Real64 ZoneVolCapMultpSensHMCountSum = 0.0;         // for temperature capacity multiplier average calculation
     742             :         Real64 ZoneVolCapMultpSensHMAverage = 1.0;          // Temperature capacity multiplier average
     743             :         Real64 MCPIHM = 0.0;                                // Calculated mass flow rate by hybrid model
     744             :         Real64 InfilOAAirChangeRateHM = 0.0;                // Calculated infiltration air change per hour by hybrid model
     745             :         Real64 NumOccHM = 0.0;                              // Inversely solved people count
     746             :         Real64 delta_T = 0.0;                               // Indoor and outdoor temperature
     747             :         Real64 delta_HumRat = 0.0;                          // Indoor and outdoor humidity ratio delta
     748             : 
     749             :         Real64 ZeroSourceSumHATsurf = 0.0; // From Chilled Ceiling Panel, equal to the SumHATsurf for all the walls in a zone with no source
     750             :         bool zoneOAQuadratureSum = false;  // True when zone OA balance method is Quadrature
     751             :         int zoneOABalanceIndex = 0;        // Index to ZoneAirBalance for this zone, if any
     752             : 
     753             :         // Spaces
     754             :         bool anySurfacesWithoutSpace = false; // True if any surfaces in a zone do not have a space assigned in input
     755             :         bool anySurfacesWithSpace = false;    // True if any surfaces in a zone have a space assigned in input
     756             :         EPVector<int> spaceIndexes;           // Indexes to spaces in this zone
     757             :         int numSpaces = 0;                    // Number of spaces in this zone
     758             : 
     759             :         // Default Constructor
     760        5585 :         ZoneData() : Centroid(0.0, 0.0, 0.0)
     761             :         {
     762        5585 :         }
     763             : 
     764             :         void SetOutBulbTempAt(EnergyPlusData &state);
     765             : 
     766             :         void SetWindSpeedAt(EnergyPlusData &state, Real64 fac);
     767             : 
     768             :         void SetWindDirAt(Real64 fac);
     769             : 
     770             :         Real64 sumHATsurf(EnergyPlusData &state);
     771             :     };
     772             : 
     773         100 :     struct ZoneListData
     774             :     {
     775             :         // Members
     776             :         std::string Name;                         // Zone List name
     777             :         int NumOfZones = 0;                       // Number of zones in the list
     778             :         std::string::size_type MaxZoneNameLength; // Max Name length of zones in the list
     779             :         Array1D_int Zone;                         // Pointers to zones in the list
     780             : 
     781             :         // Default Constructor
     782          63 :         ZoneListData() : MaxZoneNameLength(0u)
     783             :         {
     784          63 :         }
     785             :     };
     786             : 
     787          14 :     struct ZoneGroupData
     788             :     {
     789             :         // Members
     790             :         std::string Name;   // Zone Group name
     791             :         int ZoneList = 0;   // Pointer to the zone list
     792             :         int Multiplier = 1; // Zone List multiplier
     793             :     };
     794             : 
     795             :     enum class ClothingType
     796             :     {
     797             :         Invalid = -1,
     798             :         InsulationSchedule,
     799             :         DynamicAshrae55,
     800             :         CalculationSchedule,
     801             :         Num
     802             :     };
     803             :     constexpr std::array<std::string_view, static_cast<int>(ClothingType::Num)> clothingTypeNamesUC = {
     804             :         "CLOTHINGINSULATIONSCHEDULE", "DYNAMICCLOTHINGMODELASHRAE55", "CALCULATIONMETHODSCHEDULE"};
     805             :     constexpr std::array<std::string_view, static_cast<int>(ClothingType::Num)> clothingTypeEIOStrings = {
     806             :         "Clothing Insulation Schedule,", "Dynamic Clothing Model ASHRAE55,", "Calculation Method Schedule,"};
     807             : 
     808       12252 :     struct PeopleData
     809             :     {
     810             :         // Members
     811             :         std::string Name;               // PEOPLE object name
     812             :         int ZonePtr = 0;                // Zone index for this people statement
     813             :         int spaceIndex = 0;             // Space index for this people statement
     814             :         Real64 NumberOfPeople = 0.0;    // Maximum number of people for this statement
     815             :         int NumberOfPeoplePtr = -1;     // Pointer to schedule for number of people
     816             :         bool EMSPeopleOn = false;       // EMS actuating number of people if .TRUE.
     817             :         Real64 EMSNumberOfPeople = 0.0; // Value EMS is directing to use for override
     818             :         // Note that the schedule and maximum number was kept for people since it seemed likely that
     819             :         // users would want to assign the same schedule to multiple people statements.
     820             :         int ActivityLevelPtr = -1;    // Pointer to schedule for activity level
     821             :         Real64 FractionRadiant = 0.0; // Percentage (fraction 0.0-1.0) of sensible heat gain from people
     822             :         // that is radiant
     823             :         Real64 FractionConvected = 0.0; // Percentage (fraction 0.0-1.0) of sensible heat gain from people
     824             :         // that is convective
     825             :         Real64 NomMinNumberPeople = 0.0; // Nominal Minimum Number of People (min sch X number of people)
     826             :         Real64 NomMaxNumberPeople = 0.0; // Nominal Maximum Number of People (min sch X number of people)
     827             :         int WorkEffPtr = -1;             // Pointer to schedule for work efficiency
     828             :         int ClothingPtr = -1;            // Pointer to schedule for clothing insulation
     829             :         int ClothingMethodPtr = -1;
     830             :         ClothingType clothingType = ClothingType::Invalid; // Clothing type
     831             :         int AirVelocityPtr = -1;                           // Pointer to schedule for air velocity in zone
     832             :         int AnkleAirVelocityPtr = -1;                      // Pointer to schedule for air velocity in zone
     833             :         bool Fanger = false;                               // True when Fanger calculation to be performed
     834             :         bool Pierce = false;                               // True when Pierce 2-node calculation to be performed
     835             :         bool KSU = false;                                  // True when KSU 2-node calculation to be performed
     836             :         bool AdaptiveASH55 = false;                        // True when ASHRAE Standard 55 adaptive comfort calculation
     837             :         //   to be performed
     838             :         bool AdaptiveCEN15251 = false; // True when CEN Standard 15251 adaptive comfort calculation
     839             :         //   to be performed
     840             :         bool CoolingEffectASH55 = false;                         // True when ASHRAE Standard 55 cooling effect calculation to be performed
     841             :         bool AnkleDraftASH55 = false;                            // True when ASHRAE Standard 55 ankle draft calculation to be performed
     842             :         CalcMRT MRTCalcType = DataHeatBalance::CalcMRT::Invalid; // MRT calculation type (See MRT Calculation type parameters)
     843             :         int SurfacePtr = -1;                                     // Pointer to the name of surface
     844             :         std::string AngleFactorListName;                         // Name of angle factor list
     845             :         int AngleFactorListPtr = -1;                             // Pointer to the name of angle factor list
     846             :         Real64 UserSpecSensFrac = 0.0;                           // User specified sensible fraction
     847             :         bool Show55Warning = false;                              // show the warning messages about ASHRAE 55-2004
     848             :         Real64 CO2RateFactor = 0.0;                              // Carbon Dioxide Generation Rate [m3/s-W]
     849             :         // Report variables
     850             :         Real64 NumOcc = 0.0;            // Number of occupants at current timestep []
     851             :         Real64 TemperatureInZone = 0.0; // Temperature in zone (C)
     852             :         Real64 ColdStressTempThresh = 15.56;
     853             :         Real64 HeatStressTempThresh = 30.0;
     854             :         Real64 RelativeHumidityInZone = 0.0; // Relative humidity in zone
     855             :         Real64 RadGainRate = 0.0;            // Radiant heat gain [W]
     856             :         Real64 ConGainRate = 0.0;            // Convective heat gain [W]
     857             :         Real64 SenGainRate = 0.0;            // Sensible heat gain [W]
     858             :         Real64 LatGainRate = 0.0;            // Latent heat gain [W]
     859             :         Real64 TotGainRate = 0.0;            // Total heat gain [W]
     860             :         Real64 CO2GainRate = 0.0;            // Carbon Dioxide Gain Rate [m3/s]
     861             :         Real64 RadGainEnergy = 0.0;          // Radiant heat gain [J]
     862             :         Real64 ConGainEnergy = 0.0;          // Convective heat gain [J]
     863             :         Real64 SenGainEnergy = 0.0;          // Sensible heat gain [J]
     864             :         Real64 LatGainEnergy = 0.0;          // Latent heat gain [J]
     865             :         Real64 TotGainEnergy = 0.0;          // Total heat gain [J]
     866             :         // Air velocity check during run time for thermal comfort control
     867             :         int AirVelErrIndex = 0; // Air velocity error index
     868             :         // For AdaptiveComfort tabular report
     869             :         Real64 TimeNotMetASH5580 = 0.0;
     870             :         Real64 TimeNotMetASH5590 = 0.0;
     871             :         Real64 TimeNotMetCEN15251CatI = 0.0;
     872             :         Real64 TimeNotMetCEN15251CatII = 0.0;
     873             :         Real64 TimeNotMetCEN15251CatIII = 0.0;
     874             :     };
     875             : 
     876       12794 :     struct LightsData
     877             :     {
     878             :         // Members
     879             :         std::string Name;                 // LIGHTS object name
     880             :         int ZonePtr = 0;                  // Which zone lights are in
     881             :         int spaceIndex = 0;               // Space index for this lights instance
     882             :         int SchedPtr = -1;                // Schedule for lights
     883             :         Real64 DesignLevel = 0.0;         // design level for lights [W]
     884             :         bool EMSLightsOn = false;         // EMS actuating Lighting power if .TRUE.
     885             :         Real64 EMSLightingPower = 0.0;    // Value EMS is directing to use for override
     886             :         Real64 FractionReturnAir = 0.0;   // Percentage (fraction 0.0-1.0) of sensible heat gain that is return air
     887             :         Real64 FractionRadiant = 0.0;     // Percentage (fraction 0.0-1.0) of sensible heat gain that is radiant
     888             :         Real64 FractionShortWave = 0.0;   // Percentage (fraction 0.0-1.0) of sensible heat gain that is short wave
     889             :         Real64 FractionReplaceable = 0.0; // Percentage (fraction 0.0-1.0) of sensible heat gain that is replaceable
     890             :         Real64 FractionConvected = 0.0;   // Percentage (fraction 0.0-1.0) of sensible heat gain that is convective
     891             :         bool FractionReturnAirIsCalculated = false;
     892             :         Real64 FractionReturnAirPlenTempCoeff1 = 0.0;
     893             :         Real64 FractionReturnAirPlenTempCoeff2 = 0.0;
     894             :         int ZoneReturnNum = 1;          // zone return index (not the node number) for return heat gain
     895             :         std::string RetNodeName;        // Zone return node name
     896             :         int ZoneExhaustNodeNum = 0;     // Exhaust node number
     897             :         Real64 NomMinDesignLevel = 0.0; // Nominal Minimum Design Level (min sch X design level)
     898             :         Real64 NomMaxDesignLevel = 0.0; // Nominal Maximum Design Level (max sch X design level)
     899             :         bool ManageDemand = false;      // Flag to indicate whether to use demand limiting
     900             :         Real64 DemandLimit = 0.0;       // Demand limit set by demand manager [W]
     901             :         // Report variables
     902             :         Real64 Power = 0.0;              // Electric power [W]
     903             :         Real64 RadGainRate = 0.0;        // Radiant heat gain [W]
     904             :         Real64 VisGainRate = 0.0;        // Visible heat gain [W]
     905             :         Real64 ConGainRate = 0.0;        // Convective heat gain [W]
     906             :         Real64 RetAirGainRate = 0.0;     // Return air heat gain [W]
     907             :         Real64 TotGainRate = 0.0;        // Total heat gain [W]
     908             :         Real64 Consumption = 0.0;        // Electric consumption [J]
     909             :         Real64 RadGainEnergy = 0.0;      // Radiant heat gain [J]
     910             :         Real64 VisGainEnergy = 0.0;      // Visible heat gain [J]
     911             :         Real64 ConGainEnergy = 0.0;      // Convective heat gain [J]
     912             :         Real64 RetAirGainEnergy = 0.0;   // Return air heat gain [J]
     913             :         Real64 TotGainEnergy = 0.0;      // Total heat gain [J]
     914             :         std::string EndUseSubcategory;   // user defined name for the end use category
     915             :         Real64 SumConsumption = 0.0;     // sum of electric consumption [J] for reporting
     916             :         Real64 SumTimeNotZeroCons = 0.0; // sum of time of positive electric consumption [hr]
     917             :     };
     918             : 
     919       14492 :     struct ZoneEquipData // Electric, Gas, Other Equipment, CO2
     920             :     {
     921             :         // Members
     922             :         std::string Name;                    // EQUIPMENT object name
     923             :         int ZonePtr = 0;                     // Which zone internal gain is in
     924             :         int spaceIndex = 0;                  // Space index for this equipment instance
     925             :         int SchedPtr = 0;                    // Schedule for internal gain
     926             :         Real64 DesignLevel = 0.0;            // design level for internal gain [W]
     927             :         bool EMSZoneEquipOverrideOn = false; // EMS actuating equipment power if .TRUE.
     928             :         Real64 EMSEquipPower = 0.0;          // Value EMS is directing to use for override
     929             :         Real64 FractionLatent = 0.0;         // Percentage (fraction 0.0-1.0) of sensible heat gain that is latent
     930             :         Real64 FractionRadiant = 0.0;        // Percentage (fraction 0.0-1.0) of sensible heat gain that is radiant
     931             :         Real64 FractionLost = 0.0;           // Percentage (fraction 0.0-1.0) of sensible heat gain that is lost
     932             :         Real64 FractionConvected = 0.0;      // Percentage (fraction 0.0-1.0) of sensible heat gain that is convective
     933             :         Real64 CO2DesignRate = 0.0;          // CO2 design Rate [m3/s]
     934             :         Real64 CO2RateFactor = 0.0;          // CO2 rate factor [m3/s/W]
     935             :         Real64 NomMinDesignLevel = 0.0;      // Nominal Minimum Design Level (min sch X design level)
     936             :         Real64 NomMaxDesignLevel = 0.0;      // Nominal Maximum Design Level (max sch X design level)
     937             :         bool ManageDemand = false;           // Flag to indicate whether to use demand limiting
     938             :         Real64 DemandLimit = 0.0;            // Demand limit set by demand manager [W]
     939             :         // Report variables
     940             :         Real64 Power = 0.0;                   // Electric/Gas/Fuel power [W]
     941             :         Real64 RadGainRate = 0.0;             // Radiant heat gain [W]
     942             :         Real64 ConGainRate = 0.0;             // Convective heat gain [W]
     943             :         Real64 LatGainRate = 0.0;             // Latent heat gain [W]
     944             :         Real64 LostRate = 0.0;                // Lost energy (converted to work) [W]
     945             :         Real64 TotGainRate = 0.0;             // Total heat gain [W]
     946             :         Real64 CO2GainRate = 0.0;             // CO2 gain rate [m3/s]
     947             :         Real64 Consumption = 0.0;             // Electric/Gas/Fuel consumption [J]
     948             :         Real64 RadGainEnergy = 0.0;           // Radiant heat gain [J]
     949             :         Real64 ConGainEnergy = 0.0;           // Convective heat gain [J]
     950             :         Real64 LatGainEnergy = 0.0;           // Latent heat gain [J]
     951             :         Real64 LostEnergy = 0.0;              // Lost energy (converted to work) [J]
     952             :         Real64 TotGainEnergy = 0.0;           // Total heat gain [J]
     953             :         std::string EndUseSubcategory;        // user defined name for the end use category
     954             :         std::string otherEquipFuelTypeString; // Fuel Type string for Other Equipment
     955             :         ExteriorEnergyUse::ExteriorFuelUsage OtherEquipFuelType =
     956             :             ExteriorEnergyUse::ExteriorFuelUsage::Invalid; // Fuel Type Number of the Other Equipment (defined in ExteriorEnergyUse.cc)
     957             :     };
     958             : 
     959             :     // ITE Equipment Environmental Class Data
     960             :     // MODULE PARAMETER DEFINITIONS:
     961             :     enum class ITEClass
     962             :     {
     963             :         Invalid = -1,
     964             :         None, // (0)
     965             :         A1,   // (1)
     966             :         A2,   // (2)
     967             :         A3,   // (3)
     968             :         A4,   // (4)
     969             :         B,    // (5)
     970             :         C,    // (6)
     971             :         H1,   // (7)
     972             :         Num
     973             :     };
     974             :     static constexpr std::array<std::string_view, static_cast<int>(ITEClass::Num)> ITEClassNamesUC = {"NONE", "A1", "A2", "A3", "A4", "B", "C", "H1"};
     975             : 
     976             :     enum class ITEInletConnection
     977             :     {
     978             :         Invalid = -1,
     979             :         AdjustedSupply,
     980             :         ZoneAirNode,
     981             :         RoomAirModel,
     982             :         Num
     983             :     };
     984             :     static constexpr std::array<std::string_view, static_cast<int>(ITEInletConnection::Num)> ITEInletConnectionNamesUC = {
     985             :         "ADJUSTEDSUPPLY", "ZONEAIRNODE", "ROOMAIRMODEL"};
     986             : 
     987             :     enum class PERptVars
     988             :     {
     989             :         CPU = 0,       // ITE CPU Electric Power/Energy
     990             :         Fan,           // ITE Fan Electric Power/Energy
     991             :         UPS,           // ITE UPS Electric Power/Energy
     992             :         CPUAtDesign,   // ITE CPU Electric Power/Energy at Design Inlet Conditions
     993             :         FanAtDesign,   // ITE Fan Electric Power/Energy at Design Inlet Conditions
     994             :         UPSGainToZone, // ITE UPS Heat Gain to Zone Power(Rate)/Energy - convective gain
     995             :         ConGainToZone, // ITE Total Heat Gain to Zone Power(Rate)/Energy - convective gain - includes heat gain from UPS, plus CPU and Fans if
     996             :                        // room air model not used
     997             :         Num
     998             :     };
     999             : 
    1000          26 :     struct ITEquipData // IT Equipment
    1001             :     {
    1002             :         // Members
    1003             :         std::string Name;                          // EQUIPMENT object name
    1004             :         int ZonePtr = 0;                           // Which zone internal gain is in
    1005             :         int spaceIndex = 0;                        // Space index for this equipment instance
    1006             :         bool FlowControlWithApproachTemps = false; // True if using supply and return approach temperature for ITE object.
    1007             :         Real64 DesignTotalPower = 0.0;             // Design level for internal gain [W]
    1008             :         Real64 NomMinDesignLevel = 0.0;            // Nominal Minimum Design Level (min sch X design level)
    1009             :         Real64 NomMaxDesignLevel = 0.0;            // Nominal Maximum Design Level (max sch X design level)
    1010             :         Real64 DesignFanPowerFrac = 0.0;           // Fraction (0.0-1.0) of design power level that is fans
    1011             :         int OperSchedPtr = 0;                      // Schedule pointer for design power input or operating schedule
    1012             :         int CPULoadSchedPtr = 0;                   // Schedule pointer for CPU loading schedule
    1013             :         Real64 SizingTAirIn = 0.0;                 // Entering air dry-bulb temperature at maximum value during sizing[C]
    1014             :         Real64 DesignTAirIn = 0.0;                 // Design entering air dry-bulb temperature [C]
    1015             :         Real64 DesignFanPower = 0.0;               // Design fan power input [W]
    1016             :         Real64 DesignCPUPower = 0.0;               // Design CPU power input [W]
    1017             :         Real64 DesignAirVolFlowRate = 0.0;         // Design air volume flow rate [m3/s]
    1018             :         ITEClass Class = ITEClass::None;           // Environmental class index (A1=1, A2=2, A3=3, A4=4, B=5, C=6, H1=7)
    1019             :         int AirFlowFLTCurve = 0;                   // Index for airflow function of CPULoadFrac (x) and TAirIn (y) curve
    1020             :         int CPUPowerFLTCurve = 0;                  // Index for CPU power function of CPULoadFrac (x) and TAirIn (y) curve
    1021             :         int FanPowerFFCurve = 0;                   // Index for fan power function of flow fraction curve
    1022             :         ITEInletConnection AirConnectionType = ITEInletConnection::AdjustedSupply; // Air connection type (AdjustedSupply, ZoneAirNode, RoomAirModel)
    1023             :         int InletRoomAirNodeNum = 0;                                               // Room air model node number for air inlet
    1024             :         int OutletRoomAirNodeNum = 0;                                              // Room air model node number for air outlet
    1025             :         int SupplyAirNodeNum = 0;                                                  // Node number for supply air inlet
    1026             :         Real64 DesignRecircFrac = 0.0;                                             // Design recirculation fraction (0.0-0.5)
    1027             :         int RecircFLTCurve = 0;             // Index for recirculation function of CPULoadFrac (x) and TSupply (y) curve
    1028             :         Real64 DesignUPSEfficiency = 0.0;   // Design power supply efficiency (>0.0 - 1.0)
    1029             :         int UPSEfficFPLRCurve = 0;          // Index for recirculation function of part load ratio
    1030             :         Real64 UPSLossToZoneFrac = 0.0;     // Fraction of UPS power loss to zone (0.0 - 1.0); remainder is lost
    1031             :         std::string EndUseSubcategoryCPU;   // User defined name for the end use category for the CPU
    1032             :         std::string EndUseSubcategoryFan;   // User defined name for the end use category for the Fans
    1033             :         std::string EndUseSubcategoryUPS;   // User defined name for the end use category for the power supply
    1034             :         bool EMSCPUPowerOverrideOn = false; // EMS actuating CPU power if .TRUE.
    1035             :         Real64 EMSCPUPower = 0.0;           // Value EMS is directing to use for override of CPU power [W]
    1036             :         bool EMSFanPowerOverrideOn = false; // EMS actuating Fan power if .TRUE.
    1037             :         Real64 EMSFanPower = 0.0;           // Value EMS is directing to use for override of Fan power [W]
    1038             :         bool EMSUPSPowerOverrideOn = false; // EMS actuating UPS power if .TRUE.
    1039             :         Real64 EMSUPSPower = 0.0;           // Value EMS is directing to use for override of UPS power [W]
    1040             :         Real64 SupplyApproachTemp = 0.0;    // The difference of the IT inlet temperature from the AHU supply air temperature
    1041             :         int SupplyApproachTempSch = 0;      // The difference schedule of the IT inlet temperature from the AHU supply air temperature
    1042             :         Real64 ReturnApproachTemp = 0.0;    // The difference of the unit outlet temperature from the well mixed zone temperature
    1043             :         int ReturnApproachTempSch = 0;      // The difference schedule of the unit outlet temperature from the well mixed zone temperature
    1044             :         bool inControlledZone = false;      // True if in a controlled zone
    1045             : 
    1046             :         // Report variables
    1047             :         std::array<Real64, (int)PERptVars::Num> PowerRpt;
    1048             :         std::array<Real64, (int)PERptVars::Num> EnergyRpt;
    1049             : 
    1050             :         Real64 AirVolFlowStdDensity = 0.0; // Air volume flow rate at standard density [m3/s]
    1051             :         Real64 AirVolFlowCurDensity = 0.0; // Air volume flow rate at current density [m3/s]
    1052             :         Real64 AirMassFlow = 0.0;          // Air mass flow rate [kg/s]
    1053             :         Real64 AirInletDryBulbT = 0.0;     // Air inlet dry-bulb temperature [C]
    1054             :         Real64 AirInletDewpointT = 0.0;    // Air inlet dewpoint temperature [C]
    1055             :         Real64 AirInletRelHum = 0.0;       // Air inlet relative humidity [%]
    1056             :         Real64 AirOutletDryBulbT = 0.0;    // Air outlet dry-bulb temperature [C]
    1057             :         Real64 SHI = 0.0;                  // Supply Heat Index []
    1058             :         Real64 TimeOutOfOperRange = 0.0;   // ITE Air Inlet Operating Range Exceeded Time [hr]
    1059             :         Real64 TimeAboveDryBulbT = 0.0;    // ITE Air Inlet Dry-Bulb Temperature Above Operating Range Time [hr]
    1060             :         Real64 TimeBelowDryBulbT = 0.0;    // ITE Air Inlet Dry-Bulb Temperature Below Operating Range Time [hr]
    1061             :         Real64 TimeAboveDewpointT = 0.0;   // ITE Air Inlet Dewpoint Temperature Above Operating Range Time [hr]
    1062             :         Real64 TimeBelowDewpointT = 0.0;   // ITE Air Inlet Dewpoint Temperature Below Operating Range Time [hr]
    1063             :         Real64 TimeAboveRH = 0.0;          // ITE Air Inlet Relative Humidity Above Operating Range Time [hr]
    1064             :         Real64 TimeBelowRH = 0.0;          // ITE Air Inlet Relative Humidity Below Operating Range Time [hr]
    1065             :         Real64 DryBulbTAboveDeltaT = 0.0;  // ITE Air Inlet Dry-Bulb Temperature Difference Above Operating Range [deltaC]
    1066             :         Real64 DryBulbTBelowDeltaT = 0.0;  // ITE Air Inlet Dry-Bulb Temperature Difference Below Operating Range [deltaC]
    1067             :         Real64 DewpointTAboveDeltaT = 0.0; // ITE Air Inlet Dewpoint Temperature Difference Above Operating Range [deltaC]
    1068             :         Real64 DewpointTBelowDeltaT = 0.0; // ITE Air Inlet Dewpoint Temperature Difference Below Operating Range [deltaC]
    1069             :         Real64 RHAboveDeltaRH = 0.0;       // ITE Air Inlet Relative Humidity Difference Above Operating Range [%]
    1070             :         Real64 RHBelowDeltaRH = 0.0;       // ITE Air Inlet Relative Humidity Difference Below Operating Range [%]
    1071             :     };
    1072             : 
    1073          12 :     struct BBHeatData
    1074             :     {
    1075             :         // Members
    1076             :         std::string Name; // BASEBOARD HEAT object name
    1077             :         int ZonePtr = 0;
    1078             :         int spaceIndex = 0; // Space index for this equipment instance
    1079             :         int SchedPtr = 0;
    1080             :         Real64 CapatLowTemperature = 0.0;
    1081             :         Real64 LowTemperature = 0.0;
    1082             :         Real64 CapatHighTemperature = 0.0;
    1083             :         Real64 HighTemperature = 0.0;
    1084             :         bool EMSZoneBaseboardOverrideOn = false; // EMS actuating equipment power if .TRUE.
    1085             :         Real64 EMSZoneBaseboardPower = 0.0;      // Value EMS is directing to use for override
    1086             :         Real64 FractionRadiant = 0.0;
    1087             :         Real64 FractionConvected = 0.0;
    1088             :         bool ManageDemand = false; // Flag to indicate whether to use demand limiting
    1089             :         Real64 DemandLimit = 0.0;  // Demand limit set by demand manager [W]
    1090             :         // Report variables
    1091             :         Real64 Power = 0.0;            // Electric power [W]
    1092             :         Real64 RadGainRate = 0.0;      // Radiant heat gain [W]
    1093             :         Real64 ConGainRate = 0.0;      // Convective heat gain [W]
    1094             :         Real64 TotGainRate = 0.0;      // Total heat gain [W]
    1095             :         Real64 Consumption = 0.0;      // Electric consumption [J]
    1096             :         Real64 RadGainEnergy = 0.0;    // Radiant heat gain [J]
    1097             :         Real64 ConGainEnergy = 0.0;    // Convective heat gain [J]
    1098             :         Real64 TotGainEnergy = 0.0;    // Total heat gain [J]
    1099             :         std::string EndUseSubcategory; // user defined name for the end use category
    1100             :     };
    1101             : 
    1102       10716 :     struct InfiltrationData
    1103             :     {
    1104             :         // Members
    1105             :         std::string Name;
    1106             :         int ZonePtr = 0;                                                  // Which zone infiltration is in
    1107             :         int spaceIndex = 0;                                               // Space index for this infiltration instance
    1108             :         int SchedPtr = 0;                                                 // Schedule for infiltration
    1109             :         InfiltrationModelType ModelType = InfiltrationModelType::Invalid; // which model is used for infiltration
    1110             :         // Design Flow Rate model terms
    1111             :         Real64 DesignLevel = 0.0;
    1112             :         Real64 ConstantTermCoef = 0.0;
    1113             :         Real64 TemperatureTermCoef = 0.0;
    1114             :         Real64 VelocityTermCoef = 0.0;
    1115             :         Real64 VelocitySQTermCoef = 0.0;
    1116             :         // Effective Leakage Area, Sherman Grimsrud terms
    1117             :         Real64 LeakageArea = 0.0;           // "AL" effective air leakage area
    1118             :         Real64 BasicStackCoefficient = 0.0; // "Cs" Stack coefficient
    1119             :         Real64 BasicWindCoefficient = 0.0;  // "Cw" wind coefficient
    1120             :         // Flow Coefficient, AIM-2, Walker and Wilson terms
    1121             :         Real64 FlowCoefficient = 0.0;       // "c" Flow coefficient
    1122             :         Real64 AIM2StackCoefficient = 0.0;  // "Cs" stack coefficient
    1123             :         Real64 AIM2WindCoefficient = 0.0;   // "Cw" wind coefficient
    1124             :         Real64 PressureExponent = 0.0;      // "n" pressure power law exponent
    1125             :         Real64 ShelterFactor = 0.0;         // "s" shelter factor
    1126             :         bool EMSOverrideOn = false;         // if true then EMS is requesting to override
    1127             :         Real64 EMSAirFlowRateValue = 0.0;   // value EMS is setting for air flow rate
    1128             :         Real64 VolumeFlowRate = 0.0;        // infiltration air volume flow rate
    1129             :         Real64 MassFlowRate = 0.0;          // infiltration air mass flow rate
    1130             :         Real64 MCpI_temp = 0.0;             // INFILTRATION MASS FLOW * AIR SPECIFIC HEAT
    1131             :         Real64 InfilHeatGain = 0.0;         // Heat Gain {J} due to infiltration
    1132             :         Real64 InfilHeatLoss = 0.0;         // Heat Loss {J} due to infiltration
    1133             :         Real64 InfilLatentGain = 0.0;       // Latent Gain {J} due to infiltration
    1134             :         Real64 InfilLatentLoss = 0.0;       // Latent Loss {J} due to infiltration
    1135             :         Real64 InfilTotalGain = 0.0;        // Total Gain {J} due to infiltration (sensible+latent)
    1136             :         Real64 InfilTotalLoss = 0.0;        // Total Loss {J} due to infiltration (sensible+latent)
    1137             :         Real64 InfilVolumeCurDensity = 0.0; // Volume of Air {m3} due to infiltration at current zone air density
    1138             :         Real64 InfilVolumeStdDensity = 0.0; // Volume of Air {m3} due to infiltration at standard density (adjusted for elevation)
    1139             :         Real64 InfilVdotCurDensity = 0.0;   // Volume flow rate of Air {m3/s} due to infiltration at current zone air density
    1140             :         Real64 InfilVdotStdDensity = 0.0;   // Volume flow rate of Air {m3/s} due to infiltration standard density (adjusted elevation)
    1141             :         Real64 InfilMdot = 0.0;             // Mass flow rate {kg/s} due to infiltration for reporting
    1142             :         Real64 InfilMass = 0.0;             // Mass of Air {kg} due to infiltration
    1143             :         Real64 InfilAirChangeRate = 0.0;    // Infiltration air change rate {ach}
    1144             :     };
    1145             : 
    1146        1302 :     struct VentilationData
    1147             :     {
    1148             :         // Members
    1149             :         std::string Name;
    1150             :         int ZonePtr = 0;
    1151             :         int spaceIndex = 0; // Space index for this ventilation instance
    1152             :         int SchedPtr = 0;
    1153             :         VentilationModelType ModelType =
    1154             :             VentilationModelType::Invalid; // which model is used for ventilation: DesignFlowRate and WindandStackOpenArea
    1155             :         Real64 DesignLevel = 0.0;
    1156             :         bool EMSSimpleVentOn = false;      // EMS actuating ventilation flow rate if .TRUE.
    1157             :         Real64 EMSimpleVentFlowRate = 0.0; // Value EMS is directing to use for override
    1158             :         Real64 MinIndoorTemperature = -100.0;
    1159             :         Real64 DelTemperature = 0.0;
    1160             :         VentilationType FanType = VentilationType::Natural;
    1161             :         Real64 FanPressure = 0.0;
    1162             :         Real64 FanEfficiency = 0.0;
    1163             :         Real64 FanPower = 0.0;
    1164             :         Real64 AirTemp = 0.0;
    1165             :         Real64 ConstantTermCoef = 0.0;
    1166             :         Real64 TemperatureTermCoef = 0.0;
    1167             :         Real64 VelocityTermCoef = 0.0;
    1168             :         Real64 VelocitySQTermCoef = 0.0;
    1169             :         Real64 MaxIndoorTemperature = 100.0;
    1170             :         Real64 MinOutdoorTemperature = -100.0;
    1171             :         Real64 MaxOutdoorTemperature = 100.0;
    1172             :         Real64 MaxWindSpeed = 40.0;
    1173             :         int MinIndoorTempSchedPtr = 0;                            // Minimum indoor temperature schedule index
    1174             :         int MaxIndoorTempSchedPtr = 0;                            // Maximum indoor temperature schedule index
    1175             :         int DeltaTempSchedPtr = 0;                                // Delta temperature schedule index
    1176             :         int MinOutdoorTempSchedPtr = 0;                           // Minimum outdoor temperature schedule index
    1177             :         int MaxOutdoorTempSchedPtr = 0;                           // Maximum outdoor temperature schedule index
    1178             :         int IndoorTempErrCount = 0;                               // Indoor temperature error count
    1179             :         int OutdoorTempErrCount = 0;                              // Outdoor temperature error count
    1180             :         int IndoorTempErrIndex = 0;                               // Indoor temperature error Index
    1181             :         int OutdoorTempErrIndex = 0;                              // Outdoor temperature error Index
    1182             :         HybridCtrlType HybridControlType = HybridCtrlType::Indiv; // Hybrid ventilation control type: 0 Individual, 1 Close, 2 Global
    1183             :         int HybridControlMasterNum = 0;                           // Hybrid ventilation control master object number
    1184             :         bool HybridControlMasterStatus = false;                   // Hybrid ventilation control master object opening status
    1185             :         // WindandStackOpenArea
    1186             :         Real64 OpenArea = 0.0;    // Opening area [m2]
    1187             :         int OpenAreaSchedPtr = 0; // Opening area fraction schedule pointer
    1188             :         Real64 OpenEff = 0.0;     // Opening effectiveness [dimensionless]
    1189             :         Real64 EffAngle = 0.0;    // Effective angle [degree]
    1190             :         Real64 DH = 0.0;          // Height difference [m]
    1191             :         Real64 DiscCoef = 0.0;    // Discharge coefficient
    1192             :         Real64 MCP = 0.0;         // Product of mass flow rate and Cp
    1193             :     };
    1194             : 
    1195         774 :     struct ZoneAirBalanceData
    1196             :     {
    1197             :         // Members
    1198             :         std::string Name;                            // Object name
    1199             :         std::string ZoneName;                        // Zone name
    1200             :         int ZonePtr = 0;                             // Zone number
    1201             :         AirBalance BalanceMethod = AirBalance::None; // Air Balance Method
    1202             :         Real64 InducedAirRate = 0.0;                 // Induced Outdoor Air Due to Duct Leakage Unbalance [m3/s]
    1203             :         int InducedAirSchedPtr = 0;                  // Induced Outdoor Air Fraction Schedule
    1204             :         Real64 BalMassFlowRate = 0.0;                // balanced mass flow rate
    1205             :         Real64 InfMassFlowRate = 0.0;                // unbalanced mass flow rate from infiltration
    1206             :         Real64 NatMassFlowRate = 0.0;                // unbalanced mass flow rate from natural ventilation
    1207             :         Real64 ExhMassFlowRate = 0.0;                // unbalanced mass flow rate from exhaust ventilation
    1208             :         Real64 IntMassFlowRate = 0.0;                // unbalanced mass flow rate from intake ventilation
    1209             :         Real64 ERVMassFlowRate = 0.0;                // unbalanced mass flow rate from stand-alone ERV
    1210             :         bool OneTimeFlag = false;                    // One time flag to get nodes of stand alone ERV
    1211             :         int NumOfERVs = 0;                           // Number of zone stand alone ERVs
    1212             :         Array1D_int ERVInletNode;                    // Stand alone ERV supply air inlet nodes
    1213             :         Array1D_int ERVExhaustNode;                  // Stand alone ERV air exhaust nodes
    1214             :     };
    1215             : 
    1216         252 :     struct MixingData
    1217             :     {
    1218             :         // Members
    1219             :         std::string Name;
    1220             :         int ZonePtr = 0;
    1221             :         int spaceIndex = 0; // Space index for this mixing instance
    1222             :         int SchedPtr = 0;
    1223             :         Real64 DesignLevel = 0.0;
    1224             :         int FromZone = 0;
    1225             :         int fromSpaceIndex = 0; // Source space index for this mixing instance
    1226             :         Real64 DeltaTemperature = 0.0;
    1227             :         Real64 DesiredAirFlowRate = 0.0;
    1228             :         Real64 DesiredAirFlowRateSaved = 0.0;
    1229             :         Real64 MixingMassFlowRate = 0.0;
    1230             :         int DeltaTempSchedPtr = 0;                                // Delta temperature schedule index
    1231             :         int MinIndoorTempSchedPtr = 0;                            // Minimum indoor temperature schedule index
    1232             :         int MaxIndoorTempSchedPtr = 0;                            // Maximum indoor temperature schedule index
    1233             :         int MinSourceTempSchedPtr = 0;                            // Minimum source zone temperature schedule index
    1234             :         int MaxSourceTempSchedPtr = 0;                            // Maximum source zone temperature schedule index
    1235             :         int MinOutdoorTempSchedPtr = 0;                           // Minimum outdoor temperature schedule index
    1236             :         int MaxOutdoorTempSchedPtr = 0;                           // Maximum outdoor temperature schedule index
    1237             :         int IndoorTempErrCount = 0;                               // Indoor temperature error count
    1238             :         int SourceTempErrCount = 0;                               // Source zone temperature error count
    1239             :         int OutdoorTempErrCount = 0;                              // Outdoor temperature error count
    1240             :         int IndoorTempErrIndex = 0;                               // Indoor temperature error Index
    1241             :         int SourceTempErrIndex = 0;                               // Source zone temperature error Index
    1242             :         int OutdoorTempErrIndex = 0;                              // Outdoor temperature error Index
    1243             :         HybridCtrlType HybridControlType = HybridCtrlType::Indiv; // Hybrid ventilation control type: 0 Individual, 1 Close, 2 Global
    1244             :         int HybridControlMasterNum = 0;                           // Hybrid ventilation control master ventilation object number
    1245             :         int NumRefDoorConnections = 0;
    1246             :         bool EMSSimpleMixingOn = false;      // EMS actuating ventilation flow rate if .TRUE.
    1247             :         bool RefDoorMixFlag = false;         // Refrigeration door mixing within zone
    1248             :         bool ReportFlag = false;             // TRUE when Mixing or Cross Mixing is active based on controls
    1249             :         Real64 EMSimpleMixingFlowRate = 0.0; // Value EMS is directing to use for override
    1250             :         Array1D_bool EMSRefDoorMixingOn;
    1251             :         Array1D<Real64> EMSRefDoorFlowRate;
    1252             :         Array1D<Real64> VolRefDoorFlowRate;
    1253             :         Array1D_int OpenSchedPtr;            // Schedule for Refrigeration door open fraction
    1254             :         Array1D<Real64> DoorHeight;          // Door height for refrigeration door, m
    1255             :         Array1D<Real64> DoorArea;            // Door area for refrigeration door, m2
    1256             :         Array1D<Real64> Protection;          // Refrigeration door protection factor, dimensionless
    1257             :         Array1D_int MateZonePtr;             // Zone connected by refrigeration door (MateZone > ZonePtr)
    1258             :         Array1D_string DoorMixingObjectName; // Used in one error statement and eio
    1259             :         Array1D_string DoorProtTypeName;     // Used in eio
    1260             :                                              // Note, for mixing and crossmixing, this type dimensioned by number of mixing objects.
    1261             :         // For ref door mixing, dimensioned by number of zones.
    1262             :     };
    1263             : 
    1264             :     struct AirBoundaryMixingSpecs
    1265             :     {
    1266             :         int space1;                  // Air boundary simple mixing space 1
    1267             :         int space2;                  // Air boundary simple mixing space 2
    1268             :         int scheduleIndex;           // Air boundary simple mixing schedule index
    1269             :         Real64 mixingVolumeFlowRate; // Air boundary simple mixing volume flow rate [m3/s]
    1270             :     };
    1271             : 
    1272         771 :     struct ZoneAirMassFlowConservation
    1273             :     {
    1274             :         // Members
    1275             :         bool EnforceZoneMassBalance = false; // flag to enforce zone air mass conservation
    1276             :         AdjustmentType ZoneFlowAdjustment =
    1277             :             AdjustmentType::NoAdjustReturnAndMixing; // determines how zone air flow is adjusted (AdjustMixingOnly, AdjustReturnOnly,
    1278             :                                                      // AdjustMixingThenReturn, AdjustReturnThenMixing, None)        int InfiltrationTreatment;   //
    1279             :                                                      // determines how infiltration is treated for zone mass balance
    1280             :         InfiltrationFlow InfiltrationTreatment = InfiltrationFlow::No;             // determines how infiltration is treated for zone mass balance
    1281             :         InfiltrationZoneType InfiltrationForZones = InfiltrationZoneType::Invalid; // specifies which types of zones allow infiltration to be changed
    1282             :         bool AdjustZoneMixingFlow = false;                                         // used to adjust zone mixing air flows to enforce air flow balance
    1283             :         bool AdjustZoneInfiltrationFlow = false; // used to adjust zone infiltration air flows to enforce air flow balance
    1284             :                                                  // Note, unique global object
    1285             :     };
    1286             : 
    1287       15213 :     struct ZoneMassConservationData
    1288             :     {
    1289             :         // Members
    1290             :         std::string Name;
    1291             :         int ZonePtr = 0;                       // pointer to the mixing zone
    1292             :         Real64 InMassFlowRate = 0.0;           // zone total supply air mass flow rate, kg/s
    1293             :         Real64 ExhMassFlowRate = 0.0;          // zone exhaust total air mass flow rate, kg/s
    1294             :         Real64 RetMassFlowRate = 0.0;          // zone return air mass flow rate, kg/s
    1295             :         Real64 MixingMassFlowRate = 0.0;       // zone mixing air mass flow rate, kg/s
    1296             :         Real64 MixingSourceMassFlowRate = 0.0; // Zone source mass flow rate for mixing zone, kg/s
    1297             :         int NumSourceZonesMixingObject = 0;    // number of zone mixing object references as a source zone
    1298             :         int NumReceivingZonesMixingObject = 0; // number of zone mixing object references as a receiving zone
    1299             :         bool IsOnlySourceZone = false;         // true only if used only as a source zone in zone mixing object
    1300             :         bool IsSourceAndReceivingZone = false; // true only if a zone is used as a source and receiving zone in zone mixing objects
    1301             :         int InfiltrationPtr = 0;               // pointer to infiltration object
    1302             :         Real64 InfiltrationMassFlowRate = 0.0; // infiltration added to enforced source zone mass balance, kg/s
    1303             :         int IncludeInfilToZoneMassBal = 0;     // not self-balanced, include infiltration in zone air mass balance
    1304             :         Array1D_int ZoneMixingSourcesPtr;      // source zones pointer
    1305             :         Array1D_int ZoneMixingReceivingPtr;    // receiving zones pointer
    1306             :         Array1D<Real64> ZoneMixingReceivingFr; // receiving zones fraction
    1307             :                                                // Note, this type dimensioned by number of zones
    1308             :     };
    1309             : 
    1310      840724 :     struct GenericComponentZoneIntGainStruct
    1311             :     {
    1312             :         // Members
    1313             :         std::string CompObjectType;                   // device object class name
    1314             :         std::string CompObjectName;                   // device user unique name
    1315             :         IntGainType CompType = IntGainType::Invalid;  // type of internal gain device identifier
    1316             :         Real64 spaceGainFrac = 1.0;                   // Fraction of gain value assigned to this Space (because gain rate might be for an entire zone)
    1317             :         Real64 *PtrConvectGainRate = nullptr;         // POINTER to value of convection heat gain rate for device, watts
    1318             :         Real64 ConvectGainRate = 0.0;                 // current timestep value of convection heat gain rate for device, watts
    1319             :         Real64 *PtrReturnAirConvGainRate = nullptr;   // POINTER to value of return air convection heat gain rate for device, W
    1320             :         Real64 ReturnAirConvGainRate = 0.0;           // current timestep value of return air convection heat gain rate for device, W
    1321             :         Real64 *PtrRadiantGainRate = nullptr;         // POINTER to value of thermal radiation heat gain rate for device, watts
    1322             :         Real64 RadiantGainRate = 0.0;                 // current timestep value of thermal radiation heat gain rate for device, watts
    1323             :         Real64 *PtrLatentGainRate = nullptr;          // POINTER to value of moisture gain rate for device, Watts
    1324             :         Real64 LatentGainRate = 0.0;                  // current timestep value of moisture gain rate for device, Watts
    1325             :         Real64 *PtrReturnAirLatentGainRate = nullptr; // POINTER to value of return air moisture gain rate for device, Watts
    1326             :         Real64 ReturnAirLatentGainRate = 0.0;         // current timestep value of return air moisture gain rate for device, Watts
    1327             :         Real64 *PtrCarbonDioxideGainRate = nullptr;   // POINTER to value of carbon dioxide gain rate for device
    1328             :         Real64 CarbonDioxideGainRate = 0.0;           // current timestep value of carbon dioxide gain rate for device
    1329             :         Real64 *PtrGenericContamGainRate = nullptr;   // POINTER to value of generic contaminant gain rate for device
    1330             :         Real64 GenericContamGainRate = 0.0;           // current timestep value of generic contaminant gain rate for device
    1331             :         int ReturnAirNodeNum = 0;                     // return air node number for retrun air convection heat gain
    1332             :     };
    1333             : 
    1334        9632 :     struct SpaceZoneSimData // Calculated data by Space or Zone during each time step/hour
    1335             :     {
    1336             :         // Members
    1337             :         Real64 NOFOCC = 0.0;  // Number of Occupants
    1338             :         Real64 QOCTOT = 0.0;  // Total Energy from Occupants
    1339             :         Real64 QOCSEN = 0.0;  // Sensible Energy from Occupants
    1340             :         Real64 QOCCON = 0.0;  // ENERGY CONVECTED FROM OCCUPANTS (WH)
    1341             :         Real64 QOCRAD = 0.0;  // ENERGY RADIATED FROM OCCUPANTS
    1342             :         Real64 QOCLAT = 0.0;  // LATENT ENERGY FROM OCCUPANTS
    1343             :         Real64 QLTTOT = 0.0;  // TOTAL ENERGY INTO LIGHTS (WH)
    1344             :         Real64 QLTCON = 0.0;  // ENERGY CONVECTED TO SPACE AIR FROM LIGHTS
    1345             :         Real64 QLTRAD = 0.0;  // ENERGY RADIATED TO SPACE FROM LIGHTS
    1346             :         Real64 QLTCRA = 0.0;  // ENERGY CONVECTED TO RETURN AIR FROM LIGHTS
    1347             :         Real64 QLTSW = 0.0;   // VISIBLE ENERGY FROM LIGHTS
    1348             :         Real64 QEECON = 0.0;  // ENERGY CONVECTED FROM ELECTRIC EQUIPMENT
    1349             :         Real64 QEERAD = 0.0;  // ENERGY RADIATED FROM ELECTRIC EQUIPMENT
    1350             :         Real64 QEELost = 0.0; // Energy from Electric Equipment (lost)
    1351             :         Real64 QEELAT = 0.0;  // LATENT ENERGY FROM Electric Equipment
    1352             :         Real64 QGECON = 0.0;  // ENERGY CONVECTED FROM GAS EQUIPMENT
    1353             :         Real64 QGERAD = 0.0;  // ENERGY RADIATED FROM GAS EQUIPMENT
    1354             :         Real64 QGELost = 0.0; // Energy from Gas Equipment (lost)
    1355             :         Real64 QGELAT = 0.0;  // LATENT ENERGY FROM Gas Equipment
    1356             :         Real64 QOECON = 0.0;  // ENERGY CONVECTED FROM OTHER EQUIPMENT
    1357             :         Real64 QOERAD = 0.0;  // ENERGY RADIATED FROM OTHER EQUIPMENT
    1358             :         Real64 QOELost = 0.0; // Energy from Other Equipment (lost)
    1359             :         Real64 QOELAT = 0.0;  // LATENT ENERGY FROM Other Equipment
    1360             :         Real64 QHWCON = 0.0;  // ENERGY CONVECTED FROM Hot Water EQUIPMENT
    1361             :         Real64 QHWRAD = 0.0;  // ENERGY RADIATED FROM Hot Water EQUIPMENT
    1362             :         Real64 QHWLost = 0.0; // Energy from Hot Water Equipment (lost)
    1363             :         Real64 QHWLAT = 0.0;  // LATENT ENERGY FROM Hot Water Equipment
    1364             :         Real64 QSECON = 0.0;  // ENERGY CONVECTED FROM Steam EQUIPMENT
    1365             :         Real64 QSERAD = 0.0;  // ENERGY RADIATED FROM Steam EQUIPMENT
    1366             :         Real64 QSELost = 0.0; // Energy from Steam Equipment (lost)
    1367             :         Real64 QSELAT = 0.0;  // LATENT ENERGY FROM Steam Equipment
    1368             :         Real64 QBBCON = 0.0;  // ENERGY CONVECTED FROM BASEBOARD HEATING
    1369             :         Real64 QBBRAD = 0.0;  // ENERGY RADIATED FROM BASEBOARD HEATING
    1370             :     };
    1371             : 
    1372       15225 :     struct SpaceIntGainDeviceData
    1373             :     {
    1374             :         int numberOfDevices = 0;
    1375             :         int maxNumberOfDevices = 0;
    1376             :         Array1D<GenericComponentZoneIntGainStruct> device;
    1377             :     };
    1378             : 
    1379        2769 :     struct WindowBlindProperties
    1380             :     {
    1381             :         // Members
    1382             :         std::string Name;
    1383             :         int MaterialNumber = 0; // Material pointer for the blind
    1384             :         // Input properties
    1385             :         DataWindowEquivalentLayer::Orientation SlatOrientation = DataWindowEquivalentLayer::Orientation::Invalid; // HORIZONTAL or VERTICAL
    1386             :         DataWindowEquivalentLayer::AngleType SlatAngleType = DataWindowEquivalentLayer::AngleType::Fixed;         // FIXED or VARIABLE
    1387             :         Real64 SlatWidth = 0.0;                                                                                   // Slat width (m)
    1388             :         Real64 SlatSeparation = 0.0;                                                                              // Slat separation (m)
    1389             :         Real64 SlatThickness = 0.0;                                                                               // Slat thickness (m)
    1390             :         Real64 SlatCrown = 0.0;        // the height of the slate (length from the chord to the curve)
    1391             :         Real64 SlatAngle = 0.0;        // Slat angle (deg)
    1392             :         Real64 MinSlatAngle = 0.0;     // Minimum slat angle for variable-angle slats (deg) (user input)
    1393             :         Real64 MaxSlatAngle = 0.0;     // Maximum slat angle for variable-angle slats (deg) (user input)
    1394             :         Real64 SlatConductivity = 0.0; // Slat conductivity (W/m-K)
    1395             :         // Solar slat properties
    1396             :         Real64 SlatTransSolBeamDiff = 0.0;     // Slat solar beam-diffuse transmittance
    1397             :         Real64 SlatFrontReflSolBeamDiff = 0.0; // Slat front solar beam-diffuse reflectance
    1398             :         Real64 SlatBackReflSolBeamDiff = 0.0;  // Slat back solar beam-diffuse reflectance
    1399             :         Real64 SlatTransSolDiffDiff = 0.0;     // Slat solar diffuse-diffuse transmittance
    1400             :         Real64 SlatFrontReflSolDiffDiff = 0.0; // Slat front solar diffuse-diffuse reflectance
    1401             :         Real64 SlatBackReflSolDiffDiff = 0.0;  // Slat back solar diffuse-diffuse reflectance
    1402             :         // Visible slat properties
    1403             :         Real64 SlatTransVisBeamDiff = 0.0;     // Slat visible beam-diffuse transmittance
    1404             :         Real64 SlatFrontReflVisBeamDiff = 0.0; // Slat front visible beam-diffuse reflectance
    1405             :         Real64 SlatBackReflVisBeamDiff = 0.0;  // Slat back visible beam-diffuse reflectance
    1406             :         Real64 SlatTransVisDiffDiff = 0.0;     // Slat visible diffuse-diffuse transmittance
    1407             :         Real64 SlatFrontReflVisDiffDiff = 0.0; // Slat front visible diffuse-diffuse reflectance
    1408             :         Real64 SlatBackReflVisDiffDiff = 0.0;  // Slat back visible diffuse-diffuse reflectance
    1409             :         // Long-wave (IR) slat properties
    1410             :         Real64 SlatTransIR = 0.0;      // Slat IR transmittance
    1411             :         Real64 SlatFrontEmissIR = 0.0; // Slat front emissivity
    1412             :         Real64 SlatBackEmissIR = 0.0;  // Slat back emissivity
    1413             :         // Some characteristics for blind thermal calculation
    1414             :         Real64 BlindToGlassDist = 0.0;    // Distance between window shade and adjacent glass (m)
    1415             :         Real64 BlindTopOpeningMult = 0.0; // Area of air-flow opening at top of blind, expressed as a fraction
    1416             :         //  of the blind-to-glass opening area at the top of the blind
    1417             :         Real64 BlindBottomOpeningMult = 0.0; // Area of air-flow opening at bottom of blind, expressed as a fraction
    1418             :         //  of the blind-to-glass opening area at the bottom of the blind
    1419             :         Real64 BlindLeftOpeningMult = 0.0; // Area of air-flow opening at left side of blind, expressed as a fraction
    1420             :         //  of the blind-to-glass opening area at the left side of the blind
    1421             :         Real64 BlindRightOpeningMult = 0.0; // Area of air-flow opening at right side of blind, expressed as a fraction
    1422             :         //  of the blind-to-glass opening area at the right side of the blind
    1423             :         // Calculated blind properties
    1424             :         // Blind solar properties
    1425             :         Array2D<Real64> SolFrontBeamBeamTrans; // Blind solar front beam-beam transmittance vs.
    1426             :         // profile angle, slat angle
    1427             :         Array2D<Real64> SolFrontBeamBeamRefl; // Blind solar front beam-beam reflectance vs. profile angle,
    1428             :         // slat angle (zero)
    1429             :         Array2D<Real64> SolBackBeamBeamTrans; // Blind solar back beam-beam transmittance vs. profile angle,
    1430             :         // slat angle
    1431             :         Array2D<Real64> SolBackBeamBeamRefl; // Blind solar back beam-beam reflectance vs. profile angle,
    1432             :         // slat angle (zero)
    1433             :         Array2D<Real64> SolFrontBeamDiffTrans; // Blind solar front beam-diffuse transmittance
    1434             :         // vs. profile angle, slat angle
    1435             :         Array2D<Real64> SolFrontBeamDiffRefl; // Blind solar front beam-diffuse reflectance
    1436             :         // vs. profile angle, slat angle
    1437             :         Array2D<Real64> SolBackBeamDiffTrans; // Blind solar back beam-diffuse transmittance
    1438             :         // vs. profile angle, slat angle
    1439             :         Array2D<Real64> SolBackBeamDiffRefl; // Blind solar back beam-diffuse reflectance
    1440             :         // vs. profile angle, slat angle
    1441             :         Array1D<Real64> SolFrontDiffDiffTrans; // Blind solar front diffuse-diffuse transmittance
    1442             :         // vs. slat angle
    1443             :         Array1D<Real64> SolFrontDiffDiffTransGnd; // Blind ground solar front diffuse-diffuse transmittance
    1444             :         // vs. slat angle
    1445             :         Array1D<Real64> SolFrontDiffDiffTransSky; // Blind sky solar front diffuse-diffuse transmittance
    1446             :         // vs. slat angle
    1447             :         Array1D<Real64> SolFrontDiffDiffRefl; // Blind solar front diffuse-diffuse reflectance
    1448             :         // vs. slat angle
    1449             :         Array1D<Real64> SolFrontDiffDiffReflGnd; // Blind ground solar front diffuse-diffuse reflectance
    1450             :         // vs. slat angle
    1451             :         Array1D<Real64> SolFrontDiffDiffReflSky; // Blind sky solar front diffuse-diffuse reflectance
    1452             :         // vs. slat angle
    1453             :         Array1D<Real64> SolBackDiffDiffTrans; // Blind solar back diffuse-diffuse transmittance
    1454             :         // vs. slat angle
    1455             :         Array1D<Real64> SolBackDiffDiffRefl; // Blind solar back diffuse-diffuse reflectance
    1456             :         // vs. slat angle
    1457             :         Array2D<Real64> SolFrontBeamAbs;    // Blind solar front beam absorptance vs. slat angle
    1458             :         Array2D<Real64> SolBackBeamAbs;     // Blind solar back beam absorptance vs. slat angle
    1459             :         Array1D<Real64> SolFrontDiffAbs;    // Blind solar front diffuse absorptance vs. slat angle
    1460             :         Array1D<Real64> SolFrontDiffAbsGnd; // Blind ground solar front diffuse absorptance vs. slat angle
    1461             :         Array1D<Real64> SolFrontDiffAbsSky; // Blind sky solar front diffuse absorptance vs. slat angle
    1462             :         Array1D<Real64> SolBackDiffAbs;     // Blind solar back diffuse absorptance vs. slat angle
    1463             :         // Blind visible properties
    1464             :         Array2D<Real64> VisFrontBeamBeamTrans; // Blind visible front beam-beam transmittance
    1465             :         // vs. profile angle, slat angle
    1466             :         Array2D<Real64> VisFrontBeamBeamRefl; // Blind visible front beam-beam reflectance
    1467             :         // vs. profile angle, slat angle (zero)
    1468             :         Array2D<Real64> VisBackBeamBeamTrans; // Blind visible back beam-beam transmittance
    1469             :         // vs. profile angle, slat angle
    1470             :         Array2D<Real64> VisBackBeamBeamRefl; // Blind visible back beam-beam reflectance
    1471             :         // vs. profile angle, slat angle (zero)
    1472             :         Array2D<Real64> VisFrontBeamDiffTrans; // Blind visible front beam-diffuse transmittance
    1473             :         // vs. profile angle, slat angle
    1474             :         Array2D<Real64> VisFrontBeamDiffRefl; // Blind visible front beam-diffuse reflectance
    1475             :         // vs. profile angle, slat angle
    1476             :         Array2D<Real64> VisBackBeamDiffTrans; // Blind visible back beam-diffuse transmittance
    1477             :         // vs. profile angle, slat angle
    1478             :         Array2D<Real64> VisBackBeamDiffRefl; // Blind visible back beam-diffuse reflectance
    1479             :         // vs. profile angle, slat angle
    1480             :         Array1D<Real64> VisFrontDiffDiffTrans; // Blind visible front diffuse-diffuse transmittance
    1481             :         // vs. slat angle
    1482             :         Array1D<Real64> VisFrontDiffDiffRefl; // Blind visible front diffuse-diffuse reflectance
    1483             :         // vs. slat angle
    1484             :         Array1D<Real64> VisBackDiffDiffTrans; // Blind visible back diffuse-diffuse transmittance
    1485             :         // vs. slat angle
    1486             :         Array1D<Real64> VisBackDiffDiffRefl; // Blind visible back diffuse-diffuse reflectance
    1487             :         // vs. slat angle
    1488             :         // Long-wave (IR) blind properties
    1489             :         Array1D<Real64> IRFrontTrans; // Blind IR front transmittance vs. slat angle
    1490             :         Array1D<Real64> IRFrontEmiss; // Blind IR front emissivity vs. slat angle
    1491             :         Array1D<Real64> IRBackTrans;  // Blind IR back transmittance vs. slat angle
    1492             :         Array1D<Real64> IRBackEmiss;  // Blind IR back emissivity vs. slat angle
    1493             : 
    1494             :         // Default Constructor
    1495          20 :         WindowBlindProperties()
    1496          20 :             : SolFrontBeamBeamTrans(MaxSlatAngs, 37, 0.0), SolFrontBeamBeamRefl(MaxSlatAngs, 37, 0.0), SolBackBeamBeamTrans(MaxSlatAngs, 37, 0.0),
    1497             :               SolBackBeamBeamRefl(MaxSlatAngs, 37, 0.0), SolFrontBeamDiffTrans(MaxSlatAngs, 37, 0.0), SolFrontBeamDiffRefl(MaxSlatAngs, 37, 0.0),
    1498             :               SolBackBeamDiffTrans(MaxSlatAngs, 37, 0.0), SolBackBeamDiffRefl(MaxSlatAngs, 37, 0.0), SolFrontDiffDiffTrans(MaxSlatAngs, 0.0),
    1499             :               SolFrontDiffDiffTransGnd(MaxSlatAngs, 0.0), SolFrontDiffDiffTransSky(MaxSlatAngs, 0.0), SolFrontDiffDiffRefl(MaxSlatAngs, 0.0),
    1500             :               SolFrontDiffDiffReflGnd(MaxSlatAngs, 0.0), SolFrontDiffDiffReflSky(MaxSlatAngs, 0.0), SolBackDiffDiffTrans(MaxSlatAngs, 0.0),
    1501             :               SolBackDiffDiffRefl(MaxSlatAngs, 0.0), SolFrontBeamAbs(MaxSlatAngs, 37, 0.0), SolBackBeamAbs(MaxSlatAngs, 37, 0.0),
    1502             :               SolFrontDiffAbs(MaxSlatAngs, 0.0), SolFrontDiffAbsGnd(MaxSlatAngs, 0.0), SolFrontDiffAbsSky(MaxSlatAngs, 0.0),
    1503             :               SolBackDiffAbs(MaxSlatAngs, 0.0), VisFrontBeamBeamTrans(MaxSlatAngs, 37, 0.0), VisFrontBeamBeamRefl(MaxSlatAngs, 37, 0.0),
    1504             :               VisBackBeamBeamTrans(MaxSlatAngs, 37, 0.0), VisBackBeamBeamRefl(MaxSlatAngs, 37, 0.0), VisFrontBeamDiffTrans(MaxSlatAngs, 37, 0.0),
    1505             :               VisFrontBeamDiffRefl(MaxSlatAngs, 37, 0.0), VisBackBeamDiffTrans(MaxSlatAngs, 37, 0.0), VisBackBeamDiffRefl(MaxSlatAngs, 37, 0.0),
    1506             :               VisFrontDiffDiffTrans(MaxSlatAngs, 0.0), VisFrontDiffDiffRefl(MaxSlatAngs, 0.0), VisBackDiffDiffTrans(MaxSlatAngs, 0.0),
    1507             :               VisBackDiffDiffRefl(MaxSlatAngs, 0.0), IRFrontTrans(MaxSlatAngs, 0.0), IRFrontEmiss(MaxSlatAngs, 0.0), IRBackTrans(MaxSlatAngs, 0.0),
    1508          20 :               IRBackEmiss(MaxSlatAngs, 0.0)
    1509             :         {
    1510          20 :         }
    1511             :     };
    1512             : 
    1513           8 :     struct SurfaceScreenProperties
    1514             :     {
    1515             :         // Members
    1516             :         int MaterialNumber = 0; // Material pointer for the screen
    1517             :         Real64 BmBmTrans = 0.0; // Beam solar transmittance (dependent on sun angle)
    1518             :         // (this value can include scattering if the user so chooses)
    1519             :         Real64 BmBmTransBack = 0.0; // Beam solar transmittance (dependent on sun angle) from back side of screen
    1520             :         Real64 BmBmTransVis = 0.0;  // Visible solar transmittance (dependent on sun angle)
    1521             :         // (this value can include visible scattering if the user so chooses)
    1522             :         Real64 BmDifTrans = 0.0;     // Beam solar transmitted as diffuse radiation (dependent on sun angle)
    1523             :         Real64 BmDifTransBack = 0.0; // Beam solar transmitted as diffuse radiation (dependent on sun angle) from back side
    1524             :         Real64 BmDifTransVis = 0.0;  // Visible solar transmitted as diffuse radiation (dependent on sun angle)
    1525             :         // The following reflectance properties are dependent on sun angle:
    1526             :         Real64 ReflectSolBeamFront = 0.0;          // Beam solar reflected as diffuse radiation when sun is in front of screen
    1527             :         Real64 ReflectVisBeamFront = 0.0;          // Visible solar reflected as diffuse radiation when sun is in front of screen
    1528             :         Real64 ReflectSolBeamBack = 0.0;           // Beam solar reflected as diffuse radiation when sun is in back of screen
    1529             :         Real64 ReflectVisBeamBack = 0.0;           // Visible solar reflected as diffuse radiation when sun is in back of screen
    1530             :         Real64 AbsorpSolarBeamFront = 0.0;         // Front surface solar beam absorptance
    1531             :         Real64 AbsorpSolarBeamBack = 0.0;          // Back surface solar beam absorptance
    1532             :         Real64 DifDifTrans = 0.0;                  // Back surface diffuse solar transmitted
    1533             :         Real64 DifDifTransVis = 0.0;               // Back surface diffuse visible solar transmitted
    1534             :         Real64 DifScreenAbsorp = 0.0;              // Absorption of diffuse radiation
    1535             :         Real64 DifReflect = 0.0;                   // Back reflection of solar diffuse radiation
    1536             :         Real64 DifReflectVis = 0.0;                // Back reflection of visible diffuse radiation
    1537             :         Real64 ReflectScreen = 0.0;                // Screen assembly solar reflectance (user input adjusted for holes in screen)
    1538             :         Real64 ReflectScreenVis = 0.0;             // Screen assembly visible reflectance (user input adjusted for holes in screen)
    1539             :         Real64 ReflectCylinder = 0.0;              // Screen material solar reflectance (user input, does not account for holes in screen)
    1540             :         Real64 ReflectCylinderVis = 0.0;           // Screen material visible reflectance (user input, does not account for holes in screen)
    1541             :         Real64 ScreenDiameterToSpacingRatio = 0.0; // ratio of screen material diameter to screen material spacing
    1542             :         DataSurfaces::ScreenBeamReflectanceModel screenBeamReflectanceModel =
    1543             :             DataSurfaces::ScreenBeamReflectanceModel::Invalid; // user specified method of accounting for scattered solar beam
    1544             :     };
    1545             : 
    1546          26 :     struct ScreenTransData
    1547             :     {
    1548             :         // Members
    1549             :         Array2D<Real64> Trans;
    1550             :         Array2D<Real64> Scatt;
    1551             :     };
    1552             : 
    1553    18457735 :     struct ZoneCatEUseData
    1554             :     {
    1555             :         // Members
    1556             :         Array1D<Real64> EEConvected; // Category (0 to 25) Energy Convected from Electric Equipment
    1557             :         Array1D<Real64> EERadiated;  // Category (0 to 25) Energy Radiated from Electric Equipment
    1558             :         Array1D<Real64> EELost;      // Category (0 to 25) Energy from Electric Equipment (lost)
    1559             :         Array1D<Real64> EELatent;    // Category (0 to 25) Latent Energy from Electric Equipment
    1560             : 
    1561             :         // Default Constructor
    1562        6356 :         ZoneCatEUseData() : EEConvected({0, 25}, 0.0), EERadiated({0, 25}, 0.0), EELost({0, 25}, 0.0), EELatent({0, 25}, 0.0)
    1563             :         {
    1564        6356 :         }
    1565             :     };
    1566             : 
    1567        4814 :     struct RefrigCaseCreditData
    1568             :     {
    1569             :         // Members
    1570             :         Real64 SenCaseCreditToZone = 0.0; // Refrigerated display case sensible energy delivered to zone
    1571             :         // includes refrigeration pipe and receiver heat exchange with zone
    1572             :         Real64 LatCaseCreditToZone = 0.0; // Refrigerated display case latent energy delivered to zone
    1573             :         Real64 SenCaseCreditToHVAC = 0.0; // Refrigerated display case sensible energy delivered to HVAC RA duct
    1574             :         Real64 LatCaseCreditToHVAC = 0.0; // Refrigerated display case latent energy delivered to HVAC RA duct
    1575             : 
    1576             :         // Reset to Zeros
    1577     3093014 :         void reset()
    1578             :         {
    1579     3093014 :             SenCaseCreditToZone = 0.0;
    1580     3093014 :             LatCaseCreditToZone = 0.0;
    1581     3093014 :             SenCaseCreditToHVAC = 0.0;
    1582     3093014 :             LatCaseCreditToHVAC = 0.0;
    1583     3093014 :         }
    1584             :     };
    1585             : 
    1586        4795 :     struct HeatReclaimDataBase
    1587             :     {
    1588             :         // Members
    1589             :         std::string Name;                                         // Name of Coil
    1590             :         std::string SourceType;                                   // SourceType for Coil
    1591             :         Real64 AvailCapacity = 0.0;                               // Total available heat reclaim capacity
    1592             :         Real64 ReclaimEfficiencyTotal = 0.0;                      // Total reclaimed portion
    1593             :         Real64 WaterHeatingDesuperheaterReclaimedHeatTotal = 0.0; // total reclaimed heat by water heating desuperheater coils
    1594             :         Real64 HVACDesuperheaterReclaimedHeatTotal = 0.0;         // total reclaimed heat by water heating desuperheater coils
    1595             :         Array1D<Real64> WaterHeatingDesuperheaterReclaimedHeat;   // heat reclaimed by water heating desuperheater coils
    1596             :         Array1D<Real64> HVACDesuperheaterReclaimedHeat;           // heat reclaimed by water heating desuperheater coils
    1597             :     };
    1598             : 
    1599         125 :     struct HeatReclaimRefrigCondenserData : HeatReclaimDataBase // inherited from base struct
    1600             :     {
    1601             :         // Customized Members
    1602             :         Real64 AvailTemperature = 0.0; // Temperature of heat reclaim source
    1603             :     };
    1604             : 
    1605        4820 :     struct AirReportVars
    1606             :     {
    1607             :         // Members
    1608             :         Real64 MeanAirTemp = 0.0;            // Mean Air Temperature {C}
    1609             :         Real64 OperativeTemp = 0.0;          // Average of Mean Air Temperature {C} and Mean Radiant Temperature {C}
    1610             :         Real64 MeanAirHumRat = 0.0;          // Mean Air Humidity Ratio {kg/kg} (averaged over zone time step)
    1611             :         Real64 MeanAirDewPointTemp = 0.0;    // Mean Air Dewpoint Temperature {C}
    1612             :         Real64 ThermOperativeTemp = 0.0;     // Mix or MRT and MAT for Zone Control:Thermostatic:Operative Temperature {C}
    1613             :         Real64 InfilHeatGain = 0.0;          // Heat Gain {J} due to infiltration
    1614             :         Real64 InfilHeatLoss = 0.0;          // Heat Loss {J} due to infiltration
    1615             :         Real64 InfilLatentGain = 0.0;        // Latent Gain {J} due to infiltration
    1616             :         Real64 InfilLatentLoss = 0.0;        // Latent Loss {J} due to infiltration
    1617             :         Real64 InfilTotalGain = 0.0;         // Total Gain {J} due to infiltration (sensible+latent)
    1618             :         Real64 InfilTotalLoss = 0.0;         // Total Loss {J} due to infiltration (sensible+latent)
    1619             :         Real64 InfilVolumeCurDensity = 0.0;  // Volume of Air {m3} due to infiltration at current zone air density
    1620             :         Real64 InfilVolumeStdDensity = 0.0;  // Volume of Air {m3} due to infiltration at standard density (adjusted for elevation)
    1621             :         Real64 InfilVdotCurDensity = 0.0;    // Volume flow rate of Air {m3/s} due to infiltration at current zone air density
    1622             :         Real64 InfilVdotStdDensity = 0.0;    // Volume flow rate of Air {m3/s} due to infiltration standard density (adjusted elevation)
    1623             :         Real64 InfilMass = 0.0;              // Mass of Air {kg} due to infiltration
    1624             :         Real64 InfilMdot = 0.0;              // Mass flow rate of Air (kg/s) due to infiltration
    1625             :         Real64 InfilAirChangeRate = 0.0;     // Infiltration air change rate {ach}
    1626             :         Real64 VentilHeatLoss = 0.0;         // Heat Gain {J} due to ventilation
    1627             :         Real64 VentilHeatGain = 0.0;         // Heat Loss {J} due to ventilation
    1628             :         Real64 VentilLatentLoss = 0.0;       // Latent Gain {J} due to ventilation
    1629             :         Real64 VentilLatentGain = 0.0;       // Latent Loss {J} due to ventilation
    1630             :         Real64 VentilTotalLoss = 0.0;        // Total Gain {J} due to ventilation
    1631             :         Real64 VentilTotalGain = 0.0;        // Total Loss {J} due to ventilation
    1632             :         Real64 VentilVolumeCurDensity = 0.0; // Volume of Air {m3} due to ventilation at current zone air density
    1633             :         Real64 VentilVolumeStdDensity = 0.0; // Volume of Air {m3} due to ventilation at standard density (adjusted for elevation)
    1634             :         Real64 VentilVdotCurDensity = 0.0;   // Volume flow rate of Air {m3/s} due to ventilation at current zone air density
    1635             :         Real64 VentilVdotStdDensity = 0.0;   // Volume flow rate of Air {m3/s} due to ventilation at standard density (adjusted elevation)
    1636             :         Real64 VentilMass = 0.0;             // Mass of Air {kg} due to ventilation
    1637             :         Real64 VentilMdot = 0.0;             // Mass flow rate of Air {kg/s} due to ventilation
    1638             :         Real64 VentilAirChangeRate = 0.0;    // Ventilation air change rate (ach)
    1639             :         Real64 VentilFanElec = 0.0;          // Fan Electricity {W} due to ventilation
    1640             :         Real64 VentilAirTemp = 0.0;          // Air Temp {C} of ventilation
    1641             :         Real64 MixVolume = 0.0;              // Mixing volume of Air {m3}
    1642             :         Real64 MixVdotCurDensity = 0.0;      // Mixing volume flow rate of Air {m3/s} at current zone air density
    1643             :         Real64 MixVdotStdDensity = 0.0;      // Mixing volume flow rate of Air {m3/s} at standard density (adjusted for elevation)
    1644             :         Real64 MixMass = 0.0;                // Mixing mass of air {kg}
    1645             :         Real64 MixMdot = 0.0;                // Mixing mass flow rate of air {kg/s}
    1646             :         Real64 MixHeatLoss = 0.0;            // Heat Gain {J} due to mixing and cross mixing and refrigeration door mixing
    1647             :         Real64 MixHeatGain = 0.0;            // Heat Loss {J} due to mixing and cross mixing and refrigeration door mixing
    1648             :         Real64 MixLatentLoss = 0.0;          // Latent Gain {J} due to mixing and cross mixing and refrigeration door mixing
    1649             :         Real64 MixLatentGain = 0.0;          // Latent Loss {J} due to mixing and cross mixing and refrigeration door mixing
    1650             :         Real64 MixTotalLoss = 0.0;           // Total Gain {J} due to mixing and cross mixing and refrigeration door mixing
    1651             :         Real64 MixTotalGain = 0.0;           // Total Loss {J} due to mixing and cross mixing and refrigeration door mixing
    1652             :         Real64 SysInletMass = 0.0;           // Total mass of Air {kg} from all system inlets
    1653             :         Real64 SysOutletMass = 0.0;          // Total mass of Air {kg} from all system outlets
    1654             :         Real64 ExfilMass = 0.0;              // Mass of Air {kg} due to exfiltration
    1655             :         Real64 ExfilTotalLoss = 0.0;         // Total Loss rate {W} due to exfiltration (sensible+latent)
    1656             :         Real64 ExfilSensiLoss = 0.0;         // Sensible Loss rate {W} due to exfiltration
    1657             :         Real64 ExfilLatentLoss = 0.0;        // Latent Loss rate {W} due to exfiltration
    1658             :         Real64 ExhTotalLoss = 0.0;           // Total Loss rate {W} due to zone exhaust air (sensible+latent)
    1659             :         Real64 ExhSensiLoss = 0.0;           // Sensible Loss rate {W} due to zone exhaust air
    1660             :         Real64 ExhLatentLoss = 0.0;          // Latent Loss rate {W} due to zone exhaust air
    1661             :         // air heat balance component load summary results
    1662             :         Real64 SumIntGains = 0.0;     // Zone sum of convective internal gains
    1663             :         Real64 SumHADTsurfs = 0.0;    // Zone sum of Hc*Area*(Tsurf - Tz)
    1664             :         Real64 SumMCpDTzones = 0.0;   // zone sum of MassFlowRate*cp*(TremotZone - Tz) transfer air from other zone, Mixing
    1665             :         Real64 SumMCpDtInfil = 0.0;   // Zone sum of MassFlowRate*Cp*(Tout - Tz) transfer from outside, ventil, earth tube
    1666             :         Real64 SumMCpDTsystem = 0.0;  // Zone sum of air system MassFlowRate*Cp*(Tsup - Tz)
    1667             :         Real64 SumNonAirSystem = 0.0; // Zone sum of system convective gains, collected via NonAirSystemResponse
    1668             :         Real64 CzdTdt = 0.0;          // Zone air energy storage term.
    1669             :         Real64 imBalance = 0.0;       // put all terms in eq. 5 on RHS , should be zero
    1670             :         // for ZoneAirBalance:OutdoorAir object Outputs only
    1671             :         Real64 OABalanceHeatLoss = 0.0;         // Heat Gain {J} due to OA air balance
    1672             :         Real64 OABalanceHeatGain = 0.0;         // Heat Loss {J} due to OA air balance
    1673             :         Real64 OABalanceLatentLoss = 0.0;       // Latent Gain {J} due to OA air balance
    1674             :         Real64 OABalanceLatentGain = 0.0;       // Latent Loss {J} due to OA air balance
    1675             :         Real64 OABalanceTotalLoss = 0.0;        // Total Gain {J} due to OA air balance
    1676             :         Real64 OABalanceTotalGain = 0.0;        // Total Loss {J} due to OA air balance
    1677             :         Real64 OABalanceVolumeCurDensity = 0.0; // Volume of Air {m3} due to OA air balance
    1678             :         // at current zone air density
    1679             :         Real64 OABalanceVolumeStdDensity = 0.0; // Volume of Air {m3} due to OA air balance
    1680             :         // at standard density (adjusted for elevation)
    1681             :         Real64 OABalanceVdotCurDensity = 0.0; // Volume flow rate of Air {m3/s} due to OA air balance
    1682             :         // at current zone air density
    1683             :         Real64 OABalanceVdotStdDensity = 0.0; // Volume flow rate of Air {m3/s} due to OA air balance
    1684             :         // at standard density (adjusted elevation)
    1685             :         Real64 OABalanceMass = 0.0;          // Mass of Air {kg} due to OA air balance
    1686             :         Real64 OABalanceMdot = 0.0;          // Mass flow rate of Air {kg/s} due to OA air balance
    1687             :         Real64 OABalanceAirChangeRate = 0.0; // OA air balance air change rate (ach)
    1688             :         Real64 OABalanceFanElec = 0.0;       // Fan Electricity {W} due to OA air balance
    1689             :         Real64 SumEnthalpyM = 0.0;           // Zone sum of EnthalpyM
    1690             :         Real64 SumEnthalpyH = 0.0;           // Zone sum of EnthalpyH
    1691             : 
    1692             :         void setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string_view name);
    1693             :     };
    1694             : 
    1695        5585 :     struct ZonePreDefRepType
    1696             :     {
    1697             :         // Members
    1698             :         bool isOccupied = false;      // occupied during the current time step
    1699             :         Real64 NumOcc = 0.0;          // number of occupants - used in calculating Vbz
    1700             :         Real64 NumOccAccum = 0.0;     // number of occupants accumulating for entire simulation
    1701             :         Real64 NumOccAccumTime = 0.0; // time that the number of occupants is accumulating to compute average
    1702             :         //  - zone time step [hrs]
    1703             :         Real64 TotTimeOcc = 0.0; // time occupied (and the mechanical ventilation volume is accumulating)
    1704             :         //  - system time step [hrs]
    1705             : 
    1706             :         // OA Reports - accumulated values
    1707             :         // All Vol variables are in m3
    1708             :         Real64 MechVentVolTotalOcc = 0.0;    // volume for mechanical ventilation of outside air for entire simulation during occupied at current
    1709             :         Real64 MechVentVolMin = 9.9e9;       // a large number since finding minimum volume at current zone air density
    1710             :         Real64 InfilVolTotalOcc = 0.0;       // volume for infiltration of outside air for entire simulation during occupied at current density
    1711             :         Real64 InfilVolMin = 9.9e9;          // a large number since finding minimum volume at current zone air density
    1712             :         Real64 AFNInfilVolTotalOcc = 0.0;    // volume for AFN infiltration of outside air for entire simulation during occupied at zone air density
    1713             :         Real64 AFNInfilVolMin = 9.9e9;       // a large number since finding minimum volume at current zone air density
    1714             :         Real64 SimpVentVolTotalOcc = 0.0;    // volume for simple 'ZoneVentilation' of outside air for entire simulation during occupied current
    1715             :         Real64 SimpVentVolMin = 9.9e9;       // a large number since finding minimum volumeat current zone air density
    1716             :         Real64 AFNVentVolTotalOcc = 0.0;     // volume for AFN ventilation of outside air for entire simulation during occupied at zone air density
    1717             :         Real64 AFNVentVolMin = 9.9e9;        // a large number since finding minimum volume at current zone air density
    1718             :         Real64 MechVentVolTotalStdDen = 0.0; // volume for mechanical ventilation of outside air for entire simulation at standard density
    1719             :         Real64 MechVentVolTotalOccStdDen = 0.0; // volume for mechanical ventilation of outside air for entire simulation during occupied at std
    1720             :         Real64 InfilVolTotalStdDen = 0.0;       // volume for infiltration of outside air for entire simulation at standard density
    1721             :         Real64 InfilVolTotalOccStdDen = 0.0;    // volume for infiltration of outside air for entire simulation during occupied standard density
    1722             :         Real64 AFNInfilVolTotalStdDen = 0.0;    // volume for AFN infiltration of outside air for entire simulation at standard density
    1723             :         Real64 AFNInfilVolTotalOccStdDen = 0.0; // volume for AFN infiltration of outside air for entire simulation during occupied at std density
    1724             :         Real64 AFNVentVolStdDen = 0.0;          // volume flow rate for natural ventilation at standard density
    1725             :         Real64 AFNVentVolTotalStdDen = 0.0;     // volume for natural ventilation for entire simulation at standard density
    1726             :         Real64 AFNVentVolTotalOccStdDen = 0.0;  // volume for natural ventilatiofor entire simulation n during occupied at standard density
    1727             :         Real64 SimpVentVolTotalStdDen = 0.0;    // volume for simple 'ZoneVentilation' for entire simulation at standard density
    1728             :         Real64 SimpVentVolTotalOccStdDen = 0.0; // volume for simple 'ZoneVentilation' for entire simulation during occupied at standard density
    1729             :         Real64 VozMin = 0.0;                    // minimum outdoor zone ventilation
    1730             :         Real64 VozTargetTotal = 0.0;            // volume for target Voz-dyn for entire simulation at std density
    1731             :         Real64 VozTargetTotalOcc = 0.0;         // volume for target Voz-dyn for entire simulation during occupied
    1732             :         Real64 VozTargetTimeBelow = 0.0;        // time [hrs] that mechanical+natural ventilation is < VozTarget - 1%
    1733             :         Real64 VozTargetTimeAt = 0.0;           // time [hrs] that mechanical+natural ventilation is = VozTarget within 1% and > zero
    1734             :         Real64 VozTargetTimeAbove = 0.0;        // time [hrs] that mechanical+natural ventilation is > VozTarget + 1%
    1735             :         Real64 VozTargetTimeBelowOcc = 0.0;     // time [hrs] that mechanical+natural ventilation is < VozTarget - 1% during occupied
    1736             :         Real64 VozTargetTimeAtOcc = 0.0;        // time [hrs] that mechanical+natural ventilation is = VozTarget within 1% and > zero during occupied
    1737             :         Real64 VozTargetTimeAboveOcc = 0.0;     // time [hrs] that mechanical+natural ventilation is > VozTarget + 1% during occupied
    1738             :         Real64 TotVentTimeNonZeroUnocc = 0.0;   // time [hrs] that mechanical+natural ventilation is > zero during UNoccupied
    1739             : 
    1740             :         // for Sensible Heat Gas Component Report
    1741             :         // annual
    1742             :         Real64 SHGSAnZoneEqHt = 0.0;  // Zone Eq heating
    1743             :         Real64 SHGSAnZoneEqCl = 0.0;  // Zone Eq cooling
    1744             :         Real64 SHGSAnHvacATUHt = 0.0; // heating by Air Terminal Unit [J]
    1745             :         Real64 SHGSAnHvacATUCl = 0.0; // cooling by Air Terminal Unit [J]
    1746             :         Real64 SHGSAnSurfHt = 0.0;    // heated surface heating
    1747             :         Real64 SHGSAnSurfCl = 0.0;    // cooled surface cooling
    1748             :         Real64 SHGSAnPeoplAdd = 0.0;  // people additions
    1749             :         Real64 SHGSAnLiteAdd = 0.0;   // lighting addition
    1750             :         Real64 SHGSAnEquipAdd = 0.0;  // equipment addition
    1751             :         Real64 SHGSAnWindAdd = 0.0;   // window addition
    1752             :         Real64 SHGSAnIzaAdd = 0.0;    // inter zone air addition
    1753             :         Real64 SHGSAnInfilAdd = 0.0;  // infiltration addition
    1754             :         Real64 SHGSAnOtherAdd = 0.0;  // opaque surface and other addition
    1755             :         Real64 SHGSAnEquipRem = 0.0;  // equipment removal
    1756             :         Real64 SHGSAnWindRem = 0.0;   // window removal
    1757             :         Real64 SHGSAnIzaRem = 0.0;    // inter-zone air removal
    1758             :         Real64 SHGSAnInfilRem = 0.0;  // infiltration removal
    1759             :         Real64 SHGSAnOtherRem = 0.0;  // opaque surface and other removal
    1760             :         // peak cooling
    1761             :         int clPtTimeStamp = 0;        // timestamp for the cooling peak
    1762             :         Real64 clPeak = 0.0;          // cooling peak value (hvac air cooling + cooled surface)
    1763             :         Real64 SHGSClHvacHt = 0.0;    // hvac air heating
    1764             :         Real64 SHGSClHvacCl = 0.0;    // hvac air cooling
    1765             :         Real64 SHGSClHvacATUHt = 0.0; // heating by air terminal unit at cool peak [W]
    1766             :         Real64 SHGSClHvacATUCl = 0.0; // cooling by air terminal unit at cool peak [W]
    1767             :         Real64 SHGSClSurfHt = 0.0;    // heated surface heating
    1768             :         Real64 SHGSClSurfCl = 0.0;    // cooled surface cooling
    1769             :         Real64 SHGSClPeoplAdd = 0.0;  // people additions
    1770             :         Real64 SHGSClLiteAdd = 0.0;   // lighting addition
    1771             :         Real64 SHGSClEquipAdd = 0.0;  // equipment addition
    1772             :         Real64 SHGSClWindAdd = 0.0;   // window addition
    1773             :         Real64 SHGSClIzaAdd = 0.0;    // inter zone air addition
    1774             :         Real64 SHGSClInfilAdd = 0.0;  // infiltration addition
    1775             :         Real64 SHGSClOtherAdd = 0.0;  // opaque surface and other addition
    1776             :         Real64 SHGSClEquipRem = 0.0;  // equipment removal
    1777             :         Real64 SHGSClWindRem = 0.0;   // window removal
    1778             :         Real64 SHGSClIzaRem = 0.0;    // inter-zone air removal
    1779             :         Real64 SHGSClInfilRem = 0.0;  // infiltration removal
    1780             :         Real64 SHGSClOtherRem = 0.0;  // opaque surface and other removal
    1781             :         // peak heating
    1782             :         int htPtTimeStamp = 0;        // timestamp for the heating peak
    1783             :         Real64 htPeak = 0.0;          // heating peak value (hvac air heating + heated surface)
    1784             :         Real64 SHGSHtHvacHt = 0.0;    // hvac air heating
    1785             :         Real64 SHGSHtHvacCl = 0.0;    // hvac air cooling
    1786             :         Real64 SHGSHtHvacATUHt = 0.0; // heating by air terminal unit at heat peak [W]
    1787             :         Real64 SHGSHtHvacATUCl = 0.0; // cooling by air terminal unit at heat peak [W]
    1788             :         Real64 SHGSHtSurfHt = 0.0;    // heated surface heating
    1789             :         Real64 SHGSHtSurfCl = 0.0;    // cooled surface cooling
    1790             :         Real64 SHGSHtPeoplAdd = 0.0;  // people additions
    1791             :         Real64 SHGSHtLiteAdd = 0.0;   // lighting addition
    1792             :         Real64 SHGSHtEquipAdd = 0.0;  // equipment addition
    1793             :         Real64 SHGSHtWindAdd = 0.0;   // window addition
    1794             :         Real64 SHGSHtIzaAdd = 0.0;    // inter zone air addition
    1795             :         Real64 SHGSHtInfilAdd = 0.0;  // infiltration addition
    1796             :         Real64 SHGSHtOtherAdd = 0.0;  // opaque surface and other addition
    1797             :         Real64 SHGSHtEquipRem = 0.0;  // equipment removal
    1798             :         Real64 SHGSHtWindRem = 0.0;   // window removal
    1799             :         Real64 SHGSHtIzaRem = 0.0;    // inter-zone air removal
    1800             :         Real64 SHGSHtInfilRem = 0.0;  // infiltration removal
    1801             :         Real64 SHGSHtOtherRem = 0.0;  // opaque surface and other removal
    1802             : 
    1803             :         // heat emission
    1804             :         Real64 emiEnvelopConv = 0.0;      // heat emission from envelope convection
    1805             :         Real64 emiZoneExfiltration = 0.0; // heat emission from zone exfiltration
    1806             :         Real64 emiZoneExhaust = 0.0;      // heat emission from zone exhaust air
    1807             :         Real64 emiHVACRelief = 0.0;       // heat emission from HVAC relief air
    1808             :         Real64 emiHVACReject = 0.0;       // heat emission from HVAC reject air
    1809             :         Real64 emiTotHeat = 0.0;          // total building heat emission
    1810             :     };
    1811             : 
    1812           4 :     struct ZoneLocalEnvironmentData
    1813             :     {
    1814             :         // Members
    1815             :         std::string Name;
    1816             :         int ZonePtr = 0;           // surface pointer
    1817             :         int OutdoorAirNodePtr = 0; // schedule pointer
    1818             :     };
    1819             : 
    1820        9632 :     struct ZoneReportVars // Zone and Space report variables
    1821             :     {
    1822             :         // Members
    1823             :         // People
    1824             :         Real64 PeopleRadGain = 0.0;
    1825             :         Real64 PeopleConGain = 0.0;
    1826             :         Real64 PeopleSenGain = 0.0;
    1827             :         Real64 PeopleNumOcc = 0.0;
    1828             :         Real64 PeopleLatGain = 0.0;
    1829             :         Real64 PeopleTotGain = 0.0;
    1830             :         Real64 PeopleRadGainRate = 0.0;
    1831             :         Real64 PeopleConGainRate = 0.0;
    1832             :         Real64 PeopleSenGainRate = 0.0;
    1833             :         Real64 PeopleLatGainRate = 0.0;
    1834             :         Real64 PeopleTotGainRate = 0.0;
    1835             :         // Lights
    1836             :         Real64 LtsPower = 0.0;
    1837             :         Real64 LtsElecConsump = 0.0;
    1838             :         Real64 LtsRadGain = 0.0;
    1839             :         Real64 LtsVisGain = 0.0;
    1840             :         Real64 LtsConGain = 0.0;
    1841             :         Real64 LtsRetAirGain = 0.0;
    1842             :         Real64 LtsTotGain = 0.0;
    1843             :         Real64 LtsRadGainRate = 0.0;
    1844             :         Real64 LtsVisGainRate = 0.0;
    1845             :         Real64 LtsConGainRate = 0.0;
    1846             :         Real64 LtsRetAirGainRate = 0.0;
    1847             :         Real64 LtsTotGainRate = 0.0;
    1848             :         // Baseboard Heat
    1849             :         Real64 BaseHeatPower = 0.0;
    1850             :         Real64 BaseHeatElecCons = 0.0;
    1851             :         Real64 BaseHeatRadGain = 0.0;
    1852             :         Real64 BaseHeatConGain = 0.0;
    1853             :         Real64 BaseHeatTotGain = 0.0;
    1854             :         Real64 BaseHeatRadGainRate = 0.0;
    1855             :         Real64 BaseHeatConGainRate = 0.0;
    1856             :         Real64 BaseHeatTotGainRate = 0.0;
    1857             :         // Electric Equipment
    1858             :         Real64 ElecPower = 0.0;
    1859             :         Real64 ElecConsump = 0.0;
    1860             :         Real64 ElecRadGain = 0.0;
    1861             :         Real64 ElecConGain = 0.0;
    1862             :         Real64 ElecLatGain = 0.0;
    1863             :         Real64 ElecLost = 0.0;
    1864             :         Real64 ElecTotGain = 0.0;
    1865             :         Real64 ElecRadGainRate = 0.0;
    1866             :         Real64 ElecConGainRate = 0.0;
    1867             :         Real64 ElecLatGainRate = 0.0;
    1868             :         Real64 ElecLostRate = 0.0;
    1869             :         Real64 ElecTotGainRate = 0.0;
    1870             :         // Gas Equipment
    1871             :         Real64 GasPower = 0.0;
    1872             :         Real64 GasConsump = 0.0;
    1873             :         Real64 GasRadGain = 0.0;
    1874             :         Real64 GasConGain = 0.0;
    1875             :         Real64 GasLatGain = 0.0;
    1876             :         Real64 GasLost = 0.0;
    1877             :         Real64 GasTotGain = 0.0;
    1878             :         Real64 GasRadGainRate = 0.0;
    1879             :         Real64 GasConGainRate = 0.0;
    1880             :         Real64 GasLatGainRate = 0.0;
    1881             :         Real64 GasLostRate = 0.0;
    1882             :         Real64 GasTotGainRate = 0.0;
    1883             :         // Hot Water Equipment
    1884             :         Real64 HWPower = 0.0;
    1885             :         Real64 HWConsump = 0.0;
    1886             :         Real64 HWRadGain = 0.0;
    1887             :         Real64 HWConGain = 0.0;
    1888             :         Real64 HWLatGain = 0.0;
    1889             :         Real64 HWLost = 0.0;
    1890             :         Real64 HWTotGain = 0.0;
    1891             :         Real64 HWRadGainRate = 0.0;
    1892             :         Real64 HWConGainRate = 0.0;
    1893             :         Real64 HWLatGainRate = 0.0;
    1894             :         Real64 HWLostRate = 0.0;
    1895             :         Real64 HWTotGainRate = 0.0;
    1896             :         // Steam Equipment
    1897             :         Real64 SteamPower = 0.0;
    1898             :         Real64 SteamConsump = 0.0;
    1899             :         Real64 SteamRadGain = 0.0;
    1900             :         Real64 SteamConGain = 0.0;
    1901             :         Real64 SteamLatGain = 0.0;
    1902             :         Real64 SteamLost = 0.0;
    1903             :         Real64 SteamTotGain = 0.0;
    1904             :         Real64 SteamRadGainRate = 0.0;
    1905             :         Real64 SteamConGainRate = 0.0;
    1906             :         Real64 SteamLatGainRate = 0.0;
    1907             :         Real64 SteamLostRate = 0.0;
    1908             :         Real64 SteamTotGainRate = 0.0;
    1909             :         // Other Equipment
    1910             :         Real64 OtherPower = 0.0;
    1911             :         Real64 OtherConsump = 0.0;
    1912             :         Real64 OtherRadGain = 0.0;
    1913             :         Real64 OtherConGain = 0.0;
    1914             :         Real64 OtherLatGain = 0.0;
    1915             :         Real64 OtherLost = 0.0;
    1916             :         Real64 OtherTotGain = 0.0;
    1917             :         Real64 OtherRadGainRate = 0.0;
    1918             :         Real64 OtherConGainRate = 0.0;
    1919             :         Real64 OtherLatGainRate = 0.0;
    1920             :         Real64 OtherLostRate = 0.0;
    1921             :         Real64 OtherTotGainRate = 0.0;
    1922             :         // IT Equipment
    1923             :         std::array<Real64, (int)PERptVars::Num> PowerRpt;
    1924             :         std::array<Real64, (int)PERptVars::Num> EnergyRpt;
    1925             :         Real64 ITEqAirVolFlowStdDensity = 0.0; // Zone Air volume flow rate at standard density [m3/s]
    1926             :         Real64 ITEqAirMassFlow = 0.0;          // Zone Air mass flow rate [kg/s]
    1927             :         Real64 ITEqSHI = 0.0;                  // Zone Supply Heat Index []
    1928             :         Real64 ITEqTimeOutOfOperRange = 0.0;   // Zone ITE Air Inlet Operating Range Exceeded Time [hr]
    1929             :         Real64 ITEqTimeAboveDryBulbT = 0.0;    // Zone ITE Air Inlet Dry-Bulb Temperature Above Operating Range Time [hr]
    1930             :         Real64 ITEqTimeBelowDryBulbT = 0.0;    // Zone ITE Air Inlet Dry-Bulb Temperature Below Operating Range Time [hr]
    1931             :         Real64 ITEqTimeAboveDewpointT = 0.0;   // Zone ITE Air Inlet Dewpoint Temperature Above Operating Range Time [hr]
    1932             :         Real64 ITEqTimeBelowDewpointT = 0.0;   // Zone ITE Air Inlet Dewpoint Temperature Below Operating Range Time [hr]
    1933             :         Real64 ITEqTimeAboveRH = 0.0;          // Zone ITE Air Inlet Relative Humidity Above Operating Range Time [hr]
    1934             :         Real64 ITEqTimeBelowRH = 0.0;          // Zone ITE Air Inlet Relative Humidity Below Operating Range Time [hr]
    1935             :         Real64 ITEAdjReturnTemp = 0.0;         // Zone ITE Adjusted Return Air Temperature
    1936             :         // Overall Zone Variables
    1937             :         Real64 TotRadiantGain = 0.0;
    1938             :         Real64 TotVisHeatGain = 0.0;
    1939             :         Real64 TotConvectiveGain = 0.0;
    1940             :         Real64 TotLatentGain = 0.0;
    1941             :         Real64 TotTotalHeatGain = 0.0;
    1942             :         Real64 TotRadiantGainRate = 0.0;
    1943             :         Real64 TotVisHeatGainRate = 0.0;
    1944             :         Real64 TotConvectiveGainRate = 0.0;
    1945             :         Real64 TotLatentGainRate = 0.0;
    1946             :         Real64 TotTotalHeatGainRate = 0.0;
    1947             :         // Contaminant
    1948             :         Real64 CO2Rate = 0.0;
    1949             :         Real64 GCRate = 0.0;
    1950             : 
    1951             :         Real64 SumTinMinusTSup = 0.0;  // Numerator for zone-level sensible heat index (SHI)
    1952             :         Real64 SumToutMinusTSup = 0.0; // Denominator for zone-level sensible heat index (SHI)
    1953             :     };
    1954             : 
    1955             :     // Functions
    1956             : 
    1957             :     void SetZoneOutBulbTempAt(EnergyPlusData &state);
    1958             : 
    1959             :     void CheckZoneOutBulbTempAt(EnergyPlusData &state);
    1960             : 
    1961             :     void SetZoneWindSpeedAt(EnergyPlusData &state);
    1962             : 
    1963             :     void SetZoneWindDirAt(EnergyPlusData &state);
    1964             : 
    1965             :     void CheckAndSetConstructionProperties(EnergyPlusData &state,
    1966             :                                            int ConstrNum,    // Construction number to be set/checked
    1967             :                                            bool &ErrorsFound // error flag that is set when certain errors have occurred
    1968             :     );
    1969             : 
    1970             :     int AssignReverseConstructionNumber(EnergyPlusData &state,
    1971             :                                         int ConstrNum, // Existing Construction number of first surface
    1972             :                                         bool &ErrorsFound);
    1973             : 
    1974             :     void AddVariableSlatBlind(EnergyPlusData &state,
    1975             :                               int inBlindNumber,   // current Blind Number/pointer to name
    1976             :                               int &outBlindNumber, // resultant Blind Number to pass back
    1977             :                               bool &errFlag        // error flag should one be needed
    1978             :     );
    1979             : 
    1980             :     void CalcScreenTransmittance(EnergyPlusData &state,
    1981             :                                  int SurfaceNum,
    1982             :                                  Optional<Real64 const> Phi = _,     // Optional sun altitude relative to surface outward normal (radians)
    1983             :                                  Optional<Real64 const> Theta = _,   // Optional sun azimuth relative to surface outward normal (radians)
    1984             :                                  Optional_int_const ScreenNumber = _ // Optional screen number
    1985             :     );
    1986             : 
    1987             :     std::string DisplayMaterialRoughness(DataSurfaces::SurfaceRoughness Roughness); // Roughness String
    1988             : 
    1989             :     Real64 ComputeNominalUwithConvCoeffs(EnergyPlusData &state,
    1990             :                                          int numSurf,  // index for Surface array.
    1991             :                                          bool &isValid // returns true if result is valid
    1992             :     );
    1993             : 
    1994             :     void SetFlagForWindowConstructionWithShadeOrBlindLayer(EnergyPlusData &state);
    1995             : 
    1996             :     void AllocateIntGains(EnergyPlusData &state);
    1997             : 
    1998             : } // namespace DataHeatBalance
    1999             : 
    2000        1542 : struct HeatBalanceData : BaseGlobalStruct
    2001             : {
    2002             : 
    2003             :     int MaxSolidWinLayers = 0; // Maximum number of solid layers in a window construction
    2004             : 
    2005             :     // SiteData aka building data
    2006             :     Real64 LowHConvLimit = 0.1; // Lowest allowed convection coefficient for detailed model
    2007             :     // before reverting to the simple model.  This avoids a
    2008             :     // divide by zero elsewhere.  Not based on any physical
    2009             :     // reasoning, just the number that was picked.  It corresponds
    2010             :     // to a delta T for a vertical surface of 0.000444C.
    2011             :     //                           ! A lower limit is needed to avoid numerical problems
    2012             :     //                           ! Natural convection correlations are a function of temperature difference,
    2013             :     //                           !   there are many times when those temp differences pass through zero leading to non-physical results
    2014             :     //                           ! Value of 1.0 chosen here is somewhat arbitrary, but based on the following reasons:
    2015             :     //                           !  1) Low values of HconvIn indicate a layer of high thermal resistance, however
    2016             :     //                           !       the R-value of a convection film layer should be relatively low (compared to building surfaces)
    2017             :     //                           !  2) The value of 1.0 corresponds to the thermal resistance of 0.05 m of batt insulation
    2018             :     //                           !  3) Limit on the order of 1.0 is suggested by the abrupt changes in an inverse relationship
    2019             :     //                           !  4) A conduction-only analysis can model a limit by considering the thermal performance of
    2020             :     //                           !       boundary layer to be pure conduction (with no movement to enhance heat transfer);
    2021             :     //                           !       Taking the still gas thermal conductivity for air at 0.0267 W/m-K (at 300K), then
    2022             :     //                           !       this limit of 1.0 corresponds to a completely still layer of air that is around 0.025 m thick
    2023             :     //                           !  5) The previous limit of 0.1 (before ver. 3.1) caused loads initialization problems in test files
    2024             :     Real64 HighHConvLimit = 1000.0;         // upper limit for HConv, mostly used for user input limits in practice. !W/m2-K
    2025             :     Real64 MaxAllowedDelTemp = 0.002;       // Convergence criteria for inside surface temperatures
    2026             :     Real64 MaxAllowedDelTempCondFD = 0.002; // Convergence criteria for inside surface temperatures for CondFD
    2027             :     std::string BuildingName;               // Name of building
    2028             :     Real64 BuildingAzimuth = 0.0;           // North Axis of Building
    2029             :     Real64 LoadsConvergTol = 0.0;           // Tolerance value for Loads Convergence
    2030             :     Real64 TempConvergTol = 0.0;            // Tolerance value for Temperature Convergence
    2031             :     int DefaultInsideConvectionAlgo = ConvectionConstants::HcInt_ASHRAESimple;
    2032             :     int DefaultOutsideConvectionAlgo = ConvectionConstants::HcExt_ASHRAESimple;
    2033             :     DataHeatBalance::Shadowing SolarDistribution = DataHeatBalance::Shadowing::FullExterior;                // Solar Distribution Algorithm
    2034             :     int InsideSurfIterations = 0;                                                                           // Counts inside surface iterations
    2035             :     DataSurfaces::HeatTransferModel OverallHeatTransferSolutionAlgo = DataSurfaces::HeatTransferModel::CTF; // Global HeatBalanceAlgorithm setting
    2036             :     // Flags for HeatTransfer Algorithms Used
    2037             :     bool AllCTF = true;                  // CTF used for everything - no EMPD, no CondFD, No HAMT, No Kiva - true until flipped otherwise
    2038             :     bool AnyCTF = false;                 // CTF used
    2039             :     bool AnyEMPD = false;                // EMPD used
    2040             :     bool AnyCondFD = false;              // CondFD used
    2041             :     bool AnyHAMT = false;                // HAMT used
    2042             :     bool AnyKiva = false;                // Kiva used
    2043             :     bool AnyAirBoundary = false;         // Construction:AirBoundary used (implies grouped solar and radiant is present)
    2044             :     bool AnyBSDF = false;                // True if any WindowModelType == WindowModel:: BSDF
    2045             :     int MaxNumberOfWarmupDays = 25;      // Maximum number of warmup days allowed
    2046             :     int MinNumberOfWarmupDays = 1;       // Minimum number of warmup days allowed
    2047             :     Real64 CondFDRelaxFactor = 1.0;      // Relaxation factor, for looping across all the surfaces.
    2048             :     Real64 CondFDRelaxFactorInput = 1.0; // Relaxation factor, for looping across all the surfaces, user input value
    2049             :     DataHeatBalance::SolutionAlgo ZoneAirSolutionAlgo =
    2050             :         DataHeatBalance::SolutionAlgo::ThirdOrder; // ThirdOrderBackwardDifference, AnalyticalSolution, and EulerMethod
    2051             :     bool doSpaceHeatBalanceSizing = false;         // Do space heat balance during sizing
    2052             :     bool doSpaceHeatBalanceSimulation = false;     // Do space heat balance during simulation
    2053             :     bool doSpaceHeatBalance = false;               // Do space heat balance currently
    2054             :     bool OverrideZoneAirSolutionAlgo = false;      // Override the zone air solution algorithm in PerformancePrecisionTradeoffs
    2055             :     Real64 BuildingRotationAppendixG = 0.0;        // Building Rotation for Appendix G
    2056             :     Real64 ZoneTotalExfiltrationHeatLoss = 0.0;    // Building total heat emission through zone exfiltration;
    2057             :     Real64 ZoneTotalExhaustHeatLoss = 0.0;         // Building total heat emission through zone air exhaust;
    2058             :     Real64 SysTotalHVACReliefHeatLoss = 0.0;       // Building total heat emission through HVAC system relief air;
    2059             :     Real64 SysTotalHVACRejectHeatLoss = 0.0;       // Building total heat emission through HVAC system heat rejection;
    2060             :     // END SiteData
    2061             :     int NumOfZoneLists = 0;     // Total number of zone lists
    2062             :     int NumOfZoneGroups = 0;    // Total number of zone groups
    2063             :     int TotPeople = 0;          // Total People instances after expansion to spaces
    2064             :     int TotLights = 0;          // Total Lights instances after expansion to spaces
    2065             :     int TotElecEquip = 0;       // Total Electric Equipment instances after expansion to spaces
    2066             :     int TotGasEquip = 0;        // Total Gas Equipment instances after expansion to spaces
    2067             :     int TotOthEquip = 0;        // Total Other Equipment instances after expansion to spaces
    2068             :     int TotHWEquip = 0;         // Total Hot Water Equipment instances after expansion to spaces
    2069             :     int TotStmEquip = 0;        // Total Steam Equipment instances after expansion to spaces
    2070             :     int TotITEquip = 0;         // Total IT Equipment instances after expansion to spaces
    2071             :     int TotInfiltration = 0;    // Total Infiltration (all types) instances after expansion to spaces
    2072             :     int TotVentilation = 0;     // Total Ventilation (all types) instances after expansion to spaces
    2073             :     int TotMixing = 0;          // Total Mixing Statementsn instances after expansion to spaces
    2074             :     int TotCrossMixing = 0;     // Total Cross Mixing Statementsn instances after expansion to spaces
    2075             :     int TotRefDoorMixing = 0;   // Total RefrigerationDoor Mixing Statements in input
    2076             :     int TotBBHeat = 0;          // Total BBHeat Statements instances after expansion to spaces
    2077             :     int TotMaterials = 0;       // Total number of unique materials (layers) in this simulation
    2078             :     int TotConstructs = 0;      // Total number of unique constructions in this simulation
    2079             :     int TotSpectralData = 0;    // Total window glass spectral data sets
    2080             :     int W5GlsMat = 0;           // Window5 Glass Materials, specified by transmittance and front and back reflectance
    2081             :     int W5GlsMatAlt = 0;        // Window5 Glass Materials, specified by index of refraction and extinction coeff
    2082             :     int W5GasMat = 0;           // Window5 Single-Gas Materials
    2083             :     int W5GasMatMixture = 0;    // Window5 Gas Mixtures
    2084             :     int W7SupportPillars = 0;   // Complex fenestration support pillars
    2085             :     int W7DeflectionStates = 0; // Complex fenestration deflection states
    2086             :     int W7MaterialGaps = 0;     // Complex fenestration material gaps
    2087             :     int TotBlinds = 0;          // Total number of blind materials
    2088             :     int TotScreens = 0;         // Total number of exterior window screen materials
    2089             :     int TotTCGlazings = 0;      // Number of TC glazing object - WindowMaterial:Glazing:Thermochromic found in the idf file
    2090             :     int NumSurfaceScreens = 0;  // Total number of screens on exterior windows
    2091             :     int TotShades = 0;          // Total number of shade materials
    2092             :     int TotComplexShades = 0;   // Total number of shading materials for complex fenestrations
    2093             :     int TotComplexGaps = 0;     // Total number of window gaps for complex fenestrations
    2094             :     int TotSimpleWindow = 0;    // number of simple window systems.
    2095             :     int W5GlsMatEQL = 0;        // Window5 Single-Gas Materials for Equivalent Layer window model
    2096             :     int TotShadesEQL = 0;       // Total number of shade materials for Equivalent Layer window model
    2097             :     int TotDrapesEQL = 0;       // Total number of drape materials for Equivalent Layer window model
    2098             :     int TotBlindsEQL = 0;       // Total number of blind materials for Equivalent Layer window model
    2099             :     int TotScreensEQL = 0;      // Total number of exterior window screen materials for Equivalent Layer window model
    2100             :     int W5GapMatEQL = 0;        // Window5 Equivalent Layer Single-Gas Materials
    2101             :     int TotZoneAirBalance = 0;  // Total Zone Air Balance Statements in input
    2102             :     int TotFrameDivider = 0;    // Total number of window frame/divider objects
    2103             :     bool AirFlowFlag = false;
    2104             :     int TotCO2Gen = 0;                       // Total CO2 source and sink statements in input
    2105             :     bool CalcWindowRevealReflection = false; // True if window reveal reflection is to be calculated for at least one exterior window
    2106             :     bool StormWinChangeThisDay = false; // True if a storm window has been added or removed from any window during the current day; can only be true
    2107             :                                         // for first time step of the day.
    2108             :     bool SimpleCTFOnly = true;          // true if all constructions are simple CTF construction (CTFTimestep = TimeStepZone) with no internal sources
    2109             :     int MaxCTFTerms = 0;                // Maximum CTF terms to shift for all surfaces in the simulation
    2110             :     bool AnyInternalHeatSourceInInput = false;        // true if the user has entered any constructions with internal sources
    2111             :     bool AdaptiveComfortRequested_CEN15251 = false;   // true if people objects have adaptive comfort requests. CEN15251
    2112             :     bool AdaptiveComfortRequested_ASH55 = false;      // true if people objects have adaptive comfort requests. ASH55
    2113             :     bool AnyThermalComfortPierceModel = false;        // true if people objects use pierce thermal comfort model
    2114             :     bool AnyThermalComfortKSUModel = false;           // true if people objects use KSU thermal comfort model
    2115             :     bool AnyThermalComfortCoolingEffectModel = false; // true if people objects use ASH55 cooling effect adjusted thermal comfort model
    2116             :     bool AnyThermalComfortAnkleDraftModel = false;    // true if people objects use ASH55 ankle draft thermal comfort model
    2117             : 
    2118             :     bool NoFfactorConstructionsUsed = true;
    2119             :     bool NoCfactorConstructionsUsed = true;
    2120             :     bool NoRegularMaterialsUsed = true;
    2121             :     bool DoLatentSizing = false; // true when latent sizing is performed during zone sizing
    2122             :     bool isAnyLatentLoad = false;
    2123             : 
    2124             :     Array1D<Real64> ZoneListSNLoadHeatEnergy;
    2125             :     Array1D<Real64> ZoneListSNLoadCoolEnergy;
    2126             :     Array1D<Real64> ZoneListSNLoadHeatRate;
    2127             :     Array1D<Real64> ZoneListSNLoadCoolRate;
    2128             :     Array1D<Real64> ZoneGroupSNLoadHeatEnergy;
    2129             :     Array1D<Real64> ZoneGroupSNLoadCoolEnergy;
    2130             :     Array1D<Real64> ZoneGroupSNLoadHeatRate;
    2131             :     Array1D<Real64> ZoneGroupSNLoadCoolRate;
    2132             : 
    2133             :     Array1D<Real64> ZoneMRT;        // MEAN RADIANT TEMPERATURE (C)
    2134             :     Array1D<Real64> ZoneTransSolar; // Exterior beam plus diffuse solar entering zone sum of WinTransSolar for exterior windows in zone (W)
    2135             :     Array1D<Real64>
    2136             :         ZoneWinHeatGain; // Heat gain to zone from all exterior windows (includes oneTransSolar); sum of WinHeatGain for exterior windows in zone (W)
    2137             :     Array1D<Real64> ZoneWinHeatGainRep;             // = ZoneWinHeatGain when ZoneWinHeatGain >= 0
    2138             :     Array1D<Real64> ZoneWinHeatLossRep;             // = -ZoneWinHeatGain when ZoneWinHeatGain < 0
    2139             :     Array1D<Real64> ZoneBmSolFrExtWinsRep;          // Beam solar into zone from exterior windows [W]
    2140             :     Array1D<Real64> ZoneBmSolFrIntWinsRep;          // Beam solar into zone from interior windows [W]
    2141             :     Array1D<Real64> EnclSolInitialDifSolReflW;      // Initial diffuse solar in zone from ext and int windows reflected from interior surfaces [W]
    2142             :     Array1D<Real64> ZoneDifSolFrExtWinsRep;         // Diffuse solar into zone from exterior windows [W]
    2143             :     Array1D<Real64> ZoneDifSolFrIntWinsRep;         // Diffuse solar into zone from interior windows [W]
    2144             :     Array1D<Real64> ZoneOpaqSurfInsFaceCond;        // Zone inside face opaque surface conduction (W)
    2145             :     Array1D<Real64> ZoneOpaqSurfInsFaceCondGainRep; // = Zone inside face opaque surface conduction when >= 0
    2146             :     Array1D<Real64> ZoneOpaqSurfInsFaceCondLossRep; // = -Zone inside face opaque surface conduction when < 0
    2147             :     Array1D<Real64> ZoneOpaqSurfExtFaceCond;        // Zone outside face opaque surface conduction (W)
    2148             :     Array1D<Real64> ZoneOpaqSurfExtFaceCondGainRep; // = Zone outside face opaque surface conduction when >= 0
    2149             :     Array1D<Real64> ZoneOpaqSurfExtFaceCondLossRep; // = -Zone outside face opaque surface conduction when < 0
    2150             :     Array1D<Real64> ZoneTransSolarEnergy;           // Energy of ZoneTransSolar [J]
    2151             :     Array1D<Real64> ZoneWinHeatGainRepEnergy;       // Energy of ZoneWinHeatGainRep [J]
    2152             :     Array1D<Real64> ZoneWinHeatLossRepEnergy;       // Energy of ZoneWinHeatLossRep [J]
    2153             :     Array1D<Real64> ZoneBmSolFrExtWinsRepEnergy;    // Energy of ZoneBmSolFrExtWinsRep [J]
    2154             :     Array1D<Real64> ZoneBmSolFrIntWinsRepEnergy;    // Energy of ZoneBmSolFrIntWinsRep [J]
    2155             :     Array1D<Real64> ZoneDifSolFrExtWinsRepEnergy;   // Energy of ZoneDifSolFrExtWinsRep [J]
    2156             :     Array1D<Real64> ZoneDifSolFrIntWinsRepEnergy;   // Energy of ZoneDifSolFrIntWinsRep [J]
    2157             :     Array1D<Real64> ZnOpqSurfInsFaceCondGnRepEnrg;  // Energy of ZoneOpaqSurfInsFaceCondGainRep [J]
    2158             :     Array1D<Real64> ZnOpqSurfInsFaceCondLsRepEnrg;  // Energy of ZoneOpaqSurfInsFaceCondLossRep [J]
    2159             :     Array1D<Real64> ZnOpqSurfExtFaceCondGnRepEnrg;  // Energy of ZoneOpaqSurfInsFaceCondGainRep [J]
    2160             :     Array1D<Real64> ZnOpqSurfExtFaceCondLsRepEnrg;  // Energy of ZoneOpaqSurfInsFaceCondLossRep [J]
    2161             : 
    2162             :     Array1D<Real64> SurfQdotRadIntGainsInPerArea;       // Thermal radiation absorbed on inside surfaces
    2163             :     Array1D<Real64> SurfQRadSWOutIncident;              // Exterior beam plus diffuse solar incident on surface (W/m2)
    2164             :     Array1D<Real64> SurfQRadSWOutIncidentBeam;          // Exterior beam solar incident on surface (W/m2)
    2165             :     Array1D<Real64> SurfBmIncInsSurfIntensRep;          // Beam sol irrad from ext wins on inside of surface (W/m2)
    2166             :     Array1D<Real64> SurfBmIncInsSurfAmountRep;          // Beam sol amount from ext wins incident on inside of surface (W)
    2167             :     Array1D<Real64> SurfIntBmIncInsSurfIntensRep;       // Beam sol irrad from int wins on inside of surface (W/m2)
    2168             :     Array1D<Real64> SurfIntBmIncInsSurfAmountRep;       // Beam sol amount from int wins incident on inside of surface (W)
    2169             :     Array1D<Real64> SurfQRadSWOutIncidentSkyDiffuse;    // Exterior sky diffuse solar incident on surface (W/m2)
    2170             :     Array1D<Real64> SurfQRadSWOutIncidentGndDiffuse;    // Exterior ground diffuse solar incident on surface (W/m2)
    2171             :     Array1D<Real64> SurfQRadSWOutIncBmToDiffReflGnd;    // Exterior diffuse solar incident from beam to diffuse reflection from ground (W/m2)
    2172             :     Array1D<Real64> SurfQRadSWOutIncSkyDiffReflGnd;     // Exterior diffuse solar incident from sky diffuse reflection from ground (W/m2)
    2173             :     Array1D<Real64> SurfQRadSWOutIncBmToBmReflObs;      // Exterior beam solar incident from beam-to-beam reflection from obstructions (W/m2)
    2174             :     Array1D<Real64> SurfQRadSWOutIncBmToDiffReflObs;    // Exterior diffuse solar incident from beam-to-diffuse reflection from obstructions (W/m2)
    2175             :     Array1D<Real64> SurfQRadSWOutIncSkyDiffReflObs;     // Exterior diffuse solar incident from sky diffuse reflection from obstructions (W/m2)
    2176             :     Array1D<Real64> SurfSWInAbsTotalReport;             // Report - Total interior/exterior shortwave absorbed on inside of surface (W)
    2177             :     Array1D<Real64> SurfBmIncInsSurfAmountRepEnergy;    // energy of BmIncInsSurfAmountRep [J]
    2178             :     Array1D<Real64> SurfIntBmIncInsSurfAmountRepEnergy; // energy of IntBmIncInsSurfAmountRep [J]
    2179             :     Array1D<Real64> SurfInitialDifSolInAbsReport;       // Report - Initial transmitted diffuse solar absorbed on inside of surface (W)
    2180             :     Array1D_int SurfWinBSDFBeamDirectionRep;            // BSDF beam direction number for given complex fenestration state (for reporting) []
    2181             :     Array1D<Real64> SurfWinBSDFBeamThetaRep;            // BSDF beam Theta angle (for reporting) [rad]
    2182             :     Array1D<Real64> SurfWinBSDFBeamPhiRep;              // BSDF beam Phi angle (for reporting) [rad]
    2183             :     Array1D<Real64> SurfWinQRadSWwinAbsTot;             // Exterior beam plus diffuse solar absorbed in glass layers of window (W)
    2184             :     Array2D<Real64> SurfWinQRadSWwinAbsLayer;           // Exterior beam plus diffuse solar absorbed in glass layers of window (W)
    2185             :     Array2D<Real64> SurfWinFenLaySurfTempFront;         // Front surface temperatures of fenestration layers
    2186             :     Array2D<Real64> SurfWinFenLaySurfTempBack;          // Back surface temperatures of fenestration layers
    2187             :     Array1D<Real64> SurfWinQRadSWwinAbsTotEnergy;       // Energy of QRadSWwinAbsTot [J]
    2188             :     Array1D<Real64> SurfWinSWwinAbsTotalReport;         // Report - Total interior/exterior shortwave absorbed in all glass layers of window (W)
    2189             :     Array1D<Real64> SurfWinInitialDifSolInTransReport;  // Report - Initial transmitted diffuse solar transmitted out
    2190             :                                                         // through inside of window surface (W)
    2191             :     Array2D<Real64> SurfWinQRadSWwinAbs;                // Short wave radiation absorbed in window glass layers
    2192             :     Array2D<Real64> SurfWinInitialDifSolwinAbs;         // Initial diffuse solar absorbed in window glass layers from inside(W/m2)
    2193             :     Array1D<Real64> SurfOpaqSWOutAbsTotalReport;        // Report - Total exterior shortwave/solar absorbed on outside of surface (W)
    2194             :     Array1D<Real64> SurfOpaqSWOutAbsEnergyReport;       // Report - Total exterior shortwave/solar absorbed on outside of surface (j)
    2195             :     Array1D<Real64> SurfTempEffBulkAir;                 // air temperature adjacent to the surface used for inside surface heat balances
    2196             : 
    2197             :     // Material
    2198             :     Array1D<Real64> NominalR;                       // Nominal R value of each material -- used in matching interzone surfaces
    2199             :     Array1D<Real64> NominalRforNominalUCalculation; // Nominal R values are summed to calculate NominalU values for constructions
    2200             :     Array1D<Real64> NominalU;                       // Nominal U value for each construction -- used in matching interzone surfaces
    2201             :     Array1D<Real64> NominalUBeforeAdjusted;         // Nominal U value for glazing system only
    2202             :     Array1D<Real64> CoeffAdjRatio;                  // Conductive coefficient adjustment ratio
    2203             : 
    2204             :     Array1D<Real64>
    2205             :         EnclSolQSWRad; // Zone short-wave flux density; used to calculate short-wave  radiation absorbed on inside surfaces of zone or enclosure
    2206             :     Array1D<Real64> EnclSolQSWRadLights; // Like QS, but Lights short-wave only.
    2207             :     Array1D<Real64> EnclSolDB;           // Factor for diffuse radiation in a zone from beam reflecting from inside surfaces
    2208             :     Array1D<Real64> EnclSolDBSSG;        // Factor for diffuse radiation in a zone from beam reflecting from inside surfaces.
    2209             :     // Used only for scheduled surface gains
    2210             :     Array1D<Real64> EnclSolDBIntWin; // Value of factor for beam solar entering a zone through interior windows
    2211             :     // (considered to contribute to diffuse in zone)
    2212             :     Array1D<Real64> EnclSolQSDifSol; // Like QS, but diffuse solar short-wave only.
    2213             :     Array1D<Real64> EnclSolQD;       // Diffuse solar radiation in a zone from sky and ground diffuse entering
    2214             :     // through exterior windows and reflecting from interior surfaces,
    2215             :     // beam from exterior windows reflecting from interior surfaces,
    2216             :     // and beam entering through interior windows (considered diffuse)
    2217             :     Array1D<Real64> EnclSolQDforDaylight; // Diffuse solar radiation in a zone from sky and ground diffuse entering
    2218             :     // through exterior windows, beam from exterior windows reflecting
    2219             :     // from interior surfaces, and beam entering through interior windows
    2220             :     // (considered diffuse)
    2221             :     // Originally QD, now used only for EnclSolQSDifSol calc for daylighting
    2222             : 
    2223             :     bool EnclRadAlwaysReCalc = false; // Enclosure solar or thermal radiation properties always needs to be recalc at any time step
    2224             : 
    2225             :     Array1D<Real64> SurfCosIncidenceAngle;       // Cosine of beam solar incidence angle (for reporting)
    2226             :     Array2D<Real64> SurfSunlitFracHR;            // Hourly fraction of heat transfer surface that is sunlit
    2227             :     Array2D<Real64> SurfCosIncAngHR;             // Hourly cosine of beam radiation incidence angle on surface
    2228             :     Array3D<Real64> SurfSunlitFrac;              // TimeStep fraction of heat transfer surface that is sunlit
    2229             :     Array3D<Real64> SurfSunlitFracWithoutReveal; // For a window with reveal, the sunlit fraction  without shadowing by the reveal
    2230             :     Array3D<Real64> SurfCosIncAng;               // TimeStep cosine of beam radiation incidence angle on surface
    2231             :     Array4D_int SurfWinBackSurfaces;     // For a given hour and timestep, a list of up to 20 surfaces receiving  beam solar radiation from a given
    2232             :                                          // exterior window
    2233             :     Array4D<Real64> SurfWinOverlapAreas; // For a given hour and timestep, the areas of the exterior window sending beam solar radiation to the
    2234             :                                          // surfaces listed in BackSurfaces
    2235             :     Real64 zeroPointerVal = 0.0;
    2236             :     EPVector<DataHeatBalance::ZonePreDefRepType> ZonePreDefRep;
    2237             :     DataHeatBalance::ZonePreDefRepType BuildingPreDefRep;
    2238             :     EPVector<DataHeatBalance::SpaceZoneSimData> ZoneIntGain;
    2239             :     EPVector<DataHeatBalance::SpaceZoneSimData> spaceIntGain;
    2240             :     EPVector<DataHeatBalance::SpaceIntGainDeviceData> spaceIntGainDevices;
    2241             :     EPVector<DataHeatBalance::GapSupportPillar> SupportPillar;
    2242             :     EPVector<DataHeatBalance::GapDeflectionState> DeflectionState;
    2243             :     EPVector<DataHeatBalance::SpectralDataProperties> SpectralData;
    2244             :     EPVector<DataHeatBalance::SpaceData> space;
    2245             :     EPVector<DataHeatBalance::SpaceListData> spaceList;
    2246             :     EPVector<DataHeatBalance::ZoneData> Zone;
    2247             :     EPVector<DataHeatBalance::ZoneResilience> Resilience;
    2248             :     EPVector<DataHeatBalance::ZoneListData> ZoneList;
    2249             :     EPVector<DataHeatBalance::ZoneGroupData> ZoneGroup;
    2250             :     EPVector<DataHeatBalance::PeopleData> People;
    2251             :     EPVector<DataHeatBalance::LightsData> Lights;
    2252             :     EPVector<DataHeatBalance::ZoneEquipData> ZoneElectric;
    2253             :     EPVector<DataHeatBalance::ZoneEquipData> ZoneGas;
    2254             :     EPVector<DataHeatBalance::ZoneEquipData> ZoneOtherEq;
    2255             :     EPVector<DataHeatBalance::ZoneEquipData> ZoneHWEq;
    2256             :     EPVector<DataHeatBalance::ZoneEquipData> ZoneSteamEq;
    2257             :     EPVector<DataHeatBalance::ITEquipData> ZoneITEq;
    2258             :     EPVector<DataHeatBalance::BBHeatData> ZoneBBHeat;
    2259             :     EPVector<DataHeatBalance::InfiltrationData> Infiltration;
    2260             :     EPVector<DataHeatBalance::VentilationData> Ventilation;
    2261             :     EPVector<DataHeatBalance::ZoneAirBalanceData> ZoneAirBalance;
    2262             :     EPVector<DataHeatBalance::MixingData> Mixing;
    2263             :     EPVector<DataHeatBalance::MixingData> CrossMixing;
    2264             :     EPVector<DataHeatBalance::AirBoundaryMixingSpecs> airBoundaryMixing;
    2265             :     EPVector<DataHeatBalance::MixingData> RefDoorMixing;
    2266             :     Array1D<DataHeatBalance::WindowBlindProperties> Blind;
    2267             :     EPVector<DataHeatBalance::WindowComplexShade> ComplexShade;
    2268             :     EPVector<DataHeatBalance::WindowThermalModelParams> WindowThermalModel;
    2269             :     EPVector<DataHeatBalance::SurfaceScreenProperties> SurfaceScreens;
    2270             :     EPVector<DataHeatBalance::ScreenTransData> ScreenTrans;
    2271             :     EPVector<DataHeatBalance::ZoneCatEUseData> ZoneIntEEuse;
    2272             :     EPVector<DataHeatBalance::RefrigCaseCreditData> RefrigCaseCredit;
    2273             :     EPVector<DataHeatBalance::HeatReclaimDataBase> HeatReclaimRefrigeratedRack;
    2274             :     EPVector<DataHeatBalance::HeatReclaimRefrigCondenserData> HeatReclaimRefrigCondenser;
    2275             :     EPVector<DataHeatBalance::HeatReclaimDataBase> HeatReclaimDXCoil;
    2276             :     EPVector<DataHeatBalance::HeatReclaimDataBase> HeatReclaimVS_DXCoil;
    2277             :     EPVector<DataHeatBalance::HeatReclaimDataBase> HeatReclaimSimple_WAHPCoil;
    2278             :     EPVector<DataHeatBalance::AirReportVars> ZnAirRpt;
    2279             :     EPVector<DataHeatBalance::AirReportVars> spaceAirRpt;
    2280             :     EPVector<DataHeatBalance::TCGlazingsType> TCGlazings;
    2281             :     EPVector<DataHeatBalance::ZoneEquipData> ZoneCO2Gen;
    2282             :     EPVector<DataHeatBalance::ZoneReportVars> ZoneRpt;
    2283             :     EPVector<DataHeatBalance::ZoneReportVars> spaceRpt;
    2284             :     EPVector<DataHeatBalance::ZoneMassConservationData> MassConservation;
    2285             :     DataHeatBalance::ZoneAirMassFlowConservation ZoneAirMassFlow;
    2286             :     EPVector<DataHeatBalance::ZoneLocalEnvironmentData> ZoneLocalEnvironment;
    2287             :     bool MundtFirstTimeFlag = true;
    2288             :     EPVector<std::string> spaceTypes;
    2289             : 
    2290           0 :     void clear_state() override
    2291             :     {
    2292           0 :         *this = HeatBalanceData();
    2293           0 :     }
    2294             : };
    2295             : 
    2296             : } // namespace EnergyPlus
    2297             : 
    2298             : #endif

Generated by: LCOV version 1.13