Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
2 : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
3 : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
4 : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
5 : // contributors. All rights reserved.
6 : //
7 : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
8 : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
9 : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
10 : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
11 : // derivative works, and perform publicly and display publicly, and to permit others to do so.
12 : //
13 : // Redistribution and use in source and binary forms, with or without modification, are permitted
14 : // provided that the following conditions are met:
15 : //
16 : // (1) Redistributions of source code must retain the above copyright notice, this list of
17 : // conditions and the following disclaimer.
18 : //
19 : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
20 : // conditions and the following disclaimer in the documentation and/or other materials
21 : // provided with the distribution.
22 : //
23 : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
24 : // the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
25 : // used to endorse or promote products derived from this software without specific prior
26 : // written permission.
27 : //
28 : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
29 : // without changes from the version obtained under this License, or (ii) Licensee makes a
30 : // reference solely to the software portion of its product, Licensee must refer to the
31 : // software as "EnergyPlus version X" software, where "X" is the version number Licensee
32 : // obtained under this License and may not use a different name for the software. Except as
33 : // specifically required in this Section (4), Licensee shall not use in a company name, a
34 : // product name, in advertising, publicity, or other promotional activities any name, trade
35 : // name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
36 : // similar designation, without the U.S. Department of Energy's prior written consent.
37 : //
38 : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
39 : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
40 : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
41 : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43 : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
45 : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 : // POSSIBILITY OF SUCH DAMAGE.
47 :
48 : #ifndef EvaporativeCoolers_hh_INCLUDED
49 : #define EvaporativeCoolers_hh_INCLUDED
50 :
51 : // ObjexxFCL Headers
52 : #include <ObjexxFCL/Array1D.hh>
53 :
54 : // EnergyPlus Headers
55 : #include <EnergyPlus/Data/BaseData.hh>
56 : #include <EnergyPlus/DataGlobals.hh>
57 : #include <EnergyPlus/DataHVACGlobals.hh>
58 : #include <EnergyPlus/DataZoneEquipment.hh>
59 : #include <EnergyPlus/EnergyPlus.hh>
60 :
61 : namespace EnergyPlus {
62 :
63 : // Forward declarations
64 : struct EnergyPlusData;
65 :
66 : namespace Curve {
67 : struct Curve;
68 : }
69 :
70 : namespace EvaporativeCoolers {
71 :
72 : // MODULE PARAMETER DEFINITIONS
73 : enum class WaterSupply
74 : {
75 : Invalid = -1,
76 : FromMains,
77 : FromTank,
78 : Num
79 : };
80 :
81 : enum class ControlType
82 : {
83 : Invalid = -1,
84 : ZoneTemperatureDeadBandOnOffCycling,
85 : ZoneCoolingLoadOnOffCycling,
86 : ZoneCoolingLoadVariableSpeedFan,
87 : Num
88 : };
89 :
90 : enum class OperatingMode
91 : {
92 : Invalid = -1,
93 : None, // the indirect evaporative cooler Research Special is scheduled off or turned off
94 : DryModulated, // the evaporative cooler Research Special is modulated in Dry Mode
95 : DryFull, // the evaporative cooler Research Special is run in full capacity in Dry Mode
96 : DryWetModulated, // the evaporative cooler Research Special is modulated in Dry Mode or wet Mode
97 : WetModulated, // the evaporative cooler Research Special is modulated in wet Mode
98 : WetFull, // the evaporative cooler Research Special is run in full capacity in Wet Mode
99 : Num
100 : };
101 :
102 : enum class EvapCoolerType
103 : {
104 : Invalid = -1,
105 : DirectCELDEKPAD,
106 : IndirectCELDEKPAD,
107 : IndirectWETCOIL,
108 : IndirectRDDSpecial,
109 : DirectResearchSpecial,
110 : Num
111 : };
112 :
113 : struct EvapConditions
114 : {
115 : std::string Name; // Name of the EvapCooler
116 : int EquipIndex;
117 : EvapCoolerType evapCoolerType; // Type of the EvapCooler
118 : std::string EvapControlType; // Type of Control for the EvapCooler
119 : std::string Schedule; // HeatingCoil Operation Schedule
120 : Sched::Schedule *availSched = nullptr; // Pointer to the correct schedule
121 : Real64 VolFlowRate; // Volume Flow Rate in Evap Cooler needed for calculating SatEff
122 : Real64 DesVolFlowRate; // Design volume flow rate (autosize or user input) - this is only used to compute design pump power
123 : Real64 OutletTemp;
124 : Real64 OuletWetBulbTemp;
125 : Real64 OutletHumRat;
126 : Real64 OutletEnthalpy;
127 : Real64 OutletPressure;
128 : Real64 OutletMassFlowRate; // MassFlow through the EvapCooler being Simulated [kg/Sec]
129 : Real64 OutletMassFlowRateMaxAvail; // [kg/Sec]
130 : Real64 OutletMassFlowRateMinAvail; // [kg/Sec]
131 : bool InitFlag;
132 : int InletNode;
133 : int OutletNode;
134 : int SecondaryInletNode; // This is usually OA node feeding into the purge/secondary side
135 : int SecondaryOutletNode; // This outlet node of the secondary side and ilet to the secondary fan
136 : int TertiaryInletNode; // This node is used to run building exhaust into purge side.
137 : Real64 InletMassFlowRate; // Inlet is primary process air node at inlet to cooler
138 : Real64 InletMassFlowRateMaxAvail;
139 : Real64 InletMassFlowRateMinAvail;
140 : Real64 InletTemp;
141 : Real64 InletWetBulbTemp;
142 : Real64 InletHumRat;
143 : Real64 InletEnthalpy;
144 : Real64 InletPressure;
145 : Real64 SecInletMassFlowRate; // Secondary inlet is for indirect coolers
146 : Real64 SecInletMassFlowRateMaxAvail;
147 : Real64 SecInletMassFlowRateMinAvail;
148 : Real64 SecInletTemp;
149 : Real64 SecInletWetBulbTemp;
150 : Real64 SecInletHumRat;
151 : Real64 SecInletEnthalpy;
152 : Real64 SecInletPressure;
153 : Real64 SecOutletTemp; // secondary air outlet node drybulb temperature
154 : Real64 SecOuletWetBulbTemp; // secondarr air outlet node wetbulb temperature
155 : Real64 SecOutletHumRat; // secondarr air outlet node humidity ratio
156 : Real64 SecOutletEnthalpy; // secondarr air outlet node enthalpy
157 : Real64 SecOutletMassFlowRate; // Mass Flow through the secondary air side [kg/Sec]
158 : Real64 PadDepth;
159 : Real64 PadArea;
160 : Real64 RecircPumpPower;
161 : Real64 IndirectRecircPumpPower;
162 : Real64 IndirectPadDepth;
163 : Real64 IndirectPadArea;
164 : Real64 IndirectVolFlowRate;
165 : Real64 IndirectFanEff;
166 : Real64 IndirectFanDeltaPress;
167 : Real64 IndirectHXEffectiveness;
168 : Real64 DirectEffectiveness; // input saturation effectiveness for constant effectiveness model
169 : Real64 WetCoilMaxEfficiency;
170 : Real64 WetCoilFlowRatio;
171 : Real64 EvapCoolerEnergy;
172 : Real64 EvapCoolerPower;
173 : WaterSupply EvapWaterSupplyMode; // where does water come from
174 : std::string EvapWaterSupplyName; // name of water source e.g. water storage tank
175 : int EvapWaterSupTankID;
176 : int EvapWaterTankDemandARRID;
177 : Real64 DriftFraction; // excess water from drift as fraction of Evap Water Consumption rate
178 : Real64 BlowDownRatio; // excess water use for blowdown as solids ratio to be maintained
179 : Real64 EvapWaterConsumpRate; // Evap Water Consumption rate in m3/sec
180 : Real64 EvapWaterConsump; // Evap Water Consumption in m3
181 : Real64 EvapWaterStarvMakupRate; // Evap water consumed but not really available from tank m3/s
182 : Real64 EvapWaterStarvMakup; // Evap water consumed but not really available from tank m3
183 : Real64 SatEff; // Reporting for Direct Stage and Ind Dry Saturation Efficiency
184 : Real64 StageEff; // Reporting for Indirect Total Stage Efficiency
185 : Real64 DPBoundFactor; // in RDDSpecial efficency w.r.t. dewpoint
186 : int EvapControlNodeNum; // need to control to avoid over cooling
187 : Real64 DesiredOutletTemp; // setpoint manager should set this
188 : Real64 PartLoadFract; // reduces cooling performance and associated fan power
189 : int DewPointBoundFlag; // report when indirect research special cooler is bound by dewpoint
190 : Real64 MinOATDBEvapCooler; // Minimum outdoor air operating dry-bulb temperature for evaporative cooler
191 : Real64 MaxOATDBEvapCooler; // Maximum outdoor air operating dry-bulb temperature for evaporative cooler
192 : bool EvapCoolerOperationControlFlag; // turns the evap cooler on/off depending on the outdoor air temperature min and max limits
193 : Real64 MaxOATWBEvapCooler; // Evaporative Operation Maximum Limit Outdoor Wetbulb Temperature
194 : Real64 DryCoilMaxEfficiency; // Cooler Drybulb Design Effectiveness
195 : Real64 IndirectFanPower; // Secondary Fan Design Power
196 : Real64 FanSizingSpecificPower; // secondary fan sizing specific power in W/(m3/s)
197 : Real64 RecircPumpSizingFactor; // water pump power sizing factor W/(m3/s) air
198 : Real64 IndirectVolFlowScalingFactor; // secondary air flow sizing Factor
199 : Curve::Curve *WetbulbEffecCurve = nullptr; // wetbulb effectiveness modifier curve name as a function of flow fraction
200 : Curve::Curve *DrybulbEffecCurve = nullptr; // drybulb effectiveness modifier curve name as a function of flow fraction
201 : Curve::Curve *FanPowerModifierCurve = nullptr; // secondary fan power modifier curve name as a function of flow fraction
202 : Curve::Curve *PumpPowerModifierCurve = nullptr; // recirculating pump power modifier curve name as a function of flow fraction
203 : int IECOperatingStatus; // operating mode status of indirect evaporative cooler research special (0: Off, 1: Dry, 2: Wet)
204 : int IterationLimit; // used for Used for RegulaFalsi recurring error message error -1
205 : int IterationFailed; // Used for RegulaFalsi recurring error message error -2
206 : // rather than wetbulb-depression approach
207 : OperatingMode EvapCoolerRDDOperatingMode; // the indirect evaporative cooler Research Special operating mode variable
208 : // Operational fault parameters
209 : bool FaultyEvapCoolerFoulingFlag; // True if the evaporative cooler has fouling fault
210 : int FaultyEvapCoolerFoulingIndex; // Index of the fault object corresponding to the evaporative cooler
211 : Real64 FaultyEvapCoolerFoulingFactor; // Evaporative cooler fouling factor
212 : bool MySizeFlag;
213 :
214 : // Default Constructor
215 18 : EvapConditions()
216 54 : : EquipIndex(0), evapCoolerType(EvapCoolerType::Invalid), VolFlowRate(0.0), DesVolFlowRate(0.0), OutletTemp(0.0), OuletWetBulbTemp(0.0),
217 18 : OutletHumRat(0.0), OutletEnthalpy(0.0), OutletPressure(0.0), OutletMassFlowRate(0.0), OutletMassFlowRateMaxAvail(0.0),
218 18 : OutletMassFlowRateMinAvail(0.0), InitFlag(false), InletNode(0), OutletNode(0), SecondaryInletNode(0), SecondaryOutletNode(0),
219 18 : TertiaryInletNode(0), InletMassFlowRate(0.0), InletMassFlowRateMaxAvail(0.0), InletMassFlowRateMinAvail(0.0), InletTemp(0.0),
220 18 : InletWetBulbTemp(0.0), InletHumRat(0.0), InletEnthalpy(0.0), InletPressure(0.0), SecInletMassFlowRate(0.0),
221 18 : SecInletMassFlowRateMaxAvail(0.0), SecInletMassFlowRateMinAvail(0.0), SecInletTemp(0.0), SecInletWetBulbTemp(0.0), SecInletHumRat(0.0),
222 18 : SecInletEnthalpy(0.0), SecInletPressure(0.0), SecOutletTemp(0.0), SecOuletWetBulbTemp(0.0), SecOutletHumRat(0.0),
223 18 : SecOutletEnthalpy(0.0), SecOutletMassFlowRate(0.0), PadDepth(0.0), PadArea(0.0), RecircPumpPower(0.0), IndirectRecircPumpPower(0.0),
224 18 : IndirectPadDepth(0.0), IndirectPadArea(0.0), IndirectVolFlowRate(0.0), IndirectFanEff(0.0), IndirectFanDeltaPress(0.0),
225 18 : IndirectHXEffectiveness(0.0), DirectEffectiveness(0.0), WetCoilMaxEfficiency(0.0), WetCoilFlowRatio(0.0), EvapCoolerEnergy(0.0),
226 36 : EvapCoolerPower(0.0), EvapWaterSupplyMode(WaterSupply::Invalid), EvapWaterSupTankID(0), EvapWaterTankDemandARRID(0), DriftFraction(0.0),
227 18 : BlowDownRatio(0.0), EvapWaterConsumpRate(0.0), EvapWaterConsump(0.0), EvapWaterStarvMakupRate(0.0), EvapWaterStarvMakup(0.0),
228 18 : SatEff(0.0), StageEff(0.0), DPBoundFactor(0.0), EvapControlNodeNum(0), DesiredOutletTemp(0.0), PartLoadFract(0.0), DewPointBoundFlag(0),
229 18 : MinOATDBEvapCooler(0.0), MaxOATDBEvapCooler(0.0), EvapCoolerOperationControlFlag(false), MaxOATWBEvapCooler(0.0),
230 18 : DryCoilMaxEfficiency(0.0), IndirectFanPower(0.0), FanSizingSpecificPower(0.0), RecircPumpSizingFactor(0.0),
231 18 : IndirectVolFlowScalingFactor(0.0), IECOperatingStatus(0), IterationLimit(0), IterationFailed(0),
232 18 : EvapCoolerRDDOperatingMode(OperatingMode::Invalid), FaultyEvapCoolerFoulingFlag(false), FaultyEvapCoolerFoulingIndex(0),
233 18 : FaultyEvapCoolerFoulingFactor(1.0), MySizeFlag(true)
234 : {
235 18 : }
236 : };
237 :
238 : struct ZoneEvapCoolerUnitStruct
239 : {
240 : std::string Name; // user identifier
241 : int ZoneNodeNum;
242 : Sched::Schedule *availSched = nullptr; // local availability schedule
243 : std::string AvailManagerListName; // Name of an availability manager list object
244 : bool UnitIsAvailable;
245 : Avail::Status FanAvailStatus = Avail::Status::NoAction;
246 : int OAInletNodeNum; // outdoor air inlet node index
247 : int UnitOutletNodeNum; // Unit air outlet (to zone) node index
248 : int UnitReliefNodeNum; // Unit relief air (from zone) node index (optional)
249 : HVAC::FanType fanType;
250 : std::string FanName;
251 : int FanIndex;
252 : Real64 ActualFanVolFlowRate;
253 : Sched::Schedule *fanAvailSched = nullptr;
254 : int FanInletNodeNum;
255 : int FanOutletNodeNum;
256 : HVAC::FanOp fanOp = HVAC::FanOp::Invalid;
257 : Real64 DesignAirVolumeFlowRate;
258 : Real64 DesignAirMassFlowRate;
259 : Real64 DesignFanSpeedRatio;
260 : Real64 FanSpeedRatio;
261 : HVAC::FanPlace fanPlace;
262 : ControlType ControlSchemeType;
263 : Real64 TimeElapsed;
264 : Real64 ThrottlingRange; // temperature range for hystersis type tstat contorl [Delta C]
265 : bool IsOnThisTimestep;
266 : bool WasOnLastTimestep;
267 : Real64 ThresholdCoolingLoad;
268 : std::string EvapCooler_1_ObjectClassName;
269 : std::string EvapCooler_1_Name;
270 : EvapCoolerType EvapCooler_1_Type_Num;
271 : int EvapCooler_1_Index;
272 : bool EvapCooler_1_AvailStatus;
273 : std::string EvapCooler_2_ObjectClassName;
274 : std::string EvapCooler_2_Name;
275 : EvapCoolerType EvapCooler_2_Type_Num;
276 : int EvapCooler_2_Index;
277 : bool EvapCooler_2_AvailStatus;
278 : Real64 OAInletRho; // fills internal variable, current inlet air density [kg/m3]
279 : Real64 OAInletCp; // fills internal variable, current inlet air specific heat [J/kg-c]
280 : Real64 OAInletTemp; // fills internal variable, current inlet air temperature [C]
281 : Real64 OAInletHumRat; // fills internal variable, current inlet air humidity ratio [kg/kg]
282 : Real64 OAInletMassFlowRate; // fills internal variable, current inlet air mass flow rate [kg/s]
283 : Real64 UnitOutletTemp; // filled by actuator, component outlet temperature [C]
284 : Real64 UnitOutletHumRat; // filled by actuator, component outlet humidity ratio [kg/kg]
285 : Real64 UnitOutletMassFlowRate; // filled by actuator, component outlet mass flow rate [kg/s]
286 : Real64 UnitReliefTemp; // filled by actuator, component outlet temperature [C]
287 : Real64 UnitReliefHumRat; // filled by actuator, component outlet humidity ratio [kg/kg]
288 : Real64 UnitReliefMassFlowRate; // filled by actuator, component outlet mass flow rate [kg/s]
289 : Real64 UnitTotalCoolingRate; // unit output to zone, total cooling rate [W]
290 : Real64 UnitTotalCoolingEnergy; // unit output to zone, total cooling energy [J]
291 : Real64 UnitSensibleCoolingRate; // unit output to zone, sensible cooling rate [W]
292 : Real64 UnitSensibleCoolingEnergy; // unit output to zone, sensible cooling energy [J]
293 : Real64 UnitLatentHeatingRate; // unit output to zone, latent heating rate [W]
294 : Real64 UnitLatentHeatingEnergy; // unit output to zone, latent heating energy [J]
295 : Real64 UnitLatentCoolingRate; // unit output to zone, latent cooling rate [W]
296 : Real64 UnitLatentCoolingEnergy; // unit output to zone, latent cooling energy [J]
297 : Real64 UnitFanSpeedRatio; // unit fan speed ratio, dimensionless [ ]
298 : Real64 UnitPartLoadRatio; // unit part load ratio, dimensionless [ ]
299 : int UnitVSControlMaxIterErrorIndex; // regula falsi errors, fan speed iteration limits
300 : int UnitVSControlLimitsErrorIndex; // regula falsi errors, limits exceeded.
301 : int UnitLoadControlMaxIterErrorIndex; // root solver errors, part load ratio iteration limits exceeded
302 : int UnitLoadControlLimitsErrorIndex; // root solver errors, art load ratio limits exceeded.
303 : int ZonePtr; // pointer to a zone served by an evaportive cooler unit
304 : int HVACSizingIndex; // index of a HVACSizing object for an evaportive cooler unit
305 : Real64 ShutOffRelativeHumidity; // Zone relative humidity above which the evap cooler is shut off.
306 : bool MySize; // sizing logic flag
307 : bool MyEnvrn; // sim environmental logic flag
308 : bool MyFan; // fan sizing logic flag
309 : bool MyZoneEq; // logic flag used to set up zone equipment availability managers
310 :
311 : // Default Constructor
312 4 : ZoneEvapCoolerUnitStruct()
313 12 : : ZoneNodeNum(0), UnitIsAvailable(false), OAInletNodeNum(0), UnitOutletNodeNum(0), UnitReliefNodeNum(0), fanType(HVAC::FanType::Invalid),
314 4 : FanIndex(0), ActualFanVolFlowRate(0.0), FanInletNodeNum(0), FanOutletNodeNum(0), DesignAirVolumeFlowRate(0.0),
315 4 : DesignAirMassFlowRate(0.0), DesignFanSpeedRatio(0.0), FanSpeedRatio(0.0), fanPlace(HVAC::FanPlace::Invalid),
316 4 : ControlSchemeType(ControlType::Invalid), TimeElapsed(0.0), ThrottlingRange(0.0), IsOnThisTimestep(false), WasOnLastTimestep(false),
317 8 : ThresholdCoolingLoad(0.0), EvapCooler_1_Type_Num(EvapCoolerType::Invalid), EvapCooler_1_Index(0), EvapCooler_1_AvailStatus(false),
318 4 : EvapCooler_2_Type_Num(EvapCoolerType::Invalid), EvapCooler_2_Index(0), EvapCooler_2_AvailStatus(false), OAInletRho(0.0), OAInletCp(0.0),
319 4 : OAInletTemp(0.0), OAInletHumRat(0.0), OAInletMassFlowRate(0.0), UnitOutletTemp(0.0), UnitOutletHumRat(0.0), UnitOutletMassFlowRate(0.0),
320 4 : UnitReliefTemp(0.0), UnitReliefHumRat(0.0), UnitReliefMassFlowRate(0.0), UnitTotalCoolingRate(0.0), UnitTotalCoolingEnergy(0.0),
321 4 : UnitSensibleCoolingRate(0.0), UnitSensibleCoolingEnergy(0.0), UnitLatentHeatingRate(0.0), UnitLatentHeatingEnergy(0.0),
322 4 : UnitLatentCoolingRate(0.0), UnitLatentCoolingEnergy(0.0), UnitFanSpeedRatio(0.0), UnitPartLoadRatio(0.0),
323 4 : UnitVSControlMaxIterErrorIndex(0), UnitVSControlLimitsErrorIndex(0), UnitLoadControlMaxIterErrorIndex(0),
324 4 : UnitLoadControlLimitsErrorIndex(0), ZonePtr(0), HVACSizingIndex(0), ShutOffRelativeHumidity(100.0), MySize(true), MyEnvrn(true),
325 4 : MyFan(true), MyZoneEq(true)
326 : {
327 4 : }
328 : };
329 :
330 : void SimEvapCooler(EnergyPlusData &state, std::string_view CompName, int &CompIndex, Real64 PartLoadRatio = 1.0);
331 :
332 : void GetEvapInput(EnergyPlusData &state);
333 :
334 : void InitEvapCooler(EnergyPlusData &state, int EvapCoolNum);
335 :
336 : void SizeEvapCooler(EnergyPlusData &state, int EvapCoolNum);
337 :
338 : void CalcDirectEvapCooler(EnergyPlusData &state, int EvapCoolNum, Real64 PartLoadRatio);
339 :
340 : void CalcDryIndirectEvapCooler(EnergyPlusData &state, int EvapCoolNum, Real64 PartLoadRatio);
341 :
342 : void CalcWetIndirectEvapCooler(EnergyPlusData &state, int EvapCoolNum, Real64 PartLoadRatio);
343 :
344 : void CalcResearchSpecialPartLoad(EnergyPlusData &state, int EvapCoolNum);
345 :
346 : void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state,
347 : int EvapCoolNum,
348 : Real64 InletDryBulbTempSec,
349 : Real64 InletWetBulbTempSec,
350 : Real64 InletDewPointTempSec,
351 : Real64 InletHumRatioSec);
352 :
353 : OperatingMode IndirectResearchSpecialEvapCoolerOperatingMode(EnergyPlusData &state,
354 : int EvapCoolNum,
355 : Real64 InletDryBulbTempSec,
356 : Real64 InletWetBulbTempSec,
357 : Real64 TdbOutSysWetMin,
358 : Real64 TdbOutSysDryMin);
359 :
360 : void CalcSecondaryAirOutletCondition(EnergyPlusData &state,
361 : int EvapCoolNum,
362 : OperatingMode OperatingMode,
363 : Real64 AirMassFlowSec,
364 : Real64 EDBTSec,
365 : Real64 EWBTSec,
366 : Real64 EHumRatSec,
367 : Real64 QHXTotal,
368 : Real64 &QHXLatent);
369 :
370 : void CalcIndirectRDDEvapCoolerOutletTemp(EnergyPlusData &state,
371 : int EvapCoolNum,
372 : OperatingMode DryOrWetOperatingMode,
373 : Real64 AirMassFlowSec,
374 : Real64 EDBTSec,
375 : Real64 EWBTSec,
376 : Real64 EHumRatSec);
377 :
378 : Real64 IndEvapCoolerPower(EnergyPlusData &state,
379 : int EvapCoolIndex, // Unit index
380 : OperatingMode DryWetMode, // dry or wet operating mode of evaporator cooler
381 : Real64 FlowRatio // secondary air flow fraction
382 : );
383 :
384 : void CalcIndirectResearchSpecialEvapCooler(EnergyPlusData &state, int EvapCoolNum, Real64 FanPLR = 1.0);
385 :
386 : void CalcDirectResearchSpecialEvapCooler(EnergyPlusData &state, int EvapCoolNum, Real64 FanPLR = 1.0);
387 :
388 : void UpdateEvapCooler(EnergyPlusData &state, int EvapCoolNum);
389 :
390 : void ReportEvapCooler(EnergyPlusData &state, int EvapCoolNum);
391 :
392 : void SimZoneEvaporativeCoolerUnit(EnergyPlusData &state,
393 : std::string_view CompName, // name of the packaged terminal heat pump
394 : int ZoneNum, // number of zone being served
395 : Real64 &SensibleOutputProvided, // sensible capacity delivered to zone
396 : Real64 &LatentOutputProvided, // Latent add/removal (kg/s), dehumid = negative
397 : int &CompIndex // index to zone hvac unit
398 : );
399 :
400 : void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state);
401 :
402 : void InitZoneEvaporativeCoolerUnit(EnergyPlusData &state,
403 : int UnitNum, // unit number
404 : int ZoneNum // number of zone being served
405 : );
406 :
407 : void SizeZoneEvaporativeCoolerUnit(EnergyPlusData &state, int UnitNum); // unit number
408 :
409 : void CalcZoneEvaporativeCoolerUnit(EnergyPlusData &state,
410 : int UnitNum, // unit number
411 : int ZoneNum, // number of zone being served
412 : Real64 &SensibleOutputProvided, // sensible capacity delivered to zone
413 : Real64 &LatentOutputProvided // Latent add/removal (kg/s), dehumid = negative
414 : );
415 :
416 : void CalcZoneEvapUnitOutput(EnergyPlusData &state,
417 : int UnitNum, // unit number
418 : Real64 PartLoadRatio, // zone evap unit part load ratiod
419 : Real64 &SensibleOutputProvided, // sensible capacity delivered to zone
420 : Real64 &LatentOutputProvided // Latent add/removal (kg/s), dehumid = negative
421 : );
422 :
423 : void ControlZoneEvapUnitOutput(EnergyPlusData &state,
424 : int UnitNum, // unit number
425 : Real64 ZoneCoolingLoad // target cooling load
426 : );
427 :
428 : void ControlVSEvapUnitToMeetLoad(EnergyPlusData &state,
429 : int UnitNum, // unit number
430 : Real64 ZoneCoolingLoad // target cooling load
431 : );
432 :
433 : void ReportZoneEvaporativeCoolerUnit(EnergyPlusData &state, int UnitNum); // unit number
434 :
435 : int GetInletNodeNum(EnergyPlusData &state, std::string const &EvapCondName, bool &ErrorsFound);
436 :
437 : int GetOutletNodeNum(EnergyPlusData &state, std::string const &EvapCondName, bool &ErrorsFound);
438 :
439 : } // namespace EvaporativeCoolers
440 :
441 : struct EvaporativeCoolersData : BaseGlobalStruct
442 : {
443 :
444 : bool GetInputEvapComponentsFlag = true; // Flag set to make sure you get input once
445 : int NumEvapCool = 0; // The Number of Evap Coolers found in the Input
446 : Array1D_bool CheckEquipName;
447 : int NumZoneEvapUnits = 0;
448 : Array1D_bool CheckZoneEvapUnitName;
449 : bool GetInputZoneEvapUnit = true;
450 : Array1D<EvaporativeCoolers::EvapConditions> EvapCond;
451 : Array1D<EvaporativeCoolers::ZoneEvapCoolerUnitStruct> ZoneEvapUnit;
452 : std::unordered_map<std::string, std::string> UniqueEvapCondNames;
453 : bool MySetPointCheckFlag = true;
454 : bool ZoneEquipmentListChecked = false;
455 :
456 2126 : void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
457 : {
458 2126 : }
459 :
460 1152 : void init_state([[maybe_unused]] EnergyPlusData &state) override
461 : {
462 1152 : }
463 :
464 2100 : void clear_state() override
465 : {
466 2100 : new (this) EvaporativeCoolersData();
467 2100 : }
468 : };
469 :
470 : } // namespace EnergyPlus
471 :
472 : #endif
|