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 DataZoneEquipment_hh_INCLUDED
49 : #define DataZoneEquipment_hh_INCLUDED
50 :
51 : // C++ Headers
52 : #include <unordered_set>
53 :
54 : // ObjexxFCL Headers
55 : #include <ObjexxFCL/Array1D.hh>
56 : #include <ObjexxFCL/Optional.hh>
57 :
58 : // EnergyPlus Headers
59 : #include <EnergyPlus/Data/BaseData.hh>
60 : #include <EnergyPlus/DataGlobals.hh>
61 : #include <EnergyPlus/DataHVACSystems.hh>
62 : #include <EnergyPlus/EnergyPlus.hh>
63 : #include <EnergyPlus/ExhaustAirSystemManager.hh>
64 : #include <EnergyPlus/OutputProcessor.hh>
65 : #include <EnergyPlus/SystemReports.hh>
66 :
67 : namespace EnergyPlus {
68 :
69 : // Forward declarations
70 : struct EnergyPlusData;
71 :
72 : namespace DataZoneEquipment {
73 :
74 : // Using/Aliasing
75 : // Data
76 : // -only module should be available to other modules and routines.
77 : // Thus, all variables in this module must be PUBLIC.
78 :
79 : // MODULE PARAMETER DEFINITIONS:
80 : enum class AirNodeType
81 : {
82 : Invalid = -1,
83 : PathInlet,
84 : CompInlet,
85 : Intermediate,
86 : Outlet,
87 : Num
88 : };
89 :
90 : enum class AirLoopHVACZone
91 : {
92 : Invalid = -1,
93 : Splitter,
94 : SupplyPlenum,
95 : Mixer,
96 : ReturnPlenum,
97 : Num
98 : };
99 :
100 : constexpr std::array<std::string_view, static_cast<int>(AirLoopHVACZone::Num)> AirLoopHVACTypeNamesCC = {
101 : "AirLoopHVAC:ZoneSplitter", "AirLoopHVAC:SupplyPlenum", "AirLoopHVAC:ZoneMixer", "AirLoopHVAC:ReturnPlenum"};
102 :
103 : constexpr std::array<std::string_view, static_cast<int>(AirLoopHVACZone::Num)> AirLoopHVACTypeNamesUC = {
104 : "AIRLOOPHVAC:ZONESPLITTER", "AIRLOOPHVAC:SUPPLYPLENUM", "AIRLOOPHVAC:ZONEMIXER", "AIRLOOPHVAC:RETURNPLENUM"};
105 :
106 : // Start zone equip objects
107 : // list units that are valid for zone system availability managers first
108 : enum ZoneEquip
109 : {
110 : Invalid = -1,
111 : FanCoil4Pipe = 1,
112 : PkgTermHPAirToAir,
113 : PkgTermACAirToAir,
114 : PkgTermHPWaterToAir,
115 : WindowAC,
116 : UnitHeater,
117 : UnitVentilator,
118 : ERVStandAlone,
119 : VentilatedSlab,
120 : OutdoorAirUnit,
121 : VRFTerminalUnit,
122 : PurchasedAir,
123 : ZoneEvaporativeCoolerUnit,
124 : ZoneHybridEvaporativeCooler, // last zone equipment type to use zone availability manager. The above list must not change or
125 : // NumValidSysAvailZoneComponents must also change.
126 : AirDistUnit,
127 : BBWaterConvective,
128 : BBElectricConvective,
129 : HiTempRadiant,
130 : LoTempRadiant,
131 : ZoneExhaustFan,
132 : HeatXchngr,
133 : HPWaterHeater,
134 : BBWater,
135 : ZoneDXDehumidifier,
136 : BBSteam,
137 : BBElectric,
138 : RefrigerationAirChillerSet,
139 : UserDefinedZoneHVACForcedAir,
140 : CoolingPanel,
141 : ZoneUnitarySys,
142 : Num
143 : };
144 :
145 : constexpr int NumValidSysAvailZoneComponents(14);
146 : extern Array1D_string const cValidSysAvailManagerCompTypes;
147 :
148 : // Per Person Ventilation Rate Mode
149 : enum class PerPersonVentRateMode
150 : {
151 : Invalid = -1,
152 : DCVByCurrentLevel,
153 : ByDesignLevel,
154 : Num
155 : };
156 :
157 : enum class LoadDist
158 : {
159 : Invalid = -1,
160 : Sequential,
161 : Uniform,
162 : UniformPLR,
163 : SequentialUniformPLR,
164 : Num
165 : };
166 :
167 : enum class LightReturnExhaustConfig : int
168 : {
169 : Invalid = -1,
170 : NoExhast = 0, // No exhaust node
171 : Single = 1, // One to one configuration
172 : Multi = 2, // Multiple return node referred
173 : Shared = 3, // Shared exhaust node
174 : Num
175 : };
176 :
177 24659 : struct EquipMeterData
178 : {
179 : // Members
180 : std::string ReportVarName;
181 : OutputProcessor::Unit ReportVarUnits;
182 : DataGlobalConstants::ResourceType ResourceType;
183 : std::string EndUse;
184 : SystemReports::EndUseType EndUse_CompMode;
185 : std::string Group;
186 : int ReportVarIndex;
187 : OutputProcessor::TimeStepType ReportVarIndexType;
188 : OutputProcessor::VariableType ReportVarType;
189 : Real64 CurMeterReading;
190 :
191 : // Default Constructor
192 4947 : EquipMeterData()
193 4947 : : ReportVarUnits(OutputProcessor::Unit::None), ResourceType(DataGlobalConstants::ResourceType::None),
194 : EndUse_CompMode(SystemReports::EndUseType::NoHeatNoCool), ReportVarIndex(0), ReportVarIndexType(OutputProcessor::TimeStepType::Zone),
195 4947 : ReportVarType(OutputProcessor::VariableType::NotFound), CurMeterReading(0.0)
196 : {
197 4947 : }
198 : };
199 :
200 7406 : struct SubSubEquipmentData // data for an individual component
201 : {
202 : // Members
203 : std::string TypeOf; // The 'keyWord' identifying component type
204 : std::string Name; // Component name
205 : int EquipIndex; // Component Index for routines
206 : bool ON; // When true, the designated component or operation scheme is available
207 : int InletNodeNum;
208 : int OutletNodeNum;
209 : int NumMeteredVars;
210 : Array1D<EquipMeterData> MeteredVar; // Index of energy output report data
211 : int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting
212 : int ZoneEqToPlantPtr; // 0=No plant loop connection, >=0 index to ZoneEqToPlant array
213 : int OpMode;
214 : Real64 Capacity;
215 : Real64 Efficiency;
216 : Real64 TotPlantSupplyElec;
217 : Real64 TotPlantSupplyGas;
218 : Real64 TotPlantSupplyPurch;
219 :
220 : // Default Constructor
221 2434 : SubSubEquipmentData()
222 2434 : : EquipIndex(0), ON(true), InletNodeNum(0), OutletNodeNum(0), NumMeteredVars(0), EnergyTransComp(0), ZoneEqToPlantPtr(0), OpMode(0),
223 2434 : Capacity(0.0), Efficiency(0.0), TotPlantSupplyElec(0.0), TotPlantSupplyGas(0.0), TotPlantSupplyPurch(0.0)
224 : {
225 2434 : }
226 : };
227 :
228 15201 : struct SubEquipmentData // data for an individual component
229 : {
230 : // Members
231 : bool Parent; // When true, the designated component is made up of sub-components
232 : int NumSubSubEquip;
233 : std::string TypeOf; // The 'keyWord' identifying component type
234 : std::string Name; // Component name
235 : int EquipIndex; // Component Index for routines
236 : bool ON; // When true, the designated component or operation scheme is available
237 : int InletNodeNum;
238 : int OutletNodeNum;
239 : int NumMeteredVars;
240 : Array1D<EquipMeterData> MeteredVar; // Index of energy output report data
241 : Array1D<SubSubEquipmentData> SubSubEquipData; // Component list
242 : int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting
243 : int ZoneEqToPlantPtr; // 0=No plant loop connection, >0 index to ZoneEqToPlant array
244 : int OpMode;
245 : Real64 Capacity;
246 : Real64 Efficiency;
247 : Real64 TotPlantSupplyElec;
248 : Real64 TotPlantSupplyGas;
249 : Real64 TotPlantSupplyPurch;
250 :
251 : // Default Constructor
252 4057 : SubEquipmentData()
253 4057 : : Parent(false), NumSubSubEquip(0), EquipIndex(0), ON(true), InletNodeNum(0), OutletNodeNum(0), NumMeteredVars(0), EnergyTransComp(0),
254 : ZoneEqToPlantPtr(0), OpMode(0), Capacity(0.0), Efficiency(0.0), TotPlantSupplyElec(0.0), TotPlantSupplyGas(0.0),
255 4057 : TotPlantSupplyPurch(0.0)
256 : {
257 4057 : }
258 : };
259 :
260 25180 : struct AirIn
261 : {
262 : // Members
263 : int InNode; // Air distribution unit inlet node
264 : int OutNode; // Air distribution unit Outlet node
265 : bool SupplyAirPathExists;
266 : int MainBranchIndex;
267 : int SupplyBranchIndex;
268 : int AirDistUnitIndex; // equipment number in EquipList
269 : int TermUnitSizingIndex; // Pointer to TermUnitSizing and TermUnitFinalZoneSizing data for this terminal unit
270 : int SupplyAirPathIndex;
271 : Array1D<SubSubEquipmentData> Coil;
272 :
273 : // Default Constructor
274 8208 : AirIn()
275 8208 : : InNode(0), OutNode(0), SupplyAirPathExists(false), MainBranchIndex(0), SupplyBranchIndex(0), AirDistUnitIndex(0),
276 8208 : TermUnitSizingIndex(0), SupplyAirPathIndex(0)
277 : {
278 8208 : }
279 : };
280 :
281 10399 : struct EquipConfiguration
282 : {
283 : // Members
284 : std::string ZoneName;
285 : std::string EquipListName;
286 : int EquipListIndex;
287 : std::string ControlListName;
288 : int ZoneNode;
289 : int NumInletNodes; // number of inlet nodes
290 : int NumExhaustNodes; // number of exhaust nodes
291 : int NumReturnNodes; // number of return air nodes
292 : int NumReturnFlowBasisNodes; // number of return air flow basis nodes
293 : int ReturnFlowSchedPtrNum; // return air flow fraction schedule pointer
294 : bool FlowError; // flow error flag
295 : Array1D_int InletNode; // zone supply air inlet nodes
296 : Array1D_int InletNodeAirLoopNum; // air loop number connected to this inlet node (0 if not an airloop node)
297 : Array1D_int InletNodeADUNum; // AirDistUnit connected to this inlet node (0 if not an ADU node, could be zone equip or direct air)
298 : Array1D_int ExhaustNode; // zone air exhaust nodes
299 : Array1D_int ReturnNode; // zone return air nodes (node numbers)
300 : Array1D_int ReturnNodeAirLoopNum; // air loop number connected to this return node
301 : Array1D_int
302 : ReturnNodeInletNum; // zone supply air inlet index that matched this return node (same zone, same airloop) - not the inlet node number
303 : Array1D_bool FixedReturnFlow; // true if return node is fixed and cannot be adjusted in CalcZoneReturnFlows
304 : Array1D_int ReturnNodePlenumNum; // number of the return plenum attached to this return node (zero if none)
305 : Array1D_int ReturnFlowBasisNode; // return air flow basis nodes
306 : Array1D_int ReturnNodeExhaustNodeNum; // Exhaust node number flow to a corrsponding return node due to light heat gain
307 : // Array1D_int SharedExhaustNode; // Exhaust node number shared by return nodes 0 No exhaust; 1 No share; > 1 shared; -1 use the
308 : // exhaust node value
309 : Array1D<LightReturnExhaustConfig>
310 : SharedExhaustNode; // Exhaust node number shared by return nodes 0 No exhaust; 1 No share; > 1 shared; -1 use the exhaust node value
311 :
312 : bool ZonalSystemOnly; // TRUE if served by a zonal system (only)
313 : bool IsControlled; // True when this is a controlled zone.
314 : Real64 ZoneExh; // zone exhaust (unbalanced+balanced) mass flow rate [kg/s]
315 : Real64 ZoneExhBalanced; // balanced zone exhaust mass flow rate [kg/s]
316 : Real64 PlenumMassFlow; // zone air mass flow rate induced from plenum [kg/s]
317 : Real64 ExcessZoneExh; // excess zone exhaust to be balanced by other zones (only used when !ZoneAirMassFlow.EnforceZoneMassBalance) [kg/s]
318 : Real64 TotAvailAirLoopOA; // total airloop OA available for systems serving this zone (used to apportion excess exhaust) [kg/s}
319 : Real64 TotInletAirMassFlowRate; // total inlet node mass flow rate [kg/s]
320 : Real64 TotExhaustAirMassFlowRate; // total exhaust node mass flow rate [kg/s]
321 : // AirDistUnitCool and AirDistUnitHeat
322 : // do not correspond with the AIR DISTRIBUTION UNIT object in the zone equipment list.
323 : // AirDistUnitCool/AirDistUnitHeat, may represent a DIRECT AIR object,
324 : // or the cold/hot side of AIR DISTRIBUTION
325 : // UNIT object. That is both AirDistUnitHeat and AirDistUnitCool are required to describe a dual
326 : // duct AIR DISTRIBUTION object in the ZoneEquipList.
327 : Array1D<AirIn> AirDistUnitHeat; // dimensioned to number of zone inlet nodes
328 : Array1D<AirIn> AirDistUnitCool; // dimensioned to number of zone inlet nodes.
329 : bool InFloorActiveElement; // Convection adapation, true if zone has in-floor HVAC
330 : bool InWallActiveElement; // Convection adapation, true if zone has in-wall HVAC
331 : bool InCeilingActiveElement; // Convection adapation,
332 : // true when zone has in-ceiling HVAC
333 : bool ZoneHasAirLoopWithOASys; // true if zone is served by one or more airloops with an outdoor air system
334 : int ZoneAirDistributionIndex; // index to DesignSpecification:ZoneAirDistribution object
335 : int ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object
336 : Real64 AirLoopDesSupply; // air lood design supply air flow rate [kg/s]
337 :
338 : // Default Constructor
339 771 : EquipConfiguration()
340 771 : : ZoneName("Uncontrolled Zone"), EquipListIndex(0), ZoneNode(0), NumInletNodes(0), NumExhaustNodes(0), NumReturnNodes(0),
341 : NumReturnFlowBasisNodes(0), ReturnFlowSchedPtrNum(0), FlowError(false), ZonalSystemOnly(false), IsControlled(false), ZoneExh(0.0),
342 : ZoneExhBalanced(0.0), PlenumMassFlow(0.0), ExcessZoneExh(0.0), TotAvailAirLoopOA(0.0), TotInletAirMassFlowRate(0.0),
343 : TotExhaustAirMassFlowRate(0.0), InFloorActiveElement(false), InWallActiveElement(false), InCeilingActiveElement(false),
344 771 : ZoneHasAirLoopWithOASys(false), ZoneAirDistributionIndex(0), ZoneDesignSpecOAIndex(0), AirLoopDesSupply(0.0)
345 : {
346 771 : }
347 : };
348 :
349 13394 : struct EquipmentData // data for an individual component
350 : {
351 : // Members
352 : bool Parent; // When true, the designated component is made up of sub-components
353 : int NumSubEquip;
354 : std::string TypeOf; // The 'keyWord' identifying component type
355 : std::string Name; // Component name
356 : bool ON; // When true, the designated component or operation scheme is available
357 : int NumInlets;
358 : int NumOutlets;
359 : Array1D_int InletNodeNums;
360 : Array1D_int OutletNodeNums;
361 : int NumMeteredVars;
362 : Array1D<EquipMeterData> MeteredVar; // Index of energy output report data
363 : Array1D<SubEquipmentData> SubEquipData; // Component list
364 : int EnergyTransComp; // 1=EnergyTransfer, 0=No EnergyTransfer Flag needed for reporting
365 : int ZoneEqToPlantPtr; // 0=No plant loop connection, >0 index to ZoneEqToPlant array
366 : Real64 TotPlantSupplyElec;
367 : Real64 TotPlantSupplyGas;
368 : Real64 TotPlantSupplyPurch;
369 : int OpMode;
370 :
371 : // Default Constructor
372 4104 : EquipmentData()
373 4104 : : Parent(false), NumSubEquip(0), ON(true), NumInlets(0), NumOutlets(0), NumMeteredVars(0), EnergyTransComp(0), ZoneEqToPlantPtr(0),
374 4104 : TotPlantSupplyElec(0.0), TotPlantSupplyGas(0.0), TotPlantSupplyPurch(0.0), OpMode(0)
375 : {
376 4104 : }
377 : };
378 :
379 10399 : struct EquipList
380 : {
381 : // Members
382 : std::string Name; // Name of the equipment list
383 : DataZoneEquipment::LoadDist LoadDistScheme; // load distribution scheme
384 : int NumOfEquipTypes; // Number of items on this list
385 : int NumAvailHeatEquip; // Number of pieces of equipment available for heating
386 : int NumAvailCoolEquip; // Number of pieces of equipment available for cooling
387 : Array1D_string EquipType; // TODO: Convert this from string to enum and remove EquipTypeEnum below
388 : Array1D<DataZoneEquipment::ZoneEquip> EquipTypeEnum;
389 : Array1D_string EquipName;
390 : Array1D_int EquipIndex;
391 : // SystemAvailManagers need to know the index of specific equipment (e.g., PTAC as 1,2,3)
392 : // if UnitarySystem models PTAC, PTHP, UnitarySystems, then the index to a specific UnitarySystem is not the index to the PTAC
393 : std::vector<HVACSystemData *> compPointer;
394 : Array1D_int CoolingPriority;
395 : Array1D_int HeatingPriority;
396 : Array1D_int SequentialCoolingFractionSchedPtr;
397 : Array1D_int SequentialHeatingFractionSchedPtr;
398 : Array1D_int CoolingCapacity; // Current cooling capacity (negative) [W]
399 : Array1D_int HeatingCapacity; // Current heating capacity (positive) [W]
400 : Array1D<EquipmentData> EquipData; // Index of energy output report data
401 :
402 : // Default Constructor
403 771 : EquipList() : LoadDistScheme(DataZoneEquipment::LoadDist::Sequential), NumOfEquipTypes(0), NumAvailHeatEquip(0), NumAvailCoolEquip(0)
404 : {
405 771 : }
406 :
407 : void getPrioritiesForInletNode(EnergyPlusData &state,
408 : int inletNodeNum, // Zone inlet node number to match
409 : int &coolingPriority, // Cooling priority num for matching equipment
410 : int &heatingPriority // Heating priority num for matching equipment
411 : );
412 :
413 : Real64 SequentialHeatingFraction(EnergyPlusData &state, int equipNum);
414 :
415 : Real64 SequentialCoolingFraction(EnergyPlusData &state, int equipNum);
416 : };
417 :
418 : struct ControlList
419 : {
420 : // Members
421 : std::string Name;
422 : int NumOfControls;
423 : Array1D_string ControlType;
424 : Array1D_string ControlName;
425 :
426 : // Default Constructor
427 : ControlList() : NumOfControls(0)
428 : {
429 : }
430 : };
431 :
432 3143 : struct SupplyAir
433 : {
434 : // Members
435 : std::string Name;
436 : int NumOfComponents;
437 : int InletNodeNum;
438 : Array1D_string ComponentType; // TODO: Convert this from string to enum and remove ComponentTypeEnum below
439 : Array1D<DataZoneEquipment::AirLoopHVACZone> ComponentTypeEnum;
440 : Array1D_string ComponentName;
441 : Array1D_int ComponentIndex;
442 : Array1D_int SplitterIndex;
443 : Array1D_int PlenumIndex;
444 : int NumOutletNodes;
445 : Array1D_int OutletNode;
446 : int NumNodes;
447 : Array1D_int Node;
448 : Array1D<DataZoneEquipment::AirNodeType> NodeType;
449 :
450 : // Default Constructor
451 771 : SupplyAir() : NumOfComponents(0), InletNodeNum(0), NumOutletNodes(0), NumNodes(0)
452 : {
453 771 : }
454 : };
455 :
456 3109 : struct ReturnAir
457 : {
458 : // Members
459 : std::string Name;
460 : int NumOfComponents;
461 : int OutletNodeNum;
462 : Array1D_string ComponentType; // TODO: Convert this from string to enum and remove ComponentTypeEnum below
463 : Array1D<DataZoneEquipment::AirLoopHVACZone> ComponentTypeEnum;
464 : Array1D_string ComponentName;
465 : Array1D_int ComponentIndex;
466 :
467 : // Default Constructor
468 771 : ReturnAir() : NumOfComponents(0), OutletNodeNum(0)
469 : {
470 771 : }
471 : };
472 :
473 : void GetZoneEquipmentData(EnergyPlusData &state);
474 :
475 : void SetupZoneEquipmentForConvectionFlowRegime(EnergyPlusData &state);
476 :
477 : bool CheckZoneEquipmentList(EnergyPlusData &state,
478 : std::string_view ComponentType, // Type of component
479 : std::string_view ComponentName, // Name of component
480 : Optional_int CtrlZoneNum = _);
481 :
482 : int GetControlledZoneIndex(EnergyPlusData &state, std::string const &ZoneName); // Zone name to match into Controlled Zone structure
483 :
484 : int FindControlledZoneIndexFromSystemNodeNumberForZone(EnergyPlusData &state,
485 : int TrialZoneNodeNum); // Node number to match into Controlled Zone structure
486 :
487 : int GetSystemNodeNumberForZone(EnergyPlusData &state, int const zoneNum);
488 :
489 : int GetReturnAirNodeForZone(EnergyPlusData &state,
490 : int const zoneNum,
491 : std::string const &NodeName, // Return air node name to match (may be blank)
492 : std::string const &calledFromDescription // String identifying the calling function and object
493 : );
494 :
495 : int GetReturnNumForZone(EnergyPlusData &state,
496 : int const zoneNum,
497 : std::string const &NodeName // Return air node name to match (may be blank)
498 : );
499 :
500 : int GetZoneEquipControlledZoneNum(EnergyPlusData &state, DataZoneEquipment::ZoneEquip const ZoneEquipTypeNum, std::string const &EquipmentName);
501 :
502 : bool VerifyLightsExhaustNodeForZone(EnergyPlusData &state, int const ZoneNum, int const ZoneExhaustNodeNum);
503 :
504 : void CheckSharedExhaust(EnergyPlusData &state);
505 :
506 : } // namespace DataZoneEquipment
507 :
508 1542 : struct DataZoneEquipmentData : BaseGlobalStruct
509 : {
510 :
511 : bool GetZoneEquipmentDataErrorsFound = false;
512 : int GetZoneEquipmentDataFound = 0;
513 : int NumSupplyAirPaths = 0;
514 : int NumReturnAirPaths = 0;
515 : int NumExhaustAirSystems = 0;
516 : int NumZoneExhaustControls = 0;
517 : bool ZoneEquipInputsFilled = false;
518 : bool ZoneEquipSimulatedOnce = false;
519 : int NumOfZoneEquipLists = 0;
520 : Array1D_int ZoneEquipAvail;
521 : Array1D<DataZoneEquipment::EquipConfiguration> ZoneEquipConfig;
522 : std::unordered_set<std::string> UniqueZoneEquipListNames;
523 : Array1D<DataZoneEquipment::EquipList> ZoneEquipList;
524 : Array1D<DataZoneEquipment::SupplyAir> SupplyAirPath;
525 : Array1D<DataZoneEquipment::ReturnAir> ReturnAirPath;
526 : Array1D<ExhaustAirSystemManager::ExhaustAir> ExhaustAirSystem;
527 : Array1D<ExhaustAirSystemManager::ZoneExhaustControl> ZoneExhaustControlSystem; // 2022-01: maybe a better name?
528 :
529 0 : void clear_state() override
530 : {
531 0 : this->GetZoneEquipmentDataErrorsFound = false;
532 0 : this->GetZoneEquipmentDataFound = 0;
533 0 : this->NumSupplyAirPaths = 0;
534 0 : this->NumReturnAirPaths = 0;
535 0 : this->NumExhaustAirSystems = 0;
536 0 : this->NumZoneExhaustControls = 0;
537 0 : this->ZoneEquipInputsFilled = false;
538 0 : this->ZoneEquipSimulatedOnce = false;
539 0 : this->NumOfZoneEquipLists = 0;
540 0 : this->ZoneEquipAvail.deallocate();
541 0 : this->ZoneEquipConfig.deallocate();
542 0 : this->UniqueZoneEquipListNames.clear();
543 0 : this->ZoneEquipList.deallocate();
544 0 : this->SupplyAirPath.deallocate();
545 0 : this->ReturnAirPath.deallocate();
546 0 : this->ExhaustAirSystem.deallocate();
547 0 : this->ZoneExhaustControlSystem.deallocate();
548 0 : }
549 : };
550 :
551 : } // namespace EnergyPlus
552 :
553 : #endif
|