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 DataRoomAirModel_hh_INCLUDED
49 : #define DataRoomAirModel_hh_INCLUDED
50 :
51 : // ObjexxFCL Headers
52 : #include <ObjexxFCL/Array1D.hh>
53 : #include <ObjexxFCL/Array2D.hh>
54 :
55 : // EnergyPlus Headers
56 : #include <EnergyPlus/Data/BaseData.hh>
57 : #include <EnergyPlus/DataGlobals.hh>
58 : #include <EnergyPlus/EnergyPlus.hh>
59 :
60 : namespace EnergyPlus {
61 :
62 : namespace DataRoomAirModel {
63 :
64 : auto constexpr cUserDefinedControlObject("RoomAir:TemperaturePattern:UserDefined");
65 : auto constexpr cTempPatternConstGradientObject("RoomAir:TemperaturePattern:ConstantGradient");
66 : auto constexpr cTempPatternTwoGradientObject("RoomAir:TemperaturePattern:TwoGradient");
67 : auto constexpr cTempPatternNDHeightObject("RoomAir:TemperaturePattern:NondimensionalHeight");
68 : auto constexpr cTempPatternSurfMapObject("RoomAir:TemperaturePattern:SurfaceMapping");
69 :
70 : // Parameters to indicate room air model selected
71 : enum class RoomAirModel : int
72 : {
73 : Invalid = -1,
74 : UserDefined, // user defined patterns
75 : Mixing, // mixing air model
76 : Mundt, // Mundt nodal model
77 : UCSDDV, // UCSD Displacement Ventilation model
78 : UCSDCV, // UCSD-CV
79 : UCSDUFI, // UCSD UFAD interior zone model
80 : UCSDUFE, // UCSD UFAD exterior zone model
81 : AirflowNetwork, // RoomAirModel_AirflowNetwork interior zone model
82 : Num
83 : };
84 : constexpr const char *ChAirModel[] = {
85 : "*Invalid*", "UserDefined", "Mixing", "Mundt", "UCSD_DV", "UCSD_CV", "UCSD_UFI", "UCSD_UFE", "AirflowNetwork"};
86 :
87 : // Parameters to indicate air temperature coupling scheme
88 : enum class CouplingScheme
89 : {
90 : Invalid = -1,
91 : Direct,
92 : Indirect,
93 : Num
94 : };
95 :
96 : // Parameters to indicate type of air node, which is dependent on air models
97 : enum class AirNodeType
98 : {
99 : Invalid = -1,
100 : InletAir, // air node at inlet (for Mundt and Rees&Haves Models)
101 : FloorAir, // air node at floor (for Mundt and Rees&Haves Models)
102 : ControlAir, // air node at control point (for Mundt Model)
103 : CeilingAir, // air node at ceiling (for Mundt Model)
104 : MundtRoomAir, // air node for vertical walls (for Mundt Model)
105 : ReturnAir, // air node for return (for Mundt and Rees&Haves Models)
106 : AirflowNetworkRoomAir, // air node for airflow network based room air model
107 : PlumeAir, // air node for plume load (for Rees&Haves Model)
108 : RoomAir, // air node for vertical walls (for Rees&Haves Model)
109 : Num
110 : };
111 :
112 : // user-defined pattern two gradient interpolation modes
113 : enum class UserDefinedPatternMode
114 : {
115 : Invalid = -1,
116 : OutdoorDryBulb, // by outdoor air bulb.
117 : SensibleCooling, // by sensible cooling load
118 : SensibleHeating, // by sensible heating load
119 : ZoneAirTemp, // by zone air temperature
120 : DeltaOutdoorZone, // by difference between zone and outdoor
121 : Num
122 : };
123 :
124 : // user defined temperature pattern types
125 : enum class UserDefinedPatternType
126 : {
127 : Invalid = -1,
128 : ConstGradTemp, // constant gradient in vertical direction
129 : TwoGradInterp, // two gradient interpolation
130 : NonDimenHeight, // non-dimensionalized height
131 : SurfMapTemp, // arbitrary surface mappings
132 : Num
133 : };
134 :
135 : // parameters to indicate diffuser type
136 : enum class Diffuser
137 : {
138 : Invalid = -1,
139 : Swirl,
140 : VarArea,
141 : DisplVent,
142 : LinBarGrille,
143 : Custom,
144 : Num
145 : };
146 :
147 : enum class Comfort
148 : {
149 : Invalid = -1,
150 : Jet,
151 : Recirculation,
152 : Num
153 : };
154 :
155 10399 : struct AirModelData
156 : {
157 : // Members
158 : std::string AirModelName;
159 : std::string ZoneName;
160 : int ZonePtr; // Pointer to the zone number for this statement
161 : RoomAirModel AirModelType; // 1 = Mixing, 2 = Mundt, 3 = Rees and Haves,
162 : // 4 = UCSDDV, 5 = UCSDCV, -1 = user defined
163 : // 6 = UCSDUFI, 7 = UCSDUFE, 8 = AirflowNetwork
164 : CouplingScheme TempCoupleScheme; // 1 = absolute (direct),
165 : // 2 = relative air model temperature passing scheme (indirect)
166 : bool SimAirModel; // FALSE if Mixing air model is currently used and
167 : // TRUE if other air models are currently used
168 :
169 : // Default Constructor
170 771 : AirModelData() : ZonePtr(0), AirModelType(RoomAirModel::Mixing), TempCoupleScheme(CouplingScheme::Direct), SimAirModel(false)
171 : {
172 771 : }
173 : };
174 :
175 74 : struct AirNodeData
176 : {
177 : // Members
178 : std::string Name; // name
179 : std::string ZoneName;
180 : int ZonePtr; // Pointer to the zone number for this statement
181 : AirNodeType ClassType; // depending on type of model
182 : Real64 Height; // height
183 : Real64 ZoneVolumeFraction; // portion of zone air volume associated with this node
184 : Array1D_bool SurfMask; // limit of 60 surfaces at current sizing
185 : bool IsZone; // TRUE if this node is zone node
186 :
187 : // Default Constructor
188 2 : AirNodeData() : ZonePtr(0), ClassType(AirNodeType::Invalid), Height(0.0), ZoneVolumeFraction(0), IsZone(false)
189 : {
190 2 : }
191 : };
192 :
193 12 : struct DVData
194 : {
195 : // Members
196 : std::string ZoneName; // Name of zone
197 : int ZonePtr; // Pointer to the zone number for this statement
198 : int SchedGainsPtr; // Schedule for internal gain fraction to occupied zone
199 : std::string SchedGainsName; // Gains Schedule name
200 : Real64 NumPlumesPerOcc; // Effective number of plumes per occupant
201 : Real64 ThermostatHeight; // Height of thermostat/ temperature control sensor
202 : Real64 ComfortHeight; // Height at which air temperature is measured for comfort purposes
203 : Real64 TempTrigger; // Minimum temperature difference between TOC TMX for stratification
204 :
205 : // Default Constructor
206 4 : DVData() : ZonePtr(0), SchedGainsPtr(-1), NumPlumesPerOcc(1.0), ThermostatHeight(0.0), ComfortHeight(0.0), TempTrigger(0.0)
207 : {
208 4 : }
209 : };
210 :
211 6 : struct CVData
212 : {
213 : // Members
214 : std::string ZoneName; // Name of zone
215 : int ZonePtr; // Pointer to the zone number for this statement
216 : int SchedGainsPtr; // Schedule for internal gain fraction to occupied zone
217 : std::string SchedGainsName; // Gains Schedule name
218 : Comfort VforComfort; // Use Recirculation or Jet velocity and temperatures
219 : // for comfort models
220 :
221 : // Default Constructor
222 2 : CVData() : ZonePtr(-1), SchedGainsPtr(-1), VforComfort(Comfort::Invalid)
223 : {
224 2 : }
225 : };
226 :
227 : struct CVFlow
228 : {
229 : // Members
230 : int FlowFlag; // Equal to 1 if the opening has inflow, else equal to 0.
231 : Real64 Width; // Width of the opening [m]
232 : Real64 Area; // Area of the opening [m2]
233 : Real64 Fin; // Inflow volume flux through the opening [m3/s]
234 : Real64 Uin; // Inflow air velocity through the opening [m/s]
235 : Real64 Vjet; // Average maximum jet velocity for the opening [m/s]
236 : Real64 Yjet; // Y in "Y = aX + b" formula
237 : Real64 Ujet; // Volume average jet region velocity [m/s]
238 : Real64 Yrec; // Y in "Y = aX + b" formula
239 : Real64 Urec; // Area-averaged velocity in the y-z plane with maximum flow [m/s]
240 : Real64 YQrec; // Y in "Y = aX + b" formula
241 : Real64 Qrec; // Total flow rate for the recirculation regions in the plane of maximum flow [m3/s]
242 :
243 : // Default Constructor
244 7 : CVFlow()
245 7 : : FlowFlag(0), Width(0.0), Area(0.0), Fin(0.0), Uin(0.0), Vjet(0.0), Yjet(0.0), Ujet(0.0), Yrec(0.0), Urec(0.0), YQrec(0.0), Qrec(0.0)
246 : {
247 7 : }
248 : };
249 :
250 : struct CVDVParameters
251 : {
252 : // Members
253 : Real64 Width;
254 : Real64 Height;
255 : int Shadow;
256 : Real64 Zmin;
257 : Real64 Zmax;
258 :
259 : // Default Constructor
260 7 : CVDVParameters() : Width(0.0), Height(0.0), Shadow(0), Zmin(0.0), Zmax(0.0)
261 : {
262 7 : }
263 : };
264 :
265 3 : struct UFIData
266 : {
267 : // Members
268 : std::string ZoneName; // Name of zone
269 : int ZonePtr; // Pointer to the zone number for this statement
270 : int ZoneEquipPtr; // Pointer to zone equip for this UFAD zone
271 : Real64 DiffusersPerZone; // Number of diffusers in this zone
272 : Real64 PowerPerPlume; // Power in each plume [W]
273 : Real64 DiffArea; // Effective area of a diffuser [m2]
274 : Real64 DiffAngle; // angle between diffuser slots and vertical (degrees)
275 : Real64 HeatSrcHeight; // height of heat source above floor [m]
276 : Real64 ThermostatHeight; // Height of thermostat/ temperature control sensor [m]
277 : Real64 ComfortHeight; // Height at which air temperature is measured for
278 : // comfort purposes [m]
279 : Real64 TempTrigger; // Minimum temperature difference between TOC TMX
280 : // for stratification [deltaC]
281 : Diffuser DiffuserType; // 1=Swirl, 2=variable area, 3=displacement, 4=linear bar grille, 5=custom
282 : Real64 TransHeight; // user specified transition height [m]
283 : bool CalcTransHeight; // flag to calc trans height or use user specified input
284 : Real64 A_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
285 : Real64 B_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
286 : Real64 C_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
287 : Real64 D_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
288 : Real64 E_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
289 :
290 : // Default Constructor
291 1 : UFIData()
292 1 : : ZonePtr(0), ZoneEquipPtr(0), DiffusersPerZone(0.0), PowerPerPlume(0.0), DiffArea(0.0), DiffAngle(0.0), HeatSrcHeight(0.0),
293 : ThermostatHeight(0.0), ComfortHeight(0.0), TempTrigger(0.0), DiffuserType(Diffuser::Invalid), TransHeight(0.0), CalcTransHeight(false),
294 1 : A_Kc(0.0), B_Kc(0.0), C_Kc(0.0), D_Kc(0.0), E_Kc(0.0)
295 : {
296 1 : }
297 : };
298 :
299 9 : struct UFEData
300 : {
301 : // Members
302 : std::string ZoneName; // Name of zone
303 : int ZonePtr; // Pointer to the zone number for this statement
304 : int ZoneEquipPtr; // Pointer to zone equip for this UFAD zone
305 : Real64 DiffusersPerZone; // Number of diffusers in this zone
306 : Real64 PowerPerPlume; // Power in each plume [W]
307 : Real64 DiffArea; // Effective area of a diffuser [m2]
308 : Real64 DiffAngle; // angle between diffuser slots and vertical (degrees)
309 : Real64 HeatSrcHeight; // height of heat source above floor [m]
310 : Real64 ThermostatHeight; // Height of thermostat/ temperature control sensor [m]
311 : Real64 ComfortHeight; // Height at which air temperature is measured for
312 : // comfort purposes [m]
313 : Real64 TempTrigger; // Minimum temperature difference between TOC TMX
314 : // for stratification [deltaC]
315 : Diffuser DiffuserType; // 1=Swirl, 2=variable area, 3=displacement, 4=linear bar grille, 5=custom
316 : Real64 TransHeight; // user specified transition height [m]
317 : bool CalcTransHeight; // flag to calc trans height or use user specified input
318 : Real64 A_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
319 : Real64 B_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
320 : Real64 C_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
321 : Real64 D_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
322 : Real64 E_Kc; // Coefficient A in Formula Kc = A*Gamma**B + C + D*Gamma + E*Gamma**2
323 : Real64 WinWidth; // sum of widths of exterior windows in zone
324 : Real64 NumExtWin; // number of exterior windows in the zone
325 : bool ShadeDown; // signals shade up or down
326 :
327 : // Default Constructor
328 1 : UFEData()
329 1 : : ZonePtr(0), ZoneEquipPtr(0), DiffusersPerZone(0.0), PowerPerPlume(0.0), DiffArea(0.0), DiffAngle(0.0), HeatSrcHeight(0.0),
330 : ThermostatHeight(0.0), ComfortHeight(0.0), TempTrigger(0.0), DiffuserType(Diffuser::Invalid), TransHeight(0.0), CalcTransHeight(false),
331 1 : A_Kc(0.0), B_Kc(0.0), C_Kc(0.0), D_Kc(0.0), E_Kc(0.0), WinWidth(0.0), NumExtWin(0.0), ShadeDown(true)
332 : {
333 1 : }
334 : };
335 :
336 27 : struct SurfMapPattern // nested structure in RoomAirPattern
337 : {
338 : // Members
339 : // user variables
340 : Array1D_string SurfName; // user defined name
341 : Array1D<Real64> DeltaTai; // (Tai - MAT ) offset from mean air temp
342 : int NumSurfs; // number of surfaces in this pattern
343 : // calculated and from elsewhere
344 : Array1D_int SurfID; // index in HB surface structure array
345 :
346 : // Default Constructor
347 1 : SurfMapPattern() : NumSurfs(0)
348 : {
349 1 : }
350 : };
351 :
352 27 : struct ConstGradPattern // nested structure in RoomAirPattern
353 : {
354 : // Members
355 : // user variables
356 : std::string Name; // name
357 : Real64 Gradient; // value of vertical gradient [C/m]
358 :
359 : // Default Constructor
360 1 : ConstGradPattern() : Gradient(0.0)
361 : {
362 1 : }
363 : };
364 :
365 27 : struct TwoVertGradInterpolPattern // nested structure in RoomAirPattern
366 : {
367 : // Members
368 : // user variables
369 : std::string Name; // name
370 : Real64 TstatHeight; // Height of thermostat/ temperature control sensor
371 : Real64 TleavingHeight; // height of return air node where leaving zone
372 : Real64 TexhaustHeight; // height of exhaust air node where leaving zone
373 : Real64 LowGradient; // lower value of vertical gradient [C/m]
374 : Real64 HiGradient; // upper value of vertical gradient [C/m]
375 : DataRoomAirModel::UserDefinedPatternMode InterpolationMode; // control for interpolation mode
376 : Real64 UpperBoundTempScale; // temperature value for HiGradient
377 : Real64 LowerBoundTempScale; // temperature value for LowGradient
378 : Real64 UpperBoundHeatRateScale; // load value for HiGradient
379 : Real64 LowerBoundHeatRateScale; // load value for lowGradient
380 :
381 : // Default Constructor
382 1 : TwoVertGradInterpolPattern()
383 1 : : TstatHeight(0.0), TleavingHeight(0.0), TexhaustHeight(0.0), LowGradient(0.0), HiGradient(0.0),
384 : InterpolationMode(DataRoomAirModel::UserDefinedPatternMode::Invalid), UpperBoundTempScale(0.0), LowerBoundTempScale(0.0),
385 1 : UpperBoundHeatRateScale(0.0), LowerBoundHeatRateScale(0.0)
386 : {
387 1 : }
388 : };
389 :
390 27 : struct TempVsHeightPattern // to be used as nested structure in RoomAirPattern
391 : {
392 : // Members
393 : Array1D<Real64> ZetaPatrn; // non dimensional height from floor,
394 : Array1D<Real64> DeltaTaiPatrn; // Tai- MAT (TODO, check sign)
395 :
396 : // Default Constructor
397 1 : TempVsHeightPattern()
398 1 : {
399 1 : }
400 : };
401 :
402 27 : struct TemperaturePatternStruct // RoomAirPattern
403 : {
404 : // Members
405 : std::string Name; // unique identifier
406 : int PatrnID; // control ID for referencing in Schedules
407 : UserDefinedPatternType PatternMode; // Control for what type of calcs in this pattern
408 : ConstGradPattern GradPatrn; // Constant gradient pattern
409 : TwoVertGradInterpolPattern TwoGradPatrn; // Two gradient interpolation pattern
410 : TempVsHeightPattern VertPatrn; // Vertical gradient profile pattern
411 : SurfMapPattern MapPatrn; // Generic Surface map pattern
412 : Real64 DeltaTstat; // (Tstat - MAT) offset deg C
413 : Real64 DeltaTleaving; // (Tleaving - MAT) deg C
414 : Real64 DeltaTexhaust; // (Texhaust - MAT) deg C
415 :
416 : // Default Constructor
417 1 : TemperaturePatternStruct() : PatrnID(0), PatternMode(UserDefinedPatternType::Invalid), DeltaTstat(0.0), DeltaTleaving(0.0), DeltaTexhaust(0.0)
418 : {
419 1 : }
420 : };
421 :
422 831 : struct SurfaceAssocNestedStruct
423 : {
424 : // Members
425 : std::string Name; // unique identifier
426 : int SurfID; // id in HB surface structs
427 : Real64 TadjacentAir; // place to put resulting temperature value
428 : Real64 Zeta; // non-dimensional height in zone ot
429 :
430 : // Default Constructor
431 9 : SurfaceAssocNestedStruct() : SurfID(0), TadjacentAir(23.0), Zeta(0.0)
432 : {
433 9 : }
434 : };
435 :
436 23 : struct AirPatternInfobyZoneStruct // becomes AirPatternZoneInfo
437 : {
438 : // Members
439 : // user variables
440 : bool IsUsed; // .TRUE. if user-defined patterns used in zone
441 : std::string Name; // Name
442 : std::string ZoneName; // Zone name in building
443 : int ZoneID; // Index of Zone in Heat Balance
444 : std::string AvailSched; // Name of availability schedule
445 : int AvailSchedID; // index of availability schedule
446 : std::string PatternCntrlSched; // name of schedule that selects pattern
447 : int PatternSchedID; // index of pattern selecting schedule
448 : // calculated and from elsewhere
449 : Real64 ZoneHeight; // in meters, from Zone%CeilingHeight
450 : int ZoneNodeID; // index in Node array for this zone
451 : Array1D_int ExhaustAirNodeID; // indexes in Node array
452 : Real64 TairMean; // comes from MAT
453 : Real64 Tstat; // temperature for thermostat
454 : Real64 Tleaving; // temperature for return air node
455 : Real64 Texhaust; // temperature for exhaust air node
456 : Array1D<SurfaceAssocNestedStruct> Surf; // nested struct w/ surface info
457 : int totNumSurfs; // total surfs for this zone
458 : int firstSurfID; // Index of first surface
459 : // report
460 : Real64 Gradient; // result for modeled gradient if using two-gradient interpolation
461 :
462 : // Default Constructor
463 1 : AirPatternInfobyZoneStruct()
464 1 : : IsUsed(false), ZoneID(0), AvailSchedID(0), PatternSchedID(0), ZoneHeight(0.0), ZoneNodeID(0), TairMean(23.0), Tstat(23.0),
465 1 : Tleaving(23.0), Texhaust(23.0), totNumSurfs(0), firstSurfID(0), Gradient(0.0)
466 : {
467 1 : }
468 : };
469 :
470 : struct AirflowLinkagesInfoNestedStruct // becomes link
471 : {
472 : // Members
473 : // user variables
474 : int AirflowNetworkLinkSimuID; // point to this linkage in AirflowNetworkLinkSimu structure
475 : int AirflowNetworkLinkageDataID; // point to this linkage in AirflowNetworkLinkageData structure
476 : int AirflowNetworkLinkReportID; // point to this linkage in AirflowNetworkLinkReport structure
477 : Real64 MdotIn; // mass flow rate of air into control volume(neg means leaving control volume) (kg / s)
478 : Real64 TempIn; // drybulb temperature of air into control volume
479 : Real64 HumRatIn; // humidity ratio of air into control volume
480 :
481 : // Default Constructor
482 6 : AirflowLinkagesInfoNestedStruct()
483 6 : : AirflowNetworkLinkSimuID(0), AirflowNetworkLinkageDataID(0), AirflowNetworkLinkReportID(0), MdotIn(0.0), TempIn(0.0), HumRatIn(0.0)
484 : {
485 6 : }
486 : };
487 :
488 42 : struct RoomAirflowNetworkNodeInternalGainsStruct // becomes IntGain
489 : {
490 : // Members
491 : // user variables
492 : DataHeatBalance::IntGainType Type; // Internal type
493 : std::string Name; // Intenral gain name
494 : bool UseRoomAirModelTempForGains; // TRUE if user inputs temp for gains
495 : bool FractionCheck; // TRUE if a fraction of internal gain for each object is checked
496 :
497 : // Default Constructor
498 6 : RoomAirflowNetworkNodeInternalGainsStruct()
499 6 : : Type(DataHeatBalance::IntGainType::Invalid), UseRoomAirModelTempForGains(false), FractionCheck(false)
500 : {
501 6 : }
502 : };
503 :
504 18 : struct RoomAirflowNetworkHVACStruct // becomes HVAC
505 : {
506 : // Members
507 : // user variables
508 : std::string Name; // HVAC system name
509 : std::string ObjectTypeName; // HVAC object type name
510 : std::string SupplyNodeName; // HVAC system supply node name
511 : std::string ReturnNodeName; // HVAC system return node name
512 : int TypeOfNum; // HVAC type num
513 : Real64 SupplyFraction; // Supply flow fraction
514 : Real64 ReturnFraction; // Return flow fraction
515 : int EquipConfigIndex; // HVAC equipment configuration index
516 : int SupNodeNum; // HVAC supply node number
517 : int RetNodeNum; // HVAC return node number
518 : int CompIndex; // Component index
519 :
520 : // Default Constructor
521 6 : RoomAirflowNetworkHVACStruct()
522 6 : : TypeOfNum(0), // HVAC type num
523 : SupplyFraction(0), // Supply flow fraction
524 : ReturnFraction(0), // Return flow fraction
525 : EquipConfigIndex(0), // HVAC equipment configuration index
526 : SupNodeNum(0), // HVAC supply node number
527 : RetNodeNum(0), // HVAC return node number
528 6 : CompIndex(0) // Component index
529 : {
530 6 : }
531 : };
532 :
533 13 : struct RoomAirflowNetworkAirNodeNestedStruct // becomes Node
534 : {
535 : // Members
536 : // user variables
537 : std::string Name; // name of the node itself
538 : Real64 ZoneVolumeFraction; // Zone volume fraction applied to this specific node
539 : std::string NodeSurfListName; // name of nodes' adjacent surface list
540 : bool HasSurfacesAssigned; // True if this node has surfaces assigned
541 : Array1D<bool> SurfMask; // Sized to num of surfs in Zone, true if surface is associated with this node
542 : std::string NodeIntGainsListName; // name of node's internal gains list
543 : bool HasIntGainsAssigned; // True if this node has internal gain assigned
544 : int NumIntGains; // Number of matching internal gain objects for all spaces in the zone
545 : Array1D<int> intGainsDeviceSpaces; // index pointers to space struct
546 : Array1D<int> IntGainsDeviceIndices; // index pointers to internal gains struct
547 : Array1D<Real64> IntGainsFractions; // gain fractions to this node
548 : Array1D<RoomAirflowNetworkNodeInternalGainsStruct> IntGain; // Internal gain struct
549 : std::string NodeHVACListName; // name of node's HVAC list
550 : bool HasHVACAssigned; // True if HVAC systems are assigned to this node
551 : int NumHVACs; // Number of HVAC systems
552 : Array1D<RoomAirflowNetworkHVACStruct> HVAC; // HVAC struct
553 : int AirflowNetworkNodeID; // pointer to AirflowNetworkNodeData structure
554 : int NumOfAirflowLinks; // Number of intra zone links
555 : Array1D<AirflowLinkagesInfoNestedStruct> Link; // Linkage struct
556 : Real64 AirVolume; // air volume in control volume associated with this node(m3 / s)
557 : Real64 RhoAir; // current density of air for nodal control volume
558 : Real64 CpAir; // current heat capacity of air for nodal control volume
559 :
560 : Real64 AirTemp; // node air temperature
561 : Real64 AirTempX1; // node air temperature at t minus 1 zone timestep
562 : Real64 AirTempX2; // node air temperature at t minus 2 zone timestep
563 : Real64 AirTempX3; // node air temperature at t minus 3 zone timestep
564 : Real64 AirTempX4; // node air temperature at t minus 4 zone timestep
565 : Real64 AirTempDSX1; // node air temperature at t minus 1 system timestep
566 : Real64 AirTempDSX2; // node air temperature at t minus 2 system timestep
567 : Real64 AirTempDSX3; // node air temperature at t minus 3 system timestep
568 : Real64 AirTempDSX4; // node air temperature at t minus 4 system timestep
569 : Real64 AirTempT1; // node air temperature at the previous time step used in Exact and Euler method
570 : Real64 AirTempTMX; // temporary node air temperature to test convergence used in Exact and Euler method
571 : Real64 AirTempTM2; // node air temperature at time step t-2 used in Exact and Euler method
572 :
573 : Real64 HumRat; // node air humidity ratio
574 : Real64 HumRatX1; // node air humidity ratio at t minus 1 zone timestep
575 : Real64 HumRatX2; // node air humidity ratio at t minus 2 zone timestep
576 : Real64 HumRatX3; // node air humidity ratio at t minus 3 zone timestep
577 : Real64 HumRatX4; // node air humidity ratio at t minus 4 zone timestep
578 : Real64 HumRatDSX1; // node air humidity ratio at t minus 1 system timestep
579 : Real64 HumRatDSX2; // node air humidity ratio at t minus 2 system timestep
580 : Real64 HumRatDSX3; // node air humidity ratio at t minus 3 system timestep
581 : Real64 HumRatDSX4; // node air humidity ratio at t minus 4 system timestep
582 : Real64 HumRatW1; // node air humidity ratio at the previous time step used in Exact and Euler method
583 : Real64 HumRatWMX; // temporary node air humidity ratio to test convergence used in Exact and Euler method
584 : Real64 HumRatWM2; // node air humidity ratio at time step t-2 used in Exact and Euler method
585 :
586 : Real64 RelHumidity; // node air relative humidity
587 :
588 : // sensible heat balance terms for node
589 : Real64 SumIntSensibleGain; // rate of heat gain from internal sensible gains(after fraction)
590 : Real64 SumHA; // sum of Hc * Area for surfaces associated with this node(surface convection sensible gain term)
591 : Real64 SumHATsurf; // sum of Hc * Area * Temp for surfaces associated with this node for convective heat transfer
592 : Real64 SumHATref; // sum of Hc * Area * Temp for surfaces associated with this node for radiation exchange
593 : Real64 SumLinkMCp; // sum of mdor*Cp for incoming airflows for this node derived from the AirflowNetwork model
594 : Real64 SumLinkMCpT; // sum of mdor*Cp*T for incoming airflows and source temperature for this node derived from the AirflowNetwork model
595 : Real64 SumSysMCp; // sum of mdor*Cp for incoming supply airflows for this node
596 : Real64 SumSysMCpT; // sum of mdor*Cp*T for incoming supply airflows and temperature for this node
597 : Real64 SumSysM; // sum of mdot for incoming supply airflows for this node
598 : Real64 SumSysMW; // sum of mdot*W for incoming supply airflows and temperature for this node
599 : Real64 NonAirSystemResponse; // sum of convective system load
600 : Real64 SysDepZoneLoadsLagged; // sum of system lagged load
601 : Real64 SysDepZoneLoadsLaggedOld; // sum of system lagged load
602 : Real64 AirCap; // Air storage term for energy balalce at each node
603 : Real64 AirHumRat; // Air storage term for moisture balalce at each node
604 : // latent moisture balance terms for node
605 : Real64 SumIntLatentGain; // rate of heat gain form internal latent gains(after fraction)
606 : Real64 SumHmAW; // sum of AREA*Moist CONVECTION COEFF*INSIDE Humidity Ratio
607 : Real64 SumHmARa; // SUM OF ZONE AREA*Moist CONVECTION COEFF*Rho Air
608 : Real64 SumHmARaW; // SUM OF ZONE AREA*Moist CONVECTION COEFF*Rho Air* Inside Humidity Ratio
609 : Real64 SumLinkM; // sum of mdor for incoming airflows for this node derived from the AirflowNetwork model
610 : Real64 SumLinkMW; // sum of mdor*Cp*T for incoming airflows and source humidity ratio for this node derived from the AirflowNetwork model
611 :
612 : // Default Constructor
613 1 : RoomAirflowNetworkAirNodeNestedStruct()
614 1 : : ZoneVolumeFraction(0.0), HasSurfacesAssigned(false), HasIntGainsAssigned(false), NumIntGains(0), HasHVACAssigned(false), NumHVACs(0),
615 : AirflowNetworkNodeID(0), // pointer to AirflowNetworkNodeData structure
616 : NumOfAirflowLinks(0), AirVolume(0.0), // air volume in control volume associated with this node(m3 / s)
617 : RhoAir(0.0), // current density of air for nodal control volume
618 : CpAir(0.0), // current heat capacity of air for nodal control volume
619 : AirTemp(0.0), // node air temperature
620 : AirTempX1(0.0), // node air temperature at t minus 1 zone timestep
621 : AirTempX2(0.0), // node air temperature at t minus 2 zone timestep
622 : AirTempX3(0.0), // node air temperature at t minus 3 zone timestep
623 : AirTempX4(0.0), // node air temperature at t minus 4 zone timestep
624 : AirTempDSX1(0.0), // node air temperature at t minus 1 system timestep
625 : AirTempDSX2(0.0), // node air temperature at t minus 2 system timestep
626 : AirTempDSX3(0.0), // node air temperature at t minus 3 system timestep
627 : AirTempDSX4(0.0), // node air temperature at t minus 4 system timestep
628 : AirTempT1(0.0), // node air temperature at the previous time step used in Exact and Euler method
629 : AirTempTMX(0.0), // temporary node air temperature to test convergence used in Exact and Euler method
630 : AirTempTM2(0.0), // node air temperature at time step t-2 used in Exact and Euler method
631 : HumRat(0.0), // node air humidity ratio
632 : HumRatX1(0.0), // node air humidity ratio at t minus 1 zone timestep
633 : HumRatX2(0.0), // node air humidity ratio at t minus 2 zone timestep
634 : HumRatX3(0.0), // node air humidity ratio at t minus 3 zone timestep
635 : HumRatX4(0.0), // node air humidity ratio at t minus 4 zone timestep
636 : HumRatDSX1(0.0), // node air humidity ratio at t minus 1 system timestep
637 : HumRatDSX2(0.0), // node air humidity ratio at t minus 2 system timestep
638 : HumRatDSX3(0.0), // node air humidity ratio at t minus 3 system timestep
639 : HumRatDSX4(0.0), // node air humidity ratio at t minus 4 system timestep
640 : HumRatW1(0.0), // node air humidity ratio at the previous time step used in Exact and Euler method
641 : HumRatWMX(0.0), // temporary node air humidity ratio to test convergence used in Exact and Euler method
642 : HumRatWM2(0.0), // node air humidity ratio at time step t-2 used in Exact and Euler method
643 : RelHumidity(0.0), // node air relative humidity
644 : // sensible heat balance terms for node
645 : SumIntSensibleGain(0.0), // rate of heat gain from internal sensible gains(after fraction)
646 : SumHA(0.0), // sum of Hc * Area for surfaces associated with this node(surface convection sensible gain term)
647 : SumHATsurf(0.0), SumHATref(0.0), // sum of Hc * Area * Temp for surfaces associated with this node
648 : SumLinkMCp(0.0), SumLinkMCpT(0.0), SumSysMCp(0.0), SumSysMCpT(0.0), SumSysM(0.0), SumSysMW(0.0), NonAirSystemResponse(0.0),
649 : SysDepZoneLoadsLagged(0.0), SysDepZoneLoadsLaggedOld(0.0), AirCap(0.0), AirHumRat(0.0),
650 : // latent moisture balance terms for node
651 : SumIntLatentGain(0.0), // rate of heat gain form internal latent gains(after fraction)
652 : SumHmAW(0.0), // sum of AREA*Moist CONVECTION COEFF*INSIDE Humidity Ratio
653 : SumHmARa(0.0), // SUM OF ZONE AREA*Moist CONVECTION COEFF*Rho Air
654 : SumHmARaW(0.0), // SUM OF ZONE AREA*Moist CONVECTION COEFF*Rho Air* Inside Humidity Ratio
655 1 : SumLinkM(0.0), SumLinkMW(0.0)
656 : {
657 1 : }
658 : };
659 :
660 11 : struct RoomAirflowNetworkInfoByZoneStruct // becomes RoomAirflowNetworkZoneInfo
661 : {
662 : // Members
663 : // user variables
664 : bool IsUsed; // true. if RoomAirflowNetwork model used in zone
665 : std::string Name; // Name
666 : std::string ZoneName; // Zone name in building
667 : int ZoneID; // Index of Zone in Heat Balance
668 : int ActualZoneID; // Index of controlled zones in ZoneCOnfigure
669 : std::string AvailSched; // Name of availability schedule
670 : int AvailSchedID; // index of availability schedule
671 : int ControlAirNodeID; // index of roomair node that is HVAC control sensor location
672 : int NumOfAirNodes; // Number of air nodes
673 : Array1D<RoomAirflowNetworkAirNodeNestedStruct> Node; // Node struct
674 : int ZoneNodeID; // index in system Node array for this zone
675 : Real64 TairMean; // comes from MAT
676 : Real64 Tstat; // temperature for thermostat
677 : Real64 Tleaving; // temperature for return air node
678 : Real64 Texhaust; // temperature for exhaust air node
679 : int totNumSurfs; // total surfs for this zone
680 : int firstSurfID; // Index of first surface
681 : int RAFNNum; // RAFN number
682 :
683 : // Default Constructor
684 1 : RoomAirflowNetworkInfoByZoneStruct()
685 1 : : IsUsed(false), // true. if RoomAirflowNetwork model used in zone
686 : ZoneID(0), // Index of Zone in Heat Balance
687 : ActualZoneID(0), // Index of controlled zones in ZoneCOnfigure
688 : AvailSchedID(0), // index of availability schedule
689 : ControlAirNodeID(0), // index of roomair node that is HVAC control sensor location
690 : NumOfAirNodes(0), // Number of air nodes
691 : ZoneNodeID(0), // index in system Node array for this zone
692 : TairMean(23.0), // comes from MAT
693 : Tstat(23.0), // temperature for thermostat
694 : Tleaving(23.0), // temperature for return air node
695 : Texhaust(23.0), // temperature for exhaust air node
696 : totNumSurfs(0), // total surfs for this zone
697 : firstSurfID(0), // Index of first surface
698 1 : RAFNNum(0) // RAFN number
699 : {
700 1 : }
701 : };
702 :
703 : } // namespace DataRoomAirModel
704 :
705 1542 : struct RoomAirModelData : BaseGlobalStruct
706 : {
707 : bool anyNonMixingRoomAirModel = false; // True if any zone RoomAirModelType is not Mixing
708 : int TotNumOfAirNodes = 0;
709 : int TotNumOfRoomAFNNodes = 0;
710 : Array1D_int TotNumOfZoneAirNodes;
711 : Array1D<Real64> ConvectiveFloorSplit;
712 : Array1D<Real64> InfiltratFloorSplit;
713 : // UCSD
714 : int TotUCSDDV = 0; // Total number of UCSDDV zones
715 : Array1D<Real64> DVHcIn;
716 : Array1D_bool IsZoneDV; // Is the air model for the zone UCSDDV?
717 : Array1D<Real64> ZTOC; // Temperature of occupied (lower) zone
718 : Array1D<Real64> AvgTempGrad; // vertical Average Temperature Gradient in the room
719 : Array1D<Real64> ZTMX; // Temperature of the mixing(upper) layer
720 : Array1D<Real64> MaxTempGrad; // maximum Average Temperature Gradient in the room
721 : Array1D<Real64> HVACAirTemp; // HVAC system temperature (DEG C)
722 : Array1D<Real64> HVACMassFlow; // HVAC system mass flow rate (KG/S)
723 : Array1D<Real64> ZTFloor;
724 : Array1D<Real64> HeightTransition;
725 : Array1D<Real64> FracMinFlow;
726 : Array1D_int ZoneDVMixedFlag;
727 : Array1D<Real64> ZoneDVMixedFlagRep;
728 : Array1D_bool ZoneAirSystemON;
729 : Array1D<Real64> TCMF; // comfort temperature
730 : Array1D<Real64> ZoneCeilingHeight;
731 : Array1D<Real64> MATFloor; // [C] floor level mean air temp
732 : Array1D<Real64> XMATFloor; // [C] floor level mean air temp at t minus 1 zone time step
733 : Array1D<Real64> XM2TFloor; // [C] floor level mean air temp at t minus 2 zone time step
734 : Array1D<Real64> XM3TFloor; // [C] floor level mean air temp at t minus 3 zone time step
735 : Array1D<Real64> XM4TFloor; // [C] floor level mean air temp at t minus 4 zone time step
736 : Array1D<Real64> DSXMATFloor; // [C] floor level mean air temp at t minus 1 system time step
737 : Array1D<Real64> DSXM2TFloor; // [C] floor level mean air temp at t minus 2 system time step
738 : Array1D<Real64> DSXM3TFloor; // [C] floor level mean air temp at t minus 3 system time step
739 : Array1D<Real64> DSXM4TFloor; // [C] floor level mean air temp at t minus 4 system time step
740 : Array1D<Real64> MATOC; // [C] occupied mean air temp
741 : Array1D<Real64> XMATOC; // [C] occupied mean air temp at t minus 1 zone time step
742 : Array1D<Real64> XM2TOC; // [C] occupied mean air temp at t minus 2 zone time step
743 : Array1D<Real64> XM3TOC; // [C] occupied mean air temp at t minus 3 zone time step
744 : Array1D<Real64> XM4TOC; // [C] occupied mean air temp at t minus 4 zone time step
745 : Array1D<Real64> DSXMATOC; // [C] occupied mean air temp at t minus 1 system time step
746 : Array1D<Real64> DSXM2TOC; // [C] occupied mean air temp at t minus 2 system time step
747 : Array1D<Real64> DSXM3TOC; // [C] occupied mean air temp at t minus 3 system time step
748 : Array1D<Real64> DSXM4TOC; // [C] occupied mean air temp at t minus 4 system time step
749 : Array1D<Real64> MATMX; // [C] mixed (upper) mean air temp
750 : Array1D<Real64> XMATMX; // [C] mixed (upper) mean air temp at t minus 1 zone time step
751 : Array1D<Real64> XM2TMX; // [C] mixed (upper) mean air temp at t minus 2 zone time step
752 : Array1D<Real64> XM3TMX; // [C] mixed (upper) mean air temp at t minus 3 zone time step
753 : Array1D<Real64> XM4TMX; // [C] mixed (upper) mean air temp at t minus 4 zone time step
754 : Array1D<Real64> DSXMATMX; // [C] mixed mean air temp at t minus 1 system time step
755 : Array1D<Real64> DSXM2TMX; // [C] mixed mean air temp at t minus 2 system time step
756 : Array1D<Real64> DSXM3TMX; // [C] mixed mean air temp at t minus 3 system time step
757 : Array1D<Real64> DSXM4TMX; // [C] mixed mean air temp at t minus 4 system time step
758 : Array1D<Real64> ZTM1Floor; // [C] difference equation's Floor air temp at t minus 1
759 : Array1D<Real64> ZTM2Floor; // [C] difference equation's Floor air temp at t minus 2
760 : Array1D<Real64> ZTM3Floor; // [C] difference equation's Floor air temp at t minus 3
761 : Array1D<Real64> ZTM1OC; // [C] difference equation's Occupied air temp at t minus 1
762 : Array1D<Real64> ZTM2OC; // [C] difference equation's Occupied air temp at t minus 2
763 : Array1D<Real64> ZTM3OC; // [C] difference equation's Occupied air temp at t minus 3
764 : Array1D<Real64> ZTM1MX; // [C] difference equation's Mixed air temp at t minus 1
765 : Array1D<Real64> ZTM2MX; // [C] difference equation's Mixed air temp at t minus 1
766 : Array1D<Real64> ZTM3MX; // [C] difference equation's Mixed air temp at t minus 1
767 : Array1D<Real64> AIRRATFloor;
768 : Array1D<Real64> AIRRATOC;
769 : Array1D<Real64> AIRRATMX;
770 : // Euler and Exact solution algorithms
771 : Array1D<Real64> Zone1Floor; // [C] difference equation's Floor air temp at previous dt
772 : Array1D<Real64> ZoneMXFloor; // [C] difference equation's Floor air temp at t minus 1
773 : Array1D<Real64> ZoneM2Floor; // [C] difference equation's Floor air temp at t minus 2
774 : Array1D<Real64> Zone1OC; // [C] difference equation's Occupied air temp at previous dt
775 : Array1D<Real64> ZoneMXOC; // [C] difference equation's Occupied air temp at t minus 1
776 : Array1D<Real64> ZoneM2OC; // [C] difference equation's Occupied air temp at t minus 2
777 : Array1D<Real64> Zone1MX; // [C] difference equation's Mixed air temp at previous dt
778 : Array1D<Real64> ZoneMXMX; // [C] difference equation's Mixed air temp at t minus 1
779 : Array1D<Real64> ZoneM2MX; // [C] difference equation's Mixed air temp at t minus 2
780 : // UCSD-CV
781 : int TotUCSDCV = 0; // Total number of UCSDDV zones
782 : int CVNumAirflowNetworkSurfaces = 0; // total number of AirFlowNetwork surfaces.
783 : Array1D<Real64> CVHcIn;
784 : Array1D_bool IsZoneCV; // Is the air model for the zone UCSDDV?
785 : Array1D<Real64> ZoneCVisMixing; // Zone set to CV is actually using a mixing model
786 : Array1D<Real64> ZTJET; // Jet Temperatures
787 : Array1D<Real64> ZTREC; // Recirculation Temperatures
788 : Array1D<Real64> RoomOutflowTemp; // Temperature of air flowing out of the room
789 : Array1D<Real64> JetRecAreaRatio;
790 : Array1D<Real64> Urec; // Recirculation region average velocity
791 : Array1D<Real64> Ujet; // Jet region average velocity
792 : Array1D<Real64> Qrec; // Recirculation zone total flow rate
793 : Array1D<Real64> Qtot; // Total volumetric inflow rate through all active aperatures [m3/s]
794 : Array1D<Real64> RecInflowRatio; // Ratio of the recirculation volumetric flow rate to the total inflow flow rate []
795 : Array1D<Real64> Uhc;
796 : Array1D<Real64> Ain; // Inflow aperture area
797 : Array1D<Real64> Droom; // CV Zone average length
798 : Array1D<Real64> Dstar; // CV Zone average length, wind direction corrected
799 : Array1D<Real64> Tin; // Inflow air temperature
800 : Array1D<Real64> TotArea; // Sum of the areas of all apertures in the zone
801 : Array2D_int AirflowNetworkSurfaceUCSDCV; // table for AirflowNetwork surfaces organization
802 : // Interzone surfaces counts twice.
803 : Array1D<Real64> Rfr; // Ration between inflow and recirculation air flows
804 : Array1D<Real64> ZoneCVhasREC; // Airflow pattern is C = 0, CR(1)
805 : bool UCSDModelUsed = false;
806 : bool MundtModelUsed = false;
807 : // UCSD-UF
808 : int TotUCSDUI = 0; // total number of UCSDUI zones
809 : int TotUCSDUE = 0; // total number of UCSDUE zones
810 : Array1D_bool IsZoneUI; // controls program flow, for interior or exterior UFAD model
811 : Array1D_int ZoneUFPtr;
812 : Array1D<Real64> UFHcIn;
813 : Array1D_int ZoneUFMixedFlag;
814 : Array1D<Real64> ZoneUFMixedFlagRep;
815 : Array1D<Real64> ZoneUFGamma;
816 : Array1D<Real64> ZoneUFPowInPlumes; // [W]
817 : Array1D<Real64> ZoneUFPowInPlumesfromWindows; // [W]
818 : Array1D<Real64> Phi; // dimensionless measure of occupied subzone temperature
819 : // END UCSD
820 : // Begin NREL User-defined patterns
821 : int numTempDistContrldZones = 0; // count of zones with user-defined patterns
822 : int NumAirTempPatterns = 0; // count of all different patterns in input file
823 : int NumConstantGradient = 0; // count of constant gradient patterns in input
824 : int NumTwoGradientInterp = 0; // count of two gradient interp patterns in input
825 : int NumNonDimensionalHeight = 0; // count of ND height profile patterns in input
826 : int NumSurfaceMapping = 0; // count of generic surface map patterns in input
827 : bool UserDefinedUsed = false; // true if user-defined model used anywhere
828 : // End User-defined patterns
829 :
830 : // RoomAirflowNetwork
831 : int NumOfRoomAirflowNetControl = 0; // count of RoomAirSettings:AirflowNetwork
832 :
833 : // Object Data
834 : Array1D<DataRoomAirModel::AirModelData> AirModel;
835 : Array1D<DataRoomAirModel::AirNodeData> AirNode;
836 : Array1D<DataRoomAirModel::DVData> ZoneUCSDDV; // UCSD
837 : Array1D<DataRoomAirModel::CVData> ZoneUCSDCV;
838 : Array1D<DataRoomAirModel::UFIData> ZoneUCSDUI;
839 : Array1D<DataRoomAirModel::UFEData> ZoneUCSDUE;
840 : Array2D<DataRoomAirModel::CVFlow> CVJetRecFlows; // Jet and recirculation zone flows and properties
841 : Array1D<DataRoomAirModel::CVDVParameters> SurfParametersCVDV; // Surface parameters
842 : Array1D<DataRoomAirModel::TemperaturePatternStruct> RoomAirPattern; // user defined patterns ,various types
843 : Array1D<DataRoomAirModel::AirPatternInfobyZoneStruct> AirPatternZoneInfo; // added zone information for user defined patterns
844 : Array1D<DataRoomAirModel::RoomAirflowNetworkInfoByZoneStruct> RoomAirflowNetworkZoneInfo; // added zone info
845 :
846 0 : void clear_state() override
847 : {
848 0 : anyNonMixingRoomAirModel = false;
849 0 : TotNumOfAirNodes = 0;
850 0 : TotNumOfRoomAFNNodes = 0;
851 0 : TotNumOfZoneAirNodes.clear();
852 0 : ConvectiveFloorSplit.clear();
853 0 : InfiltratFloorSplit.clear();
854 : // UCSD
855 0 : TotUCSDDV = 0; // Total number of UCSDDV zones
856 0 : DVHcIn.clear();
857 0 : IsZoneDV.clear(); // Is the air model for the zone UCSDDV?
858 0 : ZTOC.clear(); // Temperature of occupied (lower) zone
859 0 : AvgTempGrad.clear(); // vertical Average Temperature Gradient in the room
860 0 : ZTMX.clear(); // Temperature of the mixing(upper) layer
861 0 : MaxTempGrad.clear(); // maximum Average Temperature Gradient in the room
862 0 : HVACAirTemp.clear(); // HVAC system temperature (DEG C)
863 0 : HVACMassFlow.clear(); // HVAC system mass flow rate (KG/S)
864 0 : ZTFloor.clear();
865 0 : HeightTransition.clear();
866 0 : FracMinFlow.clear();
867 0 : ZoneDVMixedFlag.clear();
868 0 : ZoneDVMixedFlagRep.clear();
869 0 : ZoneAirSystemON.clear();
870 0 : TCMF.clear(); // comfort temperature
871 0 : ZoneCeilingHeight.clear();
872 0 : MATFloor.clear(); // [C] floor level mean air temp
873 0 : XMATFloor.clear(); // [C] floor level mean air temp at t minus 1 zone time step
874 0 : XM2TFloor.clear(); // [C] floor level mean air temp at t minus 2 zone time step
875 0 : XM3TFloor.clear(); // [C] floor level mean air temp at t minus 3 zone time step
876 0 : XM4TFloor.clear(); // [C] floor level mean air temp at t minus 4 zone time step
877 0 : DSXMATFloor.clear(); // [C] floor level mean air temp at t minus 1 system time step
878 0 : DSXM2TFloor.clear(); // [C] floor level mean air temp at t minus 2 system time step
879 0 : DSXM3TFloor.clear(); // [C] floor level mean air temp at t minus 3 system time step
880 0 : DSXM4TFloor.clear(); // [C] floor level mean air temp at t minus 4 system time step
881 0 : MATOC.clear(); // [C] occupied mean air temp
882 0 : XMATOC.clear(); // [C] occupied mean air temp at t minus 1 zone time step
883 0 : XM2TOC.clear(); // [C] occupied mean air temp at t minus 2 zone time step
884 0 : XM3TOC.clear(); // [C] occupied mean air temp at t minus 3 zone time step
885 0 : XM4TOC.clear(); // [C] occupied mean air temp at t minus 4 zone time step
886 0 : DSXMATOC.clear(); // [C] occupied mean air temp at t minus 1 system time step
887 0 : DSXM2TOC.clear(); // [C] occupied mean air temp at t minus 2 system time step
888 0 : DSXM3TOC.clear(); // [C] occupied mean air temp at t minus 3 system time step
889 0 : DSXM4TOC.clear(); // [C] occupied mean air temp at t minus 4 system time step
890 0 : MATMX.clear(); // [C] mixed (upper) mean air temp
891 0 : XMATMX.clear(); // [C] mixed (upper) mean air temp at t minus 1 zone time step
892 0 : XM2TMX.clear(); // [C] mixed (upper) mean air temp at t minus 2 zone time step
893 0 : XM3TMX.clear(); // [C] mixed (upper) mean air temp at t minus 3 zone time step
894 0 : XM4TMX.clear(); // [C] mixed (upper) mean air temp at t minus 4 zone time step
895 0 : DSXMATMX.clear(); // [C] mixed mean air temp at t minus 1 system time step
896 0 : DSXM2TMX.clear(); // [C] mixed mean air temp at t minus 2 system time step
897 0 : DSXM3TMX.clear(); // [C] mixed mean air temp at t minus 3 system time step
898 0 : DSXM4TMX.clear(); // [C] mixed mean air temp at t minus 4 system time step
899 0 : ZTM1Floor.clear(); // [C] difference equation's Floor air temp at t minus 1
900 0 : ZTM2Floor.clear(); // [C] difference equation's Floor air temp at t minus 2
901 0 : ZTM3Floor.clear(); // [C] difference equation's Floor air temp at t minus 3
902 0 : ZTM1OC.clear(); // [C] difference equation's Occupied air temp at t minus 1
903 0 : ZTM2OC.clear(); // [C] difference equation's Occupied air temp at t minus 2
904 0 : ZTM3OC.clear(); // [C] difference equation's Occupied air temp at t minus 3
905 0 : ZTM1MX.clear(); // [C] difference equation's Mixed air temp at t minus 1
906 0 : ZTM2MX.clear(); // [C] difference equation's Mixed air temp at t minus 1
907 0 : ZTM3MX.clear(); // [C] difference equation's Mixed air temp at t minus 1
908 0 : AIRRATFloor.clear();
909 0 : AIRRATOC.clear();
910 0 : AIRRATMX.clear();
911 : // Euler and Exact solution algorithms
912 0 : Zone1Floor.clear(); // [C] difference equation's Floor air temp at previous dt
913 0 : ZoneMXFloor.clear(); // [C] difference equation's Floor air temp at t minus 1
914 0 : ZoneM2Floor.clear(); // [C] difference equation's Floor air temp at t minus 2
915 0 : Zone1OC.clear(); // [C] difference equation's Occupied air temp at previous dt
916 0 : ZoneMXOC.clear(); // [C] difference equation's Occupied air temp at t minus 1
917 0 : ZoneM2OC.clear(); // [C] difference equation's Occupied air temp at t minus 2
918 0 : Zone1MX.clear(); // [C] difference equation's Mixed air temp at previous dt
919 0 : ZoneMXMX.clear(); // [C] difference equation's Mixed air temp at t minus 1
920 0 : ZoneM2MX.clear(); // [C] difference equation's Mixed air temp at t minus 2
921 : // UCSD-CV
922 0 : TotUCSDCV = 0; // Total number of UCSDDV zones
923 0 : CVNumAirflowNetworkSurfaces = 0; // total number of AirFlowNetwork surfaces.
924 0 : CVHcIn.clear();
925 0 : IsZoneCV.clear(); // Is the air model for the zone UCSDDV?
926 0 : ZoneCVisMixing.clear(); // Zone set to CV is actually using a mixing model
927 0 : ZTJET.clear(); // Jet Temperatures
928 0 : ZTREC.clear(); // Recirculation Temperatures
929 0 : RoomOutflowTemp.clear(); // Temperature of air flowing out of the room
930 0 : JetRecAreaRatio.clear();
931 0 : Urec.clear(); // Recirculation region average velocity
932 0 : Ujet.clear(); // Jet region average velocity
933 0 : Qrec.clear(); // Recirculation zone total flow rate
934 0 : Qtot.clear(); // Total volumetric inflow rate through all active aperatures [m3/s]
935 0 : RecInflowRatio.clear(); // Ratio of the recirculation volumetric flow rate to the total inflow flow rate []
936 0 : Uhc.clear();
937 0 : Ain.clear(); // Inflow aperture area
938 0 : Droom.clear(); // CV Zone average length
939 0 : Dstar.clear(); // CV Zone average length, wind direction corrected
940 0 : Tin.clear(); // Inflow air temperature
941 0 : TotArea.clear(); // Sum of the areas of all apertures in the zone
942 0 : AirflowNetworkSurfaceUCSDCV.clear(); // table for AirflowNetwork surfaces organization
943 : // Interzone surfaces counts twice.
944 0 : Rfr.clear(); // Ration between inflow and recirculation air flows
945 0 : ZoneCVhasREC.clear(); // Airflow pattern is C = 0, CR(1)
946 0 : UCSDModelUsed = false;
947 0 : MundtModelUsed = false;
948 : // UCSD-UF
949 0 : TotUCSDUI = 0; // total number of UCSDUI zones
950 0 : TotUCSDUE = 0; // total number of UCSDUE zones
951 0 : IsZoneUI.clear(); // controls program flow, for interior or exterior UFAD model
952 0 : ZoneUFPtr.clear();
953 0 : UFHcIn.clear();
954 0 : ZoneUFMixedFlag.clear();
955 0 : ZoneUFMixedFlagRep.clear();
956 0 : ZoneUFGamma.clear();
957 0 : ZoneUFPowInPlumes.clear(); // [W]
958 0 : ZoneUFPowInPlumesfromWindows.clear(); // [W]
959 0 : Phi.clear(); // dimensionless measure of occupied subzone temperature
960 : // END UCSD
961 : // Begin NREL User-defined patterns
962 0 : numTempDistContrldZones = 0; // count of zones with user-defined patterns
963 0 : NumAirTempPatterns = 0; // count of all different patterns in input file
964 0 : NumConstantGradient = 0; // count of constant gradient patterns in input
965 0 : NumTwoGradientInterp = 0; // count of two gradient interp patterns in input
966 0 : NumNonDimensionalHeight = 0; // count of ND height profile patterns in input
967 0 : NumSurfaceMapping = 0; // count of generic surface map patterns in input
968 0 : UserDefinedUsed = false; // true if user-defined model used anywhere
969 : // End User-defined patterns
970 :
971 : // RoomAirflowNetwork
972 0 : NumOfRoomAirflowNetControl = 0; // count of RoomAirSettings:AirflowNetwork
973 :
974 : // Object Data
975 0 : AirModel.clear();
976 0 : AirNode.clear();
977 0 : ZoneUCSDDV.clear(); // UCSD
978 0 : ZoneUCSDCV.clear();
979 0 : ZoneUCSDUI.clear();
980 0 : ZoneUCSDUE.clear();
981 0 : CVJetRecFlows.clear(); // Jet and recirculation zone flows and properties
982 0 : SurfParametersCVDV.clear(); // Surface parameters
983 0 : RoomAirPattern.clear(); // user defined patterns ,various types
984 0 : AirPatternZoneInfo.clear(); // added zone information for user defined patterns
985 0 : RoomAirflowNetworkZoneInfo.clear(); // added zone info
986 0 : }
987 : };
988 :
989 : } // namespace EnergyPlus
990 :
991 : #endif
|