Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
2 : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
3 : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
4 : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
5 : // contributors. All rights reserved.
6 : //
7 : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
8 : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
9 : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
10 : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
11 : // derivative works, and perform publicly and display publicly, and to permit others to do so.
12 : //
13 : // Redistribution and use in source and binary forms, with or without modification, are permitted
14 : // provided that the following conditions are met:
15 : //
16 : // (1) Redistributions of source code must retain the above copyright notice, this list of
17 : // conditions and the following disclaimer.
18 : //
19 : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
20 : // conditions and the following disclaimer in the documentation and/or other materials
21 : // provided with the distribution.
22 : //
23 : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
24 : // the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
25 : // used to endorse or promote products derived from this software without specific prior
26 : // written permission.
27 : //
28 : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
29 : // without changes from the version obtained under this License, or (ii) Licensee makes a
30 : // reference solely to the software portion of its product, Licensee must refer to the
31 : // software as "EnergyPlus version X" software, where "X" is the version number Licensee
32 : // obtained under this License and may not use a different name for the software. Except as
33 : // specifically required in this Section (4), Licensee shall not use in a company name, a
34 : // product name, in advertising, publicity, or other promotional activities any name, trade
35 : // name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
36 : // similar designation, without the U.S. Department of Energy's prior written consent.
37 : //
38 : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
39 : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
40 : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
41 : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43 : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
45 : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 : // POSSIBILITY OF SUCH DAMAGE.
47 :
48 : #ifndef 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 :
59 : namespace EnergyPlus {
60 :
61 : namespace HVAC {
62 :
63 : // Using/Aliasing
64 :
65 : // Data
66 : // -only module should be available to other modules and routines.
67 : // Thus, all variables in this module must be PUBLIC.
68 :
69 : enum class CtrlVarType
70 : {
71 : Invalid = -1,
72 : Temp,
73 : MaxTemp,
74 : MinTemp,
75 : HumRat,
76 : MaxHumRat,
77 : MinHumRat,
78 : MassFlowRate,
79 : MaxMassFlowRate,
80 : MinMassFlowRate,
81 : Num
82 : };
83 :
84 : // MODULE PARAMETER DEFINITIONS:
85 :
86 : Real64 constexpr SmallHumRatDiff(1.0E-7);
87 : Real64 constexpr SmallTempDiff(1.0E-5);
88 : Real64 constexpr SmallMassFlow(0.001);
89 : Real64 constexpr VerySmallMassFlow(1.0E-30);
90 : Real64 constexpr SmallLoad(1.0);
91 : Real64 constexpr TempControlTol(0.1); // temperature control tolerance for packaged equip. [deg C]
92 : Real64 constexpr SmallAirVolFlow(0.001);
93 : Real64 constexpr SmallWaterVolFlow(1.0E-9);
94 : Real64 constexpr BlankNumeric(-99999.0); // indicates numeric input field was blank
95 : Real64 constexpr RetTempMax(60.0); // maximum return air temperature [deg C]
96 : Real64 constexpr RetTempMin(-30.0); // minimum return air temperature [deg C]
97 : Real64 constexpr DesCoilHWInletTempMin(46.0); // minimum heating water coil water inlet temp for UA sizing only. [deg C]
98 :
99 : int constexpr NumOfSizingTypes(35); // request sizing for cooling air flow rate
100 :
101 : // Sizing types
102 : int constexpr CoolingAirflowSizing(1); // request sizing for cooling air flow rate
103 : int constexpr CoolingWaterDesWaterInletTempSizing(6); // request sizing for cooling water coil inlet water temp
104 : int constexpr HeatingAirflowSizing(14); // request sizing for heating air flow rate
105 : int constexpr SystemAirflowSizing(16); // request sizing for system air flow rate
106 : int constexpr CoolingCapacitySizing(17); // request sizing for cooling capacity
107 : int constexpr HeatingCapacitySizing(18); // request sizing for heating capacity
108 : int constexpr SystemCapacitySizing(21); // request sizing for system capacity
109 : int constexpr AutoCalculateSizing(25); // identifies an autocalulate input
110 :
111 : // The following parameters describe the setpoint types in TempControlType(ActualZoneNum)
112 : enum class SetptType
113 : {
114 : Invalid = -1,
115 : Uncontrolled,
116 : SingleHeat,
117 : SingleCool,
118 : SingleHeatCool,
119 : DualHeatCool,
120 : Num
121 : };
122 :
123 : static constexpr std::array<SetptType, 4> controlledSetptTypes = {
124 : SetptType::SingleHeat, SetptType::SingleCool, SetptType::SingleHeatCool, SetptType::DualHeatCool};
125 :
126 : static constexpr std::array<std::string_view, (int)SetptType::Num> setptTypeNames = {
127 : "Uncontrolled", "SingleHeating", "SingleCooling", "SingleHeatCool", "DualSetPointWithDeadBand"};
128 :
129 : enum class AirDuctType
130 : // parameters describing air duct type
131 : {
132 : Invalid = -1,
133 : Main,
134 : Cooling,
135 : Heating,
136 : Other,
137 : RAB,
138 : Num
139 : };
140 :
141 : static constexpr std::array<std::string_view, static_cast<int>(AirDuctType::Num)> airDuctTypeNames = {
142 : "Main", "Cooling", "Heating", "Other", "Return Air Bypass"};
143 :
144 : int constexpr Cooling(2);
145 : int constexpr Heating(3);
146 :
147 : enum class FanType
148 : {
149 : Invalid = -1,
150 : Constant,
151 : VAV,
152 : OnOff,
153 : Exhaust,
154 : ComponentModel,
155 : SystemModel,
156 : Num
157 : };
158 :
159 : extern const std::array<std::string_view, (int)FanType::Num> fanTypeNames;
160 : extern const std::array<std::string_view, (int)FanType::Num> fanTypeNamesUC;
161 :
162 : // Fan mode
163 :
164 : enum class FanOp
165 : {
166 : Invalid = -1,
167 : Cycling,
168 : Continuous,
169 : Num
170 : };
171 :
172 : // Fan placement
173 : enum class FanPlace
174 : {
175 : Invalid = -1,
176 : BlowThru,
177 : DrawThru,
178 : Num
179 : };
180 :
181 : static constexpr std::array<std::string_view, (int)FanPlace::Num> fanPlaceNamesUC = {"BLOWTHROUGH", "DRAWTHROUGH"};
182 :
183 : // OA Controller Heat Recovery Bypass Control Types
184 : int constexpr BypassWhenWithinEconomizerLimits(0); // heat recovery controlled by economizer limits
185 : int constexpr BypassWhenOAFlowGreaterThanMinimum(1); // heat recovery ON at minimum OA in economizer mode
186 :
187 : enum class EconomizerStagingType
188 : // OA Controller Economizer Staging
189 : {
190 : Invalid = -1,
191 : EconomizerFirst, // system air flow rate and economizer is ramped-up before using mechanical cooling
192 : InterlockedWithMechanicalCooling, // economizer operation (flow rate) depends on the cooling speed chosen by the system
193 : Num
194 : };
195 :
196 : static constexpr std::array<std::string_view, (int)EconomizerStagingType::Num> economizerStagingTypeNamesUC = {
197 : "ECONOMIZERFIRST",
198 : "INTERLOCKEDWITHMECHANICALCOOLING",
199 : };
200 : static constexpr std::array<std::string_view, (int)EconomizerStagingType::Num> economizerStagingTypeNames = {
201 : "EconomizerFirst",
202 : "InterlockedWithMechanicalCooling",
203 : };
204 :
205 : enum class UnitarySysType
206 : {
207 : Invalid = -1,
208 : Furnace_HeatOnly,
209 : Furnace_HeatCool,
210 : Unitary_HeatOnly,
211 : Unitary_HeatCool,
212 : Unitary_HeatPump_AirToAir,
213 : Unitary_HeatPump_WaterToAir,
214 : Unitary_AnyCoilType,
215 : Num
216 : };
217 :
218 : extern const std::array<std::string_view, (int)UnitarySysType::Num> unitarySysTypeNames;
219 : extern const std::array<std::string_view, (int)UnitarySysType::Num> unitarySysTypeNamesUC;
220 :
221 : enum class CoilType
222 : {
223 : Invalid = -1,
224 : DXCoolingSingleSpeed,
225 : DXHeatingEmpirical,
226 : DXCoolingTwoSpeed,
227 : DXCoolingHXAssisted,
228 : DXCoolingTwoStageWHumControl,
229 : DXHeatPumpWaterHeaterPumped,
230 : DXHeatPumpWaterHeaterWrapped,
231 : DXMultiSpeedCooling,
232 : DXMultiSpeedHeating,
233 : HeatingGasOrOtherFuel,
234 : HeatingGasMultiStage,
235 : HeatingElectric,
236 : HeatingElectricMultiStage,
237 : HeatingDesuperheater,
238 : CoolingWater,
239 : CoolingWaterDetailed,
240 : HeatingWater,
241 : HeatingSteam,
242 : WaterCoolingHXAssisted,
243 : CoolingWaterToAirHP,
244 : HeatingWaterToAirHP,
245 : CoolingWaterToAirHPSimple,
246 : HeatingWaterToAirHPSimple,
247 : VRFCooling,
248 : VRFHeating,
249 : UserDefined,
250 : DXPackagedThermalStorageCooling,
251 : CoolingWaterToAirHPVSEquationFit,
252 : HeatingWaterToAirHPVSEquationFit,
253 : CoolingAirToAirVariableSpeed,
254 : HeatingAirToAirVariableSpeed,
255 : DXHeatPumpWaterHeaterVariableSpeed,
256 : VRFFluidTCtrlCooling,
257 : VRFFluidTCtrlHeating,
258 : DXCooling,
259 : DXSubcoolReheat,
260 : DXCurveFitSpeed,
261 : Num
262 : };
263 : static constexpr std::array<std::string_view, static_cast<int>(CoilType::Num)> coilTypeNamesUC = {
264 : "COIL:COOLING:DX:SINGLESPEED",
265 : "COIL:HEATING:DX:SINGLESPEED",
266 : "COIL:COOLING:DX:TWOSPEED",
267 : "COILSYSTEM:COOLING:DX:HEATEXCHANGERASSISTED",
268 : "COIL:COOLING:DX:TWOSTAGEWITHHUMIDITYCONTROLMODE",
269 : "COIL:WATERHEATING:AIRTOWATERHEATPUMP:PUMPED",
270 : "COIL:WATERHEATING:AIRTOWATERHEATPUMP:WRAPPED",
271 : "COIL:COOLING:DX:MULTISPEED",
272 : "COIL:HEATING:DX:MULTISPEED",
273 : "COIL:HEATING:FUEL",
274 : "COIL:HEATING:GAS:MULTISTAGE",
275 : "COIL:HEATING:ELECTRIC",
276 : "COIL:HEATING:ELECTRIC:MULTISTAGE",
277 : "COIL:HEATING:DESUPERHEATER",
278 : "COIL:COOLING:WATER",
279 : "COIL:COOLING:WATER:DETAILEDGEOMETRY",
280 : "COIL:HEATING:WATER",
281 : "COIL:HEATING:STEAM",
282 : "COILSYSTEM:COOLING:WATER:HEATEXCHANGERASSISTED",
283 : "COIL:COOLING:WATERTOAIRHEATPUMP:PARAMETERESTIMATION",
284 : "COIL:HEATING:WATERTOAIRHEATPUMP:PARAMETERESTIMATION",
285 : "COIL:COOLING:WATERTOAIRHEATPUMP:EQUATIONFIT",
286 : "COIL:HEATING:WATERTOAIRHEATPUMP:EQUATIONFIT",
287 : "COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW",
288 : "COIL:HEATING:DX:VARIABLEREFRIGERANTFLOW",
289 : "COIL:USERDEFINED",
290 : "COIL:COOLING:DX:SINGLESPEED:THERMALSTORAGE",
291 : "COIL:COOLING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT",
292 : "COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT",
293 : "COIL:COOLING:DX:VARIABLESPEED",
294 : "COIL:HEATING:DX:VARIABLESPEED",
295 : "COIL:WATERHEATING:AIRTOWATERHEATPUMP:VARIABLESPEED",
296 : "COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL",
297 : "COIL:HEATING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL",
298 : "COIL:COOLING:DX",
299 : "COIL:COOLING:DX:SUBCOOLREHEAT",
300 : "COIL:COOLING:DX:CURVEFIT:SPEED"};
301 :
302 : // parameters describing coil types
303 : int constexpr NumAllCoilTypes(37);
304 : int constexpr CoilDX_CoolingSingleSpeed(1);
305 : int constexpr CoilDX_HeatingEmpirical(2);
306 : int constexpr CoilDX_CoolingTwoSpeed(3);
307 : int constexpr CoilDX_CoolingHXAssisted(4);
308 : int constexpr CoilDX_CoolingTwoStageWHumControl(5);
309 : int constexpr CoilDX_HeatPumpWaterHeaterPumped(6);
310 : int constexpr CoilDX_HeatPumpWaterHeaterWrapped(7);
311 : int constexpr CoilDX_MultiSpeedCooling(8);
312 : int constexpr CoilDX_MultiSpeedHeating(9);
313 : int constexpr Coil_HeatingGasOrOtherFuel(10);
314 : int constexpr Coil_HeatingGas_MultiStage(11);
315 : int constexpr Coil_HeatingElectric(12);
316 : int constexpr Coil_HeatingElectric_MultiStage(13);
317 : int constexpr Coil_HeatingDesuperheater(14);
318 : int constexpr Coil_CoolingWater(15);
319 : int constexpr Coil_CoolingWaterDetailed(16);
320 : int constexpr Coil_HeatingWater(17);
321 : int constexpr Coil_HeatingSteam(18);
322 : int constexpr CoilWater_CoolingHXAssisted(19);
323 : int constexpr Coil_CoolingWaterToAirHP(20);
324 : int constexpr Coil_HeatingWaterToAirHP(21);
325 : int constexpr Coil_CoolingWaterToAirHPSimple(22);
326 : int constexpr Coil_HeatingWaterToAirHPSimple(23);
327 : int constexpr CoilVRF_Cooling(24);
328 : int constexpr CoilVRF_Heating(25);
329 : int constexpr Coil_UserDefined(26);
330 : int constexpr CoilDX_PackagedThermalStorageCooling(27);
331 : int constexpr Coil_CoolingWaterToAirHPVSEquationFit(28);
332 : int constexpr Coil_HeatingWaterToAirHPVSEquationFit(29);
333 : int constexpr Coil_CoolingAirToAirVariableSpeed(30);
334 : int constexpr Coil_HeatingAirToAirVariableSpeed(31);
335 : int constexpr CoilDX_HeatPumpWaterHeaterVariableSpeed(32);
336 : int constexpr CoilVRF_FluidTCtrl_Cooling(33);
337 : int constexpr CoilVRF_FluidTCtrl_Heating(34);
338 : int constexpr CoilDX_Cooling(35);
339 : // int constexpr CoilDX_SubcoolReheat(36);
340 : int constexpr CoilDX_CurveFit_Speed(37);
341 :
342 : enum class CoilMode
343 : {
344 : Invalid = -1,
345 : Normal,
346 : Enhanced,
347 : SubcoolReheat,
348 : Num
349 : };
350 :
351 : enum class WaterFlow
352 : {
353 : Invalid = -1,
354 : Cycling,
355 : Constant,
356 : ConstantOnDemand,
357 : Num
358 : };
359 :
360 : extern const std::array<std::string_view, (int)WaterFlow::Num> waterFlowNames;
361 : extern const std::array<std::string_view, (int)WaterFlow::Num> waterFlowNamesUC;
362 :
363 : // parameters describing coil performance types
364 : int constexpr CoilPerfDX_CoolBypassEmpirical(100);
365 :
366 : // Airflow per total capacity range (Regular DX coils)
367 : Real64 constexpr MaxRatedVolFlowPerRatedTotCap1(0.00006041); // m3/s per watt = 450 cfm/ton
368 : Real64 constexpr MinRatedVolFlowPerRatedTotCap1(0.00004027); // m3/s per watt = 300 cfm/ton
369 : Real64 constexpr MaxHeatVolFlowPerRatedTotCap1(0.00008056); // m3/s per watt = 600 cfm/ton
370 : Real64 constexpr MaxCoolVolFlowPerRatedTotCap1(0.00006713); // m3/s per watt = 500 cfm/ton
371 : Real64 constexpr MinOperVolFlowPerRatedTotCap1(0.00002684); // m3/s per watt = 200 cfm/ton
372 :
373 : // 100% DOAS DX coils Airflow per total capacity ratio
374 : Real64 constexpr MaxRatedVolFlowPerRatedTotCap2(0.00003355); // m3/s per watt = 250 cfm/ton
375 : Real64 constexpr MinRatedVolFlowPerRatedTotCap2(0.00001677); // m3/s per watt = 125 cfm/ton
376 : Real64 constexpr MaxHeatVolFlowPerRatedTotCap2(0.00004026); // m3/s per watt = 300 cfm/ton
377 : Real64 constexpr MaxCoolVolFlowPerRatedTotCap2(0.00004026); // m3/s per watt = 300 cfm/ton
378 : Real64 constexpr MinOperVolFlowPerRatedTotCap2(0.00001342); // m3/s per watt = 100 cfm/ton
379 :
380 : constexpr std::array<Real64, 2> MaxRatedVolFlowPerRatedTotCap = {MaxRatedVolFlowPerRatedTotCap1, MaxRatedVolFlowPerRatedTotCap2};
381 : constexpr std::array<Real64, 2> MinRatedVolFlowPerRatedTotCap = {MinRatedVolFlowPerRatedTotCap1, MinRatedVolFlowPerRatedTotCap2};
382 : constexpr std::array<Real64, 2> MaxHeatVolFlowPerRatedTotCap = {MaxHeatVolFlowPerRatedTotCap1, MaxHeatVolFlowPerRatedTotCap2};
383 : constexpr std::array<Real64, 2> MaxCoolVolFlowPerRatedTotCap = {MaxCoolVolFlowPerRatedTotCap1, MaxCoolVolFlowPerRatedTotCap2};
384 : constexpr std::array<Real64, 2> MinOperVolFlowPerRatedTotCap = {MinOperVolFlowPerRatedTotCap1, MinOperVolFlowPerRatedTotCap2};
385 :
386 : // dx coil type (DXCT)
387 : enum class DXCoilType
388 : {
389 : Invalid = -1,
390 : Regular,
391 : DOAS,
392 : Num
393 : };
394 :
395 : enum class HXType
396 : {
397 : Invalid = -1,
398 : AirToAir_FlatPlate,
399 : AirToAir_SensAndLatent,
400 : Desiccant_Balanced,
401 : Num
402 : };
403 :
404 : extern const std::array<std::string_view, (int)HXType::Num> hxTypeNames;
405 : extern const std::array<std::string_view, (int)HXType::Num> hxTypeNamesUC;
406 :
407 : enum class MixerType
408 : {
409 : Invalid = -1,
410 : InletSide,
411 : SupplySide,
412 : Num
413 : };
414 :
415 : extern const std::array<std::string_view, (int)MixerType::Num> mixerTypeNames;
416 : extern const std::array<std::string_view, (int)MixerType::Num> mixerTypeNamesUC;
417 :
418 : extern const std::array<std::string_view, (int)MixerType::Num> mixerTypeLocNames;
419 : extern const std::array<std::string_view, (int)MixerType::Num> mixerTypeLocNamesUC;
420 :
421 : enum class OATType
422 : {
423 : Invalid = -1,
424 : WetBulb,
425 : DryBulb,
426 : Num
427 : };
428 :
429 : extern const std::array<std::string_view, (int)OATType::Num> oatTypeNames;
430 : extern const std::array<std::string_view, (int)OATType::Num> oatTypeNamesUC;
431 :
432 : // parameter concerning the amount of change in zone temperature is needed
433 : // for oscillation of zone temperature to be detected.
434 : Real64 constexpr OscillateMagnitude(0.15);
435 :
436 : int constexpr MaxSpeedLevels = 10;
437 :
438 : extern Array1D_string const cAllCoilTypes;
439 : extern Array1D_string const cCoolingCoilTypes;
440 : extern Array1D_string const cHeatingCoilTypes;
441 :
442 : struct ComponentSetPtData
443 : {
444 : // Members
445 : std::string EquipmentType;
446 : std::string EquipmentName;
447 : int NodeNumIn = 0;
448 : int NodeNumOut = 0;
449 : Real64 EquipDemand = 0.0;
450 : Real64 DesignFlowRate = 0.0;
451 : std::string HeatOrCool;
452 : int OpType = 0;
453 : };
454 :
455 : // Compressor operation
456 : enum class CompressorOp
457 : {
458 : Invalid = -1,
459 : Off, // signal DXCoil that compressor shouldn't run
460 : On, // normal compressor operation
461 : Num
462 : };
463 : } // namespace HVAC
464 :
465 : struct HVACGlobalsData : BaseGlobalStruct
466 : {
467 : // Object Data
468 : Array1D<HVAC::ComponentSetPtData> CompSetPtEquip;
469 :
470 : // For multispeed heat pump only
471 : Real64 MSHPMassFlowRateLow = 0.0; // Mass flow rate at low speed
472 : Real64 MSHPMassFlowRateHigh = 0.0; // Mass flow rate at high speed
473 : Real64 MSHPWasteHeat = 0.0; // Waste heat
474 : Real64 PreviousTimeStep = 0.0; // The time step length at the previous time step
475 : bool ShortenTimeStepSysRoomAir = false; // Logical flag that triggers shortening of system time step
476 : // For multispeed unitary systems
477 : Real64 MSUSEconoSpeedNum = 0; // Economizer speed
478 :
479 : Real64 deviationFromSetPtThresholdHtg = -0.2; // heating threshold for reporting setpoint deviation
480 : Real64 deviationFromSetPtThresholdClg = 0.2; // cooling threshold for reporting setpoint deviation
481 :
482 : bool SimAirLoopsFlag = false; // True when the air loops need to be (re)simulated
483 : bool SimElecCircuitsFlag = false; // True when electic circuits need to be (re)simulated
484 : bool SimPlantLoopsFlag = false; // True when the main plant loops need to be (re)simulated
485 : bool SimZoneEquipmentFlag = false; // True when zone equipment components need to be (re)simulated
486 : bool SimNonZoneEquipmentFlag = false; // True when non-zone equipment components need to be (re)simulated
487 : bool ZoneMassBalanceHVACReSim = false; // True when zone air mass flow balance and air loop needs (re)simulated
488 : int MinAirLoopIterationsAfterFirst = 1; // minimum number of HVAC iterations after FirstHVACIteration
489 :
490 : HVAC::DXCoilType DXCT = HVAC::DXCoilType::Regular; // dx coil type: regular DX coil ==1, 100% DOAS DX coil = 2
491 : bool FirstTimeStepSysFlag = false; // Set to true at the start of each sub-time step
492 :
493 : Real64 TimeStepSys = 0.0; // System Time Increment - the adaptive time step used by the HVAC simulation (hours)
494 : Real64 TimeStepSysSec = 0.0; // System Time Increment in seconds
495 : Real64 SysTimeElapsed = 0.0; // elapsed system time in zone timestep (hours)
496 : Real64 FracTimeStepZone = 0.0; // System time step divided by the zone time step
497 : bool ShortenTimeStepSys = false; // Logical flag that triggers shortening of system time step
498 : int NumOfSysTimeSteps = 1; // for current zone time step, number of system timesteps inside it
499 : int NumOfSysTimeStepsLastZoneTimeStep = 1; // previous zone time step, num of system timesteps inside
500 : int LimitNumSysSteps = 0;
501 :
502 : bool UseZoneTimeStepHistory = true; // triggers use of zone time step history, else system time step history, for ZTM1, ZTMx
503 : int NumPlantLoops = 0; // Number of plant loops specified in simulation
504 : int NumCondLoops = 0; // Number of condenser plant loops specified in simulation
505 : int NumElecCircuits = 0; // Number of electric circuits specified in simulation
506 : int NumGasMeters = 0; // Number of gas meters specified in simulation
507 : int NumPrimaryAirSys = 0; // Number of primary HVAC air systems
508 : Real64 OnOffFanPartLoadFraction = 1.0; // fan part-load fraction (Fan:OnOff)
509 : Real64 DXCoilTotalCapacity = 0.0; // DX coil total cooling capacity (eio report var for HPWHs)
510 : Real64 DXElecCoolingPower = 0.0; // Electric power consumed by DX cooling coil last DX simulation
511 : Real64 DXElecHeatingPower = 0.0; // Electric power consumed by DX heating coil last DX simulation
512 : Real64 ElecHeatingCoilPower = 0.0; // Electric power consumed by electric heating coil
513 : Real64 SuppHeatingCoilPower = 0.0; // Electric power consumed by electric supplemental heating coil
514 : Real64 AirToAirHXElecPower = 0.0; // Electric power consumed by Heat Exchanger:Air To Air (Generic or Flat Plate)
515 : Real64 DefrostElecPower = 0.0; // Electric power consumed by DX heating coil for defrosting (Resistive or ReverseCycle)
516 : // from last simulation in HeatRecovery.cc
517 : Real64 UnbalExhMassFlow = 0.0; // unbalanced zone exhaust from a zone equip component [kg/s]
518 : Real64 BalancedExhMassFlow = 0.0; // balanced zone exhaust (declared as so by user) [kg/s]
519 : Real64 PlenumInducedMassFlow = 0.0; // secondary air mass flow rate induced from a return plenum [kg/s]
520 : bool TurnFansOn = false; // If true overrides fan schedule and cycles fans on
521 : bool TurnFansOff = false; // If True overides fan schedule and TurnFansOn and forces fans off
522 : bool SetPointErrorFlag = false; // True if any needed setpoints not set; if true, program terminates
523 : bool DoSetPointTest = false; // True one time only for sensed node setpoint test
524 : bool NightVentOn = false; // set TRUE in SimAirServingZone if night ventilation is happening
525 :
526 : int NumTempContComps = 0;
527 : Real64 HPWHInletDBTemp = 0.0; // Used by curve objects when calculating DX coil performance for HEAT PUMP:WATER HEATER
528 : Real64 HPWHInletWBTemp = 0.0; // Used by curve objects when calculating DX coil performance for HEAT PUMP:WATER HEATER
529 : Real64 HPWHCrankcaseDBTemp = 0.0; // Used for HEAT PUMP:WATER HEATER crankcase heater ambient temperature calculations
530 : bool AirLoopInit = false; // flag for whether InitAirLoops has been called
531 : bool AirLoopsSimOnce = false; // True means that the air loops have been simulated once in this environment
532 : bool GetAirPathDataDone = false; // True means that air loops inputs have been processed
533 : bool StandardRatingsMyOneTimeFlag = true;
534 : bool StandardRatingsMyCoolOneTimeFlag = true;
535 : bool StandardRatingsMyCoolOneTimeFlag2 = true;
536 : bool StandardRatingsMyCoolOneTimeFlag3 = true;
537 : bool StandardRatingsMyHeatOneTimeFlag = true;
538 : bool StandardRatingsMyHeatOneTimeFlag2 = true;
539 :
540 801 : void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
541 : {
542 801 : }
543 :
544 801 : void init_state([[maybe_unused]] EnergyPlusData &state) override
545 : {
546 801 : }
547 :
548 0 : void clear_state() override
549 : {
550 0 : new (this) HVACGlobalsData();
551 0 : }
552 : };
553 :
554 : } // namespace EnergyPlus
555 :
556 : #endif
|