LCOV - code coverage report
Current view: top level - EnergyPlus - DataHVACGlobals.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 4 8 50.0 %
Date: 2023-01-17 19:17:23 Functions: 10 16 62.5 %

          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 DataHVACGlobals_hh_INCLUDED
      49             : #define DataHVACGlobals_hh_INCLUDED
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array1D.hh>
      53             : 
      54             : // EnergyPlus Headers
      55             : #include <EnergyPlus/Data/BaseData.hh>
      56             : #include <EnergyPlus/DataGlobals.hh>
      57             : #include <EnergyPlus/EnergyPlus.hh>
      58             : #include <EnergyPlus/Plant/PlantAvailManager.hh>
      59             : 
      60             : namespace EnergyPlus {
      61             : 
      62             : namespace DataHVACGlobals {
      63             : 
      64             :     // Using/Aliasing
      65             : 
      66             :     // Data
      67             :     // -only module should be available to other modules and routines.
      68             :     // Thus, all variables in this module must be PUBLIC.
      69             : 
      70             :     // MODULE PARAMETER DEFINITIONS:
      71             : 
      72             :     Real64 constexpr SmallHumRatDiff(1.0E-7);
      73             :     Real64 constexpr SmallTempDiff(1.0E-5);
      74             :     Real64 constexpr SmallMassFlow(0.001);
      75             :     Real64 constexpr VerySmallMassFlow(1.0E-30);
      76             :     Real64 constexpr SmallLoad(1.0);
      77             :     Real64 constexpr TempControlTol(0.1); // temperature control tolerance for packaged equip. [deg C]
      78             :     Real64 constexpr SmallAirVolFlow(0.001);
      79             :     Real64 constexpr SmallWaterVolFlow(1.0E-9);
      80             :     Real64 constexpr BlankNumeric(-99999.0);      // indicates numeric input field was blank
      81             :     Real64 constexpr RetTempMax(60.0);            // maximum return air temperature [deg C]
      82             :     Real64 constexpr RetTempMin(-30.0);           // minimum return air temperature [deg C]
      83             :     Real64 constexpr DesCoilHWInletTempMin(46.0); // minimum heating water coil water inlet temp for UA sizing only. [deg C]
      84             : 
      85             :     int constexpr NumOfSizingTypes(35); // request sizing for cooling air flow rate
      86             : 
      87             :     // Sizing types
      88             :     int constexpr CoolingAirflowSizing(1);                // request sizing for cooling air flow rate
      89             :     int constexpr CoolingWaterDesWaterInletTempSizing(6); // request sizing for cooling water coil inlet water temp
      90             :     int constexpr HeatingAirflowSizing(14);               // request sizing for heating air flow rate
      91             :     int constexpr SystemAirflowSizing(16);                // request sizing for system air flow rate
      92             :     int constexpr CoolingCapacitySizing(17);              // request sizing for cooling capacity
      93             :     int constexpr HeatingCapacitySizing(18);              // request sizing for heating capacity
      94             :     int constexpr SystemCapacitySizing(21);               // request sizing for system capacity
      95             :     int constexpr AutoCalculateSizing(25);                // identifies an autocalulate input
      96             : 
      97             :     // The following parameters are used for system availability status
      98             :     int constexpr NoAction(0);
      99             :     int constexpr ForceOff(1);
     100             :     int constexpr CycleOn(2);
     101             :     int constexpr CycleOnZoneFansOnly(3);
     102             : 
     103             :     // The following parameters describe the setpoint types in TempControlType(ActualZoneNum)
     104             :     enum class ThermostatType
     105             :     {
     106             :         Invalid = -1,
     107             :         Uncontrolled,
     108             :         SingleHeating,
     109             :         SingleCooling,
     110             :         SingleHeatCool,
     111             :         DualSetPointWithDeadBand,
     112             :         Num
     113             :     };
     114             : 
     115             :     enum class AirDuctType
     116             :     // parameters describing air duct type
     117             :     {
     118             :         Invalid = -1,
     119             :         Main,
     120             :         Cooling,
     121             :         Heating,
     122             :         Other,
     123             :         RAB,
     124             :         Num
     125             :     };
     126             : 
     127             :     int constexpr Cooling(2);
     128             :     int constexpr Heating(3);
     129             : 
     130             :     // parameters describing fan types
     131             :     int constexpr NumAllFanTypes(6);
     132             : 
     133             :     // fan types
     134             :     int constexpr FanType_SimpleConstVolume(1);
     135             :     int constexpr FanType_SimpleVAV(2);
     136             :     int constexpr FanType_SimpleOnOff(3);
     137             :     int constexpr FanType_ZoneExhaust(4);
     138             :     int constexpr FanType_ComponentModel(5);
     139             :     int constexpr FanType_SystemModelObject(6);
     140             : 
     141             :     // Fan Minimum Flow Fraction Input Method
     142             :     int constexpr MinFrac(1);
     143             :     int constexpr FixedMin(2);
     144             :     // Fan mode
     145             :     int constexpr CycFanCycCoil(1);  // Cycling fan, cycling coil = 1
     146             :     int constexpr ContFanCycCoil(2); // Continuous fan, cycling coil = 2
     147             :     // Fan placement
     148             :     int constexpr BlowThru(1); // fan before coil
     149             :     int constexpr DrawThru(2); // fan after coil
     150             :     // OA Controller Heat Recovery Bypass Control Types
     151             :     int constexpr BypassWhenWithinEconomizerLimits(0);   // heat recovery controlled by economizer limits
     152             :     int constexpr BypassWhenOAFlowGreaterThanMinimum(1); // heat recovery ON at minimum OA in economizer mode
     153             : 
     154             :     // parameters describing unitary systems
     155             :     int constexpr NumUnitarySystemTypes(7);
     156             :     // Furnace/Unitary System Types
     157             :     int constexpr Furnace_HeatOnly(1);
     158             :     int constexpr Furnace_HeatCool(2);
     159             :     int constexpr UnitarySys_HeatOnly(3);
     160             :     int constexpr UnitarySys_HeatCool(4);
     161             :     int constexpr UnitarySys_HeatPump_AirToAir(5);
     162             :     int constexpr UnitarySys_HeatPump_WaterToAir(6);
     163             :     int constexpr UnitarySys_AnyCoilType(7);
     164             : 
     165             :     // parameters describing coil types
     166             :     int constexpr NumAllCoilTypes(37);
     167             :     int constexpr CoilDX_CoolingSingleSpeed(1);
     168             :     int constexpr CoilDX_HeatingEmpirical(2);
     169             :     int constexpr CoilDX_CoolingTwoSpeed(3);
     170             :     int constexpr CoilDX_CoolingHXAssisted(4);
     171             :     int constexpr CoilDX_CoolingTwoStageWHumControl(5);
     172             :     int constexpr CoilDX_HeatPumpWaterHeaterPumped(6);
     173             :     int constexpr CoilDX_HeatPumpWaterHeaterWrapped(7);
     174             :     int constexpr CoilDX_MultiSpeedCooling(8);
     175             :     int constexpr CoilDX_MultiSpeedHeating(9);
     176             :     int constexpr Coil_HeatingGasOrOtherFuel(10);
     177             :     int constexpr Coil_HeatingGas_MultiStage(11);
     178             :     int constexpr Coil_HeatingElectric(12);
     179             :     int constexpr Coil_HeatingElectric_MultiStage(13);
     180             :     int constexpr Coil_HeatingDesuperheater(14);
     181             :     int constexpr Coil_CoolingWater(15);
     182             :     int constexpr Coil_CoolingWaterDetailed(16);
     183             :     int constexpr Coil_HeatingWater(17);
     184             :     int constexpr Coil_HeatingSteam(18);
     185             :     int constexpr CoilWater_CoolingHXAssisted(19);
     186             :     int constexpr Coil_CoolingWaterToAirHP(20);
     187             :     int constexpr Coil_HeatingWaterToAirHP(21);
     188             :     int constexpr Coil_CoolingWaterToAirHPSimple(22);
     189             :     int constexpr Coil_HeatingWaterToAirHPSimple(23);
     190             :     int constexpr CoilVRF_Cooling(24);
     191             :     int constexpr CoilVRF_Heating(25);
     192             :     int constexpr Coil_UserDefined(26);
     193             :     int constexpr CoilDX_PackagedThermalStorageCooling(27);
     194             :     int constexpr Coil_CoolingWaterToAirHPVSEquationFit(28);
     195             :     int constexpr Coil_HeatingWaterToAirHPVSEquationFit(29);
     196             :     int constexpr Coil_CoolingAirToAirVariableSpeed(30);
     197             :     int constexpr Coil_HeatingAirToAirVariableSpeed(31);
     198             :     int constexpr CoilDX_HeatPumpWaterHeaterVariableSpeed(32);
     199             :     int constexpr CoilVRF_FluidTCtrl_Cooling(33);
     200             :     int constexpr CoilVRF_FluidTCtrl_Heating(34);
     201             :     int constexpr CoilDX_Cooling(35);
     202             :     //    int constexpr CoilDX_SubcoolReheat(36);
     203             :     int constexpr CoilDX_CurveFit_Speed(37);
     204             : 
     205             :     int constexpr coilNormalMode = 0;        // Normal operation mode
     206             :     int constexpr coilEnhancedMode = 1;      // Enhanced operation mode
     207             :     int constexpr coilSubcoolReheatMode = 2; // SubcoolReheat operation mode
     208             : 
     209             :     // Water to air HP coil types
     210             :     int constexpr WatertoAir_Simple(1);
     211             :     int constexpr WatertoAir_ParEst(2);
     212             :     int constexpr WatertoAir_VarSpeedEquationFit(3);
     213             :     int constexpr WatertoAir_VarSpeedLooUpTable(4);
     214             : 
     215             :     // Water to Air HP Water Flow Mode
     216             :     int constexpr WaterCycling(1);  // water flow cycles with compressor
     217             :     int constexpr WaterConstant(2); // water flow is constant
     218             :     int constexpr WaterConstantOnDemand(
     219             :         3); // water flow is constant whenever the coil is operational - this is the only method used in EP V7.2 and earlier
     220             : 
     221             :     // parameters describing coil performance types
     222             :     int constexpr CoilPerfDX_CoolBypassEmpirical(100);
     223             : 
     224             :     // Airflow per total capacity range (Regular DX coils)
     225             :     Real64 constexpr MaxRatedVolFlowPerRatedTotCap1(0.00006041); // m3/s per watt = 450 cfm/ton
     226             :     Real64 constexpr MinRatedVolFlowPerRatedTotCap1(0.00004027); // m3/s per watt = 300 cfm/ton
     227             :     Real64 constexpr MaxHeatVolFlowPerRatedTotCap1(0.00008056);  // m3/s per watt = 600 cfm/ton
     228             :     Real64 constexpr MaxCoolVolFlowPerRatedTotCap1(0.00006713);  // m3/s per watt = 500 cfm/ton
     229             :     Real64 constexpr MinOperVolFlowPerRatedTotCap1(0.00002684);  // m3/s per watt = 200 cfm/ton
     230             : 
     231             :     // 100% DOAS DX coils Airflow per total capacity ratio
     232             :     Real64 constexpr MaxRatedVolFlowPerRatedTotCap2(0.00003355); // m3/s per watt = 250 cfm/ton
     233             :     Real64 constexpr MinRatedVolFlowPerRatedTotCap2(0.00001677); // m3/s per watt = 125 cfm/ton
     234             :     Real64 constexpr MaxHeatVolFlowPerRatedTotCap2(0.00004026);  // m3/s per watt = 300 cfm/ton
     235             :     Real64 constexpr MaxCoolVolFlowPerRatedTotCap2(0.00004026);  // m3/s per watt = 300 cfm/ton
     236             :     Real64 constexpr MinOperVolFlowPerRatedTotCap2(0.00001342);  // m3/s per watt = 100 cfm/ton
     237             : 
     238             :     // dx coil type (DXCT)
     239             :     int constexpr RegularDXCoil(1); // Regular DX coils or mixed air dx coils
     240             :     int constexpr DOASDXCoil(2);    // 100% DOAS DX coils
     241             : 
     242             :     // Parameters describing Heat Exchanger types
     243             :     int constexpr NumHXTypes(3);
     244             : 
     245             :     int constexpr HX_AIRTOAIR_FLATPLATE(1);
     246             :     int constexpr HX_AIRTOAIR_GENERIC(2);
     247             :     int constexpr HX_DESICCANT_BALANCED(3);
     248             : 
     249             :     // Parameters describing air terminal mixers
     250             :     int constexpr NumATMixerTypes(2);
     251             :     int constexpr No_ATMixer(0);
     252             :     int constexpr ATMixer_InletSide(1);
     253             :     int constexpr ATMixer_SupplySide(2);
     254             : 
     255             :     bool constexpr ATMixerExists(true);
     256             : 
     257             :     // Parameters describing variable refrigerant flow terminal unit types
     258             :     int constexpr NumVRFTUTypes(1);
     259             :     int constexpr VRFTUType_ConstVolume(1);
     260             : 
     261             :     // VRF Heating Performance Curve Temperature Type
     262             :     int constexpr NumVRFHeatingPerformanceOATTypes(2);
     263             :     int constexpr WetBulbIndicator(1);
     264             :     int constexpr DryBulbIndicator(2);
     265             : 
     266             :     // parameter concerning the amount of change in zone temperature is needed
     267             :     // for oscillation of zone temperature to be detected.
     268             :     Real64 constexpr OscillateMagnitude(0.15);
     269             : 
     270             :     // Parameters for HVACSystemRootFindingAlgorithm
     271             :     int constexpr Bisection(2);
     272             : 
     273             :     int constexpr NumZoneHVACTerminalTypes = 38;
     274             :     int constexpr ZoneEquipTypeOf_VariableRefrigerantFlow(1);
     275             :     int constexpr ZoneEquipTypeOf_EnergyRecoveryVentilator(2);
     276             :     int constexpr ZoneEquipTypeOf_FourPipeFanCoil(3);
     277             :     int constexpr ZoneEquipTypeOf_OutdoorAirUnit(4);
     278             :     int constexpr ZoneEquipTypeOf_PackagedTerminalAirConditioner(5);
     279             :     int constexpr ZoneEquipTypeOf_PackagedTerminalHeatPump(6);
     280             :     int constexpr ZoneEquipTypeOf_UnitHeater(7);
     281             :     int constexpr ZoneEquipTypeOf_UnitVentilator(8);
     282             :     int constexpr ZoneEquipTypeOf_VentilatedSlab(9);
     283             :     int constexpr ZoneEquipTypeOf_WaterToAirHeatPump(10);
     284             :     int constexpr ZoneEquipTypeOf_WindowAirConditioner(11);
     285             :     int constexpr ZoneEquipTypeOf_BaseboardRadiantConvectiveElectric(12);
     286             :     int constexpr ZoneEquipTypeOf_BaseboardRadiantConvectiveWater(13);
     287             :     int constexpr ZoneEquipTypeOf_BaseboardRadiantConvectiveSteam(14);
     288             :     int constexpr ZoneEquipTypeOf_BaseboardConvectiveElectric(15);
     289             :     int constexpr ZoneEquipTypeOf_BaseboardConvectiveWater(16);
     290             :     int constexpr ZoneEquipTypeOf_HighTemperatureRadiant(17);
     291             :     int constexpr ZoneEquipTypeOf_DehumidifierDX(18);
     292             :     int constexpr ZoneEquipTypeOf_IdealLoadsAirSystem(19);
     293             :     int constexpr ZoneEquipTypeOf_RefrigerationChillerSet(20);
     294             :     int constexpr ZoneEquipTypeOf_HybridUnitaryAirConditioners(21);
     295             :     int constexpr ZoneEquipTypeOf_FanZoneExhaust(22);
     296             :     int constexpr ZoneEquipTypeOf_WaterHeaterHeatPump(23);
     297             :     int constexpr ZoneEquipTypeOf_AirTerminalDualDuctConstantVolume(24);
     298             :     int constexpr ZoneEquipTypeOf_AirTerminalDualDuctVAV(25);
     299             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctConstantVolumeReheat(26);
     300             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctConstantVolumeNoReheat(27);
     301             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctVAVReheat(28);
     302             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctVAVNoReheat(29);
     303             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctSeriesPIUReheat(30);
     304             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctParallelPIUReheat(31);
     305             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctCAVFourPipeInduction(32);
     306             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctVAVReheatVariableSpeedFan(33);
     307             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctVAVHeatAndCoolReheat(34);
     308             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctVAVHeatAndCoolNoReheat(35);
     309             :     int constexpr ZoneEquipTypeOf_AirTerminalSingleDuctConstantVolumeCooledBeam(36);
     310             :     int constexpr ZoneEquipTypeOf_AirTerminalDualDuctVAVOutdoorAir(37);
     311             :     int constexpr ZoneEquipTypeOf_AirLoopHVACReturnAir(38);
     312             : 
     313             :     extern Array1D_string const cFanTypes;
     314             :     extern Array1D_string const cAllCoilTypes;
     315             :     extern Array1D_string const cCoolingCoilTypes;
     316             :     extern Array1D_string const cHeatingCoilTypes;
     317             :     extern Array1D_string const ccZoneHVACTerminalTypes;
     318             :     extern Array1D_string const ZoneHVACTerminalTypes;
     319             :     extern Array1D_string const cATMixerTypes;
     320             :     extern Array1D_string const cVRFTUTypes;
     321             :     extern Array1D_string const cVRFHeatingPerformanceOATTypes;
     322             :     extern Array1D_string const cHXTypes;
     323             :     extern Array1D_string const cFurnaceTypes;
     324             : 
     325           0 :     struct ComponentSetPtData
     326             :     {
     327             :         // Members
     328             :         std::string EquipmentType;
     329             :         std::string EquipmentName;
     330             :         int NodeNumIn = 0;
     331             :         int NodeNumOut = 0;
     332             :         Real64 EquipDemand = 0.0;
     333             :         Real64 DesignFlowRate = 0.0;
     334             :         std::string HeatOrCool;
     335             :         int OpType = 0;
     336             :     };
     337             : 
     338        1964 :     struct DefineZoneCompAvailMgrs
     339             :     {
     340             :         // Members
     341             :         int NumAvailManagers = 0;                                    // number of availability managers for this system
     342             :         int AvailStatus = 0;                                         // system availability status
     343             :         int StartTime = 0;                                           // cycle on time (in SimTimeSteps)
     344             :         int StopTime = 0;                                            // cycle off time (in SimTimeSteps)
     345             :         std::string AvailManagerListName;                            // name of each availability manager
     346             :         Array1D_string AvailManagerName;                             // name of each availability manager
     347             :         Array1D<DataPlant::SystemAvailabilityType> AvailManagerType; // type of availability manager
     348             :         Array1D_int AvailManagerNum;                                 // index for availability manager
     349             :         int ZoneNum = 0;                                             // cycle off time (in SimTimeSteps)
     350             :         bool Input = true;                                           // starts off as true to initialize zone equipment availability manager data
     351             :         int Count = 0; // initialize twice to ensure zone equipment availability manager list name has been read in
     352             :     };
     353             : 
     354       23130 :     struct ZoneCompTypeData
     355             :     {
     356             :         // Members
     357             :         Array1D<DefineZoneCompAvailMgrs> ZoneCompAvailMgrs;
     358             :         int TotalNumComp = 0; // total number of components of a zone equip type
     359             :     };
     360             : 
     361        1542 :     struct OptStartDataType
     362             :     {
     363             :         // Members
     364             :         Array1D_int ActualZoneNum;
     365             :         Array1D<Real64> OccStartTime;
     366             :         Array1D_bool OptStartFlag;
     367             :     };
     368             : 
     369             :     // Compressor operation
     370             :     enum class CompressorOperation
     371             :     {
     372             :         Invalid = -1,
     373             :         Off, // signal DXCoil that compressor shouldn't run
     374             :         On,  // normal compressor operation
     375             :         Num
     376             :     };
     377             : } // namespace DataHVACGlobals
     378             : 
     379        1542 : struct HVACGlobalsData : BaseGlobalStruct
     380             : {
     381             :     // Object Data
     382             :     Array1D<DataHVACGlobals::ZoneCompTypeData> ZoneComp;
     383             :     DataHVACGlobals::OptStartDataType OptStartData; // For optimum start
     384             :     Array1D<DataHVACGlobals::ComponentSetPtData> CompSetPtEquip;
     385             : 
     386             :     // Hybrid ventilation control part
     387             :     int NumHybridVentSysAvailMgrs = 0;              // Number of hybrid ventilation control
     388             :     Array1D_int HybridVentSysAvailAirLoopNum;       // Airloop number in hybrid vent availability manager
     389             :     Array1D_int HybridVentSysAvailVentCtrl;         // Ventilation control action in hybrid vent availability manager
     390             :     Array1D_int HybridVentSysAvailActualZoneNum;    // Actual zone num in hybrid vent availability manager
     391             :     Array1D_int HybridVentSysAvailANCtrlStatus;     // AN control status in hybrid vent availability manager
     392             :     Array1D_int HybridVentSysAvailMaster;           // Master object name: Ventilation for simple; Zone name for AN
     393             :     Array1D<Real64> HybridVentSysAvailWindModifier; // Wind modifier for AirflowNetwork
     394             :     // For multispeed heat pump only
     395             :     Real64 MSHPMassFlowRateLow = 0.0;       // Mass flow rate at low speed
     396             :     Real64 MSHPMassFlowRateHigh = 0.0;      // Mass flow rate at high speed
     397             :     Real64 MSHPWasteHeat = 0.0;             // Waste heat
     398             :     Real64 PreviousTimeStep = 0.0;          // The time step length at the previous time step
     399             :     bool ShortenTimeStepSysRoomAir = false; // Logical flag that triggers shortening of system time step
     400             : 
     401             :     Real64 deviationFromSetPtThresholdHtg = -0.2; // heating threshold for reporting setpoint deviation
     402             :     Real64 deviationFromSetPtThresholdClg = 0.2;  // cooling threshold for reporting setpoint deviation
     403             : 
     404             :     bool SimAirLoopsFlag;                   // True when the air loops need to be (re)simulated
     405             :     bool SimElecCircuitsFlag;               // True when electic circuits need to be (re)simulated
     406             :     bool SimPlantLoopsFlag;                 // True when the main plant loops need to be (re)simulated
     407             :     bool SimZoneEquipmentFlag;              // True when zone equipment components need to be (re)simulated
     408             :     bool SimNonZoneEquipmentFlag;           // True when non-zone equipment components need to be (re)simulated
     409             :     bool ZoneMassBalanceHVACReSim;          // True when zone air mass flow balance and air loop needs (re)simulated
     410             :     int MinAirLoopIterationsAfterFirst = 1; // minimum number of HVAC iterations after FirstHVACIteration
     411             : 
     412             :     Array1D<Real64> MaxRatedVolFlowPerRatedTotCap =
     413             :         Array1D<Real64>(2, {DataHVACGlobals::MaxRatedVolFlowPerRatedTotCap1, DataHVACGlobals::MaxRatedVolFlowPerRatedTotCap2});
     414             :     Array1D<Real64> MinRatedVolFlowPerRatedTotCap =
     415             :         Array1D<Real64>(2, {DataHVACGlobals::MinRatedVolFlowPerRatedTotCap1, DataHVACGlobals::MinRatedVolFlowPerRatedTotCap2});
     416             :     Array1D<Real64> MaxHeatVolFlowPerRatedTotCap =
     417             :         Array1D<Real64>(2, {DataHVACGlobals::MaxHeatVolFlowPerRatedTotCap1, DataHVACGlobals::MaxHeatVolFlowPerRatedTotCap2});
     418             :     Array1D<Real64> MaxCoolVolFlowPerRatedTotCap =
     419             :         Array1D<Real64>(2, {DataHVACGlobals::MaxCoolVolFlowPerRatedTotCap1, DataHVACGlobals::MaxCoolVolFlowPerRatedTotCap2});
     420             :     Array1D<Real64> MinOperVolFlowPerRatedTotCap =
     421             :         Array1D<Real64>(2, {DataHVACGlobals::MinOperVolFlowPerRatedTotCap1, DataHVACGlobals::MinOperVolFlowPerRatedTotCap2});
     422             : 
     423             :     int DXCT = 1;                      // dx coil type: regular DX coil ==1, 100% DOAS DX coil = 2
     424             :     bool FirstTimeStepSysFlag = false; // Set to true at the start of each sub-time step
     425             : 
     426             :     Real64 TimeStepSys = 0.0;                  // System Time Increment - the adaptive time step used by the HVAC simulation (hours)
     427             :     Real64 SysTimeElapsed = 0.0;               // elapsed system time in zone timestep (hours)
     428             :     Real64 FracTimeStepZone = 0.0;             // System time step divided by the zone time step
     429             :     bool ShortenTimeStepSys = false;           // Logical flag that triggers shortening of system time step
     430             :     int NumOfSysTimeSteps = 1;                 // for current zone time step, number of system timesteps inside  it
     431             :     int NumOfSysTimeStepsLastZoneTimeStep = 1; // previous zone time step, num of system timesteps inside
     432             :     int LimitNumSysSteps = 0;
     433             : 
     434             :     bool UseZoneTimeStepHistory = true;    // triggers use of zone time step history, else system time step history, for ZTM1, ZTMx
     435             :     int NumPlantLoops = 0;                 // Number of plant loops specified in simulation
     436             :     int NumCondLoops = 0;                  // Number of condenser plant loops specified in simulation
     437             :     int NumElecCircuits = 0;               // Number of electric circuits specified in simulation
     438             :     int NumGasMeters = 0;                  // Number of gas meters specified in simulation
     439             :     int NumPrimaryAirSys = 0;              // Number of primary HVAC air systems
     440             :     Real64 OnOffFanPartLoadFraction = 1.0; // fan part-load fraction (Fan:OnOff)
     441             :     Real64 DXCoilTotalCapacity = 0.0;      // DX coil total cooling capacity (eio report var for HPWHs)
     442             :     Real64 DXElecCoolingPower = 0.0;       // Electric power consumed by DX cooling coil last DX simulation
     443             :     Real64 DXElecHeatingPower = 0.0;       // Electric power consumed by DX heating coil last DX simulation
     444             :     Real64 ElecHeatingCoilPower = 0.0;     // Electric power consumed by electric heating coil
     445             :     Real64 SuppHeatingCoilPower = 0.0;     // Electric power consumed by electric supplemental heating coil
     446             :     Real64 AirToAirHXElecPower = 0.0;      // Electric power consumed by Heat Exchanger:Air To Air (Generic or Flat Plate)
     447             :     // from last simulation in HeatRecovery.cc
     448             :     Real64 UnbalExhMassFlow = 0.0;      // unbalanced zone exhaust from a zone equip component [kg/s]
     449             :     Real64 BalancedExhMassFlow = 0.0;   // balanced zone exhaust (declared as so by user)  [kg/s]
     450             :     Real64 PlenumInducedMassFlow = 0.0; // secondary air mass flow rate induced from a return plenum [kg/s]
     451             :     bool TurnFansOn = false;            // If true overrides fan schedule and cycles fans on
     452             :     bool TurnZoneFansOnlyOn =
     453             :         false;                // If true overrides zone fan schedule and cycles fans on (currently used only by parallel powered induction unit)
     454             :     bool TurnFansOff = false; // If True overides fan schedule and TurnFansOn and forces fans off
     455             :     bool ZoneCompTurnFansOn = false;  // If true overrides fan schedule and cycles fans on
     456             :     bool ZoneCompTurnFansOff = false; // If True overides fan schedule and TurnFansOn and forces fans off
     457             :     bool SetPointErrorFlag = false;   // True if any needed setpoints not set; if true, program terminates
     458             :     bool DoSetPointTest = false;      // True one time only for sensed node setpoint test
     459             :     bool NightVentOn = false;         // set TRUE in SimAirServingZone if night ventilation is happening
     460             : 
     461             :     int NumTempContComps = 0;
     462             :     Real64 HPWHInletDBTemp = 0.0;     // Used by curve objects when calculating DX coil performance for HEAT PUMP:WATER HEATER
     463             :     Real64 HPWHInletWBTemp = 0.0;     // Used by curve objects when calculating DX coil performance for HEAT PUMP:WATER HEATER
     464             :     Real64 HPWHCrankcaseDBTemp = 0.0; // Used for HEAT PUMP:WATER HEATER crankcase heater ambient temperature calculations
     465             :     bool AirLoopInit = false;         // flag for whether InitAirLoops has been called
     466             :     bool AirLoopsSimOnce = false;     // True means that the air loops have been simulated once in this environment
     467             :     bool GetAirPathDataDone = false;  // True means that air loops inputs have been processed
     468             :     bool StandardRatingsMyOneTimeFlag = true;
     469             :     bool StandardRatingsMyCoolOneTimeFlag = true;
     470             :     bool StandardRatingsMyCoolOneTimeFlag2 = true;
     471             :     bool StandardRatingsMyHeatOneTimeFlag = true;
     472             : 
     473           0 :     void clear_state() override
     474             :     {
     475           0 :         *this = HVACGlobalsData();
     476           0 :     }
     477             : };
     478             : 
     479             : } // namespace EnergyPlus
     480             : 
     481             : #endif

Generated by: LCOV version 1.13