LCOV - code coverage report
Current view: top level - EnergyPlus - VariableSpeedCoils.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 7 61 11.5 %
Date: 2023-01-17 19:17:23 Functions: 5 7 71.4 %

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

Generated by: LCOV version 1.13