LCOV - code coverage report
Current view: top level - EnergyPlus - PurchasedAirManager.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 11 37 29.7 %
Date: 2023-01-17 19:17:23 Functions: 11 16 68.8 %

          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 PurchasedAirManager_hh_INCLUDED
      49             : #define PurchasedAirManager_hh_INCLUDED
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array1D.hh>
      53             : 
      54             : // EnergyPlus Headers
      55             : #include <EnergyPlus/Data/BaseData.hh>
      56             : #include <EnergyPlus/DataGlobals.hh>
      57             : #include <EnergyPlus/EnergyPlus.hh>
      58             : 
      59             : namespace EnergyPlus {
      60             : 
      61             : // Forward declarations
      62             : struct EnergyPlusData;
      63             : 
      64             : namespace PurchasedAirManager {
      65             : 
      66             :     // Heating and Cooling Limit type parameters
      67             :     enum class LimitType
      68             :     {
      69             :         Invalid = -1,
      70             :         NoLimit,
      71             :         LimitFlowRate,
      72             :         LimitCapacity,
      73             :         LimitFlowRateAndCapacity,
      74             :         Num
      75             :     };
      76           0 :     constexpr const char *cLimitType(LimitType l)
      77             :     {
      78           0 :         switch (l) {
      79           0 :         case LimitType::NoLimit:
      80           0 :             return "NoLimit";
      81           0 :         case LimitType::LimitFlowRate:
      82           0 :             return "LimitFlowRate";
      83           0 :         case LimitType::LimitCapacity:
      84           0 :             return "LimitCapacity";
      85           0 :         case LimitType::LimitFlowRateAndCapacity:
      86           0 :             return "LimitFlowRateAndCapacity";
      87           0 :         default:
      88           0 :             return "UNKNOWN!";
      89             :         }
      90             :     }
      91             : 
      92             :     // Dehumidification and Humidification control type parameters
      93             :     enum class HumControl
      94             :     {
      95             :         Invalid = -1,
      96             :         None,
      97             :         ConstantSensibleHeatRatio,
      98             :         Humidistat,
      99             :         ConstantSupplyHumidityRatio,
     100             :         Num
     101             :     };
     102             : 
     103             :     // Demand controlled ventilation type parameters
     104             :     enum class DCV
     105             :     {
     106             :         Invalid = -1,
     107             :         None,
     108             :         OccupancySchedule,
     109             :         CO2SetPoint,
     110             :         Num
     111             :     };
     112             : 
     113             :     // Outdoor air economizer type parameters
     114             :     enum class Econ
     115             :     {
     116             :         Invalid = -1,
     117             :         NoEconomizer,
     118             :         DifferentialDryBulb,
     119             :         DifferentialEnthalpy,
     120             :         Num
     121             :     };
     122             : 
     123             :     // Heat recovery type parameters
     124             :     enum class HeatRecovery
     125             :     {
     126             :         Invalid = -1,
     127             :         None,
     128             :         Sensible,
     129             :         Enthalpy,
     130             :         Num
     131             :     };
     132             : 
     133             :     // Operating mode parameters
     134             :     enum class OpMode
     135             :     {
     136             :         Invalid = -1,
     137             :         Off,
     138             :         Heat,
     139             :         Cool,
     140             :         DeadBand,
     141             :         Num
     142             :     };
     143             : 
     144         685 :     struct ZonePurchasedAir
     145             :     {
     146             :         // Members
     147             :         std::string cObjectName;     // Name of the object from IDD
     148             :         std::string Name;            // Name or identifier of this piece of equipment
     149             :         std::string AvailSched;      // System availability schedule
     150             :         int AvailSchedPtr;           // Index to system availability schedule
     151             :         int ZoneSupplyAirNodeNum;    // Node number of zone supply air node for purchased air
     152             :         int ZoneExhaustAirNodeNum;   // Node number of zone exhaust air node for purchased air
     153             :         int PlenumExhaustAirNodeNum; // Node number of plenum exhaust air node
     154             :         int ReturnPlenumIndex;       // Index of return plenum
     155             :         int PurchAirArrayIndex;      // Index to sub-array that links ideal loads air system to index of sub-array
     156             :         std::string ReturnPlenumName;
     157             :         int ZoneRecircAirNodeNum; // Node number of recirculation air node for purchased air
     158             :         //   same as exhaust node if specified, otherwise zone return node
     159             :         Real64 MaxHeatSuppAirTemp;   // Maximum supply air temperature for heating [C]
     160             :         Real64 MinCoolSuppAirTemp;   // Minimum supply air temperature for cooling [C]
     161             :         Real64 MaxHeatSuppAirHumRat; // Maximum supply heating air humidity ratio [kg water/kg dry air]
     162             :         Real64 MinCoolSuppAirHumRat; // Minimum supply cooling air humidity ratio [kg water/kg dry air]
     163             :         LimitType HeatingLimit;      // Heating capacity limit type - NoLimit, LimitFlowRate, LimitCapacity,
     164             :         //       or LimitFlowRateAndCapacity
     165             :         Real64 MaxHeatVolFlowRate; // Maximum heating supply air flow[m3/s]
     166             :         Real64 MaxHeatSensCap;     // Maximum heating sensible capacity [W]
     167             :         LimitType CoolingLimit;    // Cooling capacity limit type - NoLimit, LimitFlowRate, LimitCapacity,
     168             :         //       or LimitFlowRateAndCapacity
     169             :         Real64 MaxCoolVolFlowRate;  // Maximum cooling supply air flow [m3/s]
     170             :         Real64 MaxCoolTotCap;       // Maximum cooling total capacity [W]
     171             :         std::string HeatSched;      // Heating availablity schedule
     172             :         int HeatSchedPtr;           // Index to heating availability schedule
     173             :         std::string CoolSched;      // Cooling availability schedule
     174             :         int CoolSchedPtr;           // Index to the cooling availability schedule
     175             :         HumControl DehumidCtrlType; // Dehumidification control type - ConstantSensibleHeatRatio,
     176             :         //      Humidistat, or ConstantSupplyHumidityRatio
     177             :         Real64 CoolSHR;           // Cooling sensible heat ratio
     178             :         HumControl HumidCtrlType; // Humidification control type - None,
     179             :         //      Humidistat, or ConstantSupplyHumidityRatio
     180             :         int OARequirementsPtr; // Index to DesignSpecification:OutdoorAir object
     181             :         DCV DCVType;           // Demand controlled ventilation type - None,
     182             :         //      OccupancySchedule, or CO2SetPoint
     183             :         Econ EconomizerType; // Outdoor air economizer type - NoEconomizer,
     184             :         //      DifferentialDryBulb, or DifferentialEnthalpy
     185             :         bool OutdoorAir;                    // Is there outdoor air?
     186             :         int OutdoorAirNodeNum;              // Node number of the outdoor air inlet node
     187             :         HeatRecovery HtRecType;             // Outdoor air heat recovery type - None, Sensible, Enthalpy
     188             :         Real64 HtRecSenEff;                 // Sensible heat recovery effectiveness
     189             :         Real64 HtRecLatEff;                 // Latent heat recovery effectiveness
     190             :         int OAFlowFracSchPtr;               // Fraction schedule applied to total OA requirement
     191             :         Real64 MaxHeatMassFlowRate;         // The maximum heating air mass flow rate [kg/s]
     192             :         Real64 MaxCoolMassFlowRate;         // The maximum cooling air mass flow rate [kg/s]
     193             :         bool EMSOverrideMdotOn;             // if true, then EMS is calling to override supply mass flow rate
     194             :         Real64 EMSValueMassFlowRate;        // Value EMS is directing to use for supply mass flow rate [kg/s]
     195             :         bool EMSOverrideOAMdotOn;           // if true, then EMS is calling to override OA mass flow rate
     196             :         Real64 EMSValueOAMassFlowRate;      // Value EMS is directing to use for OA mass flow rate [kg/s]
     197             :         bool EMSOverrideSupplyTempOn;       // if true, then EMS is calling to override supply temperature
     198             :         Real64 EMSValueSupplyTemp;          // Value EMS is directing to use for supply temperature [C]
     199             :         bool EMSOverrideSupplyHumRatOn;     // if true, then EMS is calling to override supply humidity ratio
     200             :         Real64 EMSValueSupplyHumRat;        // Value EMS is directing to use for supply humidity ratio [kgWater/kgDryAir]
     201             :         Real64 MinOAMassFlowRate;           // The minimum required outdoor air mass flow rate [kg/s]
     202             :         Real64 OutdoorAirMassFlowRate;      // The outdoor air mass flow rate [kg/s]
     203             :         Real64 OutdoorAirVolFlowRateStdRho; //  The outdoor air volume flow rate using standard density  [m3/s]
     204             :         Real64 SupplyAirMassFlowRate;       // Supply air mass flow rate [kg/s]
     205             :         Real64 SupplyAirVolFlowRateStdRho;  // supply air volume flow using standard density [m3/s]
     206             :         // Intermediate results
     207             :         Real64 HtRecSenOutput;        // Sensible heating/cooling rate from heat recovery (<0 means cooling) [W]
     208             :         Real64 HtRecLatOutput;        // Latent heating/cooling rate from heat recovery (<0 means cooling or dehumidfying) [W]
     209             :         Real64 OASenOutput;           // Outdoor air sensible output relative to zone conditions [W], <0 means OA is cooler than zone air
     210             :         Real64 OALatOutput;           // Outdoor air latent output relative to zone conditions [W], <0 means OA is drier than zone air
     211             :         Real64 SenOutputToZone;       // Ideal Loads System sensible output to zone [W], <0 means supply is cooler than zone air
     212             :         Real64 LatOutputToZone;       // Ideal Loads System latent heat output to zone [W], <0 means supply is drier than zone air
     213             :         Real64 SenCoilLoad;           // Ideal Loads System sensible load on "coils" (<0 means cooling) [W]
     214             :         Real64 LatCoilLoad;           // Ideal Loads System latent load on "coils" (<0 means cooling or dehumidfying) [W]
     215             :         int OAFlowMaxCoolOutputError; // Counter for OAFlow > Max Cooling Flow error
     216             :         int OAFlowMaxHeatOutputError; // Counter for OAFlow > Max Heating Flow error
     217             :         int SaturationOutputError;    // Counter for OAFlow > Max Heating Flow error
     218             :         int OAFlowMaxCoolOutputIndex; // Recurring warning index for OAFlow > Max Cooling Flow error
     219             :         int OAFlowMaxHeatOutputIndex; // Recurring warning index for OAFlow > Max Heating Flow error
     220             :         int SaturationOutputIndex;    // Recurring warning index for OAFlow > Max Heating Flow error
     221             :         int AvailStatus;
     222             :         int CoolErrIndex; // Cooling setpoint error index (recurring errors)
     223             :         int HeatErrIndex; // Heating setpoint error index (recurring errors)
     224             :         // Output variables
     225             :         Real64 SenHeatEnergy;      // Sensible heating energy consumed [J]
     226             :         Real64 LatHeatEnergy;      // Latent   heating energy consumed [J]
     227             :         Real64 TotHeatEnergy;      // Total    heating energy consumed [J]
     228             :         Real64 SenCoolEnergy;      // Sensible cooling energy consumed [J]
     229             :         Real64 LatCoolEnergy;      // Latent   cooling energy consumed [J]
     230             :         Real64 TotCoolEnergy;      // Total    cooling energy consumed [J]
     231             :         Real64 ZoneSenHeatEnergy;  // Sensible heating energy supplied to the zone [J]
     232             :         Real64 ZoneLatHeatEnergy;  // Latent   heating energy supplied to the zone [J]
     233             :         Real64 ZoneTotHeatEnergy;  // Total    heating energy supplied to the zone [J]
     234             :         Real64 ZoneSenCoolEnergy;  // Sensible cooling energy supplied to the zone [J]
     235             :         Real64 ZoneLatCoolEnergy;  // Latent   cooling energy supplied to the zone [J]
     236             :         Real64 ZoneTotCoolEnergy;  // Total    cooling energy supplied to the zone [J]
     237             :         Real64 OASenHeatEnergy;    // Sensible heating energy required for OA to equal zone air [J]
     238             :         Real64 OALatHeatEnergy;    // Latent   heating energy required for OA to equal zone air [J]
     239             :         Real64 OATotHeatEnergy;    // Total    heating energy required for OA to equal zone air [J]
     240             :         Real64 OASenCoolEnergy;    // Sensible cooling energy required for OA to equal zone air [J]
     241             :         Real64 OALatCoolEnergy;    // Latent   cooling energy required for OA to equal zone air [J]
     242             :         Real64 OATotCoolEnergy;    // Total    cooling energy required for OA to equal zone air [J]
     243             :         Real64 HtRecSenHeatEnergy; // Sensible heating energy from heat reocovery [J]
     244             :         Real64 HtRecLatHeatEnergy; // Latent   heating energy from heat reocovery [J]
     245             :         Real64 HtRecTotHeatEnergy; // Total    heating energy from heat reocovery [J]
     246             :         Real64 HtRecSenCoolEnergy; // Sensible cooling energy from heat reocovery [J]
     247             :         Real64 HtRecLatCoolEnergy; // Latent   cooling energy from heat reocovery [J]
     248             :         Real64 HtRecTotCoolEnergy; // Total    cooling energy from heat reocovery [J]
     249             :         Real64 SenHeatRate;        // Sensible heating rate consumed [W]
     250             :         Real64 LatHeatRate;        // Latent   heating rate consumed [W]
     251             :         Real64 TotHeatRate;        // Total    heating rate consumed [W]
     252             :         Real64 SenCoolRate;        // Sensible cooling rate consumed [W]
     253             :         Real64 LatCoolRate;        // Latent   cooling rate consumed [W]
     254             :         Real64 TotCoolRate;        // Total    cooling rate consumed [W]
     255             :         Real64 ZoneSenHeatRate;    // Sensible heating rate supplied to the zone [W]
     256             :         Real64 ZoneLatHeatRate;    // Latent   heating rate supplied to the zone [W]
     257             :         Real64 ZoneTotHeatRate;    // Total    heating rate supplied to the zone [W]
     258             :         Real64 ZoneSenCoolRate;    // Sensible cooling rate supplied to the zone [W]
     259             :         Real64 ZoneLatCoolRate;    // Latent   cooling rate supplied to the zone [W]
     260             :         Real64 ZoneTotCoolRate;    // Total    cooling rate supplied to the zone [W]
     261             :         Real64 OASenHeatRate;      // Sensible heating rate required for OA to equal zone air [W]
     262             :         Real64 OALatHeatRate;      // Latent   heating rate required for OA to equal zone air [W]
     263             :         Real64 OATotHeatRate;      // Total    heating rate required for OA to equal zone air [W]
     264             :         Real64 OASenCoolRate;      // Sensible cooling rate required for OA to equal zone air [W]
     265             :         Real64 OALatCoolRate;      // Latent   cooling rate required for OA to equal zone air [W]
     266             :         Real64 OATotCoolRate;      // Total    cooling rate required for OA to equal zone air [W]
     267             :         Real64 HtRecSenHeatRate;   // Sensible heating rate from heat reocovery [W]
     268             :         Real64 HtRecLatHeatRate;   // Latent   heating rate from heat reocovery [W]
     269             :         Real64 HtRecTotHeatRate;   // Total    heating rate from heat reocovery [W]
     270             :         Real64 HtRecSenCoolRate;   // Sensible cooling rate from heat reocovery [W]
     271             :         Real64 HtRecLatCoolRate;   // Latent   cooling rate from heat reocovery [W]
     272             :         Real64 HtRecTotCoolRate;   // Total    cooling rate from heat reocovery [W]
     273             :         Real64 TimeEconoActive;    // Time economizer is active [hrs]
     274             :         Real64 TimeHtRecActive;    // Time heat reocovery is active [hrs]
     275             :         int ZonePtr;               // pointer to a zone served by an Ideal load air system
     276             :         int HVACSizingIndex;       // index of a HVAC Sizing object for an Ideal load air system
     277             :         Real64 SupplyTemp;         // Supply inlet to zone dry bulb temperature [C]
     278             :         Real64 SupplyHumRat;       // Supply inlet to zone humidity ratio [kgWater/kgDryAir]
     279             :         Real64 MixedAirTemp;       // Mixed air dry bulb temperature [C]
     280             :         Real64 MixedAirHumRat;     // Mixed air humidity ratio [kgWater/kgDryAir]
     281             : 
     282             :         // Default Constructor
     283         257 :         ZonePurchasedAir()
     284         257 :             : AvailSchedPtr(0), ZoneSupplyAirNodeNum(0), ZoneExhaustAirNodeNum(0), PlenumExhaustAirNodeNum(0), ReturnPlenumIndex(0),
     285             :               PurchAirArrayIndex(0), ZoneRecircAirNodeNum(0), MaxHeatSuppAirTemp(0.0), MinCoolSuppAirTemp(0.0), MaxHeatSuppAirHumRat(0.0),
     286             :               MinCoolSuppAirHumRat(0.0), HeatingLimit(LimitType::Invalid), MaxHeatVolFlowRate(0.0), MaxHeatSensCap(0.0),
     287             :               CoolingLimit(LimitType::Invalid), MaxCoolVolFlowRate(0.0), MaxCoolTotCap(0.0), HeatSchedPtr(0), CoolSchedPtr(0),
     288             :               DehumidCtrlType(HumControl::Invalid), CoolSHR(0.0), HumidCtrlType(HumControl::Invalid), OARequirementsPtr(0), DCVType(DCV::Invalid),
     289             :               EconomizerType(Econ::Invalid), OutdoorAir(false), OutdoorAirNodeNum(0), HtRecType(HeatRecovery::Invalid), HtRecSenEff(0.0),
     290             :               HtRecLatEff(0.0), OAFlowFracSchPtr(0), MaxHeatMassFlowRate(0.0), MaxCoolMassFlowRate(0.0), EMSOverrideMdotOn(false),
     291             :               EMSValueMassFlowRate(0.0), EMSOverrideOAMdotOn(false), EMSValueOAMassFlowRate(0.0), EMSOverrideSupplyTempOn(false),
     292             :               EMSValueSupplyTemp(0.0), EMSOverrideSupplyHumRatOn(false), EMSValueSupplyHumRat(0.0), MinOAMassFlowRate(0.0),
     293             :               OutdoorAirMassFlowRate(0.0), OutdoorAirVolFlowRateStdRho(0.0), SupplyAirMassFlowRate(0.0), SupplyAirVolFlowRateStdRho(0.0),
     294             :               HtRecSenOutput(0.0), HtRecLatOutput(0.0), OASenOutput(0.0), OALatOutput(0.0), SenOutputToZone(0.0), LatOutputToZone(0.0),
     295             :               SenCoilLoad(0.0), LatCoilLoad(0.0), OAFlowMaxCoolOutputError(0), OAFlowMaxHeatOutputError(0), SaturationOutputError(0),
     296             :               OAFlowMaxCoolOutputIndex(0), OAFlowMaxHeatOutputIndex(0), SaturationOutputIndex(0), AvailStatus(0), CoolErrIndex(0), HeatErrIndex(0),
     297             :               SenHeatEnergy(0.0), LatHeatEnergy(0.0), TotHeatEnergy(0.0), SenCoolEnergy(0.0), LatCoolEnergy(0.0), TotCoolEnergy(0.0),
     298             :               ZoneSenHeatEnergy(0.0), ZoneLatHeatEnergy(0.0), ZoneTotHeatEnergy(0.0), ZoneSenCoolEnergy(0.0), ZoneLatCoolEnergy(0.0),
     299             :               ZoneTotCoolEnergy(0.0), OASenHeatEnergy(0.0), OALatHeatEnergy(0.0), OATotHeatEnergy(0.0), OASenCoolEnergy(0.0), OALatCoolEnergy(0.0),
     300             :               OATotCoolEnergy(0.0), HtRecSenHeatEnergy(0.0), HtRecLatHeatEnergy(0.0), HtRecTotHeatEnergy(0.0), HtRecSenCoolEnergy(0.0),
     301             :               HtRecLatCoolEnergy(0.0), HtRecTotCoolEnergy(0.0), SenHeatRate(0.0), LatHeatRate(0.0), TotHeatRate(0.0), SenCoolRate(0.0),
     302             :               LatCoolRate(0.0), TotCoolRate(0.0), ZoneSenHeatRate(0.0), ZoneLatHeatRate(0.0), ZoneTotHeatRate(0.0), ZoneSenCoolRate(0.0),
     303             :               ZoneLatCoolRate(0.0), ZoneTotCoolRate(0.0), OASenHeatRate(0.0), OALatHeatRate(0.0), OATotHeatRate(0.0), OASenCoolRate(0.0),
     304             :               OALatCoolRate(0.0), OATotCoolRate(0.0), HtRecSenHeatRate(0.0), HtRecLatHeatRate(0.0), HtRecTotHeatRate(0.0), HtRecSenCoolRate(0.0),
     305             :               HtRecLatCoolRate(0.0), HtRecTotCoolRate(0.0), TimeEconoActive(0.0), TimeHtRecActive(0.0), ZonePtr(0), HVACSizingIndex(0),
     306         257 :               SupplyTemp(0.0), SupplyHumRat(0.0), MixedAirTemp(0.0), MixedAirHumRat(0.0)
     307             :         {
     308         257 :         }
     309             :     };
     310             : 
     311         685 :     struct PurchAirNumericFieldData
     312             :     {
     313             :         // Members
     314             :         Array1D_string FieldNames;
     315             : 
     316             :         // Default Constructor
     317         257 :         PurchAirNumericFieldData() = default;
     318             :     };
     319             : 
     320           3 :     struct PurchAirPlenumArrayData
     321             :     {
     322             :         // Members
     323             :         int NumPurchAir;
     324             :         int ReturnPlenumIndex;
     325             :         Array1D_int PurchAirArray;
     326             :         Array1D_bool IsSimulated;
     327             : 
     328             :         // Default Constructor
     329           1 :         PurchAirPlenumArrayData() : NumPurchAir(0), ReturnPlenumIndex(0)
     330             :         {
     331           1 :         }
     332             :     };
     333             : 
     334             :     // Object Data
     335             : 
     336             :     void SimPurchasedAir(EnergyPlusData &state,
     337             :                          std::string const &PurchAirName,
     338             :                          Real64 &SysOutputProvided,
     339             :                          Real64 &MoistOutputProvided, // Moisture output provided (kg/s), dehumidification = negative
     340             :                          bool FirstHVACIteration,
     341             :                          int ControlledZoneNum,
     342             :                          int &CompIndex);
     343             : 
     344             :     void GetPurchasedAir(EnergyPlusData &state);
     345             : 
     346             :     void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const ControlledZoneNum);
     347             : 
     348             :     void SizePurchasedAir(EnergyPlusData &state, int PurchAirNum);
     349             : 
     350             :     void CalcPurchAirLoads(EnergyPlusData &state,
     351             :                            int PurchAirNum,
     352             :                            Real64 &SysOutputProvided,   // Sensible output provided [W] cooling = negative
     353             :                            Real64 &MoistOutputProvided, // Moisture output provided [kg/s] dehumidification = negative
     354             :                            int ControlledZoneNum);
     355             : 
     356             :     void CalcPurchAirMinOAMassFlow(EnergyPlusData &state,
     357             :                                    int PurchAirNum,       // index to ideal loads unit
     358             :                                    int ZoneNum,           // index to zone
     359             :                                    Real64 &OAMassFlowRate // outside air mass flow rate [kg/s] from volume flow using std density
     360             :     );
     361             : 
     362             :     void CalcPurchAirMixedAir(EnergyPlusData &state,
     363             :                               int PurchAirNum,           // index to ideal loads unit
     364             :                               Real64 OAMassFlowRate,     // outside air mass flow rate [kg/s]
     365             :                               Real64 SupplyMassFlowRate, // supply air mass flow rate [kg/s]
     366             :                               Real64 &MixedAirTemp,      // Mixed air dry bulb temperature [C]
     367             :                               Real64 &MixedAirHumRat,    // Mixed air humidity ratio [kgWater/kgDryAir]
     368             :                               Real64 &MixedAirEnthalpy,  // Mixed air enthalpy [J/kg]
     369             :                               OpMode OperatingMode       // current operating mode, Off, Heating, Cooling, or DeadBand
     370             :     );
     371             : 
     372             :     void UpdatePurchasedAir(EnergyPlusData &state, int PurchAirNum, bool FirstHVACIteration);
     373             : 
     374             :     void ReportPurchasedAir(EnergyPlusData &state, int PurchAirNum);
     375             : 
     376             :     Real64 GetPurchasedAirOutAirMassFlow(EnergyPlusData &state, int PurchAirNum);
     377             : 
     378             :     int GetPurchasedAirZoneInletAirNode(EnergyPlusData &state, int PurchAirNum);
     379             : 
     380             :     int GetPurchasedAirReturnAirNode(EnergyPlusData &state, int PurchAirNum);
     381             : 
     382             :     Real64 GetPurchasedAirMixedAirTemp(EnergyPlusData &state, int PurchAirNum);
     383             : 
     384             :     Real64 GetPurchasedAirMixedAirHumRat(EnergyPlusData &state, int PurchAirNum);
     385             : 
     386             :     bool CheckPurchasedAirForReturnPlenum(EnergyPlusData &state, int ReturnPlenumIndex);
     387             : 
     388             :     void InitializePlenumArrays(EnergyPlusData &state, int PurchAirNum);
     389             : 
     390             : } // namespace PurchasedAirManager
     391             : 
     392        1542 : struct PurchasedAirManagerData : BaseGlobalStruct
     393             : {
     394             :     int NumPurchAir = 0;
     395             :     int NumPlenumArrays = 0; // total number of plenum arrays
     396             :     bool GetPurchAirInputFlag = true;
     397             :     Array1D_bool CheckEquipName;
     398             :     Array1D<PurchasedAirManager::ZonePurchasedAir> PurchAir;                      // Used to specify purchased air parameters
     399             :     Array1D<PurchasedAirManager::PurchAirNumericFieldData> PurchAirNumericFields; // Used to save the indices of scalable sizing object for zone HVAC
     400             :     Array1D<PurchasedAirManager::PurchAirPlenumArrayData> PurchAirPlenumArrays;   // Used to save the indices of scalable sizing object for zone HVAC
     401             :     bool InitPurchasedAirMyOneTimeFlag = true;
     402             :     bool InitPurchasedAirZoneEquipmentListChecked = false; // True after the Zone Equipment List has been checked for items
     403             :     Array1D_bool InitPurchasedAirMyEnvrnFlag;
     404             :     Array1D_bool InitPurchasedAirMySizeFlag;
     405             :     Array1D_bool InitPurchasedAirOneTimeUnitInitsDone; // True if one-time inits for PurchAirNum are completed
     406             :     Array1D<PurchasedAirManager::PurchAirPlenumArrayData>
     407             :         TempPurchAirPlenumArrays; // Used to save the indices of scalable sizing object for zone HVAC
     408             : 
     409           0 :     void clear_state() override
     410             :     {
     411           0 :         NumPurchAir = 0;
     412           0 :         NumPlenumArrays = 0;
     413           0 :         GetPurchAirInputFlag = true;
     414           0 :         CheckEquipName.deallocate();
     415           0 :         PurchAir.deallocate();
     416           0 :         PurchAirNumericFields.deallocate();
     417           0 :         InitPurchasedAirMyOneTimeFlag = true;
     418           0 :         InitPurchasedAirZoneEquipmentListChecked = false; // True after the Zone Equipment List has been checked for items
     419           0 :         InitPurchasedAirMyEnvrnFlag.deallocate();
     420           0 :         InitPurchasedAirMySizeFlag.deallocate();
     421           0 :         InitPurchasedAirOneTimeUnitInitsDone.deallocate(); // True if one-time inits for PurchAirNum are completed
     422           0 :         TempPurchAirPlenumArrays.deallocate();
     423           0 :     }
     424             : };
     425             : 
     426             : } // namespace EnergyPlus
     427             : 
     428             : #endif

Generated by: LCOV version 1.13