LCOV - code coverage report
Current view: top level - EnergyPlus - VariableSpeedCoils.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 59 113 52.2 %
Date: 2024-08-24 18:31:18 Functions: 3 4 75.0 %

          Line data    Source code
       1             : // EnergyPlus, Copyright (c) 1996-2024, 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 VariableSpeedCoils_hh_INCLUDED
      49             : #define VariableSpeedCoils_hh_INCLUDED
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array1D.fwd.hh>
      53             : 
      54             : // EnergyPlus Headers
      55             : #include <EnergyPlus/Data/BaseData.hh>
      56             : #include <EnergyPlus/DataGlobalConstants.hh>
      57             : #include <EnergyPlus/DataHVACGlobals.hh>
      58             : #include <EnergyPlus/DataHeatBalance.hh>
      59             : #include <EnergyPlus/DataSizing.hh>
      60             : #include <EnergyPlus/EnergyPlus.hh>
      61             : #include <EnergyPlus/Plant/Enums.hh>
      62             : #include <EnergyPlus/Plant/PlantLocation.hh>
      63             : #include <EnergyPlus/StandardRatings.hh>
      64             : 
      65             : namespace EnergyPlus {
      66             : 
      67             : // Forward declarations
      68             : struct EnergyPlusData;
      69             : 
      70             : namespace VariableSpeedCoils {
      71             : 
      72             :     struct VariableSpeedCoilData // variable speed coil
      73             :     {
      74             :         // Members
      75             :         std::string Name;              // Name of the  Coil
      76             :         std::string VarSpeedCoilType;  // type of coil
      77             :         int NumOfSpeeds;               // Number of speeds
      78             :         int NormSpedLevel;             // Nominal speed level
      79             :         Real64 RatedWaterVolFlowRate;  // Rated/Ref Water Volumetric Flow Rate [m3/s]
      80             :         Real64 RatedWaterMassFlowRate; // Rated/Ref Water Volumetric Flow Rate [m3/s]
      81             :         Real64 RatedAirVolFlowRate;    // Rated/Ref Air Volumetric Flow Rate [m3/s]
      82             :         Real64 RatedCapHeat;           // Rated/Ref Heating Capacity [W]
      83             :         Real64 RatedCapCoolTotal;      // Rated/Ref Total Cooling Capacity [W]
      84             :         Real64 MaxONOFFCyclesperHour;  // Maximum ON/OFF cycles per hour for the compressor (cycles/hour)
      85             :         Real64 Twet_Rated;             // Nominal time for condensate to begin leaving the coil's
      86             :         // condensate drain line (sec)
      87             :         Real64 Gamma_Rated; // Initial moisture evaporation rate divided by steady-state
      88             :         // AC latent capacity (dimensionless)
      89             :         int HOTGASREHEATFLG;               // whether to use hot gas reheat
      90             :         Real64 LatentCapacityTimeConstant; // Latent capacity time constant [s]
      91             :         int PLFFPLR;                       // index of part load curve as a function of part load ratio
      92             :         std::string CoolHeatType;          // Type of WatertoAirHP ie. Heating or Cooling
      93             :         int VSCoilType;                    // type of component in plant
      94             :         bool SimFlag;                      // Heat Pump Simulation Flag
      95             :         Real64 DesignWaterMassFlowRate;    // design water mass flow rate [kg/s]
      96             :         Real64 DesignWaterVolFlowRate;     // design water volumetric flow rate [m3/s]
      97             :         Real64 DesignAirMassFlowRate;      // Design Air Mass Flow Rate [kg/s]
      98             :         Real64 DesignAirVolFlowRate;       // Design Air Volumetric Flow Rate [m3/s]
      99             :         Real64 AirVolFlowRate;             // Air Volumetric Flow Rate[m3/s], real time
     100             :         Real64 AirMassFlowRate;            // Air Mass Flow Rate[kg/s], real time
     101             :         Real64 InletAirPressure;           // air inlet pressure [pa]
     102             :         Real64 InletAirDBTemp;             // Inlet Air Dry Bulb Temperature [C], real time
     103             :         Real64 InletAirHumRat;             // Inlet Air Humidity Ratio [kg/kg], real time
     104             :         Real64 InletAirEnthalpy;           // Inlet Air Enthalpy [J/kg], real time
     105             :         Real64 OutletAirDBTemp;            // Outlet Air Dry Bulb Temperature [C], real time
     106             :         Real64 OutletAirHumRat;            // Outlet Air Humidity Ratio [kg/kg], real time
     107             :         Real64 OutletAirEnthalpy;          // Outlet Air Enthalpy [J/kg], real time
     108             :         Real64 WaterVolFlowRate;           // Water Volumetric Flow Rate [m3/s], real time
     109             :         Real64 WaterMassFlowRate;          // Water Mass Flow Rate [kg/s], real time
     110             :         Real64 InletWaterTemp;             // Inlet Water Temperature [C]
     111             :         Real64 InletWaterEnthalpy;         // Inlet Water Enthalpy [J/kg]
     112             :         Real64 OutletWaterTemp;            // Outlet Water Temperature [C]
     113             :         Real64 OutletWaterEnthalpy;        // Outlet Water Enthalpy [J/kg]
     114             :         Real64 Power;                      // Power Consumption [W]
     115             :         Real64 QLoadTotal;                 // Load Side Total Heat Transfer Rate [W]
     116             :         Real64 QSensible;                  // Sensible Load Side Heat Transfer Rate [W]
     117             :         Real64 QLatent;                    // Latent Load Side Heat Transfer Rate [W]
     118             :         Real64 QSource;                    // Source Side Heat Transfer Rate [W]
     119             :         Real64 QWasteHeat;                 // Recoverable waste Heat Transfer Rate [W]
     120             :         Real64 Energy;                     // Energy Consumption [J]
     121             :         Real64 EnergyLoadTotal;            // Load Side Total Heat Transferred [J]
     122             :         Real64 EnergySensible;             // Sensible Load Side Heat Transferred [J]
     123             :         Real64 EnergyLatent;               // Latent Load Side Heat Transferred [J]
     124             :         Real64 EnergySource;               // Source Side Heat Transferred [J]
     125             :         Real64 COP;                        // Heat Pump Coefficient of Performance [-]
     126             :         Real64 RunFrac;                    // Duty Factor
     127             :         Real64 PartLoadRatio;              // Part Load Ratio
     128             :         Real64 RatedPowerHeat;             // Rated/Ref Heating Power Consumption[W]
     129             :         Real64 RatedCOPHeat;               // Rated/Ref Heating COP [W/W]
     130             :         Real64 RatedCapCoolSens;           // Rated/Ref Sensible Cooling Capacity [W]
     131             :         Real64 RatedPowerCool;             // Rated/Ref Cooling Power Consumption[W]
     132             :         Real64 RatedCOPCool;               // Rated/Ref Cooling COP [W/W]
     133             :         int AirInletNodeNum;               // Node Number of the Air Inlet
     134             :         int AirOutletNodeNum;              // Node Number of the Air Outlet
     135             :         int WaterInletNodeNum;             // Node Number of the Water Onlet
     136             :         int WaterOutletNodeNum;            // Node Number of the Water Outlet
     137             :         PlantLocation plantLoc;
     138             :         // set by parent object and "pushed" to this structure in SetVSWSHPData subroutine
     139             :         bool FindCompanionUpStreamCoil; // Flag to get the companion coil in Init
     140             :         bool IsDXCoilInZone;            // true means dx coil is in zone instead of outside
     141             :         int CompanionCoolingCoilNum;    // Heating coil companion cooling coil index
     142             :         int CompanionHeatingCoilNum;    // Cooling coil companion heating coil index
     143             :         Real64 FanDelayTime;            // Fan delay time, time delay for the HP's fan to
     144             :         // beginning for multispeed coil type
     145             :         int MSHPDesignSpecIndex;              // index to UnitarySystemPerformance:Multispeed object
     146             :         Array1D_int MSErrIndex;               // index flag for num speeds/recurring messages
     147             :         Array1D<Real64> MSRatedPercentTotCap; // Percentage to the total cooling capacity for MS heat pump at the highest speed [dimensionless]
     148             :         Array1D<Real64> MSRatedTotCap;        // Rated cooling capacity for MS heat pump [W]
     149             :         Array1D<Real64> MSRatedSHR;           // Rated SHR for MS heat pump [dimensionless]
     150             :         Array1D<Real64> MSRatedCOP;           // Rated COP for MS heat pump [dimensionless]
     151             :         Array1D<Real64> MSRatedAirVolFlowPerRatedTotCap;
     152             :         // Rated Air volume flow rate per total capacity through unit at rated conditions [m^3/w]
     153             :         Array1D<Real64> MSRatedAirVolFlowRate;
     154             :         // Air volume flow rate through unit at rated conditions [m3/s]
     155             :         Array1D<Real64> MSRatedEvaporatorFanPowerPerVolumeFlowRate2017; // 2017 Rated Evaporator Fan Power Per Volume Flow Rate [W/(m3/s)]
     156             :         Array1D<Real64> MSRatedEvaporatorFanPowerPerVolumeFlowRate2023; // 2023 Rated Evaporator Fan Power Per Volume Flow Rate [W/(m3/s)]
     157             :         Array1D<Real64> MSRatedAirMassFlowRate;
     158             :         // Air mass flow rate through unit at rated conditions [kg/s]
     159             :         Array1D<Real64> MSRatedWaterVolFlowPerRatedTotCap;
     160             :         // Rated water volume flow rate per total  capacity through unit at rated conditions [m^3/w]
     161             :         Array1D<Real64> MSRatedWaterVolFlowRate;
     162             :         // Water volume flow rate through unit at rated conditions [m3/s]
     163             :         Array1D<Real64> MSRatedWaterMassFlowRate;
     164             :         // Water mass flow rate through unit at rated conditions [kg/s]
     165             :         Array1D<Real64> MSRatedCBF;
     166             :         // rated coil bypass factor
     167             :         Array1D<Real64> MSEffectiveAo;
     168             :         // effective heat transfer surface at each speed
     169             :         Array1D_int MSCCapFTemp;
     170             :         // index of total capacity modifier curve
     171             :         Array1D_int MSCCapAirFFlow;
     172             :         // index of total capacity modifier curve as a function of air flow
     173             :         Array1D_int MSCCapWaterFFlow;
     174             :         // index of total capacity modifier curve as a function of water flow
     175             :         Array1D_int MSEIRFTemp;
     176             :         // index of energy input ratio modifier curve as a function of temperature
     177             :         Array1D_int MSEIRAirFFlow;
     178             :         // index of energy input ratio modifier curve as a function of air flow fraction
     179             :         Array1D_int MSEIRWaterFFlow;
     180             :         // index of energy input ratio modifier curve as a function of water flow fraction
     181             :         Array1D_int MSWasteHeat;
     182             :         // index of waste heat as a function of temperature
     183             :         Array1D<Real64> MSWasteHeatFrac;
     184             :         // water heating coil pump power at various speeds
     185             :         Array1D<Real64> MSWHPumpPower;
     186             :         Array1D<Real64> MSWHPumpPowerPerRatedTotCap;
     187             :         // Waste heat fraction
     188             :         Real64 SpeedNumReport;
     189             :         // speed number for output
     190             :         Real64 SpeedRatioReport;
     191             :         // speed ratio for output between two neighboring speeds
     192             :         // End of multispeed water source coil input
     193             :         //----------------------------------------------------------------
     194             :         // added variables and arrays for variable speed air-source heat pump
     195             :         // defrosting
     196             :         int DefrostStrategy;       // defrost strategy; 1=reverse-cycle, 2=resistive
     197             :         int DefrostControl;        // defrost control; 1=timed, 2=on-demand
     198             :         int EIRFPLR;               // index of energy input ratio vs part-load ratio curve
     199             :         int DefrostEIRFT;          // index of defrost mode total cooling capacity for reverse cycle heat pump
     200             :         Real64 MinOATCompressor;   // Minimum OAT for heat pump compressor operation
     201             :         Real64 OATempCompressorOn; // The outdoor tempearture when the compressor is automatically turned back on,
     202             :         // if applicable, following automatic shut off. This field is used only for
     203             :         // HSPF calculation.
     204             :         Real64 MaxOATDefrost;           // Maximum OAT for defrost operation
     205             :         Real64 DefrostTime;             // Defrost time period in hours
     206             :         Real64 DefrostCapacity;         // Resistive defrost to nominal capacity (at 21.11C/8.33C) ratio
     207             :         Real64 HPCompressorRuntime;     // keep track of compressor runtime
     208             :         Real64 HPCompressorRuntimeLast; // keep track of last time step compressor runtime (if simulation downshifts)
     209             :         Real64 TimeLeftToDefrost;       // keep track of time left to defrost heat pump
     210             :         Real64 DefrostPower;            // power used during defrost
     211             :         Real64 DefrostConsumption;      // energy used during defrost
     212             :         // crankcase heater
     213             :         bool ReportCoolingCoilCrankcasePower;  // logical determines if the cooling coil crankcase heater power is reported
     214             :         Real64 CrankcaseHeaterCapacity;        // total crankcase heater capacity [W]
     215             :         Real64 CrankcaseHeaterPower;           // report variable for average crankcase heater power [W]
     216             :         int CrankcaseHeaterCapacityCurveIndex; // Crankcase heater power-temperature curve or table index
     217             :         Real64 MaxOATCrankcaseHeater;          // maximum OAT for crankcase heater operation [C]
     218             :         Real64 CrankcaseHeaterConsumption;     // report variable for total crankcase heater energy consumption [J]
     219             :         // condenser evaporative precooling
     220             :         int CondenserInletNodeNum;                          // Node number of outdoor condenser
     221             :         DataHeatBalance::RefrigCondenserType CondenserType; // Type of condenser for DX cooling coil: AIR COOLED or EVAP COOLED
     222             :         bool ReportEvapCondVars;                            // true if any performance mode includes an evap condenser
     223             :         Real64 EvapCondPumpElecNomPower;                    // Nominal power input to the evap condenser water circulation pump [W]
     224             :         Real64 EvapCondPumpElecPower;                       // Average power consumed by the evap condenser water circulation pump over
     225             :         // the time step [W]
     226             :         Real64 EvapWaterConsumpRate;        // Evap condenser water consumption rate [m3/s]
     227             :         Real64 EvapCondPumpElecConsumption; // Electric energy consumed by the evap condenser water circulation pump [J]
     228             :         Real64 EvapWaterConsump;            // Evap condenser water consumption [m3]
     229             :         Real64 BasinHeaterConsumption;      // Basin heater energy consumption (J)
     230             :         Real64 BasinHeaterPowerFTempDiff;   // Basin heater capacity per degree C below setpoint (W/C)
     231             :         Real64 BasinHeaterSetPointTemp;     // setpoint temperature for basin heater operation (C)
     232             :         Real64 BasinHeaterPower;            // Basin heater power (W)
     233             :         int BasinHeaterSchedulePtr;         // Pointer to basin heater schedule
     234             :         Array1D<Real64> EvapCondAirFlow;    // Air flow rate through the evap condenser at high speed, volumetric flow rate
     235             :         // for water use calcs [m3/s]
     236             :         Array1D<Real64> EvapCondEffect; // effectiveness of the evaporatively cooled condenser
     237             :         // [high speed for multi-speed unit] (-)
     238             :         Array1D<Real64> MSRatedEvapCondVolFlowPerRatedTotCap; // evap condenser air flow ratio to capacity
     239             :         // begin variables for Water System interactions
     240             :         int EvapWaterSupplyMode;         // where does water come from
     241             :         std::string EvapWaterSupplyName; // name of water source e.g. water storage tank
     242             :         int EvapWaterSupTankID;
     243             :         int EvapWaterTankDemandARRID;
     244             :         int CondensateCollectMode;         // where does water come from
     245             :         std::string CondensateCollectName; // name of water source e.g. water storage tank
     246             :         int CondensateTankID;
     247             :         int CondensateTankSupplyARRID;
     248             :         Real64 CondensateVdot;         // rate of water condensation from air stream [m3/s]
     249             :         Real64 CondensateVol;          // amount of water condensed from air stream [m3]
     250             :         Real64 CondInletTemp;          // Evap condenser inlet temperature [C], report variable
     251             :         int SupplyFanIndex;            // index of this fan in fan array or vector
     252             :         HVAC::FanType supplyFanType;   // type of fan, in DataHVACGlobals
     253             :         std::string SupplyFanName;     // name of fan associated with this dx coil
     254             :         Real64 SourceAirMassFlowRate;  // source air mass flow rate [kg/s]
     255             :         Real64 InletSourceAirTemp;     // source air temperature entering the outdoor coil [C]
     256             :         Real64 InletSourceAirEnthalpy; // source air enthalpy entering the outdoor coil [J/kg]
     257             :         // end variables for water system interactions
     258             : 
     259             :         // begin varibles for HPWH
     260             :         Real64 RatedCapWH;                                              // Rated water heating Capacity [W]
     261             :         HVAC::OATType InletAirTemperatureType = HVAC::OATType::Invalid; // Specifies to use either air wet-bulb or dry-bulb temp for curve objects
     262             :         Real64 WHRatedInletDBTemp;                                      // Rated inlet air dry-bulb temperature [C]
     263             :         Real64 WHRatedInletWBTemp;                                      // Rated inlet air wet-bulb temperature [C]
     264             :         Real64 WHRatedInletWaterTemp;                                   // Rated condenser water inlet temperature [C]
     265             :         Real64 HPWHCondPumpElecNomPower;                                // Nominal power input to the condenser water circulation pump [W]
     266             :         Real64 HPWHCondPumpFracToWater;                                 // Nominal power fraction to water for the condenser water circulation pump
     267             :         Real64 RatedHPWHCondWaterFlow;                                  // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
     268             :         Real64 ElecWaterHeatingPower;                                   // Total electric power consumed by compressor and condenser pump [W]
     269             :         Real64 ElecWaterHeatingConsumption;                             // Total electric consumption by compressor and condenser pump [J]
     270             :         bool FanPowerIncludedInCOP;                                     // Indicates that fan heat is included in heating capacity and COP
     271             :         bool CondPumpHeatInCapacity;                                    // Indicates that condenser pump heat is included in heating capacity
     272             :         bool CondPumpPowerInCOP;                                        // Indicates that condenser pump power is included in heating COP
     273             :         bool AirVolFlowAutoSized;                                       // Used to report autosizing info for the HPWH DX coil
     274             :         bool WaterVolFlowAutoSized;                                     // Used to report autosizing info for the HPWH DX coil
     275             :         Real64 TotalHeatingEnergy;                                      // total water heating energy
     276             :         Real64 TotalHeatingEnergyRate;                                  // total WH energy rate
     277             :         bool bIsDesuperheater; // whether the coil is used for a desuperheater, i.e. zero all the cooling capacity and power
     278             :         // end variables for HPWH
     279             :         bool reportCoilFinalSizes; // one time report of sizes to coil selection report
     280             :         Real64 capModFacTotal;     // coil  TotCapTempModFac * TotCapAirFFModFac * TotCapWaterFFModFac, for result for simulation peak reporting
     281             : 
     282             :         // default constructor
     283          99 :         VariableSpeedCoilData()
     284         198 :             : NumOfSpeeds(2), NormSpedLevel(HVAC::MaxSpeedLevels), RatedWaterVolFlowRate(DataSizing::AutoSize),
     285          99 :               RatedWaterMassFlowRate(DataSizing::AutoSize), RatedAirVolFlowRate(DataSizing::AutoSize), RatedCapHeat(DataSizing::AutoSize),
     286          99 :               RatedCapCoolTotal(DataSizing::AutoSize), MaxONOFFCyclesperHour(0.0), Twet_Rated(0.0), Gamma_Rated(0.0), HOTGASREHEATFLG(0),
     287         198 :               LatentCapacityTimeConstant(0.0), PLFFPLR(0), VSCoilType(0), SimFlag(false), DesignWaterMassFlowRate(0.0), DesignWaterVolFlowRate(0.0),
     288          99 :               DesignAirMassFlowRate(0.0), DesignAirVolFlowRate(0.0), AirVolFlowRate(0.0), AirMassFlowRate(0.0), InletAirPressure(0.0),
     289          99 :               InletAirDBTemp(0.0), InletAirHumRat(0.0), InletAirEnthalpy(0.0), OutletAirDBTemp(0.0), OutletAirHumRat(0.0), OutletAirEnthalpy(0.0),
     290          99 :               WaterVolFlowRate(0.0), WaterMassFlowRate(0.0), InletWaterTemp(0.0), InletWaterEnthalpy(0.0), OutletWaterTemp(0.0),
     291          99 :               OutletWaterEnthalpy(0.0), Power(0.0), QLoadTotal(0.0), QSensible(0.0), QLatent(0.0), QSource(0.0), QWasteHeat(0.0), Energy(0.0),
     292          99 :               EnergyLoadTotal(0.0), EnergySensible(0.0), EnergyLatent(0.0), EnergySource(0.0), COP(0.0), RunFrac(0.0), PartLoadRatio(0.0),
     293          99 :               RatedPowerHeat(0.0), RatedCOPHeat(0.0), RatedCapCoolSens(0.0), RatedPowerCool(0.0), RatedCOPCool(0.0), AirInletNodeNum(0),
     294          99 :               AirOutletNodeNum(0), WaterInletNodeNum(0), WaterOutletNodeNum(0), plantLoc{}, FindCompanionUpStreamCoil(true), IsDXCoilInZone(false),
     295          99 :               CompanionCoolingCoilNum(0), CompanionHeatingCoilNum(0), FanDelayTime(0.0),
     296             :               // This one calls into a std::vector, so it's 0-indexed, so we initialize it to -1
     297          99 :               MSHPDesignSpecIndex(-1), MSErrIndex(HVAC::MaxSpeedLevels, 0), MSRatedPercentTotCap(HVAC::MaxSpeedLevels, 0.0),
     298          99 :               MSRatedTotCap(HVAC::MaxSpeedLevels, 0.0), MSRatedSHR(HVAC::MaxSpeedLevels, 0.0), MSRatedCOP(HVAC::MaxSpeedLevels, 0.0),
     299          99 :               MSRatedAirVolFlowPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), MSRatedAirVolFlowRate(HVAC::MaxSpeedLevels, 0.0),
     300          99 :               MSRatedEvaporatorFanPowerPerVolumeFlowRate2017(HVAC::MaxSpeedLevels, 0.0),
     301          99 :               MSRatedEvaporatorFanPowerPerVolumeFlowRate2023(HVAC::MaxSpeedLevels, 0.0), MSRatedAirMassFlowRate(HVAC::MaxSpeedLevels, 0.0),
     302          99 :               MSRatedWaterVolFlowPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), MSRatedWaterVolFlowRate(HVAC::MaxSpeedLevels, 0.0),
     303          99 :               MSRatedWaterMassFlowRate(HVAC::MaxSpeedLevels, 0.0), MSRatedCBF(HVAC::MaxSpeedLevels, 0.0), MSEffectiveAo(HVAC::MaxSpeedLevels, 0.0),
     304          99 :               MSCCapFTemp(HVAC::MaxSpeedLevels, 0), MSCCapAirFFlow(HVAC::MaxSpeedLevels, 0), MSCCapWaterFFlow(HVAC::MaxSpeedLevels, 0),
     305          99 :               MSEIRFTemp(HVAC::MaxSpeedLevels, 0), MSEIRAirFFlow(HVAC::MaxSpeedLevels, 0), MSEIRWaterFFlow(HVAC::MaxSpeedLevels, 0),
     306          99 :               MSWasteHeat(HVAC::MaxSpeedLevels, 0), MSWasteHeatFrac(HVAC::MaxSpeedLevels, 0.0), MSWHPumpPower(HVAC::MaxSpeedLevels, 0.0),
     307          99 :               MSWHPumpPowerPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), SpeedNumReport(0.0), SpeedRatioReport(0.0), DefrostStrategy(0),
     308          99 :               DefrostControl(0), EIRFPLR(0), DefrostEIRFT(0), MinOATCompressor(0.0), OATempCompressorOn(0.0), MaxOATDefrost(0.0), DefrostTime(0.0),
     309          99 :               DefrostCapacity(0.0), HPCompressorRuntime(0.0), HPCompressorRuntimeLast(0.0), TimeLeftToDefrost(0.0), DefrostPower(0.0),
     310          99 :               DefrostConsumption(0.0), ReportCoolingCoilCrankcasePower(true), CrankcaseHeaterCapacity(0.0), CrankcaseHeaterPower(0.0),
     311          99 :               CrankcaseHeaterCapacityCurveIndex(0), MaxOATCrankcaseHeater(0.0), CrankcaseHeaterConsumption(0.0), CondenserInletNodeNum(0),
     312          99 :               CondenserType(DataHeatBalance::RefrigCondenserType::Air), ReportEvapCondVars(false), EvapCondPumpElecNomPower(0.0),
     313          99 :               EvapCondPumpElecPower(0.0), EvapWaterConsumpRate(0.0), EvapCondPumpElecConsumption(0.0), EvapWaterConsump(0.0),
     314          99 :               BasinHeaterConsumption(0.0), BasinHeaterPowerFTempDiff(0.0), BasinHeaterSetPointTemp(0.0), BasinHeaterPower(0.0),
     315          99 :               BasinHeaterSchedulePtr(0), EvapCondAirFlow(HVAC::MaxSpeedLevels, 0.0), EvapCondEffect(HVAC::MaxSpeedLevels, 0.0),
     316          99 :               MSRatedEvapCondVolFlowPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), EvapWaterSupplyMode(101), EvapWaterSupTankID(0),
     317         198 :               EvapWaterTankDemandARRID(0), CondensateCollectMode(1001), CondensateTankID(0), CondensateTankSupplyARRID(0), CondensateVdot(0.0),
     318         198 :               CondensateVol(0.0), CondInletTemp(0.0), SupplyFanIndex(0), supplyFanType(HVAC::FanType::Invalid), SourceAirMassFlowRate(0.0),
     319          99 :               InletSourceAirTemp(0.0), InletSourceAirEnthalpy(0.0),
     320             :               // begin varibles for HPWH
     321          99 :               RatedCapWH(0.0),                  // Rated water heating Capacity [W]
     322          99 :               WHRatedInletDBTemp(0.0),          // Rated inlet air dry-bulb temperature [C]
     323          99 :               WHRatedInletWBTemp(0.0),          // Rated inlet air wet-bulb temperature [C]
     324          99 :               WHRatedInletWaterTemp(0.0),       // Rated condenser water inlet temperature [C]
     325          99 :               HPWHCondPumpElecNomPower(0.0),    // Nominal power input to the condenser water circulation pump [W]
     326          99 :               HPWHCondPumpFracToWater(1.0),     // Nominal power fraction to water for the condenser water circulation pump
     327          99 :               RatedHPWHCondWaterFlow(0.0),      // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
     328          99 :               ElecWaterHeatingPower(0.0),       // Total electric power consumed by compressor and condenser pump [W]
     329          99 :               ElecWaterHeatingConsumption(0.0), // Total electric consumption by compressor and condenser pump [J]
     330          99 :               FanPowerIncludedInCOP(false),     // Indicates that fan heat is included in heating capacity and COP
     331          99 :               CondPumpHeatInCapacity(false),    // Indicates that condenser pump heat is included in heating capacity
     332          99 :               CondPumpPowerInCOP(false),        // Indicates that condenser pump power is included in heating COP
     333          99 :               AirVolFlowAutoSized(false),       // Used to report autosizing info for the HPWH DX coil
     334          99 :               WaterVolFlowAutoSized(false),     // Used to report autosizing info for the HPWH DX coil
     335          99 :               TotalHeatingEnergy(0.0),          // total water heating energy
     336          99 :               TotalHeatingEnergyRate(0.0),      // total WH energy rate
     337          99 :               bIsDesuperheater(false),          // whether the coil is used for a desuperheater, i.e. zero all the cooling capacity and power
     338             :                                                 // end variables for HPWH
     339          99 :               reportCoilFinalSizes(true),       // coil report
     340         198 :               capModFacTotal(0.0)               // coil report
     341             : 
     342             :         {
     343          99 :         }
     344             :     };
     345             : 
     346             :     void SimVariableSpeedCoils(EnergyPlusData &state,
     347             :                                std::string_view CompName,       // Coil Name
     348             :                                int &CompIndex,                  // Index for Component name
     349             :                                HVAC::FanOp const fanOp,         // Continuous fan OR cycling compressor
     350             :                                HVAC::CompressorOp compressorOp, // compressor on/off. 0 = off; 1= on
     351             :                                Real64 const PartLoadFrac,
     352             :                                int const SpeedNum,                  // compressor speed number
     353             :                                Real64 const SpeedRatio,             // compressor speed ratio
     354             :                                Real64 const SensLoad,               // Sensible demand load [W]
     355             :                                Real64 const LatentLoad,             // Latent demand load [W]
     356             :                                const Real64 OnOffAirFlowRatio = 1.0 // ratio of comp on to comp off air flow rate
     357             :     );
     358             : 
     359             :     void GetVarSpeedCoilInput(EnergyPlusData &state);
     360             : 
     361             :     // Beginning Initialization Section of the Module
     362             :     //******************************************************************************
     363             : 
     364             :     void InitVarSpeedCoil(EnergyPlusData &state,
     365             :                           int const DXCoilNum,            // Current DXCoilNum under simulation
     366             :                           Real64 const SensLoad,          // Control zone sensible load[W]
     367             :                           Real64 const LatentLoad,        // Control zone latent load[W]
     368             :                           HVAC::FanOp const fanOp,        // fan operating mode
     369             :                           Real64 const OnOffAirFlowRatio, // ratio of compressor on flow to average flow over time step
     370             :                           Real64 const SpeedRatio,        // compressor speed ratio
     371             :                           int const SpeedNum              // compressor speed number
     372             :     );
     373             : 
     374             :     void SizeVarSpeedCoil(EnergyPlusData &state, int const DXCoilNum, bool &ErrorsFound);
     375             : 
     376             :     void CalcVarSpeedCoilCooling(EnergyPlusData &state,
     377             :                                  int const DXCoilNum,             // Heat Pump Number
     378             :                                  HVAC::FanOp const fanOp,         // Fan/Compressor cycling scheme indicator
     379             :                                  Real64 const SensDemand,         // Cooling Sensible Demand [W] !unused1208
     380             :                                  Real64 const LatentDemand,       // Cooling Latent Demand [W]
     381             :                                  HVAC::CompressorOp compressorOp, // compressor operation flag
     382             :                                  Real64 const PartLoadRatio,      // compressor part load ratio
     383             :                                  Real64 const OnOffAirFlowRatio,  // ratio of compressor on flow to average flow over time step
     384             :                                  Real64 const SpeedRatio,         // SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
     385             :                                  int const SpeedNum               // Speed number, high bound
     386             :     );
     387             : 
     388             :     void CalcVarSpeedCoilHeating(EnergyPlusData &state,
     389             :                                  int const DXCoilNum,             // Heat Pump Number
     390             :                                  HVAC::FanOp const fanOp,         // Fan/Compressor cycling scheme indicator
     391             :                                  Real64 const SensDemand,         // Cooling Sensible Demand [W] !unused1208
     392             :                                  HVAC::CompressorOp compressorOp, // compressor operation flag
     393             :                                  Real64 const PartLoadRatio,      // compressor part load ratio
     394             :                                  Real64 const OnOffAirFlowRatio,  // ratio of compressor on flow to average flow over time step
     395             :                                  Real64 const SpeedRatio,         // SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
     396             :                                  int const SpeedNum               // Speed number, high bound, i.e. SpeedNum - 1 is the other side
     397             :     );
     398             : 
     399             :     Real64 GetCoilCapacityVariableSpeed(EnergyPlusData &state,
     400             :                                         std::string const &CoilType, // must match coil types in this module
     401             :                                         std::string const &CoilName, // must match coil names for the coil type
     402             :                                         bool &ErrorsFound            // set to true if problem
     403             :     );
     404             : 
     405             :     int GetCoilIndexVariableSpeed(EnergyPlusData &state,
     406             :                                   std::string const &CoilType, // must match coil types in this module
     407             :                                   std::string const &CoilName, // must match coil names for the coil type
     408             :                                   bool &ErrorsFound            // set to true if problem
     409             :     );
     410             : 
     411             :     Real64 GetCoilAirFlowRateVariableSpeed(EnergyPlusData &state,
     412             :                                            std::string const &CoilType, // must match coil types in this module
     413             :                                            std::string const &CoilName, // must match coil names for the coil type
     414             :                                            bool &ErrorsFound            // set to true if problem
     415             :     );
     416             : 
     417             :     int GetCoilInletNodeVariableSpeed(EnergyPlusData &state,
     418             :                                       std::string const &CoilType, // must match coil types in this module
     419             :                                       std::string const &CoilName, // must match coil names for the coil type
     420             :                                       bool &ErrorsFound            // set to true if problem
     421             :     );
     422             : 
     423             :     int GetCoilOutletNodeVariableSpeed(EnergyPlusData &state,
     424             :                                        std::string const &CoilType, // must match coil types in this module
     425             :                                        std::string const &CoilName, // must match coil names for the coil type
     426             :                                        bool &ErrorsFound            // set to true if problem
     427             :     );
     428             : 
     429             :     int GetVSCoilCondenserInletNode(EnergyPlusData &state,
     430             :                                     std::string const &CoilName, // must match coil names for the coil type
     431             :                                     bool &ErrorsFound            // set to true if problem
     432             :     );
     433             : 
     434             :     int GetVSCoilPLFFPLR(EnergyPlusData &state,
     435             :                          std::string const &CoilType, // must match coil types in this module
     436             :                          std::string const &CoilName, // must match coil names for the coil type
     437             :                          bool &ErrorsFound            // set to true if problem
     438             :     );
     439             : 
     440             :     int GetVSCoilCapFTCurveIndex(EnergyPlusData &state,
     441             :                                  int CoilIndex,    // must match coil names for the coil type
     442             :                                  bool &ErrorsFound // set to true if problem
     443             :     );
     444             : 
     445             :     Real64 GetVSCoilMinOATCompressor(EnergyPlusData &state,
     446             :                                      int const CoilIndex, // index to cooling coil
     447             :                                      bool &ErrorsFound    // set to true if problem
     448             :     );
     449             : 
     450             :     int GetVSCoilNumOfSpeeds(EnergyPlusData &state,
     451             :                              std::string const &CoilName, // must match coil names for the coil type
     452             :                              bool &ErrorsFound            // set to true if problem
     453             :     );
     454             : 
     455             :     Real64 GetVSCoilRatedSourceTemp(EnergyPlusData &state, int const CoilIndex);
     456             : 
     457             :     void SetVarSpeedCoilData(EnergyPlusData &state,
     458             :                              int const WSHPNum,                                   // Number of OA Controller
     459             :                              bool &ErrorsFound,                                   // Set to true if certain errors found
     460             :                              ObjexxFCL::Optional_int CompanionCoolingCoilNum = _, // Index to cooling coil for heating coil = SimpleWSHPNum
     461             :                              ObjexxFCL::Optional_int CompanionHeatingCoilNum = _, // Index to heating coil for cooling coil = SimpleWSHPNum
     462             :                              ObjexxFCL::Optional_int MSHPDesignSpecIndex = _      // index to UnitarySystemPerformance:Multispeed object
     463             :     );
     464             : 
     465             :     void UpdateVarSpeedCoil(EnergyPlusData &state, int const DXCoilNum);
     466             : 
     467             :     Real64 CalcEffectiveSHR(EnergyPlusData &state,
     468             :                             int const DXCoilNum,     // Index number for cooling coil
     469             :                             Real64 const SHRss,      // Steady-state sensible heat ratio
     470             :                             HVAC::FanOp const fanOp, // Fan/compressor cycling scheme indicator
     471             :                             Real64 const RTF,        // Compressor run-time fraction
     472             :                             Real64 const QLatRated,  // Rated latent capacity
     473             :                             Real64 const QLatActual, // Actual latent capacity
     474             :                             Real64 const EnteringDB, // Entering air dry-bulb temperature
     475             :                             Real64 const EnteringWB  // Entering air wet-bulb temperature
     476             :     );
     477             : 
     478             :     void CalcTotCapSHR_VSWSHP(EnergyPlusData &state,
     479             :                               Real64 const InletDryBulb,       // inlet air dry bulb temperature [C]
     480             :                               Real64 const InletHumRat,        // inlet air humidity ratio [kg water / kg dry air]
     481             :                               Real64 const InletEnthalpy,      // inlet air specific enthalpy [J/kg]
     482             :                               Real64 &InletWetBulb,            // inlet air wet bulb temperature [C]
     483             :                               Real64 const AirMassFlowRatio,   // Ratio of actual air mass flow to nominal air mass flow
     484             :                               Real64 const WaterMassFlowRatio, // Ratio of actual water mass flow to nominal water mass flow
     485             :                               Real64 const AirMassFlow,        // actual mass flow for capacity and SHR calculation
     486             :                               Real64 const CBF,                // coil bypass factor
     487             :                               Real64 const TotCapNom1,         // nominal total capacity at low speed [W]
     488             :                               int const CCapFTemp1,            // capacity modifier curve index, function of entering wetbulb at low speed
     489             :                               int const CCapAirFFlow1,         // capacity modifier curve, function of actual air flow vs rated flow at low speed
     490             :                               int const CCapWaterFFlow1,       // capacity modifier curve, function of actual water flow vs rated flow at low speed
     491             :                               Real64 const TotCapNom2,         // nominal total capacity at high speed [W]
     492             :                               int const CCapFTemp2,            // capacity modifier curve index, function of entering wetbulb at high speed
     493             :                               int const CCapAirFFlow2,         // capacity modifier curve, function of actual air flow vs rated flow at high speed
     494             :                               int const CCapWaterFFlow2,       // capacity modifier curve, function of actual water flow vs rated flow at high speed
     495             :                               Real64 &TotCap1,                 // total capacity at the given conditions [W] at low speed
     496             :                               Real64 &TotCap2,                 // total capacity at the given conditions [W] at high speed
     497             :                               Real64 &TotCapSpeed,             // integrated total capacity corresponding to the speed ratio
     498             :                               Real64 &SHR,                     // sensible heat ratio at the given conditions
     499             :                               Real64 const CondInletTemp,      // Condenser inlet temperature [C]
     500             :                               Real64 const Pressure,           // air pressure [Pa]
     501             :                               Real64 const SpeedRatio,         // from 0.0 to 1.0
     502             :                               int const NumSpeeds,             // number of speeds for input
     503             :                               Real64 &TotCapModFac             // capacity modification factor, func of temp and func of flow
     504             :     );
     505             : 
     506             :     void CalcVarSpeedHPWH(EnergyPlusData &state,
     507             :                           int const DXCoilNum,        // the number of the DX coil to be simulated
     508             :                           Real64 const PartLoadRatio, // sensible water heating load / full load sensible water heating capacity
     509             :                           Real64 const SpeedRatio,    // SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
     510             :                           int const SpeedNum,         // Speed number, high bound capacity
     511             :                           HVAC::FanOp const fanOp     // Continuous fan OR cycling compressor
     512             :     );
     513             : 
     514             :     Real64 getVarSpeedPartLoadRatio(EnergyPlusData &state, int const DXCoilNum); // the number of the DX coil to mined for current PLR
     515             : 
     516             :     void setVarSpeedHPWHFanType(EnergyPlusData &state, int const dXCoilNum, HVAC::FanType fanType);
     517             : 
     518             :     void setVarSpeedHPWHFanIndex(EnergyPlusData &state, int const dXCoilNum, int const fanIndex);
     519             : 
     520             : } // namespace VariableSpeedCoils
     521             : 
     522             : struct VariableSpeedCoilsData : BaseGlobalStruct
     523             : {
     524             :     int NumVarSpeedCoils = 0;      // The Number of Water to Air Heat Pumps found in the Input
     525             :     bool MyOneTimeFlag = true;     // one time allocation flag
     526             :     bool GetCoilsInputFlag = true; // Flag set to make sure you get input once
     527             :                                    // LOGICAL, ALLOCATABLE, DIMENSION(:) :: MySizeFlag
     528             : 
     529             :     Real64 SourceSideMassFlowRate = 0.0; // Source Side Mass flow rate [Kg/s]
     530             :     Real64 SourceSideInletTemp = 0.0;    // Source Side Inlet Temperature [C]
     531             :     Real64 SourceSideInletEnth = 0.0;    // Source Side Inlet Enthalpy [J/kg]
     532             :     Real64 LoadSideMassFlowRate = 0.0;   // Load Side Mass flow rate [Kg/s]
     533             :     Real64 LoadSideInletDBTemp = 0.0;    // Load Side Inlet Dry Bulb Temp [C]
     534             :     Real64 LoadSideInletWBTemp = 0.0;    // Load Side Inlet Wet Bulb Temp [C]
     535             :     Real64 LoadSideInletHumRat = 0.0;    // Load Side Outlet Humidity ratio
     536             :     Real64 LoadSideInletEnth = 0.0;      // Load Side Inlet Enthalpy [J/kg]
     537             :     Real64 LoadSideOutletDBTemp = 0.0;   // Load Side Outlet Dry Bulb Temp [C]
     538             :     Real64 LoadSideOutletHumRat = 0.0;   // Load Side Outlet Humidity ratio
     539             :     Real64 LoadSideOutletEnth = 0.0;     // Load Side Outlet Enthalpy [J/kg]
     540             :     Real64 QSensible = 0.0;              // Load side sensible heat transfer rate [W]
     541             :     Real64 QLoadTotal = 0.0;             // Load side total heat transfer rate [W]
     542             :     Real64 QLatRated = 0.0;              // Latent Capacity [W] rated at entering air conditions [Tdb=26.7C Twb=19.4C]
     543             :     Real64 QLatActual = 0.0;             // Actual Latent Capacity [W]
     544             :     Real64 QSource = 0.0;                // Source side heat transfer rate [W]
     545             :     Real64 Winput = 0.0;                 // Power Consumption [W]
     546             :     Real64 PLRCorrLoadSideMdot = 0.0;    // Load Side Mdot corrected for Part Load Ratio of the unit
     547             : 
     548             :     Real64 VSHPWHHeatingCapacity = 0.0; // Used by Heat Pump:Water Heater object as total water heating capacity [W]
     549             :     Real64 VSHPWHHeatingCOP = 0.0;      // Used by Heat Pump:Water Heater object as water heating COP [W/W]
     550             : 
     551             :     EPVector<VariableSpeedCoils::VariableSpeedCoilData> VarSpeedCoil;
     552             :     bool firstTime = true;
     553             : 
     554             :     Array1D_bool MyEnvrnFlag; // used for initializations each begin environment flag
     555             :     Array1D_bool MySizeFlag;  // used for sizing PTHP inputs one time
     556             :     Array1D_bool MyPlantScanFlag;
     557             : 
     558             :     Real64 LoadSideInletDBTemp_Init = 0.0;
     559             :     Real64 LoadSideInletWBTemp_Init = 0.0;
     560             :     Real64 LoadSideInletHumRat_Init = 0.0;
     561             :     Real64 LoadSideInletEnth_Init = 0.0;
     562             :     Real64 CpAir_Init = 0.0;
     563             : 
     564             :     Real64 OutdoorCoilT = 0.0;                                  // Outdoor coil temperature (C)
     565             :     Real64 OutdoorCoildw = 0.0;                                 // Outdoor coil delta w assuming coil temp of OutdoorCoilT (kg/kg)
     566             :     Real64 OutdoorDryBulb = 0.0;                                // Outdoor dry-bulb temperature at condenser (C)
     567             :     Real64 OutdoorWetBulb = 0.0;                                // Outdoor wet-bulb temperature at condenser (C)
     568             :     Real64 OutdoorHumRat = 0.0;                                 // Outdoor humidity ratio at condenser (kg/kg)
     569             :     Real64 OutdoorPressure = 0.0;                               // Outdoor barometric pressure at condenser (Pa)
     570             :     Real64 FractionalDefrostTime = 0.0;                         // Fraction of time step system is in defrost
     571             :     Real64 HeatingCapacityMultiplier = 0.0;                     // Multiplier for heating capacity when system is in defrost
     572             :     Real64 InputPowerMultiplier = 0.0;                          // Multiplier for power when system is in defrost
     573             :     Real64 LoadDueToDefrost = 0.0;                              // Additional load due to defrost
     574             :     Real64 CrankcaseHeatingPower = 0.0;                         // power due to crankcase heater
     575             :     Real64 DefrostEIRTempModFac = 0.0;                          // EIR modifier for defrost (function of entering wetbulb, outside drybulb)
     576             :     Real64 TotRatedCapacity = 0.0;                              // total rated capacity at the given speed and speed ratio for defrosting
     577             :     Real64 OutdoorDryBulb_CalcVarSpeedCoilCooling = 0.0;        // Outdoor dry-bulb temperature at condenser (C)
     578             :     Real64 OutdoorWetBulb_CalcVarSpeedCoilCooling = 0.0;        // Outdoor wet-bulb temperature at condenser (C)
     579             :     Real64 OutdoorHumRat_CalcVarSpeedCoilCooling = 0.0;         // Outdoor humidity ratio at condenser (kg/kg)
     580             :     Real64 OutdoorPressure_CalcVarSpeedCoilCooling = 0.0;       // Outdoor barometric pressure at condenser (Pa)
     581             :     Real64 CrankcaseHeatingPower_CalcVarSpeedCoilCooling = 0.0; // power due to crankcase heater
     582             :     Real64 CompAmbTemp_CalcVarSpeedCoilCooling = 0.0;           // Ambient temperature at compressor
     583             : 
     584         796 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
     585             :     {
     586         796 :     }
     587             : 
     588           0 :     void clear_state() override
     589             :     {
     590           0 :         this->NumVarSpeedCoils = 0;
     591           0 :         this->MyOneTimeFlag = true;
     592           0 :         this->GetCoilsInputFlag = true;
     593           0 :         this->SourceSideMassFlowRate = 0.0;
     594           0 :         this->SourceSideInletTemp = 0.0;
     595           0 :         this->SourceSideInletEnth = 0.0;
     596           0 :         this->LoadSideMassFlowRate = 0.0;
     597           0 :         this->LoadSideInletDBTemp = 0.0;
     598           0 :         this->LoadSideInletWBTemp = 0.0;
     599           0 :         this->LoadSideInletHumRat = 0.0;
     600           0 :         this->LoadSideInletEnth = 0.0;
     601           0 :         this->LoadSideOutletDBTemp = 0.0;
     602           0 :         this->LoadSideOutletHumRat = 0.0;
     603           0 :         this->LoadSideOutletEnth = 0.0;
     604           0 :         this->QSensible = 0.0;
     605           0 :         this->QLoadTotal = 0.0;
     606           0 :         this->QLatRated = 0.0;
     607           0 :         this->QLatActual = 0.0;
     608           0 :         this->QSource = 0.0;
     609           0 :         this->Winput = 0.0;
     610           0 :         this->PLRCorrLoadSideMdot = 0.0;
     611           0 :         this->VSHPWHHeatingCapacity = 0.0;
     612           0 :         this->VSHPWHHeatingCOP = 0.0;
     613           0 :         this->VarSpeedCoil.deallocate();
     614           0 :         this->firstTime = true;
     615           0 :         this->MyEnvrnFlag.deallocate();
     616           0 :         this->MySizeFlag.deallocate();
     617           0 :         this->MyPlantScanFlag.deallocate();
     618           0 :         this->LoadSideInletDBTemp_Init = 0.0;
     619           0 :         this->LoadSideInletWBTemp_Init = 0.0;
     620           0 :         this->LoadSideInletHumRat_Init = 0.0;
     621           0 :         this->LoadSideInletEnth_Init = 0.0;
     622           0 :         this->CpAir_Init = 0.0;
     623           0 :         this->OutdoorCoilT = 0.0;
     624           0 :         this->OutdoorCoildw = 0.0;
     625           0 :         this->OutdoorDryBulb = 0.0;
     626           0 :         this->OutdoorWetBulb = 0.0;
     627           0 :         this->OutdoorHumRat = 0.0;
     628           0 :         this->OutdoorPressure = 0.0;
     629           0 :         this->FractionalDefrostTime = 0.0;
     630           0 :         this->HeatingCapacityMultiplier = 0.0;
     631           0 :         this->InputPowerMultiplier = 0.0;
     632           0 :         this->LoadDueToDefrost = 0.0;
     633           0 :         this->CrankcaseHeatingPower = 0.0;
     634           0 :         this->DefrostEIRTempModFac = 0.0;
     635           0 :         this->TotRatedCapacity = 0.0;
     636           0 :         this->OutdoorDryBulb_CalcVarSpeedCoilCooling = 0.0;
     637           0 :         this->OutdoorWetBulb_CalcVarSpeedCoilCooling = 0.0;
     638           0 :         this->OutdoorHumRat_CalcVarSpeedCoilCooling = 0.0;
     639           0 :         this->OutdoorPressure_CalcVarSpeedCoilCooling = 0.0;
     640           0 :         this->CrankcaseHeatingPower_CalcVarSpeedCoilCooling = 0.0;
     641           0 :         this->CompAmbTemp_CalcVarSpeedCoilCooling = 0.0;
     642           0 :     }
     643             : 
     644             :     // Default Constructor
     645         796 :     VariableSpeedCoilsData() = default;
     646             : };
     647             : } // namespace EnergyPlus
     648             : 
     649             : #endif

Generated by: LCOV version 1.14