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 HVACUnitaryBypassVAV_hh_INCLUDED
49 : #define HVACUnitaryBypassVAV_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/EnergyPlus.hh>
58 :
59 : namespace EnergyPlus {
60 :
61 : // Forward declarations
62 : struct EnergyPlusData;
63 :
64 : namespace HVACUnitaryBypassVAV {
65 :
66 : // Using/Aliasing
67 :
68 : // Data
69 : // MODULE PARAMETER DEFINITIONS
70 :
71 : // Mode of operation
72 : // can't change these to enum class since these are used in SetupOutputVariable()
73 : int constexpr CoolingMode(1); // System operating mode is cooling
74 : int constexpr HeatingMode(2); // System operating mode is heating
75 :
76 : enum class DehumidControl // Dehumidification control modes (DehumidControlMode) for Multimode units only
77 : {
78 : // TODO: enum check
79 : Invalid = -1,
80 : None,
81 : Multimode,
82 : CoolReheat,
83 : Num
84 : };
85 :
86 : enum class PriorityCtrlMode // Priority control mode (prioritized thermostat signal)
87 : {
88 : Invalid = -1,
89 : CoolingPriority, // Controls CBVAV system based on cooling priority
90 : HeatingPriority, // Controls CBVAV system based on heating priority
91 : ZonePriority, // Controls CBVAV system based on number of zones priority
92 : LoadPriority, // Controls CBVAV system based on total load priority
93 : Num
94 : };
95 :
96 : enum class AirFlowCtrlMode // Airflow control for contant fan mode
97 : {
98 : Invalid = -1,
99 : UseCompressorOnFlow, // Set compressor OFF air flow rate equal to compressor ON air flow rate
100 : UseCompressorOffFlow, // Set compressor OFF air flow rate equal to user defined value
101 : Num
102 : };
103 :
104 : // SUBROUTINE SPECIFICATIONS FOR MODULE
105 :
106 12 : struct CBVAVData
107 : {
108 : // Members
109 : // input data
110 : std::string Name; // Name of unit
111 : std::string UnitType; // Type of unit
112 : std::string Sched; // Availability schedule name
113 : int SchedPtr; // Index number to availability schedule
114 : Real64 MaxCoolAirVolFlow; // System air volumetric flow rate during cooling operation [m3/s]
115 : Real64 MaxHeatAirVolFlow; // System air volumetric flow rate during heating operation [m3/s]
116 : Real64 MaxNoCoolHeatAirVolFlow; // System air volumetric flow rate when no cooling or heating [m3/s]
117 : Real64 MaxCoolAirMassFlow; // System air mass flow rate during cooling operation [kg/s]
118 : Real64 MaxHeatAirMassFlow; // System air mass flow rate during heating operation [kg/s]
119 : Real64 MaxNoCoolHeatAirMassFlow; // System air mass flow rate when no cooling or heating [kg/s]
120 : Real64 CoolOutAirVolFlow; // OA volumetric flow rate during cooling operation [m3/s]
121 : Real64 HeatOutAirVolFlow; // OA volumetric flow rate during heating operation [m3/s]
122 : Real64 NoCoolHeatOutAirVolFlow; // OA volumetric flow rate when no cooling or heating [m3/s]
123 : Real64 CoolOutAirMassFlow; // OA mass flow rate during cooling operation [kg/s]
124 : Real64 HeatOutAirMassFlow; // OA mass flow rate during heating operation [kg/s]
125 : Real64 NoCoolHeatOutAirMassFlow; // OA mass flow rate when no cooling or heating [kg/s]
126 : int OutAirSchPtr; // Index number to outside air multiplier schedule
127 : int AirInNode; // Inlet air node number for CBVAV unit
128 : int AirOutNode; // Outlet air node number for CBVAV unit
129 : int CondenserNodeNum; // DX Coil condenser air inlet node number
130 : int MixerOutsideAirNode; // Outside air node number for OA mixer
131 : int MixerMixedAirNode; // Mixed air node number for OA mixer
132 : int MixerReliefAirNode; // Relief air node number for OA mixer
133 : int MixerInletAirNode; // Return air node number for OA mixer
134 : int SplitterOutletAirNode; // Air node number for splitter (last component outlet node)
135 : int PlenumMixerInletAirNode; // only used when bypass is connected to plenum or mixer
136 : std::string OAMixType; // type of outside air mixer
137 : std::string OAMixName; // Name of OA mixer
138 : int OAMixIndex; // Index to OA mixer
139 : std::string FanName; // Name of fan
140 : std::string FanType; // Type of fan
141 : int FanPlace; // Fan placement is either blowthru (1) or drawthru (2)
142 : int FanType_Num; // Fan type number (see DataHVACGlobals)
143 : int FanIndex; // Index number to fan
144 : int FanOpModeSchedPtr; // Fan operating mode schedule pointer
145 : Real64 FanVolFlow; // Volumetric flow rate of system supply air fan [m3/s]
146 : Real64 HeatingSpeedRatio; // Fan speed ratio in heating mode
147 : Real64 CoolingSpeedRatio; // Fan speed ratio in cooling mode
148 : Real64 NoHeatCoolSpeedRatio; // Fan speed ratio when no cooling or heating
149 : Real64 MaxONOFFCyclesperHourCycling; // Maximum cycling rate of heat pump [cycles/hr]
150 : Real64 HPTimeConstantCycling; // Heat pump time constant [s]
151 : Real64 FanDelayTimeCycling; // Fan delay time, time delay for the HP's fan to
152 : bool CheckFanFlow; // Check fan volumetric flow versus system flow in init routine.
153 : std::string DXCoolCoilName; // Name of DX cooling coil
154 : std::string DXCoolCoilType; // Type of DX cooling coil, Coil:DX:Cooling:SingleSpeed or
155 : // CoilSystem:Cooling:DX:HeatExchangerAssisted
156 : int DXCoolCoilType_Num; // Numeric equivalent for DX cooling coil type
157 : int CoolCoilCompIndex; // cooling coil component index number
158 : int DXCoolCoilIndexNum; // actual DX cooling coil index number
159 : int DXHeatCoilIndexNum; // actual DX heating coil index number
160 : std::string HeatCoilName; // Name of heating coil
161 : std::string HeatCoilType; // Type of heating coil,Coil:DX:HeatingEmpirical
162 : // Coil:Heater:Gas, Coil:Heater:Electric, Coil:Heater:Water
163 : // Coil:Heater:Steam
164 : int HeatCoilType_Num; // Numeric equivalent for DX heating coil type
165 : int HeatCoilIndex; // DX heating coil index number
166 : int OpMode; // mode of operation; 1=cycling fan, cycling compressor
167 : // 2=continuous fan, cycling compressor
168 : int CoilControlNode; // heating coil hot water or steam inlet node
169 : int CoilOutletNode; // outlet node for hot water and steam coil
170 : PlantLocation plantLoc; // plant loop component location object for water heating coil
171 : int HotWaterCoilMaxIterIndex; // Index to recurring warning message
172 : int HotWaterCoilMaxIterIndex2; // Index to recurring warning message
173 : Real64 MaxHeatCoilFluidFlow; // water or steam mass flow rate for heating coil [kg/s]
174 : Real64 DesignHeatingCapacity; // design heating capacity of the heating coil
175 : Real64 DesignSuppHeatingCapacity; // Operating capacity of supplemental Heating Coil [W]
176 : Real64 MinOATCompressor; // Minimum OAT for compressor operation [C]
177 : Real64 MinLATCooling; // Minimum leaving air temp for compressor cooling operation [C]
178 : Real64 MaxLATHeating; // Maximum leaving air temp for heating operation [C]
179 : // Report data
180 : Real64 TotHeatEnergyRate; // Total heating output [W]
181 : Real64 TotHeatEnergy; // Total heating output [J]
182 : Real64 TotCoolEnergyRate; // Total cooling output [W]
183 : Real64 TotCoolEnergy; // Total cooling output [J]
184 : Real64 SensHeatEnergyRate; // Sensible heating output [W]
185 : Real64 SensHeatEnergy; // Sensible heating output [J]
186 : Real64 SensCoolEnergyRate; // Sensible cooling output [W]
187 : Real64 SensCoolEnergy; // Sensible cooling output [J]
188 : Real64 LatHeatEnergyRate; // Latent heating output [W]
189 : Real64 LatHeatEnergy; // Latent heating output [J]
190 : Real64 LatCoolEnergyRate; // Latent cooling output [W]
191 : Real64 LatCoolEnergy; // Latent cooling output [J]
192 : Real64 ElecPower; // Electricity consumed [W]
193 : Real64 ElecConsumption; // Electricity consumed [J]
194 : Real64 FanPartLoadRatio; // Fan part-load ratio for time step
195 : Real64 CompPartLoadRatio; // Compressor part-load ratio for time step
196 : int LastMode; // Last mode of operation, coolingmode or heatingmode
197 : AirFlowCtrlMode AirFlowControl; // Fan control mode, UseCompressorOnFlow or UseCompressorOffFlow
198 : Real64 CompPartLoadFrac; // Compressor part load ratio
199 : int AirLoopNumber; // Air loop served by the CBVAV system
200 : int NumControlledZones;
201 : Array1D_int ControlledZoneNum; // Index to controlled zones
202 : Array1D_int ControlledZoneNodeNum; // Zone node num of controlled zone
203 : Array1D_int CBVAVBoxOutletNode; // Outlet node of CBVAV Box in controlled zone
204 : Array1D_int ZoneSequenceCoolingNum; // Index to cooling sequence/priority for this zone
205 : Array1D_int ZoneSequenceHeatingNum; // Index to heating sequence/priority for this zone
206 : PriorityCtrlMode PriorityControl; // Control mode - CoolingPriority, HeatingPriority, ZonePriority or LoadPriority
207 : int NumZonesCooled; // Number of zones requesting cooling
208 : int NumZonesHeated; // Number of zones requesting heating
209 : int PLRMaxIter; // Counter for recurring warning message
210 : int PLRMaxIterIndex; // Index to recurring warning message
211 : int DXCoilInletNode; // Inlet node number of DX cooling coil
212 : int DXCoilOutletNode; // Outlet node number of DX cooling coil
213 : int HeatingCoilInletNode; // Inlet node of heating coil
214 : int HeatingCoilOutletNode; // Outlet node of heating coil
215 : int FanInletNodeNum; // fan inlet node number
216 : Real64 OutletTempSetPoint; // Oulet node temperature setpoint [C]
217 : Real64 CoilTempSetPoint; // Coil oulet node temperature setpoint (inc. fan heat) [C]
218 : int HeatCoolMode; // System operating mode (0 = floating, 1 = cooling, 2 = heating)
219 : Real64 BypassMassFlowRate; // Bypass mass flow rate report variable [m3/s]
220 : int DehumidificationMode; // Dehumidification mode (0=normal, 1=enhanced)
221 : DehumidControl DehumidControlType; // Dehumidification control type (currently only for multimode coil)
222 : bool HumRatMaxCheck; // Used in Init for warning messages
223 : int DXIterationExceeded; // Counter for DX coil messages
224 : int DXIterationExceededIndex; // Counter for DX coil messages
225 : int DXIterationFailed; // Counter for DX coil messages
226 : int DXIterationFailedIndex; // Counter for DX coil messages
227 : int DXCyclingIterationExceeded; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
228 : int DXCyclingIterationExceededIndex; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
229 : int DXCyclingIterationFailed; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
230 : int DXCyclingIterationFailedIndex; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
231 : int DXHeatIterationExceeded; // Counter for DX coil messages
232 : int DXHeatIterationExceededIndex; // Counter for DX coil messages
233 : int DXHeatIterationFailed; // Counter for DX coil messages
234 : int DXHeatIterationFailedIndex; // Counter for DX coil messages
235 : int DXHeatCyclingIterationExceeded; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
236 : int DXHeatCyclingIterationExceededIndex; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
237 : int DXHeatCyclingIterationFailed; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
238 : int DXHeatCyclingIterationFailedIndex; // Counter for VS DX coil messages, when on/off cycling between off and speed 1
239 : int HXDXIterationExceeded; // Counter for HX assisted DX coil messages
240 : int HXDXIterationExceededIndex; // Counter for HX assisted DX coil messages
241 : int HXDXIterationFailed; // Counter for HX assisted DX coil messages
242 : int HXDXIterationFailedIndex; // Counter for HX assisted DX coil messages
243 : int MMDXIterationExceeded; // Counter for multimode DX coil messages
244 : int MMDXIterationExceededIndex; // Counter for multimode DX coil messages
245 : int MMDXIterationFailed; // Counter for multimode DX coil messages
246 : int MMDXIterationFailedIndex; // Counter for multimode DX coil messages
247 : int DMDXIterationExceeded; // Counter for dehumidifying multimode DX coil messages
248 : int DMDXIterationExceededIndex; // Counter for dehumidifying multimode DX coil messages
249 : int DMDXIterationFailed; // Counter for dehumidifying multimode DX coil messages
250 : int DMDXIterationFailedIndex; // Counter for dehumidifying multimode DX coil messages
251 : int CRDXIterationExceeded; // Counter for cool reheat multimode DX coil messages
252 : int CRDXIterationExceededIndex; // Counter for cool reheat multimode DX coil messages
253 : int CRDXIterationFailed; // Counter for cool reheat multimode DX coil messages
254 : int CRDXIterationFailedIndex; // Counter for cool reheat multimode DX coil messages
255 : bool FirstPass; // used to determine when first call is made
256 : int plenumIndex; // index to AirloopHVAC:ReturnPlenum
257 : int mixerIndex; // index to AirloopHVAC:ZoneMixer
258 : Real64 changeOverTimer; // timer to avoid rapid change of operating modes (e.g., cooling to heating)
259 : Real64 minModeChangeTime; // time limit before mode change is allowed (hr)
260 : int OutNodeSPMIndex; // set point manager index if exists on outlet node
261 : bool modeChanged; // identifies operating mode changed this time step
262 :
263 : // Default Constructor
264 8 : CBVAVData()
265 8 : : SchedPtr(0), MaxCoolAirVolFlow(0.0), MaxHeatAirVolFlow(0.0), MaxNoCoolHeatAirVolFlow(0.0), MaxCoolAirMassFlow(0.0),
266 : MaxHeatAirMassFlow(0.0), MaxNoCoolHeatAirMassFlow(0.0), CoolOutAirVolFlow(0.0), HeatOutAirVolFlow(0.0), NoCoolHeatOutAirVolFlow(0.0),
267 : CoolOutAirMassFlow(0.0), HeatOutAirMassFlow(0.0), NoCoolHeatOutAirMassFlow(0.0), OutAirSchPtr(0), AirInNode(0), AirOutNode(0),
268 : CondenserNodeNum(0), MixerOutsideAirNode(0), MixerMixedAirNode(0), MixerReliefAirNode(0), MixerInletAirNode(0),
269 : SplitterOutletAirNode(0), PlenumMixerInletAirNode(0), OAMixIndex(0), FanPlace(0), FanType_Num(0), FanIndex(0), FanOpModeSchedPtr(0),
270 : FanVolFlow(0.0), HeatingSpeedRatio(1.0), CoolingSpeedRatio(1.0), NoHeatCoolSpeedRatio(1.0), MaxONOFFCyclesperHourCycling(4.0),
271 : HPTimeConstantCycling(0.0), FanDelayTimeCycling(0.0), CheckFanFlow(true), DXCoolCoilType_Num(0), CoolCoilCompIndex(0),
272 : DXCoolCoilIndexNum(0), DXHeatCoilIndexNum(0), HeatCoilType_Num(0), HeatCoilIndex(0), OpMode(0), CoilControlNode(0), CoilOutletNode(0),
273 : HotWaterCoilMaxIterIndex(0), HotWaterCoilMaxIterIndex2(0), MaxHeatCoilFluidFlow(0.0), DesignHeatingCapacity(0.0),
274 : DesignSuppHeatingCapacity(0.0), MinOATCompressor(0.0), MinLATCooling(0.0), MaxLATHeating(0.0), TotHeatEnergyRate(0.0),
275 : TotHeatEnergy(0.0), TotCoolEnergyRate(0.0), TotCoolEnergy(0.0), SensHeatEnergyRate(0.0), SensHeatEnergy(0.0), SensCoolEnergyRate(0.0),
276 : SensCoolEnergy(0.0), LatHeatEnergyRate(0.0), LatHeatEnergy(0.0), LatCoolEnergyRate(0.0), LatCoolEnergy(0.0), ElecPower(0.0),
277 : ElecConsumption(0.0), FanPartLoadRatio(0.0), CompPartLoadRatio(0.0), LastMode(0), AirFlowControl(AirFlowCtrlMode::Invalid),
278 : CompPartLoadFrac(0.0), AirLoopNumber(0), NumControlledZones(0), PriorityControl(PriorityCtrlMode::Invalid), NumZonesCooled(0),
279 : NumZonesHeated(0), PLRMaxIter(0), PLRMaxIterIndex(0), DXCoilInletNode(0), DXCoilOutletNode(0), HeatingCoilInletNode(0),
280 : HeatingCoilOutletNode(0), FanInletNodeNum(0), OutletTempSetPoint(0.0), CoilTempSetPoint(0.0), HeatCoolMode(0), BypassMassFlowRate(0.0),
281 : DehumidificationMode(0), DehumidControlType(DehumidControl::None), HumRatMaxCheck(true), DXIterationExceeded(0),
282 : DXIterationExceededIndex(0), DXIterationFailed(0), DXIterationFailedIndex(0), DXCyclingIterationExceeded(0),
283 : DXCyclingIterationExceededIndex(0), DXCyclingIterationFailed(0), DXCyclingIterationFailedIndex(0), DXHeatIterationExceeded(0),
284 : DXHeatIterationExceededIndex(0), DXHeatIterationFailed(0), DXHeatIterationFailedIndex(0), DXHeatCyclingIterationExceeded(0),
285 : DXHeatCyclingIterationExceededIndex(0), DXHeatCyclingIterationFailed(0), DXHeatCyclingIterationFailedIndex(0), HXDXIterationExceeded(0),
286 : HXDXIterationExceededIndex(0), HXDXIterationFailed(0), HXDXIterationFailedIndex(0), MMDXIterationExceeded(0),
287 : MMDXIterationExceededIndex(0), MMDXIterationFailed(0), MMDXIterationFailedIndex(0), DMDXIterationExceeded(0),
288 : DMDXIterationExceededIndex(0), DMDXIterationFailed(0), DMDXIterationFailedIndex(0), CRDXIterationExceeded(0),
289 : CRDXIterationExceededIndex(0), CRDXIterationFailed(0), CRDXIterationFailedIndex(0), FirstPass(true), plenumIndex(0), mixerIndex(0),
290 8 : changeOverTimer(-1.0), minModeChangeTime(-1.0), OutNodeSPMIndex(0), modeChanged(false)
291 : {
292 8 : }
293 : };
294 :
295 : void SimUnitaryBypassVAV(EnergyPlusData &state,
296 : std::string_view CompName, // Name of the CBVAV system
297 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system time step
298 : int AirLoopNum, // air loop index
299 : int &CompIndex // Index to changeover-bypass VAV system
300 : );
301 :
302 : void SimCBVAV(EnergyPlusData &state,
303 : int CBVAVNum, // Index of the current CBVAV system being simulated
304 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
305 : Real64 &QSensUnitOut, // Sensible delivered capacity [W]
306 : Real64 &OnOffAirFlowRatio, // Ratio of compressor ON airflow to AVERAGE airflow over timestep
307 : bool &HXUnitOn // flag to enable heat exchanger
308 : );
309 :
310 : void GetCBVAV(EnergyPlusData &state);
311 :
312 : void InitCBVAV(EnergyPlusData &state,
313 : int CBVAVNum, // Index of the current CBVAV unit being simulated
314 : bool FirstHVACIteration, // TRUE if first HVAC iteration
315 : int AirLoopNum, // air loop index
316 : Real64 &OnOffAirFlowRatio, // Ratio of compressor ON airflow to average airflow over timestep
317 : bool &HXUnitOn // flag to enable heat exchanger
318 : );
319 :
320 : void SizeCBVAV(EnergyPlusData &state, int CBVAVNum); // Index to CBVAV system
321 :
322 : void ControlCBVAVOutput(EnergyPlusData &state,
323 : int CBVAVNum, // Index to CBVAV system
324 : bool FirstHVACIteration, // Flag for 1st HVAC iteration
325 : Real64 &PartLoadFrac, // Unit part load fraction
326 : Real64 &OnOffAirFlowRatio, // Ratio of compressor ON airflow to AVERAGE airflow over timestep
327 : bool &HXUnitOn // flag to enable heat exchanger
328 : );
329 :
330 : void CalcCBVAV(EnergyPlusData &state,
331 : int CBVAVNum, // Unit index in fan coil array
332 : bool FirstHVACIteration, // Flag for 1st HVAC iteration
333 : Real64 &PartLoadFrac, // Compressor part load fraction
334 : Real64 &LoadMet, // Load met by unit (W)
335 : Real64 &OnOffAirFlowRatio, // Ratio of compressor ON airflow to AVERAGE airflow over timestep
336 : bool HXUnitOn // flag to enable heat exchanger
337 : );
338 :
339 : void GetZoneLoads(EnergyPlusData &state, int CBVAVNum // Index to CBVAV unit being simulated
340 : );
341 :
342 : Real64 CalcSetPointTempTarget(EnergyPlusData &state, int CBVAVNumber); // Index to changeover-bypass VAV system
343 :
344 : void SetAverageAirFlow(EnergyPlusData &state,
345 : int CBVAVNum, // Index to CBVAV system
346 : Real64 &OnOffAirFlowRatio // Ratio of compressor ON airflow to average airflow over timestep
347 : );
348 :
349 : void ReportCBVAV(EnergyPlusData &state, int CBVAVNum); // Index of the current CBVAV unit being simulated
350 :
351 : void CalcNonDXHeatingCoils(EnergyPlusData &state,
352 : int CBVAVNum, // Changeover bypass VAV unit index
353 : bool FirstHVACIteration, // flag for first HVAC iteration in the time step
354 : Real64 &HeatCoilLoad, // heating coil load to be met (Watts)
355 : int FanMode, // fan operation mode
356 : Real64 &HeatCoilLoadmet // coil heating load met
357 : );
358 :
359 : } // namespace HVACUnitaryBypassVAV
360 :
361 1542 : struct HVACUnitaryBypassVAVData : BaseGlobalStruct
362 : {
363 :
364 : int NumCBVAV = 0; // Number of CBVAV systems in input file
365 : Real64 CompOnMassFlow = 0.0; // System air mass flow rate w/ compressor ON
366 : Real64 OACompOnMassFlow = 0.0; // OA mass flow rate w/ compressor ON
367 : Real64 CompOffMassFlow = 0.0; // System air mass flow rate w/ compressor OFF
368 : Real64 OACompOffMassFlow = 0.0; // OA mass flow rate w/ compressor OFF
369 : Real64 CompOnFlowRatio = 0.0; // fan flow ratio when coil on
370 : Real64 CompOffFlowRatio = 0.0; // fan flow ratio when coil off
371 : Real64 FanSpeedRatio = 0.0; // ratio of air flow ratio passed to fan object
372 : Real64 BypassDuctFlowFraction = 0.0; // Fraction of unit mass flow that returns to inlet of CBVAV unit through bypass duct
373 : Real64 PartLoadFrac = 0.0; // Compressor part-load fraction
374 : Real64 SaveCompressorPLR = 0.0; // Holds DX compressor PLR from active DX coil
375 : Real64 TempSteamIn = 100.0; // steam coil steam inlet temperature
376 : Array1D_bool CheckEquipName;
377 :
378 : EPVector<HVACUnitaryBypassVAV::CBVAVData> CBVAV;
379 : bool GetInputFlag = true; // Flag set to make sure you get input once
380 :
381 : bool MyOneTimeFlag = true; // Initialization flag
382 : Array1D_bool MyEnvrnFlag; // Used for initializations each begin environment flag
383 : Array1D_bool MySizeFlag; // Used for sizing CBVAV inputs one time
384 : Array1D_bool MyPlantScanFlag; // Used for initializations plant component for heating coils
385 :
386 0 : void clear_state() override
387 : {
388 0 : this->CBVAV.deallocate();
389 0 : this->NumCBVAV = 0;
390 0 : this->CompOnMassFlow = 0.0;
391 0 : this->OACompOnMassFlow = 0.0;
392 0 : this->CompOffMassFlow = 0.0;
393 0 : this->OACompOffMassFlow = 0.0;
394 0 : this->CompOnFlowRatio = 0.0;
395 0 : this->CompOffFlowRatio = 0.0;
396 0 : this->FanSpeedRatio = 0.0;
397 0 : this->BypassDuctFlowFraction = 0.0;
398 0 : this->PartLoadFrac = 0.0;
399 0 : this->SaveCompressorPLR = 0.0;
400 0 : this->TempSteamIn = 100.0;
401 0 : this->CheckEquipName.deallocate();
402 0 : this->GetInputFlag = true;
403 0 : this->MyOneTimeFlag = true;
404 0 : this->MyEnvrnFlag.deallocate();
405 0 : this->MySizeFlag.deallocate();
406 0 : this->MyPlantScanFlag.deallocate();
407 0 : }
408 : };
409 :
410 : } // namespace EnergyPlus
411 :
412 : #endif
|