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 FanCoilUnits_hh_INCLUDED
49 : #define FanCoilUnits_hh_INCLUDED
50 :
51 : // C++ Headers
52 : #include <memory>
53 : #include <string>
54 :
55 : // ObjexxFCL Headers
56 : #include <ObjexxFCL/Array1D.hh>
57 : #include <ObjexxFCL/Optional.hh>
58 :
59 : // EnergyPlus Headers
60 : #include <EnergyPlus/Data/BaseData.hh>
61 : #include <EnergyPlus/DataGlobals.hh>
62 : #include <EnergyPlus/EnergyPlus.hh>
63 : #include <EnergyPlus/HVACFan.hh>
64 : #include <EnergyPlus/Plant/Enums.hh>
65 : #include <EnergyPlus/Plant/PlantLocation.hh>
66 :
67 : namespace EnergyPlus {
68 :
69 : // Forward declarations
70 : struct EnergyPlusData;
71 :
72 : namespace FanCoilUnits {
73 :
74 : Real64 constexpr Small5WLoad = 5.0; // load threshold 5.0 W
75 :
76 : // coil type units supported in this module
77 : constexpr int FanCoilUnit_4Pipe(1);
78 :
79 : enum class CCoil
80 : {
81 : Invalid = -1,
82 : Water,
83 : Detailed,
84 : HXAssist,
85 : Num
86 : };
87 :
88 : enum class HCoil
89 : {
90 : Invalid = -1,
91 : Water,
92 : Electric,
93 : Num
94 : };
95 :
96 : enum class CCM // capacity control method supported in this module
97 : {
98 : Invalid = -1,
99 : ConsFanVarFlow,
100 : CycFan,
101 : VarFanVarFlow,
102 : VarFanConsFlow,
103 : MultiSpeedFan,
104 : ASHRAE,
105 : Num
106 : };
107 :
108 181 : struct FanCoilData
109 : {
110 : // Members
111 : // Input data
112 : int UnitType_Num;
113 : std::string Sched; // availability schedule
114 : int SchedPtr; // index to schedule
115 : std::string SchedOutAir; // outside air schedule, multipliy maximum outdoor air flow rate
116 : int SchedOutAirPtr; // index to outside air schedule
117 : int FanType_Num; // index to fan type
118 : std::string CapCtrlMeth; // type of capacity control method
119 : // 'ConstantFanVariableFlow' or
120 : // 'CyclingFan' or
121 : // 'VariableFanVariableFlow'
122 : int SpeedFanSel; // Speed fan selected
123 : CCM CapCtrlMeth_Num;
124 : Real64 PLR; // Part Load Ratio, fraction of time step fancoil is on
125 : int MaxIterIndexH; // Maximum iterations exceeded for heating
126 : int BadMassFlowLimIndexH; // Bad mass flow limit error index for heating
127 : int MaxIterIndexC; // Maximum iterations exceeded for cooling
128 : int BadMassFlowLimIndexC; // Bad mass flow limit error index for cooling
129 : Real64 FanAirVolFlow; // m3/s
130 : Real64 MaxAirVolFlow; // m3/s
131 : Real64 MaxAirMassFlow; // kg/s
132 : Real64 LowSpeedRatio; // Low speed fan supply air flow ratio
133 : Real64 MedSpeedRatio; // Medium speed fan supply air flow ratio
134 : Real64 SpeedFanRatSel; // Speed fan ratio determined by fan speed selection at each timestep
135 : Real64 OutAirVolFlow; // m3/s
136 : Real64 OutAirMassFlow; // kg/s
137 : int AirInNode; // inlet air node number
138 : int AirOutNode; // outlet air node number
139 : int OutsideAirNode; // outside air node number
140 : int AirReliefNode; // relief air node number
141 : int MixedAirNode; // Mixed Air Node number
142 : std::string OAMixName; // name of outside air mixer
143 : std::string OAMixType; // type of outside air mixer
144 : int OAMixIndex;
145 : std::string FanName; // name of fan
146 : std::string FanType; // type of fan
147 : int FanIndex; // index for fan
148 : std::string CCoilName; // name of cooling coil
149 : int CCoilName_Index; // Index for this Cooling Coil in SimWaterComp
150 : std::string CCoilType; // type of cooling coil:
151 : // 'Coil:Cooling:Water' or
152 : // 'Coil:Cooling:Water:DetailedGeometry' or
153 : // 'CoilSystem:Cooling:Water:HeatExchangerAssisted'
154 : CCoil CCoilType_Num; // Numeric equivalent for type of cooling coil
155 : std::string CCoilPlantName; // name of cooling coil (child<=CoilSystem:Cooling:Water:HeatExchangerAssisted)
156 : DataPlant::PlantEquipmentType CCoilPlantType;
157 : int ControlCompTypeNum;
158 : int CompErrIndex;
159 : Real64 MaxColdWaterVolFlow; // m3/s
160 : Real64 MinColdWaterVolFlow; // m3/s
161 : Real64 MinColdWaterFlow; // kg/s
162 : Real64 ColdControlOffset; // control tolerance
163 : std::string HCoilName; // name of heating coil
164 : int HCoilName_Index;
165 : std::string HCoilType; // type of heating coil:
166 : // 'Coil:Heating:Water' or
167 : HCoil HCoilType_Num; // Numeric equivalent for type of cooling coil
168 : DataPlant::PlantEquipmentType HCoilPlantTypeOf{DataPlant::PlantEquipmentType::Invalid};
169 : Real64 MaxHotWaterVolFlow; // m3/s
170 : Real64 MinHotWaterVolFlow; // m3/s
171 : Real64 MinHotWaterFlow; // kg/s
172 : Real64 HotControlOffset; // control tolerance
173 : Real64 DesignHeatingCapacity; // size of electric heating coil [W]
174 : int AvailStatus;
175 : std::string AvailManagerListName; // Name of an availability manager list object
176 : // addition for OA to Zone Units
177 : std::string ATMixerName; // name of air terminal mixer
178 : int ATMixerIndex; // index to the air terminal mixer
179 : int ATMixerType; // 1 = inlet side mixer, 2 = supply side mixer
180 : int ATMixerPriNode; // primary inlet air node number for the air terminal mixer
181 : int ATMixerSecNode; // secondary air inlet node number for the air terminal mixer
182 : int HVACSizingIndex; // index of a HVACSizing object for a fancoil unit
183 : Real64 SpeedRatio; // speed ratio when the fan is cycling between stages
184 : int FanOpModeSchedPtr; // pointer to supply air fan operating mode schedule
185 : int FanOpMode; // 1=cycling fan cycling coil; 2=constant fan cycling coil
186 : bool ASHRAETempControl; // ASHRAE90.1 control to temperature set point when true
187 : Real64 QUnitOutNoHC; // unit output with coils off [W]
188 : Real64 QUnitOutMaxH; // unit output at maximum heating [W]
189 : Real64 QUnitOutMaxC; // unit output at maximum cooling [W]
190 : int LimitErrCountH; // count of SolveRoot limit errors
191 : int LimitErrCountC; // count of SolveRoot limit errors
192 : int ConvgErrCountH; // count of SolveRoot iteration limit errors
193 : int ConvgErrCountC; // count of SolveRoot iteration limit errors
194 : // Report data
195 : Real64 HeatPower; // unit heating output in watts
196 : Real64 HeatEnergy; // unit heating output in J
197 : Real64 TotCoolPower; // unit total cooling power output in watts
198 : Real64 TotCoolEnergy; // unit total cooling energy output in joules
199 : Real64 SensCoolPower; // unit sensible cooling power output in watts
200 : Real64 SensCoolEnergy; // unit sensible cooling energy output in joules
201 : Real64 ElecPower; // unit electric power consumption in watts
202 : Real64 ElecEnergy; // unit electiric energy consumption in joules
203 : Real64 DesCoolingLoad; // used for reporting in watts
204 : Real64 DesHeatingLoad; // used for reporting in watts
205 : Real64 DesZoneCoolingLoad; // used for reporting in watts
206 : Real64 DesZoneHeatingLoad; // used for reporting in watts
207 : int DSOAPtr; // design specification outdoor air object index
208 : bool FirstPass; // detects first time through for resetting sizing data
209 : int fanAvailSchIndex; // fan availability schedule index
210 :
211 : // SZVAV Model inputs
212 : std::string Name; // name of unit
213 : std::string UnitType; // type of unit
214 : Real64 MaxCoolCoilFluidFlow; // kg/s
215 : Real64 MaxHeatCoilFluidFlow; // kg/s
216 : Real64 DesignMinOutletTemp; // ASHRAE90.1 maximum supply air temperature in Cooling mode
217 : Real64 DesignMaxOutletTemp; // ASHRAE90.1 maximum supply air temperature in Heating mode
218 : Real64 MaxNoCoolHeatAirMassFlow; // minimum air flow rate using constant fan and ASHRAE90.1 control method
219 : Real64 MaxCoolAirMassFlow; // used in ASHRAE90.1 model, same as MaxAirMassFlow
220 : Real64 MaxHeatAirMassFlow; // used in ASHRAE90.1 model, same as MaxAirMassFlow
221 : Real64 LowSpeedCoolFanRatio; // ratio of min air flow to max air flow
222 : Real64 LowSpeedHeatFanRatio; // ratio of min air flow to max air flow
223 : int CoolCoilFluidInletNode; // chilled water control node
224 : int CoolCoilFluidOutletNodeNum; // chilled water coil outlet plant node
225 : int HeatCoilFluidInletNode; // hot water control node
226 : int HeatCoilFluidOutletNodeNum; // hot water coil outlet plant node
227 : PlantLocation CoolCoilPlantLoc; // index for plant location for chilled water coil
228 : PlantLocation HeatCoilPlantLoc; // index for plant location for hot water coil
229 : int CoolCoilInletNodeNum; // index of cooling coil inlet node number
230 : int CoolCoilOutletNodeNum; // index of cooling coil outlet node number
231 : int HeatCoilInletNodeNum; // index of heating coil inlet node number
232 : int HeatCoilOutletNodeNum; // index of heating coil outlet node number
233 : int ControlZoneNum; // pointer to a zone served by a fancoil unit
234 : int NodeNumOfControlledZone; // node number of controlled zone
235 : bool ATMixerExists; // True if there is an ATMixer
236 : int ATMixerOutNode; // outlet air node number for the air terminal mixer
237 : Real64 FanPartLoadRatio; // ratio of air flow to max air flow to simulation modulating fan
238 : Real64 HeatCoilWaterFlowRatio; // ratio of water flow rate to max water flow rate
239 : Real64 ControlZoneMassFlowFrac; // flow fraction of control zone (always 1 for zone equipment)
240 : int MaxIterIndex; // recurring message index
241 : int RegulaFalsiFailedIndex; // iteration loop warning
242 :
243 19 : FanCoilData() // Default Constructor
244 19 : : UnitType_Num(0), SchedPtr(0), SchedOutAirPtr(0), FanType_Num(0), SpeedFanSel(0), CapCtrlMeth_Num(CCM::Invalid), PLR(0.0),
245 : MaxIterIndexH(0), BadMassFlowLimIndexH(0), MaxIterIndexC(0), BadMassFlowLimIndexC(0), FanAirVolFlow(0.0), MaxAirVolFlow(0.0),
246 : MaxAirMassFlow(0.0), LowSpeedRatio(0.0), MedSpeedRatio(0.0), SpeedFanRatSel(0.0), OutAirVolFlow(0.0), OutAirMassFlow(0.0), AirInNode(0),
247 : AirOutNode(0), OutsideAirNode(0), AirReliefNode(0), MixedAirNode(0), OAMixIndex(0), FanIndex(0), CCoilName_Index(0),
248 : CCoilType_Num(CCoil::Invalid), CCoilPlantType(DataPlant::PlantEquipmentType::Invalid), ControlCompTypeNum(0), CompErrIndex(0),
249 : MaxColdWaterVolFlow(0.0), MinColdWaterVolFlow(0.0), MinColdWaterFlow(0.0), ColdControlOffset(0.0), HCoilName_Index(0),
250 : HCoilType_Num(HCoil::Invalid), MaxHotWaterVolFlow(0.0), MinHotWaterVolFlow(0.0), MinHotWaterFlow(0.0), HotControlOffset(0.0),
251 : DesignHeatingCapacity(0.0), AvailStatus(0), ATMixerIndex(0), ATMixerType(0), ATMixerPriNode(0), ATMixerSecNode(0), HVACSizingIndex(0),
252 : SpeedRatio(0.0), FanOpModeSchedPtr(0), FanOpMode(1), ASHRAETempControl(false), QUnitOutNoHC(0.0), QUnitOutMaxH(0.0), QUnitOutMaxC(0.0),
253 : LimitErrCountH(0), LimitErrCountC(0), ConvgErrCountH(0), ConvgErrCountC(0), HeatPower(0.0), HeatEnergy(0.0), TotCoolPower(0.0),
254 : TotCoolEnergy(0.0), SensCoolPower(0.0), SensCoolEnergy(0.0), ElecPower(0.0), ElecEnergy(0.0), DesCoolingLoad(0.0), DesHeatingLoad(0.0),
255 : DesZoneCoolingLoad(0.0), DesZoneHeatingLoad(0.0), DSOAPtr(0), FirstPass(true), fanAvailSchIndex(0), MaxCoolCoilFluidFlow(0.0),
256 : MaxHeatCoilFluidFlow(0.0), DesignMinOutletTemp(0.0), DesignMaxOutletTemp(0.0), MaxNoCoolHeatAirMassFlow(0.0), MaxCoolAirMassFlow(0.0),
257 : MaxHeatAirMassFlow(0.0), LowSpeedCoolFanRatio(0.0), LowSpeedHeatFanRatio(0.0), CoolCoilFluidInletNode(0), CoolCoilFluidOutletNodeNum(0),
258 : HeatCoilFluidInletNode(0), HeatCoilFluidOutletNodeNum(0), CoolCoilPlantLoc{}, HeatCoilPlantLoc{}, CoolCoilInletNodeNum(0),
259 : CoolCoilOutletNodeNum(0), HeatCoilInletNodeNum(0), HeatCoilOutletNodeNum(0), ControlZoneNum(0), NodeNumOfControlledZone(0),
260 : ATMixerExists(false), ATMixerOutNode(0), FanPartLoadRatio(0.0), HeatCoilWaterFlowRatio(0.0), ControlZoneMassFlowFrac(1.0),
261 19 : MaxIterIndex(0), RegulaFalsiFailedIndex(0)
262 : {
263 19 : }
264 : };
265 :
266 200 : struct FanCoilNumericFieldData
267 : {
268 : // Members
269 : Array1D_string FieldNames;
270 : };
271 :
272 : void SimFanCoilUnit(EnergyPlusData &state,
273 : std::string_view CompName, // name of the fan coil unit
274 : int ControlledZoneNum, // number of zone being served
275 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
276 : Real64 &PowerMet, // Sensible power supplied (W)
277 : Real64 &LatOutputProvided, // Latent add/removal supplied by window AC (kg/s), dehumid = negative
278 : int &CompIndex);
279 :
280 : void GetFanCoilUnits(EnergyPlusData &state);
281 :
282 : void InitFanCoilUnits(EnergyPlusData &state,
283 : int FanCoilNum, // number of the current fan coil unit being simulated
284 : int ControlledZoneNum); // number of zone being served
285 :
286 : void SizeFanCoilUnit(EnergyPlusData &state, int FanCoilNum,
287 : int ControlledZoneNum); // index into ZoneEquipConfig array
288 :
289 : void Sim4PipeFanCoil(EnergyPlusData &state,
290 : int &FanCoilNum, // number of the current fan coil unit being simulated
291 : int ControlledZoneNum, // index into ZoneEqupConfig
292 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
293 : Real64 &PowerMet, // Sensible power supplied (W)
294 : Real64 &LatOutputProvided // Latent power supplied (kg/s), negative = dehumidification
295 : );
296 :
297 : void TightenWaterFlowLimits(EnergyPlusData &state,
298 : int FanCoilNum, // Unit index in fan coil array
299 : bool CoolingLoad, // true if zone requires cooling
300 : bool HeatingLoad, // true if zone requires heating
301 : int WaterControlNode, // water control node, either cold or hot water
302 : int ControlledZoneNum, // controlling zone index
303 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
304 : Real64 QZnReq, // zone load [W]
305 : Real64 &MinWaterFlow, // minimum water flow rate
306 : Real64 &MaxWaterFlow // maximum water flow rate
307 : );
308 :
309 : void TightenAirAndWaterFlowLimits(EnergyPlusData &state,
310 : int FanCoilNum, // Unit index in fan coil array
311 : bool CoolingLoad, // true if zone requires cooling
312 : bool HeatingLoad, // true if zone requires heating
313 : int WaterControlNode, // water control node, either cold or hot water
314 : int ControlledZoneNum, // controlling zone index
315 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
316 : Real64 QZnReq, // zone load [W]
317 : Real64 &PLRMin, // minimum part-load ratio
318 : Real64 &PLRMax // maximum part-load ratio
319 : );
320 :
321 : void Calc4PipeFanCoil(EnergyPlusData &state,
322 : int FanCoilNum, // Unit index in fan coil array
323 : int ControlledZoneNum, // ZoneEquipConfig index
324 : bool FirstHVACIteration, // flag for 1st HVAV iteration in the time step
325 : Real64 &LoadMet, // load met by unit (watts)
326 : Optional<Real64> PLR = _, // Part Load Ratio, fraction of time step fancoil is on
327 : Real64 ElecHeatCoilPLR = 1.0 // electric heating coil PLR used with MultiSpeedFan capacity control
328 : );
329 :
330 : void SimMultiStage4PipeFanCoil(EnergyPlusData &state,
331 : int &FanCoilNum, // number of the current fan coil unit being simulated
332 : int ControlledZoneNum, // index into ZoneEqupConfig
333 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
334 : Real64 &PowerMet // Sensible power supplied (W)
335 : );
336 :
337 : void CalcMultiStage4PipeFanCoil(EnergyPlusData &state,
338 : int &FanCoilNum, // number of the current fan coil unit being simulated
339 : int ZoneNum, // number of zone being served
340 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
341 : Real64 QZnReq, // current zone cooling or heating load
342 : Real64 &SpeedRatio, // fan coil speed ratio
343 : Real64 &PartLoadRatio, // fan coil part load ratio
344 : Real64 &PowerMet // Sensible power supplied (W)
345 : );
346 :
347 : void ReportFanCoilUnit(EnergyPlusData &state, int FanCoilNum); // number of the current fan coil unit being simulated
348 :
349 : int GetFanCoilZoneInletAirNode(EnergyPlusData &state, int FanCoilNum);
350 :
351 : int GetFanCoilOutAirNode(EnergyPlusData &state, int FanCoilNum);
352 :
353 : int GetFanCoilReturnAirNode(EnergyPlusData &state, int FanCoilNum);
354 :
355 : int GetFanCoilMixedAirNode(EnergyPlusData &state, int FanCoilNum);
356 :
357 : Real64 CalcFanCoilLoadResidual(EnergyPlusData &state,
358 : int FanCoilNum, // Index to this fan coil unit
359 : bool FirstHVACIteration, // FirstHVACIteration flag
360 : int ControlledZoneNum, // zone index
361 : Real64 QZnReq, // Sensible load to be met [W]
362 : Real64 PartLoadRatio // coil part load ratio
363 : );
364 :
365 : Real64 CalcFanCoilPLRResidual(EnergyPlusData &state,
366 : Real64 PLR, // part-load ratio of air and water mass flow rate
367 : int FanCoilNum, // Index to this fan coil unit
368 : bool FirstHVACIteration, // FirstHVACIteration flag
369 : int ControlledZoneNum, // zone index
370 : int WaterControlNode, // water node to control
371 : Real64 QZnReq // Sensible load to be met [W] // Function parameters
372 : );
373 :
374 : Real64 CalcFanCoilHeatCoilPLRResidual(EnergyPlusData &state,
375 : Real64 CyclingR, // electric heating coil cycling ratio
376 : int FanCoilNum,
377 : bool FirstHVACIteration,
378 : int ZoneNum,
379 : Real64 QZnReq // Function parameters
380 : );
381 :
382 : Real64 CalcFanCoilCWLoadResidual(EnergyPlusData &state,
383 : Real64 CWFlow, // water mass flow rate [kg/s]
384 : int FanCoilNum,
385 : bool FirstHVACIteration,
386 : int ControlledZoneNum,
387 : Real64 QZnReq);
388 :
389 : Real64 CalcFanCoilWaterFlowResidual(EnergyPlusData &state,
390 : Real64 PLR,
391 : int FanCoilNum,
392 : bool FirstHVACIteration,
393 : int ControlledZoneNum,
394 : Real64 QZnReq,
395 : int AirInNode,
396 : int WaterControlNode,
397 : Real64 maxCoilFluidFlow,
398 : Real64 AirMassFlowRate);
399 :
400 : Real64 CalcFanCoilAirAndWaterFlowResidual(EnergyPlusData &state,
401 : Real64 WaterFlow, // water mass flow rate [kg/s]
402 : int FanCoilNum,
403 : bool FirstHVACIteration,
404 : int ControlledZoneNum,
405 : Real64 QZnReq,
406 : int AirInNode,
407 : int WaterControlNode,
408 : Real64 MinWaterFlow);
409 :
410 : } // namespace FanCoilUnits
411 :
412 1542 : struct FanCoilUnitsData : BaseGlobalStruct
413 : {
414 :
415 : std::string const cMO_FanCoil = "ZoneHVAC:FourPipeFanCoil";
416 : int NumFanCoils = 0;
417 : int Num4PipeFanCoils = 0;
418 : Array1D_bool MySizeFlag;
419 : Array1D_bool CheckEquipName;
420 : bool GetFanCoilInputFlag = true; // First time, input is "gotten"
421 : Real64 FanFlowRatio = 0.0;
422 : bool HeatingLoad = false; // True when zone needs heating
423 : bool CoolingLoad = false; // True when zone needs cooling
424 : Array1D<FanCoilUnits::FanCoilData> FanCoil;
425 : Array1D<FanCoilUnits::FanCoilNumericFieldData> FanCoilNumericFields;
426 : bool InitFanCoilUnitsOneTimeFlag = true;
427 : bool InitFanCoilUnitsCheckInZoneEquipmentListFlag = false; // True after the Zone Equipment List has been checked for items
428 :
429 : // static variables extracted from functions
430 : bool ErrorsFound = false; // Set to true if errors in input, fatal at end of routine
431 : bool errFlag = false; // Local error flag for GetOAMixerNodeNums
432 : int TotalArgs = 0; // Total number of alpha and numeric arguments (max) for a
433 : bool ZoneExNodeNotFound = false; // used in error checking
434 : bool ZoneInNodeNotFound = false; // used in error checking
435 : int ATMixerNum = 0; // index of air terminal mixer in the air terminal mixer data array
436 : int ATMixerType = 0; // type of air terminal mixer (1=inlet side; 2=supply side)
437 : int ATMixerPriNode = 0; // node number of the air terminal mixer primary air inlet
438 : int ATMixerSecNode = 0; // node number of the air terminal mixer secondary air inlet
439 : int ATMixerOutNode = 0; // node number of the air terminal mixer secondary air inlet
440 : Array1D_bool MyEnvrnFlag;
441 : Array1D_bool MyPlantScanFlag;
442 : Array1D_bool MyZoneEqFlag; // used to set up zone equipment availability managers
443 : int CoilWaterInletNode = 0;
444 : int CoilWaterOutletNode = 0;
445 : int ATMixOutNode = 0; // outlet node of ATM Mixer
446 : int ZoneNode = 0; // zone node
447 :
448 0 : void clear_state() override
449 : {
450 0 : new (this) FanCoilUnitsData();
451 0 : }
452 : };
453 :
454 : } // namespace EnergyPlus
455 :
456 : #endif
|