LCOV - code coverage report
Current view: top level - EnergyPlus - SingleDuct.hh (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 88.9 % 27 24
Test Date: 2025-06-02 07:23:51 Functions: 80.0 % 5 4

            Line data    Source code
       1              : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
       2              : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
       3              : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
       4              : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
       5              : // contributors. All rights reserved.
       6              : //
       7              : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
       8              : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
       9              : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
      10              : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
      11              : // derivative works, and perform publicly and display publicly, and to permit others to do so.
      12              : //
      13              : // Redistribution and use in source and binary forms, with or without modification, are permitted
      14              : // provided that the following conditions are met:
      15              : //
      16              : // (1) Redistributions of source code must retain the above copyright notice, this list of
      17              : //     conditions and the following disclaimer.
      18              : //
      19              : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
      20              : //     conditions and the following disclaimer in the documentation and/or other materials
      21              : //     provided with the distribution.
      22              : //
      23              : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
      24              : //     the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
      25              : //     used to endorse or promote products derived from this software without specific prior
      26              : //     written permission.
      27              : //
      28              : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
      29              : //     without changes from the version obtained under this License, or (ii) Licensee makes a
      30              : //     reference solely to the software portion of its product, Licensee must refer to the
      31              : //     software as "EnergyPlus version X" software, where "X" is the version number Licensee
      32              : //     obtained under this License and may not use a different name for the software. Except as
      33              : //     specifically required in this Section (4), Licensee shall not use in a company name, a
      34              : //     product name, in advertising, publicity, or other promotional activities any name, trade
      35              : //     name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
      36              : //     similar designation, without the U.S. Department of Energy's prior written consent.
      37              : //
      38              : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
      39              : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
      40              : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
      41              : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      42              : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      43              : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      44              : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
      45              : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      46              : // POSSIBILITY OF SUCH DAMAGE.
      47              : 
      48              : #ifndef SingleDuct_hh_INCLUDED
      49              : #define SingleDuct_hh_INCLUDED
      50              : 
      51              : #include <unordered_map>
      52              : 
      53              : // ObjexxFCL Headers
      54              : #include <ObjexxFCL/Array1D.hh>
      55              : #include <ObjexxFCL/Optional.hh>
      56              : 
      57              : // EnergyPlus Headers
      58              : #include <EnergyPlus/Data/BaseData.hh>
      59              : #include <EnergyPlus/DataGlobals.hh>
      60              : #include <EnergyPlus/DataZoneEquipment.hh>
      61              : #include <EnergyPlus/EnergyPlus.hh>
      62              : #include <EnergyPlus/FluidProperties.hh>
      63              : #include <EnergyPlus/Plant/Enums.hh>
      64              : #include <EnergyPlus/Plant/PlantLocation.hh>
      65              : 
      66              : namespace EnergyPlus {
      67              : 
      68              : // Forward declarations
      69              : struct EnergyPlusData;
      70              : 
      71              : namespace SingleDuct {
      72              : 
      73              :     enum class Action
      74              :     {
      75              :         Invalid = -1,
      76              :         Normal,
      77              :         Reverse,
      78              :         ReverseWithLimits,
      79              :         HeatingNotUsed,
      80              :         Num
      81              :     };
      82              :     enum class SysType
      83              :     {
      84              :         Invalid = -1,
      85              :         SingleDuctVAVReheat,
      86              :         SingleDuctConstVolReheat,
      87              :         SingleDuctConstVolNoReheat,
      88              :         SingleDuctVAVNoReheat,
      89              :         SingleDuctVAVReheatVSFan,
      90              :         SingleDuctCBVAVReheat,
      91              :         SingleDuctCBVAVNoReheat,
      92              :         Num,
      93              :     };
      94              :     enum class HeatingCoilType : int
      95              :     {
      96              :         Invalid = -1,
      97              :         None,
      98              :         Gas,
      99              :         Electric,
     100              :         SimpleHeating,
     101              :         SteamAirHeating,
     102              :         Num,
     103              :     };
     104              :     enum class MinFlowFraction
     105              :     {
     106              :         Invalid = -1,
     107              :         Constant,
     108              :         Scheduled,
     109              :         Fixed,
     110              :         MinFracNotUsed,
     111              :         Num
     112              :     };
     113              : 
     114              :     struct SingleDuctAirTerminalFlowConditions
     115              :     {
     116              :         // Members
     117              :         Real64 AirMassFlowRate;         // MassFlow through the Sys being Simulated [kg/Sec]
     118              :         Real64 AirMassFlowRateMaxAvail; // MassFlow through the Sys being Simulated [kg/Sec]
     119              :         Real64 AirMassFlowRateMinAvail; // MassFlow through the Sys being Simulated [kg/Sec]
     120              :         Real64 AirTemp;                 // (C)
     121              :         Real64 AirHumRat;               // (Kg/Kg)
     122              :         Real64 AirEnthalpy;             // (J/Kg)
     123              : 
     124              :         // Default Constructor
     125         7214 :         SingleDuctAirTerminalFlowConditions()
     126         7214 :             : AirMassFlowRate(0.0), AirMassFlowRateMaxAvail(0.0), AirMassFlowRateMinAvail(0.0), AirTemp(0.0), AirHumRat(0.0), AirEnthalpy(0.0)
     127              :         {
     128         7214 :         }
     129              :     };
     130              : 
     131              :     struct SingleDuctAirTerminal
     132              :     {
     133              :         // Members
     134              :         int SysNum;                                         // index to single duct air terminal unit
     135              :         std::string SysName;                                // Name of the Sys
     136              :         std::string sysType;                                // Type of Sys ie. VAV, Mixing, Inducing, etc.
     137              :         SysType SysType_Num;                                // Numeric Equivalent for System type
     138              :         Sched::Schedule *availSched = nullptr;              // availability schedule
     139              :         std::string ReheatComp;                             // Type of the Reheat Coil Object
     140              :         HeatingCoilType ReheatComp_Num;                     // Numeric Equivalent in this module for Coil type
     141              :         int ReheatComp_Index;                               // Returned Index number from other routines
     142              :         std::string ReheatName;                             // name of reheat coil
     143              :         DataPlant::PlantEquipmentType ReheatComp_PlantType; // typeOf_ number for plant type of heating coil
     144              :         HVAC::FanType fanType;                              // Numeric Equivalent in this module for fan type
     145              :         int Fan_Index;                                      // Returned Index number from other routines
     146              :         int ControlCompTypeNum;
     147              :         int CompErrIndex;
     148              :         std::string FanName;                  // name of fan
     149              :         Real64 MaxAirVolFlowRate;             // Max Specified Volume Flow Rate of Sys (cooling max) [m3/sec]
     150              :         Real64 AirMassFlowRateMax;            // Max Specified Mass Flow Rate of Sys (cooling max) [kg/sec]
     151              :         Real64 MaxHeatAirVolFlowRate;         // Max specified volume flow rate of unit at max heating [m3/s]
     152              :         Real64 HeatAirMassFlowRateMax;        // Max Specified Mass Flow Rate of unit at max heating [kg/sec]
     153              :         MinFlowFraction ZoneMinAirFracMethod; // parameter for what method is used for min flow fraction
     154              :         Real64 ZoneMinAirFracDes;             // Fraction of supply air used as design minimum flow
     155              :         Real64 ZoneMinAirFrac;                // Fraction of supply air used as current minimum flow
     156              :         Real64 ZoneMinAirFracReport;          // Fraction of supply air used as minimum flow for reporting (zero if terminal unit flow is zero)
     157              :         Real64 ZoneFixedMinAir;               // Absolute minimum supply air flow
     158              :         Sched::Schedule *zoneMinAirFracSched = nullptr; // schedule for min flow fraction
     159              :         bool ConstantMinAirFracSetByUser;               // record if user left field blank for constant min fraction.
     160              :         bool FixedMinAirSetByUser;                      // record if user left field blank for constant min fraction.
     161              :         Real64 DesignMinAirFrac;                        // store user entered constant min flow fract for design
     162              :         Real64 DesignFixedMinAir;                       // store user entered constant min flow for design
     163              :         int InletNodeNum;                               // terminal unit inlet node number; damper inlet node number
     164              :         int OutletNodeNum;                              // damper outlet node number for VAV; unused by CV; coil air inlet node for VAV
     165              :         // fan outlet node, coil inlet node for VAV VS Fan
     166              :         int ReheatControlNode;        // hot water inlet node for heating coil
     167              :         int ReheatCoilOutletNode;     // outlet node for heating coil
     168              :         Real64 ReheatCoilMaxCapacity; // heating coil capacity, W
     169              :         int ReheatAirOutletNode;      // terminal unit outlet node; heating coil air outlet node
     170              :         Real64 MaxReheatWaterVolFlow; // m3/s
     171              :         Real64 MaxReheatSteamVolFlow; // m3/s
     172              :         Real64 MaxReheatWaterFlow;    // kg/s
     173              :         Real64 MaxReheatSteamFlow;    // kg/s
     174              :         Real64 MinReheatWaterVolFlow; // m3/s
     175              :         Real64 MinReheatSteamVolFlow; // m3/s
     176              :         Real64 MinReheatWaterFlow;    // kg/s
     177              :         Real64 MinReheatSteamFlow;    // kg/s
     178              :         Real64 ControllerOffset;
     179              :         Real64 MaxReheatTemp; // C
     180              :         bool MaxReheatTempSetByUser;
     181              :         Action DamperHeatingAction;
     182              :         Real64 DamperPosition;
     183              :         int ADUNum;                           // index of corresponding air distribution unit
     184              :         int ErrCount1;                        // iteration limit exceeded in Hot Water Flow Calc
     185              :         int ErrCount1c;                       // iteration limit exceeded in Hot Water Flow Calc - continue
     186              :         int ErrCount2;                        // bad iterations limits in hot water flow calc
     187              :         Real64 ZoneFloorArea;                 // Zone floor area
     188              :         int CtrlZoneNum;                      // Pointer to CtrlZone data structure
     189              :         int CtrlZoneInNodeIndex;              // which controlled zone inlet node number corresponds with this unit
     190              :         Real64 MaxAirVolFlowRateDuringReheat; // Maximum vol flow during reheat
     191              :         Real64 MaxAirVolFractionDuringReheat; // Maximum vol flow fraction during reheat
     192              :         Real64 AirMassFlowDuringReheatMax;    // Maximum mass flow during reheat
     193              :         int ZoneOutdoorAirMethod;             // Outdoor air method
     194              :         Real64 OutdoorAirFlowRate;            // report variable for TU outdoor air flow rate
     195              :         bool NoOAFlowInputFromUser;           // avoids OA calculation if no input specified by user
     196              :         int OARequirementsPtr;                // - Index to DesignSpecification:OutdoorAir object
     197              :         int AirLoopNum;
     198              :         PlantLocation HWplantLoc;     // plant topology, Component location
     199              :         std::string ZoneHVACUnitType; // type of Zone HVAC unit for air terminal mixer units
     200              :         std::string ZoneHVACUnitName; // name of Zone HVAC unit for air terminal mixer units
     201              :         int SecInNode;                // zone or zone unit air node number
     202              :         // warning variables
     203              :         int IterationLimit;                                       // Used for RegulaFalsi error -1
     204              :         int IterationFailed;                                      // Used for RegulaFalsi error -2
     205              :         DataZoneEquipment::PerPersonVentRateMode OAPerPersonMode; // mode for how per person rates are determined, DCV or design.
     206              :         bool EMSOverrideAirFlow;                                  // if true, EMS is calling to override flow rate
     207              :         Real64 EMSMassFlowRateValue;                              // value EMS is directing to use for flow rate [kg/s]
     208              :         Sched::Schedule *zoneTurndownMinAirFracSched = nullptr;   // schedule for turndown minimum airflow fraction
     209              :         Real64 ZoneTurndownMinAirFrac; // turndown minimum airflow fraction value, multiplier of zone design minimum air flow
     210              :         bool MyEnvrnFlag;
     211              :         bool MySizeFlag;
     212              :         bool GetGasElecHeatCoilCap; // Gets autosized value of coil capacity
     213              :         bool PlantLoopScanFlag;     // plant loop scan flag, false if scanned
     214              :         Real64 MassFlow1;           // previous value of the terminal unit mass flow rate
     215              :         Real64 MassFlow2;           // previous value of the previous value of the mass flow rate
     216              :         Real64 MassFlow3;
     217              :         Real64 MassFlowDiff;
     218              :         SingleDuctAirTerminalFlowConditions sd_airterminalInlet;
     219              :         SingleDuctAirTerminalFlowConditions sd_airterminalOutlet;
     220              : 
     221              :         // Default Constructor
     222         3607 :         SingleDuctAirTerminal()
     223        10821 :             : SysNum(-1), SysType_Num(SysType::Invalid), ReheatComp_Num(HeatingCoilType::None), ReheatComp_Index(0),
     224         3607 :               ReheatComp_PlantType(DataPlant::PlantEquipmentType::Invalid), fanType(HVAC::FanType::Invalid), Fan_Index(0), ControlCompTypeNum(0),
     225         7214 :               CompErrIndex(0), MaxAirVolFlowRate(0.0), AirMassFlowRateMax(0.0), MaxHeatAirVolFlowRate(0.0), HeatAirMassFlowRateMax(0.0),
     226         3607 :               ZoneMinAirFracMethod(MinFlowFraction::Constant), ZoneMinAirFracDes(0.0), ZoneMinAirFrac(0.0), ZoneMinAirFracReport(0.0),
     227         3607 :               ZoneFixedMinAir(0.0), ConstantMinAirFracSetByUser(false), FixedMinAirSetByUser(false), DesignMinAirFrac(0.0), DesignFixedMinAir(0.0),
     228         3607 :               InletNodeNum(0), OutletNodeNum(0), ReheatControlNode(0), ReheatCoilOutletNode(0), ReheatCoilMaxCapacity(0.0), ReheatAirOutletNode(0),
     229         3607 :               MaxReheatWaterVolFlow(0.0), MaxReheatSteamVolFlow(0.0), MaxReheatWaterFlow(0.0), MaxReheatSteamFlow(0.0), MinReheatWaterVolFlow(0.0),
     230         3607 :               MinReheatSteamVolFlow(0.0), MinReheatWaterFlow(0.0), MinReheatSteamFlow(0.0), ControllerOffset(0.0), MaxReheatTemp(0.0),
     231         3607 :               MaxReheatTempSetByUser(false), DamperHeatingAction(Action::HeatingNotUsed), DamperPosition(0.0), ADUNum(0), ErrCount1(0), ErrCount1c(0),
     232         3607 :               ErrCount2(0), ZoneFloorArea(0.0), CtrlZoneNum(0), CtrlZoneInNodeIndex(0), MaxAirVolFlowRateDuringReheat(0.0),
     233         3607 :               MaxAirVolFractionDuringReheat(0.0), AirMassFlowDuringReheatMax(0.0), ZoneOutdoorAirMethod(0), OutdoorAirFlowRate(0.0),
     234         7214 :               NoOAFlowInputFromUser(true), OARequirementsPtr(0), AirLoopNum(0), HWplantLoc{}, SecInNode(0), IterationLimit(0), IterationFailed(0),
     235         3607 :               OAPerPersonMode(DataZoneEquipment::PerPersonVentRateMode::Invalid), EMSOverrideAirFlow(false), EMSMassFlowRateValue(0.0),
     236         3607 :               ZoneTurndownMinAirFrac(1.0), MyEnvrnFlag(true), MySizeFlag(true), GetGasElecHeatCoilCap(true), PlantLoopScanFlag(true), MassFlow1(0.0),
     237         3607 :               MassFlow2(0.0), MassFlow3(0.0), MassFlowDiff(0.0)
     238              :         {
     239         3607 :         }
     240              : 
     241              :         void InitSys(EnergyPlusData &state, bool FirstHVACIteration);
     242              : 
     243              :         void SizeSys(EnergyPlusData &state);
     244              : 
     245              :         void SimVAV(EnergyPlusData &state, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum);
     246              : 
     247              :         void CalcOAMassFlow(EnergyPlusData &state, Real64 &SAMassFlow, Real64 &AirLoopOAFrac) const;
     248              : 
     249              :         void SimCBVAV(EnergyPlusData &state, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum);
     250              : 
     251              :         void SimVAVVS(EnergyPlusData &state, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum);
     252              : 
     253              :         void SimConstVol(EnergyPlusData &state, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum);
     254              : 
     255              :         void CalcVAVVS(EnergyPlusData &state,
     256              :                        bool FirstHVACIteration,
     257              :                        int ZoneNode,
     258              :                        Real64 HWFlow,
     259              :                        Real64 HCoilReq,
     260              :                        HVAC::FanType fanType,
     261              :                        Real64 AirFlow,
     262              :                        int FanOn,
     263              :                        Real64 &LoadMet);
     264              : 
     265              :         void SimConstVolNoReheat(EnergyPlusData &state);
     266              : 
     267              :         void CalcOutdoorAirVolumeFlowRate(EnergyPlusData &state);
     268              : 
     269              :         void reportTerminalUnit(EnergyPlusData &state);
     270              : 
     271              :         void UpdateSys(EnergyPlusData &state) const;
     272              : 
     273              :         void ReportSys(EnergyPlusData &state);
     274              :     };
     275              : 
     276              :     struct AirTerminalMixerData
     277              :     {
     278              :         // Members
     279              :         // Input data
     280              :         std::string Name;                                // name of unit
     281              :         HVAC::MixerType type = HVAC::MixerType::Invalid; // type of inlet mixer, 1 = inlet side, 2 = supply side
     282              :         int ZoneHVACUnitType = 0;                        // type of Zone HVAC unit. ZoneHVAC:WaterToAirHeatPump =1, ZoneHVAC:FourPipeFanCoil = 2
     283              :         std::string ZoneHVACUnitName;                    // name of Zone HVAC unit
     284              :         int SecInNode = 0;                               // secondary air inlet node number
     285              :         int PriInNode = 0;                               // primary air inlet node number
     286              :         int MixedAirOutNode = 0;                         // mixed air outlet node number
     287              :         int ZoneInletNode = 0;                           // zone inlet node that ultimately receives air from this mixer
     288              :         Real64 MixedAirTemp = 0.0;                       // mixed air in temp
     289              :         Real64 MixedAirHumRat = 0.0;                     // mixed air in hum rat
     290              :         Real64 MixedAirEnthalpy = 0.0;                   // mixed air in enthalpy
     291              :         Real64 MixedAirPressure = 0.0;                   // mixed air in pressure
     292              :         Real64 MixedAirMassFlowRate = 0.0;               // mixed air in mass flow rate
     293              :         Real64 MassFlowRateMaxAvail = 0.0;               // maximum air mass flow rate allowed through component
     294              :         int ADUNum = 0;                                  // index of Air Distribution Unit
     295              :         int TermUnitSizingIndex = 0;                     // Pointer to TermUnitSizing and TermUnitFinalZoneSizing data for this terminal unit
     296              :         bool OneTimeInitFlag = true;                     // true if one-time inits should be done
     297              :         bool OneTimeInitFlag2 = true;                    // true if more one-time inits should be done
     298              :         int CtrlZoneInNodeIndex = 0;                     // which controlled zone inlet node number corresponds with this unit
     299              :         int ZoneNum = 0;
     300              :         bool NoOAFlowInputFromUser = true;    // avoids OA calculation if no input specified by user
     301              :         int OARequirementsPtr = 0;            // - Index to DesignSpecification:OutdoorAir object
     302              :         int AirLoopNum = 0;                   // System sizing adjustments
     303              :         Real64 DesignPrimaryAirVolRate = 0.0; // System sizing adjustments, filled from design OA spec using sizing mode flags.
     304              :         DataZoneEquipment::PerPersonVentRateMode OAPerPersonMode =
     305              :             DataZoneEquipment::PerPersonVentRateMode::Invalid; // mode for how per person rates are determined, DCV or design.
     306              :         bool printWarning = true;                              // flag to print warnings only once
     307              : 
     308              :         void InitATMixer(EnergyPlusData &state, bool FirstHVACIteration);
     309              :     };
     310              : 
     311              :     void SimulateSingleDuct(EnergyPlusData &state, std::string_view CompName, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum, int &CompIndex);
     312              : 
     313              :     void GetSysInput(EnergyPlusData &state);
     314              : 
     315              :     void GetHVACSingleDuctSysIndex(EnergyPlusData &state,
     316              :                                    std::string const &SDSName,
     317              :                                    int &SDSIndex,
     318              :                                    bool &ErrorsFound,
     319              :                                    std::string_view const ThisObjectType = {},
     320              :                                    ObjexxFCL::Optional_int DamperInletNode = _, // Damper inlet node number
     321              :                                    ObjexxFCL::Optional_int DamperOutletNode = _ // Damper outlet node number
     322              :     );
     323              : 
     324              :     void SimATMixer(EnergyPlusData &state, std::string const &SysName, bool FirstHVACIteration, int &SysIndex);
     325              : 
     326              :     void GetATMixers(EnergyPlusData &state);
     327              : 
     328              :     void CalcATMixer(EnergyPlusData &state, int SysNum);
     329              : 
     330              :     void UpdateATMixer(EnergyPlusData &state, int SysNum);
     331              : 
     332              :     void GetATMixer(EnergyPlusData &state,
     333              :                     std::string const &ZoneEquipName, // zone unit name name
     334              :                     std::string &ATMixerName,         // air terminal mixer name
     335              :                     int &ATMixerNum,                  // air terminal mixer index
     336              :                     HVAC::MixerType &ATMixerType,     // air teminal mixer type
     337              :                     int &ATMixerPriNode,              // air terminal mixer primary air node number
     338              :                     int &ATMixerSecNode,              // air terminal mixer secondary air node number
     339              :                     int &ATMixerOutNode,              // air terminal mixer outlet air node number
     340              :                     int ZoneEquipOutletNode           // zone equipment outlet node (used with inlet side mixers)
     341              :     );
     342              : 
     343              :     void setATMixerSizingProperties(EnergyPlusData &state,
     344              :                                     int inletATMixerIndex, // index to ATMixer at inlet of zone equipment
     345              :                                     int controlledZoneNum, // controlled zone number
     346              :                                     int curZoneEqNum       // current zone equipment being simulated
     347              :     );
     348              : 
     349              : } // namespace SingleDuct
     350              : 
     351              : struct SingleDuctData : BaseGlobalStruct
     352              : {
     353              : 
     354              :     EPVector<SingleDuct::AirTerminalMixerData> SysATMixer;
     355              :     Array1D<SingleDuct::SingleDuctAirTerminal> sd_airterminal;
     356              :     std::unordered_map<std::string, std::string> SysUniqueNames;
     357              :     Array1D_bool CheckEquipName;
     358              :     int NumATMixers = 0;
     359              :     int NumConstVolSys = 0;
     360              :     int NumSDAirTerminal = 0;              // The Number of single duct air terminals found in the Input
     361              :     bool GetInputFlag = true;              // Flag set to make sure you get input once
     362              :     bool GetATMixerFlag = true;            // Flag set to make sure you get input once
     363              :     bool InitATMixerFlag = true;           // Flag set to make sure you do begin simulation initializaztions once for mixer
     364              :     bool ZoneEquipmentListChecked = false; // True after the Zone Equipment List has been checked for items
     365              : 
     366              :     int SysNumGSI = 0;   // The Sys that you are currently loading input into
     367              :     int SysIndexGSI = 0; // The Sys that you are currently loading input into
     368              :     int NumVAVSysGSI = 0;
     369              :     int NumNoRHVAVSysGSI = 0;
     370              :     int NumVAVVSGSI = 0;
     371              :     int NumCBVAVSysGSI = 0;
     372              :     int NumNoRHCBVAVSysGSI = 0;
     373              :     int NumAlphasGSI = 0;
     374              :     int NumNumsGSI = 0;
     375              :     int NumCVNoReheatSysGSI = 0;
     376              :     int MaxNumsGSI = 0;   // Maximum number of numeric input fields
     377              :     int MaxAlphasGSI = 0; // Maximum number of alpha input fields
     378              :     int TotalArgsGSI = 0; // Total number of alpha and numeric arguments  = max for a
     379              :     Real64 CoilInTempSS = 0.0;
     380              :     Real64 DesCoilLoadSS = 0.0;
     381              :     Real64 DesZoneHeatLoadSS = 0.0;
     382              :     Real64 ZoneDesTempSS = 0.0;
     383              :     Real64 ZoneDesHumRatSS = 0.0;
     384              :     int CoilWaterInletNodeSS = 0;
     385              :     int CoilWaterOutletNodeSS = 0;
     386              :     int CoilSteamInletNodeSS = 0;
     387              :     int CoilSteamOutletNodeSS = 0;
     388              :     Fluid::GlycolProps *water = nullptr;
     389              :     Real64 UserInputMaxHeatAirVolFlowRateSS = 0.0; // user input for MaxHeatAirVolFlowRate
     390              :     Real64 MinAirMassFlowRevActSVAV = 0.0;         // minimum air mass flow rate used in "reverse action" air mass flow rate calculation
     391              :     Real64 MaxAirMassFlowRevActSVAV = 0.0;         // maximum air mass flow rate used in "reverse action" air mass flow rate calculation
     392              :     Real64 ZoneTempSCBVAV = 0.0;                   // zone air temperature [C]
     393              :     Real64 MaxHeatTempSCBVAV = 0.0;                // maximum supply air temperature [C]
     394              :     Real64 MassFlowReqSCBVAV = 0.0;                // air mass flow rate required to meet the coil heating load [W]
     395              :     Real64 MassFlowActualSCBVAV = 0.0;             // air mass flow rate actually used [W]
     396              :     Real64 QZoneMaxSCBVAV = 0.0;                   // maximum zone heat addition rate given constraints of MaxHeatTemp and max        /
     397              :                                                    // available air mass flow rate [W]
     398              :     Real64 MinMassAirFlowSCBVAV = 0.0;             // the air flow rate during heating for normal acting damper
     399              :     Real64 QZoneMax2SCBVAV = 0.0;                  // temporary variable
     400              :     Real64 QZoneMax3SCBVAV = 0.0;                  // temporary variable
     401              :     Real64 TAirMaxSCV = 0.0;                       // Maximum zone supply air temperature [C]
     402              :     Real64 QMaxSCV = 0.0;                          // Maximum heat addition rate imposed by the max zone supply air temperature [W]
     403              :     Real64 ZoneTempSCV = 0.0;                      // Zone temperature [C]
     404              :     Real64 QMax2SCV = 0.0;
     405              :     int SysNumSATM = 0;
     406              : 
     407              :     Real64 ZoneTempSDAT = 0.0;                      // zone air temperature [C]
     408              :     Real64 MaxHeatTempSDAT = 0.0;                   // maximum supply air temperature [C]
     409              :     Real64 MaxDeviceAirMassFlowReheatSDAT = 0.0;    // air mass flow rate required to meet the coil heating load [W]
     410              :     Real64 MassFlowReqToLimitLeavingTempSDAT = 0.0; // air mass flow rate actually used [W]
     411              :     Real64 QZoneMaxRHTempLimitSDAT = 0.0;           // maximum zone heat addition rate given constraints of MaxHeatTemp and max
     412              :                                                     // available air mass flow rate [W]
     413              :     Real64 MinMassAirFlowSDAT = 0.0;                // the air flow rate during heating for normal acting damper
     414              :     Real64 QZoneMax2SDAT = 0.0;                     // temporary variable
     415              : 
     416          801 :     void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
     417              :     {
     418          801 :     }
     419              : 
     420          801 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
     421              :     {
     422          801 :     }
     423              : 
     424            0 :     void clear_state() override
     425              :     {
     426            0 :         new (this) SingleDuctData();
     427            0 :     }
     428              : };
     429              : 
     430              : } // namespace EnergyPlus
     431              : 
     432              : #endif
        

Generated by: LCOV version 2.0-1