LCOV - code coverage report
Current view: top level - EnergyPlus - VariableSpeedCoils.hh (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 100.0 % 117 117
Test Date: 2025-05-22 16:09:37 Functions: 100.0 % 5 5

            Line data    Source code
       1              : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
       2              : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
       3              : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
       4              : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
       5              : // contributors. All rights reserved.
       6              : //
       7              : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
       8              : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
       9              : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
      10              : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
      11              : // derivative works, and perform publicly and display publicly, and to permit others to do so.
      12              : //
      13              : // Redistribution and use in source and binary forms, with or without modification, are permitted
      14              : // provided that the following conditions are met:
      15              : //
      16              : // (1) Redistributions of source code must retain the above copyright notice, this list of
      17              : //     conditions and the following disclaimer.
      18              : //
      19              : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
      20              : //     conditions and the following disclaimer in the documentation and/or other materials
      21              : //     provided with the distribution.
      22              : //
      23              : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
      24              : //     the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
      25              : //     used to endorse or promote products derived from this software without specific prior
      26              : //     written permission.
      27              : //
      28              : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
      29              : //     without changes from the version obtained under this License, or (ii) Licensee makes a
      30              : //     reference solely to the software portion of its product, Licensee must refer to the
      31              : //     software as "EnergyPlus version X" software, where "X" is the version number Licensee
      32              : //     obtained under this License and may not use a different name for the software. Except as
      33              : //     specifically required in this Section (4), Licensee shall not use in a company name, a
      34              : //     product name, in advertising, publicity, or other promotional activities any name, trade
      35              : //     name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
      36              : //     similar designation, without the U.S. Department of Energy's prior written consent.
      37              : //
      38              : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
      39              : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
      40              : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
      41              : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      42              : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      43              : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      44              : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
      45              : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      46              : // POSSIBILITY OF SUCH DAMAGE.
      47              : 
      48              : #ifndef 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              :         bool FrostHeatingCapacityMultiplierEMSOverrideOn; // if true, then EMS is calling to override multiplier for heating capacity when system is
     139              :                                                           // in defrost
     140              :         Real64 FrostHeatingCapacityMultiplierEMSOverrideValue; // value to use for EMS override
     141              :         bool FrostHeatingInputPowerMultiplierEMSOverrideOn; // if true, then EMS is calling to override multiplier for power when system is in defrost
     142              :         Real64 FrostHeatingInputPowerMultiplierEMSOverrideValue; // value to use for EMS override
     143              :         // set by parent object and "pushed" to this structure in SetVSWSHPData subroutine
     144              :         bool FindCompanionUpStreamCoil; // Flag to get the companion coil in Init
     145              :         bool IsDXCoilInZone;            // true means dx coil is in zone instead of outside
     146              :         int CompanionCoolingCoilNum;    // Heating coil companion cooling coil index
     147              :         int CompanionHeatingCoilNum;    // Cooling coil companion heating coil index
     148              :         Real64 FanDelayTime;            // Fan delay time, time delay for the HP's fan to
     149              :         // beginning for multispeed coil type
     150              :         int MSHPDesignSpecIndex;              // index to UnitarySystemPerformance:Multispeed object
     151              :         Array1D_int MSErrIndex;               // index flag for num speeds/recurring messages
     152              :         Array1D<Real64> MSRatedPercentTotCap; // Percentage to the total cooling capacity for MS heat pump at the highest speed [dimensionless]
     153              :         Array1D<Real64> MSRatedTotCap;        // Rated cooling capacity for MS heat pump [W]
     154              :         Array1D<Real64> MSRatedSHR;           // Rated SHR for MS heat pump [dimensionless]
     155              :         Array1D<Real64> MSRatedCOP;           // Rated COP for MS heat pump [dimensionless]
     156              :         Array1D<Real64> MSRatedAirVolFlowPerRatedTotCap;
     157              :         // Rated Air volume flow rate per total capacity through unit at rated conditions [m^3/w]
     158              :         Array1D<Real64> MSRatedAirVolFlowRate;
     159              :         // Air volume flow rate through unit at rated conditions [m3/s]
     160              :         Array1D<Real64> MSRatedEvaporatorFanPowerPerVolumeFlowRate2017; // 2017 Rated Evaporator Fan Power Per Volume Flow Rate [W/(m3/s)]
     161              :         Array1D<Real64> MSRatedEvaporatorFanPowerPerVolumeFlowRate2023; // 2023 Rated Evaporator Fan Power Per Volume Flow Rate [W/(m3/s)]
     162              :         Array1D<Real64> MSRatedAirMassFlowRate;
     163              :         // Air mass flow rate through unit at rated conditions [kg/s]
     164              :         Array1D<Real64> MSRatedWaterVolFlowPerRatedTotCap;
     165              :         // Rated water volume flow rate per total  capacity through unit at rated conditions [m^3/w]
     166              :         Array1D<Real64> MSRatedWaterVolFlowRate;
     167              :         // Water volume flow rate through unit at rated conditions [m3/s]
     168              :         Array1D<Real64> MSRatedWaterMassFlowRate;
     169              :         // Water mass flow rate through unit at rated conditions [kg/s]
     170              :         Array1D<Real64> MSRatedCBF;
     171              :         // rated coil bypass factor
     172              :         Array1D<Real64> MSEffectiveAo;
     173              :         // effective heat transfer surface at each speed
     174              :         Array1D_int MSCCapFTemp;
     175              :         // index of total capacity modifier curve
     176              :         Array1D_int MSCCapAirFFlow;
     177              :         // index of total capacity modifier curve as a function of air flow
     178              :         Array1D_int MSCCapWaterFFlow;
     179              :         // index of total capacity modifier curve as a function of water flow
     180              :         Array1D_int MSEIRFTemp;
     181              :         // index of energy input ratio modifier curve as a function of temperature
     182              :         Array1D_int MSEIRAirFFlow;
     183              :         // index of energy input ratio modifier curve as a function of air flow fraction
     184              :         Array1D_int MSEIRWaterFFlow;
     185              :         // index of energy input ratio modifier curve as a function of water flow fraction
     186              :         Array1D_int MSWasteHeat;
     187              :         // index of waste heat as a function of temperature
     188              :         Array1D<Real64> MSWasteHeatFrac;
     189              :         // water heating coil pump power at various speeds
     190              :         Array1D<Real64> MSWHPumpPower;
     191              :         Array1D<Real64> MSWHPumpPowerPerRatedTotCap;
     192              :         // Waste heat fraction
     193              :         Real64 SpeedNumReport;
     194              :         // speed number for output
     195              :         Real64 SpeedRatioReport;
     196              :         // speed ratio for output between two neighboring speeds
     197              :         // End of multispeed water source coil input
     198              :         //----------------------------------------------------------------
     199              :         // added variables and arrays for variable speed air-source heat pump
     200              :         // defrosting
     201              :         int DefrostStrategy;       // defrost strategy; 1=reverse-cycle, 2=resistive
     202              :         int DefrostControl;        // defrost control; 1=timed, 2=on-demand
     203              :         int EIRFPLR;               // index of energy input ratio vs part-load ratio curve
     204              :         int DefrostEIRFT;          // index of defrost mode total cooling capacity for reverse cycle heat pump
     205              :         Real64 MinOATCompressor;   // Minimum OAT for heat pump compressor operation
     206              :         Real64 OATempCompressorOn; // The outdoor tempearture when the compressor is automatically turned back on,
     207              :         // if applicable, following automatic shut off. This field is used only for
     208              :         // HSPF calculation.
     209              :         Real64 MaxOATDefrost;           // Maximum OAT for defrost operation
     210              :         Real64 DefrostTime;             // Defrost time period in hours
     211              :         Real64 DefrostCapacity;         // Resistive defrost to nominal capacity (at 21.11C/8.33C) ratio
     212              :         Real64 HPCompressorRuntime;     // keep track of compressor runtime
     213              :         Real64 HPCompressorRuntimeLast; // keep track of last time step compressor runtime (if simulation downshifts)
     214              :         Real64 TimeLeftToDefrost;       // keep track of time left to defrost heat pump
     215              :         Real64 DefrostPower;            // power used during defrost
     216              :         Real64 DefrostConsumption;      // energy used during defrost
     217              :         // crankcase heater
     218              :         bool ReportCoolingCoilCrankcasePower;  // logical determines if the cooling coil crankcase heater power is reported
     219              :         Real64 CrankcaseHeaterCapacity;        // total crankcase heater capacity [W]
     220              :         Real64 CrankcaseHeaterPower;           // report variable for average crankcase heater power [W]
     221              :         int CrankcaseHeaterCapacityCurveIndex; // Crankcase heater power-temperature curve or table index
     222              :         Real64 MaxOATCrankcaseHeater;          // maximum OAT for crankcase heater operation [C]
     223              :         Real64 CrankcaseHeaterConsumption;     // report variable for total crankcase heater energy consumption [J]
     224              :         // condenser evaporative precooling
     225              :         int CondenserInletNodeNum;                          // Node number of outdoor condenser
     226              :         DataHeatBalance::RefrigCondenserType CondenserType; // Type of condenser for DX cooling coil: AIR COOLED or EVAP COOLED
     227              :         bool ReportEvapCondVars;                            // true if any performance mode includes an evap condenser
     228              :         Real64 EvapCondPumpElecNomPower;                    // Nominal power input to the evap condenser water circulation pump [W]
     229              :         Real64 EvapCondPumpElecPower;                       // Average power consumed by the evap condenser water circulation pump over
     230              :         // the time step [W]
     231              :         Real64 EvapWaterConsumpRate;                 // Evap condenser water consumption rate [m3/s]
     232              :         Real64 EvapCondPumpElecConsumption;          // Electric energy consumed by the evap condenser water circulation pump [J]
     233              :         Real64 EvapWaterConsump;                     // Evap condenser water consumption [m3]
     234              :         Real64 BasinHeaterConsumption;               // Basin heater energy consumption (J)
     235              :         Real64 BasinHeaterPowerFTempDiff;            // Basin heater capacity per degree C below setpoint (W/C)
     236              :         Real64 BasinHeaterSetPointTemp;              // setpoint temperature for basin heater operation (C)
     237              :         Real64 BasinHeaterPower;                     // Basin heater power (W)
     238              :         Sched::Schedule *basinHeaterSched = nullptr; // basin heater schedule
     239              :         Array1D<Real64> EvapCondAirFlow;             // Air flow rate through the evap condenser at high speed, volumetric flow rate
     240              :         // for water use calcs [m3/s]
     241              :         Array1D<Real64> EvapCondEffect; // effectiveness of the evaporatively cooled condenser
     242              :         // [high speed for multi-speed unit] (-)
     243              :         Array1D<Real64> MSRatedEvapCondVolFlowPerRatedTotCap; // evap condenser air flow ratio to capacity
     244              :         // begin variables for Water System interactions
     245              :         int EvapWaterSupplyMode;         // where does water come from
     246              :         std::string EvapWaterSupplyName; // name of water source e.g. water storage tank
     247              :         int EvapWaterSupTankID;
     248              :         int EvapWaterTankDemandARRID;
     249              :         int CondensateCollectMode;         // where does water come from
     250              :         std::string CondensateCollectName; // name of water source e.g. water storage tank
     251              :         int CondensateTankID;
     252              :         int CondensateTankSupplyARRID;
     253              :         Real64 CondensateVdot;         // rate of water condensation from air stream [m3/s]
     254              :         Real64 CondensateVol;          // amount of water condensed from air stream [m3]
     255              :         Real64 CondInletTemp;          // Evap condenser inlet temperature [C], report variable
     256              :         int SupplyFanIndex;            // index of this fan in fan array or vector
     257              :         HVAC::FanType supplyFanType;   // type of fan, in DataHVACGlobals
     258              :         std::string SupplyFanName;     // name of fan associated with this dx coil
     259              :         Real64 SourceAirMassFlowRate;  // source air mass flow rate [kg/s]
     260              :         Real64 InletSourceAirTemp;     // source air temperature entering the outdoor coil [C]
     261              :         Real64 InletSourceAirEnthalpy; // source air enthalpy entering the outdoor coil [J/kg]
     262              :         // end variables for water system interactions
     263              : 
     264              :         // begin varibles for HPWH
     265              :         Real64 RatedCapWH;                                              // Rated water heating Capacity [W]
     266              :         HVAC::OATType InletAirTemperatureType = HVAC::OATType::Invalid; // Specifies to use either air wet-bulb or dry-bulb temp for curve objects
     267              :         Real64 WHRatedInletDBTemp;                                      // Rated inlet air dry-bulb temperature [C]
     268              :         Real64 WHRatedInletWBTemp;                                      // Rated inlet air wet-bulb temperature [C]
     269              :         Real64 WHRatedInletWaterTemp;                                   // Rated condenser water inlet temperature [C]
     270              :         Real64 HPWHCondPumpElecNomPower;                                // Nominal power input to the condenser water circulation pump [W]
     271              :         Real64 HPWHCondPumpFracToWater;                                 // Nominal power fraction to water for the condenser water circulation pump
     272              :         Real64 RatedHPWHCondWaterFlow;                                  // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
     273              :         Real64 ElecWaterHeatingPower;                                   // Total electric power consumed by compressor and condenser pump [W]
     274              :         Real64 ElecWaterHeatingConsumption;                             // Total electric consumption by compressor and condenser pump [J]
     275              :         bool FanPowerIncludedInCOP;                                     // Indicates that fan heat is included in heating capacity and COP
     276              :         bool CondPumpHeatInCapacity;                                    // Indicates that condenser pump heat is included in heating capacity
     277              :         bool CondPumpPowerInCOP;                                        // Indicates that condenser pump power is included in heating COP
     278              :         bool AirVolFlowAutoSized;                                       // Used to report autosizing info for the HPWH DX coil
     279              :         bool WaterVolFlowAutoSized;                                     // Used to report autosizing info for the HPWH DX coil
     280              :         Real64 TotalHeatingEnergy;                                      // total water heating energy
     281              :         Real64 TotalHeatingEnergyRate;                                  // total WH energy rate
     282              :         bool bIsDesuperheater; // whether the coil is used for a desuperheater, i.e. zero all the cooling capacity and power
     283              :         // end variables for HPWH
     284              :         bool reportCoilFinalSizes; // one time report of sizes to coil selection report
     285              :         Real64 capModFacTotal;     // coil  TotCapTempModFac * TotCapAirFFModFac * TotCapWaterFFModFac, for result for simulation peak reporting
     286              : 
     287              :         // default constructor
     288          125 :         VariableSpeedCoilData()
     289          250 :             : NumOfSpeeds(2), NormSpedLevel(HVAC::MaxSpeedLevels), RatedWaterVolFlowRate(DataSizing::AutoSize),
     290          125 :               RatedWaterMassFlowRate(DataSizing::AutoSize), RatedAirVolFlowRate(DataSizing::AutoSize), RatedCapHeat(DataSizing::AutoSize),
     291          125 :               RatedCapCoolTotal(DataSizing::AutoSize), MaxONOFFCyclesperHour(0.0), Twet_Rated(0.0), Gamma_Rated(0.0), HOTGASREHEATFLG(0),
     292          250 :               LatentCapacityTimeConstant(0.0), PLFFPLR(0), VSCoilType(0), SimFlag(false), DesignWaterMassFlowRate(0.0), DesignWaterVolFlowRate(0.0),
     293          125 :               DesignAirMassFlowRate(0.0), DesignAirVolFlowRate(0.0), AirVolFlowRate(0.0), AirMassFlowRate(0.0), InletAirPressure(0.0),
     294          125 :               InletAirDBTemp(0.0), InletAirHumRat(0.0), InletAirEnthalpy(0.0), OutletAirDBTemp(0.0), OutletAirHumRat(0.0), OutletAirEnthalpy(0.0),
     295          125 :               WaterVolFlowRate(0.0), WaterMassFlowRate(0.0), InletWaterTemp(0.0), InletWaterEnthalpy(0.0), OutletWaterTemp(0.0),
     296          125 :               OutletWaterEnthalpy(0.0), Power(0.0), QLoadTotal(0.0), QSensible(0.0), QLatent(0.0), QSource(0.0), QWasteHeat(0.0), Energy(0.0),
     297          125 :               EnergyLoadTotal(0.0), EnergySensible(0.0), EnergyLatent(0.0), EnergySource(0.0), COP(0.0), RunFrac(0.0), PartLoadRatio(0.0),
     298          125 :               RatedPowerHeat(0.0), RatedCOPHeat(0.0), RatedCapCoolSens(0.0), RatedPowerCool(0.0), RatedCOPCool(0.0), AirInletNodeNum(0),
     299          125 :               AirOutletNodeNum(0), WaterInletNodeNum(0), WaterOutletNodeNum(0), plantLoc{}, FindCompanionUpStreamCoil(true), IsDXCoilInZone(false),
     300          125 :               CompanionCoolingCoilNum(0), CompanionHeatingCoilNum(0), FanDelayTime(0.0), FrostHeatingCapacityMultiplierEMSOverrideOn(false),
     301          125 :               FrostHeatingCapacityMultiplierEMSOverrideValue(0.0), FrostHeatingInputPowerMultiplierEMSOverrideOn(false),
     302          125 :               FrostHeatingInputPowerMultiplierEMSOverrideValue(0.0),
     303              :               // This one calls into a std::vector, so it's 0-indexed, so we initialize it to -1
     304          125 :               MSHPDesignSpecIndex(-1), MSErrIndex(HVAC::MaxSpeedLevels, 0), MSRatedPercentTotCap(HVAC::MaxSpeedLevels, 0.0),
     305          125 :               MSRatedTotCap(HVAC::MaxSpeedLevels, 0.0), MSRatedSHR(HVAC::MaxSpeedLevels, 0.0), MSRatedCOP(HVAC::MaxSpeedLevels, 0.0),
     306          125 :               MSRatedAirVolFlowPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), MSRatedAirVolFlowRate(HVAC::MaxSpeedLevels, 0.0),
     307          125 :               MSRatedEvaporatorFanPowerPerVolumeFlowRate2017(HVAC::MaxSpeedLevels, 0.0),
     308          125 :               MSRatedEvaporatorFanPowerPerVolumeFlowRate2023(HVAC::MaxSpeedLevels, 0.0), MSRatedAirMassFlowRate(HVAC::MaxSpeedLevels, 0.0),
     309          125 :               MSRatedWaterVolFlowPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), MSRatedWaterVolFlowRate(HVAC::MaxSpeedLevels, 0.0),
     310          125 :               MSRatedWaterMassFlowRate(HVAC::MaxSpeedLevels, 0.0), MSRatedCBF(HVAC::MaxSpeedLevels, 0.0), MSEffectiveAo(HVAC::MaxSpeedLevels, 0.0),
     311          125 :               MSCCapFTemp(HVAC::MaxSpeedLevels, 0), MSCCapAirFFlow(HVAC::MaxSpeedLevels, 0), MSCCapWaterFFlow(HVAC::MaxSpeedLevels, 0),
     312          125 :               MSEIRFTemp(HVAC::MaxSpeedLevels, 0), MSEIRAirFFlow(HVAC::MaxSpeedLevels, 0), MSEIRWaterFFlow(HVAC::MaxSpeedLevels, 0),
     313          125 :               MSWasteHeat(HVAC::MaxSpeedLevels, 0), MSWasteHeatFrac(HVAC::MaxSpeedLevels, 0.0), MSWHPumpPower(HVAC::MaxSpeedLevels, 0.0),
     314          125 :               MSWHPumpPowerPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), SpeedNumReport(0.0), SpeedRatioReport(0.0), DefrostStrategy(0),
     315          125 :               DefrostControl(0), EIRFPLR(0), DefrostEIRFT(0), MinOATCompressor(0.0), OATempCompressorOn(0.0), MaxOATDefrost(0.0), DefrostTime(0.0),
     316          125 :               DefrostCapacity(0.0), HPCompressorRuntime(0.0), HPCompressorRuntimeLast(0.0), TimeLeftToDefrost(0.0), DefrostPower(0.0),
     317          125 :               DefrostConsumption(0.0), ReportCoolingCoilCrankcasePower(true), CrankcaseHeaterCapacity(0.0), CrankcaseHeaterPower(0.0),
     318          125 :               CrankcaseHeaterCapacityCurveIndex(0), MaxOATCrankcaseHeater(0.0), CrankcaseHeaterConsumption(0.0), CondenserInletNodeNum(0),
     319          125 :               CondenserType(DataHeatBalance::RefrigCondenserType::Air), ReportEvapCondVars(false), EvapCondPumpElecNomPower(0.0),
     320          125 :               EvapCondPumpElecPower(0.0), EvapWaterConsumpRate(0.0), EvapCondPumpElecConsumption(0.0), EvapWaterConsump(0.0),
     321          125 :               BasinHeaterConsumption(0.0), BasinHeaterPowerFTempDiff(0.0), BasinHeaterSetPointTemp(0.0), BasinHeaterPower(0.0),
     322          125 :               EvapCondAirFlow(HVAC::MaxSpeedLevels, 0.0), EvapCondEffect(HVAC::MaxSpeedLevels, 0.0),
     323          125 :               MSRatedEvapCondVolFlowPerRatedTotCap(HVAC::MaxSpeedLevels, 0.0), EvapWaterSupplyMode(101), EvapWaterSupTankID(0),
     324          250 :               EvapWaterTankDemandARRID(0), CondensateCollectMode(1001), CondensateTankID(0), CondensateTankSupplyARRID(0), CondensateVdot(0.0),
     325          250 :               CondensateVol(0.0), CondInletTemp(0.0), SupplyFanIndex(0), supplyFanType(HVAC::FanType::Invalid), SourceAirMassFlowRate(0.0),
     326          125 :               InletSourceAirTemp(0.0), InletSourceAirEnthalpy(0.0),
     327              :               // begin varibles for HPWH
     328          125 :               RatedCapWH(0.0),                  // Rated water heating Capacity [W]
     329          125 :               WHRatedInletDBTemp(0.0),          // Rated inlet air dry-bulb temperature [C]
     330          125 :               WHRatedInletWBTemp(0.0),          // Rated inlet air wet-bulb temperature [C]
     331          125 :               WHRatedInletWaterTemp(0.0),       // Rated condenser water inlet temperature [C]
     332          125 :               HPWHCondPumpElecNomPower(0.0),    // Nominal power input to the condenser water circulation pump [W]
     333          125 :               HPWHCondPumpFracToWater(1.0),     // Nominal power fraction to water for the condenser water circulation pump
     334          125 :               RatedHPWHCondWaterFlow(0.0),      // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
     335          125 :               ElecWaterHeatingPower(0.0),       // Total electric power consumed by compressor and condenser pump [W]
     336          125 :               ElecWaterHeatingConsumption(0.0), // Total electric consumption by compressor and condenser pump [J]
     337          125 :               FanPowerIncludedInCOP(false),     // Indicates that fan heat is included in heating capacity and COP
     338          125 :               CondPumpHeatInCapacity(false),    // Indicates that condenser pump heat is included in heating capacity
     339          125 :               CondPumpPowerInCOP(false),        // Indicates that condenser pump power is included in heating COP
     340          125 :               AirVolFlowAutoSized(false),       // Used to report autosizing info for the HPWH DX coil
     341          125 :               WaterVolFlowAutoSized(false),     // Used to report autosizing info for the HPWH DX coil
     342          125 :               TotalHeatingEnergy(0.0),          // total water heating energy
     343          125 :               TotalHeatingEnergyRate(0.0),      // total WH energy rate
     344          125 :               bIsDesuperheater(false),          // whether the coil is used for a desuperheater, i.e. zero all the cooling capacity and power
     345              :                                                 // end variables for HPWH
     346          125 :               reportCoilFinalSizes(true),       // coil report
     347          375 :               capModFacTotal(0.0)               // coil report
     348              : 
     349              :         {
     350          125 :         }
     351              :     };
     352              : 
     353              :     void SimVariableSpeedCoils(EnergyPlusData &state,
     354              :                                std::string_view CompName,       // Coil Name
     355              :                                int &CompIndex,                  // Index for Component name
     356              :                                HVAC::FanOp const fanOp,         // Continuous fan OR cycling compressor
     357              :                                HVAC::CompressorOp compressorOp, // compressor on/off. 0 = off; 1= on
     358              :                                Real64 const PartLoadFrac,
     359              :                                int const SpeedNum,                  // compressor speed number
     360              :                                Real64 const SpeedRatio,             // compressor speed ratio
     361              :                                Real64 const SensLoad,               // Sensible demand load [W]
     362              :                                Real64 const LatentLoad,             // Latent demand load [W]
     363              :                                const Real64 OnOffAirFlowRatio = 1.0 // ratio of comp on to comp off air flow rate
     364              :     );
     365              : 
     366              :     void GetVarSpeedCoilInput(EnergyPlusData &state);
     367              : 
     368              :     // Beginning Initialization Section of the Module
     369              :     //******************************************************************************
     370              : 
     371              :     void InitVarSpeedCoil(EnergyPlusData &state,
     372              :                           int const DXCoilNum,            // Current DXCoilNum under simulation
     373              :                           Real64 const SensLoad,          // Control zone sensible load[W]
     374              :                           Real64 const LatentLoad,        // Control zone latent load[W]
     375              :                           HVAC::FanOp const fanOp,        // fan operating mode
     376              :                           Real64 const OnOffAirFlowRatio, // ratio of compressor on flow to average flow over time step
     377              :                           Real64 const SpeedRatio,        // compressor speed ratio
     378              :                           int const SpeedNum              // compressor speed number
     379              :     );
     380              : 
     381              :     void SizeVarSpeedCoil(EnergyPlusData &state, int const DXCoilNum, bool &ErrorsFound);
     382              : 
     383              :     void CalcVarSpeedCoilCooling(EnergyPlusData &state,
     384              :                                  int const DXCoilNum,             // Heat Pump Number
     385              :                                  HVAC::FanOp const fanOp,         // Fan/Compressor cycling scheme indicator
     386              :                                  Real64 const SensDemand,         // Cooling Sensible Demand [W] !unused1208
     387              :                                  Real64 const LatentDemand,       // Cooling Latent Demand [W]
     388              :                                  HVAC::CompressorOp compressorOp, // compressor operation flag
     389              :                                  Real64 const PartLoadRatio,      // compressor part load ratio
     390              :                                  Real64 const OnOffAirFlowRatio,  // ratio of compressor on flow to average flow over time step
     391              :                                  Real64 const SpeedRatio,         // SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
     392              :                                  int const SpeedNum               // Speed number, high bound
     393              :     );
     394              : 
     395              :     void CalcVarSpeedCoilHeating(EnergyPlusData &state,
     396              :                                  int const DXCoilNum,             // Heat Pump Number
     397              :                                  HVAC::FanOp const fanOp,         // Fan/Compressor cycling scheme indicator
     398              :                                  Real64 const SensDemand,         // Cooling Sensible Demand [W] !unused1208
     399              :                                  HVAC::CompressorOp compressorOp, // compressor operation flag
     400              :                                  Real64 const PartLoadRatio,      // compressor part load ratio
     401              :                                  Real64 const OnOffAirFlowRatio,  // ratio of compressor on flow to average flow over time step
     402              :                                  Real64 const SpeedRatio,         // SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
     403              :                                  int const SpeedNum               // Speed number, high bound, i.e. SpeedNum - 1 is the other side
     404              :     );
     405              : 
     406              :     Real64 GetCoilCapacityVariableSpeed(EnergyPlusData &state,
     407              :                                         std::string const &CoilType, // must match coil types in this module
     408              :                                         std::string const &CoilName, // must match coil names for the coil type
     409              :                                         bool &ErrorsFound            // set to true if problem
     410              :     );
     411              : 
     412              :     int GetCoilIndexVariableSpeed(EnergyPlusData &state,
     413              :                                   std::string const &CoilType, // must match coil types in this module
     414              :                                   std::string const &CoilName, // must match coil names for the coil type
     415              :                                   bool &ErrorsFound            // set to true if problem
     416              :     );
     417              : 
     418              :     Real64 GetCoilAirFlowRateVariableSpeed(EnergyPlusData &state,
     419              :                                            std::string const &CoilType, // must match coil types in this module
     420              :                                            std::string const &CoilName, // must match coil names for the coil type
     421              :                                            bool &ErrorsFound            // set to true if problem
     422              :     );
     423              : 
     424              :     int GetCoilInletNodeVariableSpeed(EnergyPlusData &state,
     425              :                                       std::string const &CoilType, // must match coil types in this module
     426              :                                       std::string const &CoilName, // must match coil names for the coil type
     427              :                                       bool &ErrorsFound            // set to true if problem
     428              :     );
     429              : 
     430              :     int GetCoilOutletNodeVariableSpeed(EnergyPlusData &state,
     431              :                                        std::string const &CoilType, // must match coil types in this module
     432              :                                        std::string const &CoilName, // must match coil names for the coil type
     433              :                                        bool &ErrorsFound            // set to true if problem
     434              :     );
     435              : 
     436              :     int GetVSCoilCondenserInletNode(EnergyPlusData &state,
     437              :                                     std::string const &CoilName, // must match coil names for the coil type
     438              :                                     bool &ErrorsFound            // set to true if problem
     439              :     );
     440              : 
     441              :     int GetVSCoilPLFFPLR(EnergyPlusData &state,
     442              :                          std::string const &CoilType, // must match coil types in this module
     443              :                          std::string const &CoilName, // must match coil names for the coil type
     444              :                          bool &ErrorsFound            // set to true if problem
     445              :     );
     446              : 
     447              :     int GetVSCoilCapFTCurveIndex(EnergyPlusData &state,
     448              :                                  int CoilIndex,    // must match coil names for the coil type
     449              :                                  bool &ErrorsFound // set to true if problem
     450              :     );
     451              : 
     452              :     Real64 GetVSCoilMinOATCompressor(EnergyPlusData &state,
     453              :                                      int const CoilIndex, // index to cooling coil
     454              :                                      bool &ErrorsFound    // set to true if problem
     455              :     );
     456              : 
     457              :     int GetVSCoilNumOfSpeeds(EnergyPlusData &state,
     458              :                              std::string const &CoilName, // must match coil names for the coil type
     459              :                              bool &ErrorsFound            // set to true if problem
     460              :     );
     461              : 
     462              :     Real64 GetVSCoilRatedSourceTemp(EnergyPlusData &state, int const CoilIndex);
     463              : 
     464              :     void SetVarSpeedCoilData(EnergyPlusData &state,
     465              :                              int const WSHPNum,                                   // Number of OA Controller
     466              :                              bool &ErrorsFound,                                   // Set to true if certain errors found
     467              :                              ObjexxFCL::Optional_int CompanionCoolingCoilNum = _, // Index to cooling coil for heating coil = SimpleWSHPNum
     468              :                              ObjexxFCL::Optional_int CompanionHeatingCoilNum = _, // Index to heating coil for cooling coil = SimpleWSHPNum
     469              :                              ObjexxFCL::Optional_int MSHPDesignSpecIndex = _      // index to UnitarySystemPerformance:Multispeed object
     470              :     );
     471              : 
     472              :     void UpdateVarSpeedCoil(EnergyPlusData &state, int const DXCoilNum);
     473              : 
     474              :     Real64 CalcEffectiveSHR(EnergyPlusData &state,
     475              :                             int const DXCoilNum,     // Index number for cooling coil
     476              :                             Real64 const SHRss,      // Steady-state sensible heat ratio
     477              :                             HVAC::FanOp const fanOp, // Fan/compressor cycling scheme indicator
     478              :                             Real64 const RTF,        // Compressor run-time fraction
     479              :                             Real64 const QLatRated,  // Rated latent capacity
     480              :                             Real64 const QLatActual, // Actual latent capacity
     481              :                             Real64 const EnteringDB, // Entering air dry-bulb temperature
     482              :                             Real64 const EnteringWB  // Entering air wet-bulb temperature
     483              :     );
     484              : 
     485              :     void CalcTotCapSHR_VSWSHP(EnergyPlusData &state,
     486              :                               Real64 const InletDryBulb,       // inlet air dry bulb temperature [C]
     487              :                               Real64 const InletHumRat,        // inlet air humidity ratio [kg water / kg dry air]
     488              :                               Real64 const InletEnthalpy,      // inlet air specific enthalpy [J/kg]
     489              :                               Real64 &InletWetBulb,            // inlet air wet bulb temperature [C]
     490              :                               Real64 const AirMassFlowRatio,   // Ratio of actual air mass flow to nominal air mass flow
     491              :                               Real64 const WaterMassFlowRatio, // Ratio of actual water mass flow to nominal water mass flow
     492              :                               Real64 const AirMassFlow,        // actual mass flow for capacity and SHR calculation
     493              :                               Real64 const CBF,                // coil bypass factor
     494              :                               Real64 const TotCapNom1,         // nominal total capacity at low speed [W]
     495              :                               int const CCapFTemp1,            // capacity modifier curve index, function of entering wetbulb at low speed
     496              :                               int const CCapAirFFlow1,         // capacity modifier curve, function of actual air flow vs rated flow at low speed
     497              :                               int const CCapWaterFFlow1,       // capacity modifier curve, function of actual water flow vs rated flow at low speed
     498              :                               Real64 const TotCapNom2,         // nominal total capacity at high speed [W]
     499              :                               int const CCapFTemp2,            // capacity modifier curve index, function of entering wetbulb at high speed
     500              :                               int const CCapAirFFlow2,         // capacity modifier curve, function of actual air flow vs rated flow at high speed
     501              :                               int const CCapWaterFFlow2,       // capacity modifier curve, function of actual water flow vs rated flow at high speed
     502              :                               Real64 &TotCap1,                 // total capacity at the given conditions [W] at low speed
     503              :                               Real64 &TotCap2,                 // total capacity at the given conditions [W] at high speed
     504              :                               Real64 &TotCapSpeed,             // integrated total capacity corresponding to the speed ratio
     505              :                               Real64 &SHR,                     // sensible heat ratio at the given conditions
     506              :                               Real64 const CondInletTemp,      // Condenser inlet temperature [C]
     507              :                               Real64 const Pressure,           // air pressure [Pa]
     508              :                               Real64 const SpeedRatio,         // from 0.0 to 1.0
     509              :                               int const NumSpeeds,             // number of speeds for input
     510              :                               Real64 &TotCapModFac             // capacity modification factor, func of temp and func of flow
     511              :     );
     512              : 
     513              :     void CalcVarSpeedHPWH(EnergyPlusData &state,
     514              :                           int const DXCoilNum,        // the number of the DX coil to be simulated
     515              :                           Real64 const PartLoadRatio, // sensible water heating load / full load sensible water heating capacity
     516              :                           Real64 const SpeedRatio,    // SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
     517              :                           int const SpeedNum,         // Speed number, high bound capacity
     518              :                           HVAC::FanOp const fanOp     // Continuous fan OR cycling compressor
     519              :     );
     520              : 
     521              :     Real64 getVarSpeedPartLoadRatio(EnergyPlusData &state, int const DXCoilNum); // the number of the DX coil to mined for current PLR
     522              : 
     523              :     void setVarSpeedHPWHFanType(EnergyPlusData &state, int const dXCoilNum, HVAC::FanType fanType);
     524              : 
     525              :     void setVarSpeedHPWHFanIndex(EnergyPlusData &state, int const dXCoilNum, int const fanIndex);
     526              : 
     527              : } // namespace VariableSpeedCoils
     528              : 
     529              : struct VariableSpeedCoilsData : BaseGlobalStruct
     530              : {
     531              :     int NumVarSpeedCoils = 0;      // The Number of Water to Air Heat Pumps found in the Input
     532              :     bool MyOneTimeFlag = true;     // one time allocation flag
     533              :     bool GetCoilsInputFlag = true; // Flag set to make sure you get input once
     534              :                                    // LOGICAL, ALLOCATABLE, DIMENSION(:) :: MySizeFlag
     535              : 
     536              :     Real64 SourceSideMassFlowRate = 0.0; // Source Side Mass flow rate [Kg/s]
     537              :     Real64 SourceSideInletTemp = 0.0;    // Source Side Inlet Temperature [C]
     538              :     Real64 SourceSideInletEnth = 0.0;    // Source Side Inlet Enthalpy [J/kg]
     539              :     Real64 LoadSideMassFlowRate = 0.0;   // Load Side Mass flow rate [Kg/s]
     540              :     Real64 LoadSideInletDBTemp = 0.0;    // Load Side Inlet Dry Bulb Temp [C]
     541              :     Real64 LoadSideInletWBTemp = 0.0;    // Load Side Inlet Wet Bulb Temp [C]
     542              :     Real64 LoadSideInletHumRat = 0.0;    // Load Side Outlet Humidity ratio
     543              :     Real64 LoadSideInletEnth = 0.0;      // Load Side Inlet Enthalpy [J/kg]
     544              :     Real64 LoadSideOutletDBTemp = 0.0;   // Load Side Outlet Dry Bulb Temp [C]
     545              :     Real64 LoadSideOutletHumRat = 0.0;   // Load Side Outlet Humidity ratio
     546              :     Real64 LoadSideOutletEnth = 0.0;     // Load Side Outlet Enthalpy [J/kg]
     547              :     Real64 QSensible = 0.0;              // Load side sensible heat transfer rate [W]
     548              :     Real64 QLoadTotal = 0.0;             // Load side total heat transfer rate [W]
     549              :     Real64 QLatRated = 0.0;              // Latent Capacity [W] rated at entering air conditions [Tdb=26.7C Twb=19.4C]
     550              :     Real64 QLatActual = 0.0;             // Actual Latent Capacity [W]
     551              :     Real64 QSource = 0.0;                // Source side heat transfer rate [W]
     552              :     Real64 Winput = 0.0;                 // Power Consumption [W]
     553              :     Real64 PLRCorrLoadSideMdot = 0.0;    // Load Side Mdot corrected for Part Load Ratio of the unit
     554              : 
     555              :     Real64 VSHPWHHeatingCapacity = 0.0; // Used by Heat Pump:Water Heater object as total water heating capacity [W]
     556              :     Real64 VSHPWHHeatingCOP = 0.0;      // Used by Heat Pump:Water Heater object as water heating COP [W/W]
     557              : 
     558              :     EPVector<VariableSpeedCoils::VariableSpeedCoilData> VarSpeedCoil;
     559              :     bool firstTime = true;
     560              : 
     561              :     Array1D_bool MyEnvrnFlag; // used for initializations each begin environment flag
     562              :     Array1D_bool MySizeFlag;  // used for sizing PTHP inputs one time
     563              :     Array1D_bool MyPlantScanFlag;
     564              : 
     565              :     Real64 LoadSideInletDBTemp_Init = 0.0;
     566              :     Real64 LoadSideInletWBTemp_Init = 0.0;
     567              :     Real64 LoadSideInletHumRat_Init = 0.0;
     568              :     Real64 LoadSideInletEnth_Init = 0.0;
     569              :     Real64 CpAir_Init = 0.0;
     570              : 
     571              :     Real64 OutdoorCoilT = 0.0;                                  // Outdoor coil temperature (C)
     572              :     Real64 OutdoorCoildw = 0.0;                                 // Outdoor coil delta w assuming coil temp of OutdoorCoilT (kg/kg)
     573              :     Real64 OutdoorDryBulb = 0.0;                                // Outdoor dry-bulb temperature at condenser (C)
     574              :     Real64 OutdoorWetBulb = 0.0;                                // Outdoor wet-bulb temperature at condenser (C)
     575              :     Real64 OutdoorHumRat = 0.0;                                 // Outdoor humidity ratio at condenser (kg/kg)
     576              :     Real64 OutdoorPressure = 0.0;                               // Outdoor barometric pressure at condenser (Pa)
     577              :     Real64 FractionalDefrostTime = 0.0;                         // Fraction of time step system is in defrost
     578              :     Real64 HeatingCapacityMultiplier = 0.0;                     // Multiplier for heating capacity when system is in defrost
     579              :     Real64 InputPowerMultiplier = 0.0;                          // Multiplier for power when system is in defrost
     580              :     Real64 LoadDueToDefrost = 0.0;                              // Additional load due to defrost
     581              :     Real64 CrankcaseHeatingPower = 0.0;                         // power due to crankcase heater
     582              :     Real64 DefrostEIRTempModFac = 0.0;                          // EIR modifier for defrost (function of entering wetbulb, outside drybulb)
     583              :     Real64 TotRatedCapacity = 0.0;                              // total rated capacity at the given speed and speed ratio for defrosting
     584              :     Real64 OutdoorDryBulb_CalcVarSpeedCoilCooling = 0.0;        // Outdoor dry-bulb temperature at condenser (C)
     585              :     Real64 OutdoorWetBulb_CalcVarSpeedCoilCooling = 0.0;        // Outdoor wet-bulb temperature at condenser (C)
     586              :     Real64 OutdoorHumRat_CalcVarSpeedCoilCooling = 0.0;         // Outdoor humidity ratio at condenser (kg/kg)
     587              :     Real64 OutdoorPressure_CalcVarSpeedCoilCooling = 0.0;       // Outdoor barometric pressure at condenser (Pa)
     588              :     Real64 CrankcaseHeatingPower_CalcVarSpeedCoilCooling = 0.0; // power due to crankcase heater
     589              :     Real64 CompAmbTemp_CalcVarSpeedCoilCooling = 0.0;           // Ambient temperature at compressor
     590              : 
     591         2126 :     void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
     592              :     {
     593         2126 :     }
     594              : 
     595         1152 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
     596              :     {
     597         1152 :     }
     598              : 
     599         2100 :     void clear_state() override
     600              :     {
     601         2100 :         this->NumVarSpeedCoils = 0;
     602         2100 :         this->MyOneTimeFlag = true;
     603         2100 :         this->GetCoilsInputFlag = true;
     604         2100 :         this->SourceSideMassFlowRate = 0.0;
     605         2100 :         this->SourceSideInletTemp = 0.0;
     606         2100 :         this->SourceSideInletEnth = 0.0;
     607         2100 :         this->LoadSideMassFlowRate = 0.0;
     608         2100 :         this->LoadSideInletDBTemp = 0.0;
     609         2100 :         this->LoadSideInletWBTemp = 0.0;
     610         2100 :         this->LoadSideInletHumRat = 0.0;
     611         2100 :         this->LoadSideInletEnth = 0.0;
     612         2100 :         this->LoadSideOutletDBTemp = 0.0;
     613         2100 :         this->LoadSideOutletHumRat = 0.0;
     614         2100 :         this->LoadSideOutletEnth = 0.0;
     615         2100 :         this->QSensible = 0.0;
     616         2100 :         this->QLoadTotal = 0.0;
     617         2100 :         this->QLatRated = 0.0;
     618         2100 :         this->QLatActual = 0.0;
     619         2100 :         this->QSource = 0.0;
     620         2100 :         this->Winput = 0.0;
     621         2100 :         this->PLRCorrLoadSideMdot = 0.0;
     622         2100 :         this->VSHPWHHeatingCapacity = 0.0;
     623         2100 :         this->VSHPWHHeatingCOP = 0.0;
     624         2100 :         this->VarSpeedCoil.deallocate();
     625         2100 :         this->firstTime = true;
     626         2100 :         this->MyEnvrnFlag.deallocate();
     627         2100 :         this->MySizeFlag.deallocate();
     628         2100 :         this->MyPlantScanFlag.deallocate();
     629         2100 :         this->LoadSideInletDBTemp_Init = 0.0;
     630         2100 :         this->LoadSideInletWBTemp_Init = 0.0;
     631         2100 :         this->LoadSideInletHumRat_Init = 0.0;
     632         2100 :         this->LoadSideInletEnth_Init = 0.0;
     633         2100 :         this->CpAir_Init = 0.0;
     634         2100 :         this->OutdoorCoilT = 0.0;
     635         2100 :         this->OutdoorCoildw = 0.0;
     636         2100 :         this->OutdoorDryBulb = 0.0;
     637         2100 :         this->OutdoorWetBulb = 0.0;
     638         2100 :         this->OutdoorHumRat = 0.0;
     639         2100 :         this->OutdoorPressure = 0.0;
     640         2100 :         this->FractionalDefrostTime = 0.0;
     641         2100 :         this->HeatingCapacityMultiplier = 0.0;
     642         2100 :         this->InputPowerMultiplier = 0.0;
     643         2100 :         this->LoadDueToDefrost = 0.0;
     644         2100 :         this->CrankcaseHeatingPower = 0.0;
     645         2100 :         this->DefrostEIRTempModFac = 0.0;
     646         2100 :         this->TotRatedCapacity = 0.0;
     647         2100 :         this->OutdoorDryBulb_CalcVarSpeedCoilCooling = 0.0;
     648         2100 :         this->OutdoorWetBulb_CalcVarSpeedCoilCooling = 0.0;
     649         2100 :         this->OutdoorHumRat_CalcVarSpeedCoilCooling = 0.0;
     650         2100 :         this->OutdoorPressure_CalcVarSpeedCoilCooling = 0.0;
     651         2100 :         this->CrankcaseHeatingPower_CalcVarSpeedCoilCooling = 0.0;
     652         2100 :         this->CompAmbTemp_CalcVarSpeedCoilCooling = 0.0;
     653         2100 :     }
     654              : 
     655              :     // Default Constructor
     656         2129 :     VariableSpeedCoilsData() = default;
     657              : };
     658              : } // namespace EnergyPlus
     659              : 
     660              : #endif
        

Generated by: LCOV version 2.0-1