Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2024, 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 DataPlant_hh_INCLUDED
49 : #define DataPlant_hh_INCLUDED
50 :
51 : // C++ Headers
52 : #include <numeric>
53 :
54 : // ObjexxFCL Headers
55 : #include <ObjexxFCL/Array1D.hh>
56 : #include <ObjexxFCL/Fmath.hh>
57 :
58 : // EnergyPlus Headers
59 : #include <EnergyPlus/Data/BaseData.hh>
60 : #include <EnergyPlus/DataGlobals.hh>
61 : #include <EnergyPlus/DataLoopNode.hh>
62 : #include <EnergyPlus/EnergyPlus.hh>
63 : #include <EnergyPlus/Plant/CallingOrder.hh>
64 : #include <EnergyPlus/Plant/Enums.hh>
65 : #include <EnergyPlus/Plant/Loop.hh>
66 : #include <EnergyPlus/Plant/ReportLoopData.hh>
67 :
68 : namespace EnergyPlus {
69 :
70 : namespace DataPlant {
71 :
72 : // Using/Aliasing
73 : using DataLoopNode::SensedNodeFlagValue;
74 :
75 : // Criteria percentage limits for determining re-simulation of connected loop sides
76 : constexpr Real64 CriteriaDelta_MassFlowRate(0.001);
77 : constexpr Real64 CriteriaDelta_Temperature(0.010);
78 : constexpr Real64 CriteriaDelta_HeatTransferRate(0.100);
79 :
80 : // Parameters for tolerance
81 : constexpr Real64 LoopDemandTol(0.1); // minimum significant loop cooling or heating demand
82 : constexpr Real64 DeltaTempTol(0.0001); // minimum significant loop temperature difference
83 :
84 : // Parameters for Component/Equipment Types (ref: TypeOf in CompData)
85 :
86 : static constexpr std::array<std::string_view, static_cast<int>(PlantEquipmentType::Num)> PlantEquipTypeNames{
87 : "Boiler:HotWater",
88 : "Boiler:Steam",
89 : "Chiller:Absorption",
90 : "Chiller:Absorption:Indirect",
91 : "Chiller:CombustionTurbine",
92 : "Chiller:ConstantCOP",
93 : "ChillerHeater:Absorption:DirectFired",
94 : "Chiller:Electric",
95 : "Chiller:Electric:EIR",
96 : "Chiller:Electric:ReformulatedEIR",
97 : "Chiller:Electric:ASHRAE205",
98 : "Chiller:EngineDriven",
99 : "CoolingTower:SingleSpeed",
100 : "CoolingTower:TwoSpeed",
101 : "CoolingTower:VariableSpeed",
102 : "Generator:Fuelcell:ExhaustGastoWaterHeatExchanger",
103 : "WaterHeater:HeatPump:PumpedCondenser",
104 : "Heatpump:WatertoWater:Equationfit:Cooling",
105 : "Heatpump:WatertoWater:Equationfit:Heating",
106 : "Heatpump:WatertoWater:ParameterEstimation:Cooling",
107 : "Heatpump:WatertoWater:ParameterEstimation:Heating",
108 : "Pipe:Adiabatic",
109 : "Pipe:Adiabatic:Steam",
110 : "Pipe:Outdoor",
111 : "Pipe:Indoor",
112 : "Pipe:Underground",
113 : "DistrictCooling",
114 : "DistrictHeating:Water",
115 : "ThermalStorage:Ice:Detailed",
116 : "ThermalStorage:Ice:Simple",
117 : "TemperingValve",
118 : "WaterHeater:Mixed",
119 : "WaterHeater:Stratified",
120 : "Pump:VariableSpeed",
121 : "Pump:ConstantSpeed",
122 : "Pump:VariableSpeed:Condensate",
123 : "HeaderedPumps:VariableSpeed",
124 : "HeaderedPumps:ConstantSpeed",
125 : "WaterUse:Connections",
126 : "Coil:Cooling:Water",
127 : "Coil:Cooling:Water:DetailedGeometry",
128 : "Coil:Heating:Water",
129 : "Coil:Heating:Steam",
130 : "Solarcollector:Flatplate:Water",
131 : "LoadProfile:Plant",
132 : "GroundHeatExchanger:System",
133 : "GroundHeatExchanger:Surface",
134 : "GroundHeatExchanger:Pond",
135 : "Generator:Microturbine",
136 : "Generator:InternalCombustionEngine",
137 : "Generator:CombustionTurbine",
138 : "Generator:Microchp",
139 : "Generator:Fuelcell:StackCooler",
140 : "FluidCooler:SingleSpeed",
141 : "FluidCooler:TwoSpeed",
142 : "EvaporativeFluidCooler:SingleSpeed",
143 : "EvaporativeFluidCooler:TwoSpeed",
144 : "ThermalStorage:ChilledWater:Mixed",
145 : "ThermalStorage:ChilledWater:Stratified",
146 : "SolarCollector:FlatPlate:PhotovoltaicThermal",
147 : "ZoneHVAC:Baseboard:Convective:Water",
148 : "ZoneHVAC:Baseboard:RadiantConvective:Steam",
149 : "ZoneHVAC:Baseboard:RadiantConvective:Water",
150 : "ZoneHVAC:LowTemperatureRadiant:VariableFlow",
151 : "ZoneHVAC:LowTemperatureRadiant:ConstantFlow",
152 : "AirTerminal:SingleDuct:ConstantVolume:CooledBeam",
153 : "Coil:Heating:WaterToAirHeatPump:EquationFit",
154 : "Coil:Cooling:WaterToAirHeatPump:EquationFit",
155 : "Coil:Heating:WaterToAirHeatPump:ParameterEstimation",
156 : "Coil:Cooling:WaterToAirHeatPump:ParameterEstimation",
157 : "Refrigeration:Condenser:WaterCooled",
158 : "Refrigeration:CompressorRack",
159 : "AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed",
160 : "ChillerHeater:Absorption:DoubleEffect",
161 : "PipingSystem:Underground:PipeCircuit",
162 : "SolarCollector:IntegralCollectorStorage",
163 : "Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit",
164 : "Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit",
165 : "PlantComponent:UserDefined",
166 : "Coil:UserDefined",
167 : "ZoneHVAC:ForcedAir:UserDefined",
168 : "AirTerminal:SingleDuct:UserDefined",
169 : "AirConditioner:VariableRefrigerantFlow",
170 : "GroundHeatExchanger:HorizontalTrench",
171 : "HeatExchanger:FluidToFluid",
172 : "PlantComponent:TemperatureSource",
173 : "CentralHeatPumpSystem",
174 : "AirLoopHVAC:UnitarySystem",
175 : "Coil:Cooling:DX:SingleSpeed:ThermalStorage",
176 : "CoolingTower:VariableSpeed:Merkel",
177 : "SwimmingPool:Indoor",
178 : "GroundHeatExchanger:Slinky",
179 : "WaterHeater:HeatPump:WrappedCondenser",
180 : "AirTerminal:SingleDuct:ConstantVolume:FourPipeBeam",
181 : "ZoneHVAC:CoolingPanel:RadiantConvective:Water",
182 : "HeatPump:PlantLoop:EIR:Cooling",
183 : "HeatPump:PlantLoop:EIR:Heating",
184 : "HeatPump:AirToWater:FuelFired:Cooling",
185 : "HeatPump:AirToWater:FuelFired:Heating",
186 : "DistrictHeating:Steam"};
187 :
188 : static constexpr std::array<std::string_view, static_cast<size_t>(PlantEquipmentType::Num)> PlantEquipTypeNamesUC{
189 : "BOILER:HOTWATER",
190 : "BOILER:STEAM",
191 : "CHILLER:ABSORPTION",
192 : "CHILLER:ABSORPTION:INDIRECT",
193 : "CHILLER:COMBUSTIONTURBINE",
194 : "CHILLER:CONSTANTCOP",
195 : "CHILLERHEATER:ABSORPTION:DIRECTFIRED",
196 : "CHILLER:ELECTRIC",
197 : "CHILLER:ELECTRIC:EIR",
198 : "CHILLER:ELECTRIC:REFORMULATEDEIR",
199 : "CHILLER:ELECTRIC:ASHRAE205",
200 : "CHILLER:ENGINEDRIVEN",
201 : "COOLINGTOWER:SINGLESPEED",
202 : "COOLINGTOWER:TWOSPEED",
203 : "COOLINGTOWER:VARIABLESPEED",
204 : "GENERATOR:FUELCELL:EXHAUSTGASTOWATERHEATEXCHANGER",
205 : "WATERHEATER:HEATPUMP:PUMPEDCONDENSER",
206 : "HEATPUMP:WATERTOWATER:EQUATIONFIT:COOLING",
207 : "HEATPUMP:WATERTOWATER:EQUATIONFIT:HEATING",
208 : "HEATPUMP:WATERTOWATER:PARAMETERESTIMATION:COOLING",
209 : "HEATPUMP:WATERTOWATER:PARAMETERESTIMATION:HEATING",
210 : "PIPE:ADIABATIC",
211 : "PIPE:ADIABATIC:STEAM",
212 : "PIPE:OUTDOOR",
213 : "PIPE:INDOOR",
214 : "PIPE:UNDERGROUND",
215 : "DISTRICTCOOLING",
216 : "DISTRICTHEATING:WATER",
217 : "THERMALSTORAGE:ICE:DETAILED",
218 : "THERMALSTORAGE:ICE:SIMPLE",
219 : "TEMPERINGVALVE",
220 : "WATERHEATER:MIXED",
221 : "WATERHEATER:STRATIFIED",
222 : "PUMP:VARIABLESPEED",
223 : "PUMP:CONSTANTSPEED",
224 : "PUMP:VARIABLESPEED:CONDENSATE",
225 : "HEADEREDPUMPS:VARIABLESPEED",
226 : "HEADEREDPUMPS:CONSTANTSPEED",
227 : "WATERUSE:CONNECTIONS",
228 : "COIL:COOLING:WATER",
229 : "COIL:COOLING:WATER:DETAILEDGEOMETRY",
230 : "COIL:HEATING:WATER",
231 : "COIL:HEATING:STEAM",
232 : "SOLARCOLLECTOR:FLATPLATE:WATER",
233 : "LOADPROFILE:PLANT",
234 : "GROUNDHEATEXCHANGER:SYSTEM",
235 : "GROUNDHEATEXCHANGER:SURFACE",
236 : "GROUNDHEATEXCHANGER:POND",
237 : "GENERATOR:MICROTURBINE",
238 : "GENERATOR:INTERNALCOMBUSTIONENGINE",
239 : "GENERATOR:COMBUSTIONTURBINE",
240 : "GENERATOR:MICROCHP",
241 : "GENERATOR:FUELCELL:STACKCOOLER",
242 : "FLUIDCOOLER:SINGLESPEED",
243 : "FLUIDCOOLER:TWOSPEED",
244 : "EVAPORATIVEFLUIDCOOLER:SINGLESPEED",
245 : "EVAPORATIVEFLUIDCOOLER:TWOSPEED",
246 : "THERMALSTORAGE:CHILLEDWATER:MIXED",
247 : "THERMALSTORAGE:CHILLEDWATER:STRATIFIED",
248 : "SOLARCOLLECTOR:FLATPLATE:PHOTOVOLTAICTHERMAL",
249 : "ZONEHVAC:BASEBOARD:CONVECTIVE:WATER",
250 : "ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:STEAM",
251 : "ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:WATER",
252 : "ZONEHVAC:LOWTEMPERATURERADIANT:VARIABLEFLOW",
253 : "ZONEHVAC:LOWTEMPERATURERADIANT:CONSTANTFLOW",
254 : "AIRTERMINAL:SINGLEDUCT:CONSTANTVOLUME:COOLEDBEAM",
255 : "COIL:HEATING:WATERTOAIRHEATPUMP:EQUATIONFIT",
256 : "COIL:COOLING:WATERTOAIRHEATPUMP:EQUATIONFIT",
257 : "COIL:HEATING:WATERTOAIRHEATPUMP:PARAMETERESTIMATION",
258 : "COIL:COOLING:WATERTOAIRHEATPUMP:PARAMETERESTIMATION",
259 : "REFRIGERATION:CONDENSER:WATERCOOLED",
260 : "REFRIGERATION:COMPRESSORRACK",
261 : "AIRLOOPHVAC:UNITARYHEATPUMP:AIRTOAIR:MULTISPEED",
262 : "CHILLERHEATER:ABSORPTION:DOUBLEEFFECT",
263 : "PIPINGSYSTEM:UNDERGROUND:PIPECIRCUIT",
264 : "SOLARCOLLECTOR:INTEGRALCOLLECTORSTORAGE",
265 : "COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT",
266 : "COIL:COOLING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT",
267 : "PLANTCOMPONENT:USERDEFINED",
268 : "COIL:USERDEFINED",
269 : "ZONEHVAC:FORCEDAIR:USERDEFINED",
270 : "AIRTERMINAL:SINGLEDUCT:USERDEFINED",
271 : "AIRCONDITIONER:VARIABLEREFRIGERANTFLOW",
272 : "GROUNDHEATEXCHANGER:HORIZONTALTRENCH",
273 : "HEATEXCHANGER:FLUIDTOFLUID",
274 : "PLANTCOMPONENT:TEMPERATURESOURCE",
275 : "CENTRALHEATPUMPSYSTEM",
276 : "AIRLOOPHVAC:UNITARYSYSTEM",
277 : "COIL:COOLING:DX:SINGLESPEED:THERMALSTORAGE",
278 : "COOLINGTOWER:VARIABLESPEED:MERKEL",
279 : "SWIMMINGPOOL:INDOOR",
280 : "GROUNDHEATEXCHANGER:SLINKY",
281 : "WATERHEATER:HEATPUMP:WRAPPEDCONDENSER",
282 : "AIRTERMINAL:SINGLEDUCT:CONSTANTVOLUME:FOURPIPEBEAM",
283 : "ZONEHVAC:COOLINGPANEL:RADIANTCONVECTIVE:WATER",
284 : "HEATPUMP:PLANTLOOP:EIR:COOLING",
285 : "HEATPUMP:PLANTLOOP:EIR:HEATING",
286 : "HEATPUMP:AIRTOWATER:FUELFIRED:COOLING",
287 : "HEATPUMP:AIRTOWATER:FUELFIRED:HEATING",
288 : "DISTRICTHEATING:STEAM"};
289 :
290 : static constexpr std::array<LoopType, static_cast<size_t>(PlantEquipmentType::Num)> ValidLoopEquipTypes{
291 : LoopType::Plant, // "Boiler:HotWater"
292 : LoopType::Plant, // "Boiler:Steam"
293 : LoopType::Plant, // "Chiller:Absorption"
294 : LoopType::Plant, // "Chiller:Absorption:Indirect"
295 : LoopType::Plant, // "Chiller:CombustionTurbine"
296 : LoopType::Plant, // "Chiller:ConstantCOP"
297 : LoopType::Plant, // "ChillerHeater:Absorption:DirectFired"
298 : LoopType::Plant, // "Chiller:Electric"
299 : LoopType::Plant, // "Chiller:Electric:EIR"
300 : LoopType::Plant, // "Chiller:Electric:ReformulatedEIR"
301 : LoopType::Plant, // "Chiller:Electric:ASHRAE205"
302 : LoopType::Plant, // "Chiller:EngineDriven"
303 : LoopType::Both, // "CoolingTower:SingleSpeed"
304 : LoopType::Both, // "CoolingTower:TwoSpeed"
305 : LoopType::Both, // "CoolingTower:VariableSpeed"
306 : LoopType::Plant, // "Generator:Fuelcell:ExhaustGastoWaterHeatExchanger"
307 : LoopType::Plant, // "WaterHeater:HeatPump:PumpedCondenser"
308 : LoopType::Plant, // "Heatpump:WatertoWater:Equationfit:Cooling"
309 : LoopType::Plant, // "Heatpump:WatertoWater:Equationfit:Heating"
310 : LoopType::Plant, // "Heatpump:WatertoWater:ParameterEstimation:Cooling"
311 : LoopType::Plant, // "Heatpump:WatertoWater:ParameterEstimation:Heating"
312 : LoopType::Both, // "Pipe:Adiabatic"
313 : LoopType::Both, // "Pipe:Adiabatic:Steam"
314 : LoopType::Both, // "Pipe:Outdoor"
315 : LoopType::Both, // "Pipe:Indoor"
316 : LoopType::Both, // "Pipe:Underground"
317 : LoopType::Both, // "DistrictCooling"
318 : LoopType::Both, // "DistrictHeating:Water"
319 : LoopType::Plant, // "ThermalStorage:Ice:Detailed"
320 : LoopType::Plant, // "ThermalStorage:Ice:Simple"
321 : LoopType::Both, // "TemperingValve"
322 : LoopType::Both, // "WaterHeater:Mixed"
323 : LoopType::Both, // "WaterHeater:Stratified"
324 : LoopType::Both, // "Pump:VariableSpeed"
325 : LoopType::Both, // "Pump:ConstantSpeed"
326 : LoopType::Both, // "Pump:VariableSpeed:Condensate"
327 : LoopType::Both, // "HeaderedPumps:VariableSpeed"
328 : LoopType::Both, // "HeaderedPumps:ConstantSpeed"
329 : LoopType::Plant, // "WaterUse:Connections"
330 : LoopType::Plant, // "Coil:Cooling:Water"
331 : LoopType::Plant, // "Coil:Cooling:Water:DetailedGeometry"
332 : LoopType::Plant, // "Coil:Heating:Water"
333 : LoopType::Plant, // "Coil:Heating:Steam"
334 : LoopType::Plant, // "Solarcollector:Flatplate:Water"
335 : LoopType::Both, // "LoadProfile:Plant"
336 : LoopType::Both, // "GroundHeatExchanger:System"
337 : LoopType::Both, // "GroundHeatExchanger:Surface"
338 : LoopType::Both, // "GroundHeatExchanger:Pond"
339 : LoopType::Plant, // "Generator:Microturbine"
340 : LoopType::Plant, // "Generator:InternalCombustionEngine"
341 : LoopType::Plant, // "Generator:CombustionTurbine"
342 : LoopType::Plant, // "Generator:Microchp"
343 : LoopType::Plant, // "Generator:Fuelcell:StackCooler"
344 : LoopType::Both, // "FluidCooler:SingleSpeed"
345 : LoopType::Both, // "FluidCooler:TwoSpeed"
346 : LoopType::Both, // "EvaporativeFluidCooler:SingleSpeed"
347 : LoopType::Both, // "EvaporativeFluidCooler:TwoSpeed"
348 : LoopType::Both, // "ThermalStorage:ChilledWater:Mixed"
349 : LoopType::Both, // "ThermalStorage:ChilledWater:Stratified"
350 : LoopType::Both, // "SolarCollector:FlatPlate:PhotovoltaicThermal"
351 : LoopType::Plant, // "ZoneHVAC:Baseboard:Convective:Water"
352 : LoopType::Plant, // "ZoneHVAC:Baseboard:RadiantConvective:Steam"
353 : LoopType::Plant, // "ZoneHVAC:Baseboard:RadiantConvective:Water"
354 : LoopType::Plant, // "ZoneHVAC:LowTemperatureRadiant:VariableFlow"
355 : LoopType::Plant, // "ZoneHVAC:LowTemperatureRadiant:ConstantFlow"
356 : LoopType::Both, // "AirTerminal:SingleDuct:ConstantVolume:CooledBeam"
357 : LoopType::Both, // "Coil:Heating:WaterToAirHeatPump:EquationFit"
358 : LoopType::Both, // "Coil:Cooling:WaterToAirHeatPump:EquationFit"
359 : LoopType::Both, // "Coil:Heating:WaterToAirHeatPump:ParameterEstimation"
360 : LoopType::Both, // "Coil:Cooling:WaterToAirHeatPump:ParameterEstimation"
361 : LoopType::Both, // "Refrigeration:Condenser:WaterCooled"
362 : LoopType::Both, // "Refrigeration:CompressorRack"
363 : LoopType::Plant, // "AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed"
364 : LoopType::Plant, // "ChillerHeater:Absorption:DoubleEffect"
365 : LoopType::Both, // "PipingSystem:Underground:PipeCircuit"
366 : LoopType::Both, // "SolarCollector:IntegralCollectorStorage"
367 : LoopType::Both, // "Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit"
368 : LoopType::Both, // "Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit"
369 : LoopType::Both, // "PlantComponent:UserDefined"
370 : LoopType::Both, // "Coil:UserDefined"
371 : LoopType::Both, // "ZoneHVAC:ForcedAir:UserDefined"
372 : LoopType::Both, // "AirTerminal:SingleDuct:UserDefined"
373 : LoopType::Both, // "AirConditioner:VariableRefrigerantFlow"
374 : LoopType::Both, // "GroundHeatExchanger:HorizontalTrench"
375 : LoopType::Both, // "HeatExchanger:FluidToFluid"
376 : LoopType::Both, // "PlantComponent:TemperatureSource"
377 : LoopType::Plant, // "CentralHeatPumpSystem"
378 : LoopType::Plant, // "AirLoopHVAC:UnitarySystem"
379 : LoopType::Both, // "Coil:Cooling:DX:SingleSpeed:ThermalStorage"
380 : LoopType::Both, // "CoolingTower:VariableSpeed:Merkel"
381 : LoopType::Both, // "SwimmingPool:Indoor"
382 : LoopType::Both, // "GroundHeatExchanger:Slinky"
383 : LoopType::Plant, // "WaterHeater:HeatPump:WrappedCondenser"
384 : LoopType::Plant, // "AirTerminal:SingleDuct:ConstantVolume:FourPipeBeam"
385 : LoopType::Plant, // "ZoneHVAC:CoolingPanel:RadiantConvective:Water"
386 : LoopType::Both, // "HeatPump:PlantLoop:EIR:Cooling"
387 : LoopType::Both, // "HeatPump:PlantLoop:EIR:Heating"
388 : LoopType::Both // "DistrictHeating:Steam"
389 : };
390 : } // namespace DataPlant
391 :
392 : struct DataPlantData : BaseGlobalStruct
393 : {
394 :
395 : int TotNumLoops = 0; // number of plant and condenser loops
396 : int TotNumHalfLoops = 0; // number of half loops (2 * TotNumLoops)
397 : bool PlantFirstSizeCompleted = false;
398 : bool PlantFirstSizesOkayToFinalize = false; // true if plant sizing is finishing and can save results
399 : bool PlantReSizingCompleted = false;
400 : bool PlantFirstSizesOkayToReport = false;
401 : bool PlantFinalSizesOkayToReport = false;
402 : bool AnyEMSPlantOpSchemesInModel = false;
403 : int PlantManageSubIterations = 0; // tracks plant iterations to characterize solver
404 : int PlantManageHalfLoopCalls = 0; // tracks number of half loop calls
405 : Array1D<DataPlant::PlantLoopData> PlantLoop;
406 : std::array<Array1D<DataPlant::ReportLoopData>, static_cast<int>(DataPlant::LoopSideLocation::Num)> VentRepPlant;
407 : std::array<Array1D<DataPlant::ReportLoopData>, static_cast<int>(DataPlant::LoopSideLocation::Num)> VentRepCond;
408 : Array1D<DataPlant::PlantCallingOrderInfoStruct> PlantCallingOrderInfo;
409 :
410 796 : void init_state([[maybe_unused]] EnergyPlusData &state) override
411 : {
412 796 : }
413 :
414 0 : void clear_state() override
415 : {
416 0 : this->TotNumLoops = 0;
417 0 : this->TotNumHalfLoops = 0;
418 0 : this->PlantFirstSizeCompleted = false;
419 0 : this->PlantFirstSizesOkayToFinalize = false;
420 0 : this->PlantReSizingCompleted = false;
421 0 : this->PlantFirstSizesOkayToReport = false;
422 0 : this->PlantFinalSizesOkayToReport = false;
423 0 : this->AnyEMSPlantOpSchemesInModel = false;
424 0 : this->PlantManageSubIterations = 0;
425 0 : this->PlantManageHalfLoopCalls = 0;
426 0 : this->PlantLoop.deallocate();
427 0 : this->VentRepPlant[static_cast<int>(DataPlant::LoopSideLocation::Demand)].deallocate();
428 0 : this->VentRepPlant[static_cast<int>(DataPlant::LoopSideLocation::Supply)].deallocate();
429 0 : this->VentRepCond[static_cast<int>(DataPlant::LoopSideLocation::Demand)].deallocate();
430 0 : this->VentRepCond[static_cast<int>(DataPlant::LoopSideLocation::Supply)].deallocate();
431 0 : this->PlantCallingOrderInfo.deallocate();
432 0 : }
433 : };
434 :
435 : } // namespace EnergyPlus
436 :
437 : #endif
|