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 : #include <EnergyPlus/Autosizing/CoolingAirFlowSizing.hh>
49 : #include <EnergyPlus/Data/EnergyPlusData.hh>
50 : #include <EnergyPlus/DataEnvironment.hh>
51 : #include <EnergyPlus/DataHVACGlobals.hh>
52 : #include <EnergyPlus/General.hh>
53 : #include <EnergyPlus/OutputReportPredefined.hh>
54 : #include <EnergyPlus/UtilityRoutines.hh>
55 : #include <EnergyPlus/WeatherManager.hh>
56 :
57 : namespace EnergyPlus {
58 :
59 3304 : Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bool &errorsFound)
60 : {
61 3304 : if (!this->checkInitialized(state, errorsFound)) {
62 0 : return 0.0;
63 : }
64 3304 : this->preSize(state, _originalValue);
65 6608 : std::string DDNameFanPeak = "";
66 6608 : std::string dateTimeFanPeak = "";
67 3304 : bool coolingFlow = false;
68 3304 : bool heatingFlow = false;
69 :
70 3304 : if (this->dataEMSOverrideON) {
71 0 : this->autoSizedValue = this->dataEMSOverride;
72 3304 : } else if (this->dataConstantUsedForSizing > 0 && this->dataFractionUsedForSizing > 0) {
73 38 : this->autoSizedValue = this->dataConstantUsedForSizing * this->dataFractionUsedForSizing;
74 : } else {
75 3266 : if (this->curZoneEqNum > 0) {
76 948 : if (!this->wasAutoSized && !this->sizingDesRunThisZone) {
77 8 : this->autoSizedValue = _originalValue;
78 16 : if (UtilityRoutines::SameString(this->compType, "Coil:Cooling:DX:TwoStageWithHumidityControlMode")) {
79 0 : this->autoSizedValue /= (1.0 - this->dataBypassFrac); // back out bypass fraction applied in GetInput
80 0 : this->originalValue /= (1.0 - this->dataBypassFrac); // back out bypass fraction applied in GetInput
81 : }
82 940 : } else if (this->zoneEqSizing(this->curZoneEqNum).DesignSizeFromParent) {
83 162 : this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).AirVolFlow;
84 : } else {
85 778 : switch (this->zoneEqSizing(this->curZoneEqNum).SizingMethod(DataHVACGlobals::CoolingAirflowSizing)) {
86 2 : case DataSizing::SupplyAirFlowRate:
87 : case DataSizing::None:
88 : case DataSizing::FlowPerFloorArea: {
89 2 : if (this->zoneEqSizing(this->curZoneEqNum).SystemAirFlow) {
90 2 : this->autoSizedValue = max(this->zoneEqSizing(this->curZoneEqNum).AirVolFlow,
91 1 : this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
92 1 : this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
93 1 : coolingFlow = true;
94 : } else {
95 1 : if (state.dataSize->ZoneCoolingOnlyFan) {
96 0 : this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
97 0 : coolingFlow = true;
98 1 : } else if (state.dataSize->ZoneHeatingOnlyFan) {
99 0 : this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
100 0 : heatingFlow = true;
101 1 : } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
102 0 : this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
103 0 : coolingFlow = true;
104 1 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
105 0 : this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow;
106 0 : heatingFlow = true;
107 1 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
108 0 : this->autoSizedValue = max(this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
109 0 : this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
110 0 : if (this->autoSizedValue == this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow) {
111 0 : coolingFlow = true;
112 0 : } else if (this->autoSizedValue == this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) {
113 0 : heatingFlow = true;
114 : }
115 : } else {
116 1 : this->autoSizedValue = max(this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow,
117 1 : this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
118 1 : if (this->autoSizedValue == this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow) {
119 1 : coolingFlow = true;
120 0 : } else if (this->autoSizedValue == this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) {
121 0 : heatingFlow = true;
122 : }
123 : }
124 : }
125 2 : } break;
126 1 : case DataSizing::FractionOfAutosizedCoolingAirflow: {
127 1 : if (state.dataSize->ZoneCoolingOnlyFan) {
128 0 : this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
129 0 : coolingFlow = true;
130 1 : } else if (state.dataSize->ZoneHeatingOnlyFan) {
131 0 : this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
132 0 : heatingFlow = true;
133 1 : } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
134 0 : this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
135 0 : coolingFlow = true;
136 1 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
137 0 : this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow;
138 0 : heatingFlow = true;
139 1 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
140 0 : this->autoSizedValue =
141 0 : max(this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
142 0 : this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
143 0 : if (this->autoSizedValue ==
144 0 : this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow) {
145 0 : coolingFlow = true;
146 0 : } else if (this->autoSizedValue ==
147 0 : this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) {
148 0 : heatingFlow = true;
149 : }
150 : } else {
151 1 : this->autoSizedValue =
152 1 : max(this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow,
153 1 : this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
154 2 : if (this->autoSizedValue ==
155 1 : this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow) {
156 1 : coolingFlow = true;
157 0 : } else if (this->autoSizedValue ==
158 0 : this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) {
159 0 : heatingFlow = true;
160 : }
161 : }
162 1 : } break;
163 0 : case DataSizing::FractionOfAutosizedHeatingAirflow: {
164 0 : if (state.dataSize->ZoneCoolingOnlyFan) {
165 0 : this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
166 0 : coolingFlow = true;
167 0 : } else if (state.dataSize->ZoneHeatingOnlyFan) {
168 0 : this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
169 0 : heatingFlow = true;
170 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
171 0 : this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
172 0 : coolingFlow = true;
173 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
174 0 : this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow;
175 0 : heatingFlow = true;
176 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
177 0 : this->autoSizedValue =
178 0 : max(this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow,
179 0 : this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow);
180 0 : if (this->autoSizedValue ==
181 0 : this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow) {
182 0 : coolingFlow = true;
183 0 : } else if (this->autoSizedValue ==
184 0 : this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow) {
185 0 : heatingFlow = true;
186 : }
187 : } else {
188 0 : this->autoSizedValue =
189 0 : max(this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow,
190 0 : this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
191 0 : if (this->autoSizedValue ==
192 0 : this->dataFracOfAutosizedCoolingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow) {
193 0 : coolingFlow = true;
194 0 : } else if (this->autoSizedValue ==
195 0 : this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow) {
196 0 : heatingFlow = true;
197 : }
198 : }
199 0 : } break;
200 0 : case DataSizing::FlowPerCoolingCapacity: {
201 0 : if (state.dataSize->ZoneCoolingOnlyFan) {
202 0 : this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
203 0 : coolingFlow = true;
204 0 : } else if (state.dataSize->ZoneHeatingOnlyFan) {
205 0 : this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
206 0 : heatingFlow = true;
207 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
208 0 : this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
209 0 : coolingFlow = true;
210 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
211 0 : this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
212 0 : heatingFlow = true;
213 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
214 0 : this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
215 0 : this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
216 0 : if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
217 0 : coolingFlow = true;
218 0 : } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
219 0 : heatingFlow = true;
220 : }
221 : } else {
222 0 : this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
223 0 : this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
224 0 : if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
225 0 : coolingFlow = true;
226 0 : } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
227 0 : heatingFlow = true;
228 : }
229 : }
230 0 : } break;
231 0 : case DataSizing::FlowPerHeatingCapacity: {
232 0 : if (state.dataSize->ZoneCoolingOnlyFan) {
233 0 : this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
234 0 : coolingFlow = true;
235 0 : } else if (state.dataSize->ZoneHeatingOnlyFan) {
236 0 : this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
237 0 : heatingFlow = true;
238 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) {
239 0 : this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity;
240 0 : coolingFlow = true;
241 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
242 0 : this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity;
243 0 : heatingFlow = true;
244 0 : } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
245 0 : this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
246 0 : this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
247 0 : if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
248 0 : coolingFlow = true;
249 0 : } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
250 0 : heatingFlow = true;
251 : }
252 : } else {
253 0 : this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity,
254 0 : this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity);
255 0 : if (this->autoSizedValue == this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity) {
256 0 : coolingFlow = true;
257 0 : } else if (this->autoSizedValue == this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity) {
258 0 : heatingFlow = true;
259 : }
260 : }
261 0 : } break;
262 775 : default: {
263 775 : if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) {
264 355 : this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow;
265 420 : } else if (state.dataSize->ZoneCoolingOnlyFan) {
266 68 : this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow;
267 352 : } else if (this->termUnitIU && (this->curTermUnitSizingNum > 0)) {
268 8 : this->autoSizedValue = this->termUnitSizing(this->curTermUnitSizingNum).AirVolFlow;
269 344 : } else if (this->zoneEqFanCoil) {
270 0 : this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).AirVolFlow;
271 344 : } else if (this->zoneHeatingOnlyFan) {
272 0 : this->autoSizedValue = this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow;
273 : } else {
274 344 : this->autoSizedValue =
275 344 : max(this->finalZoneSizing(this->curZoneEqNum).DesCoolVolFlow, this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow);
276 : }
277 775 : } break;
278 : }
279 : }
280 2318 : } else if (this->curSysNum > 0) {
281 2318 : if (!this->wasAutoSized && !this->sizingDesRunThisAirSys) {
282 247 : this->autoSizedValue = _originalValue;
283 494 : if (UtilityRoutines::SameString(this->compType, "Coil:Cooling:DX:TwoStageWithHumidityControlMode")) {
284 7 : this->autoSizedValue /= (1.0 - this->dataBypassFrac); // back out bypass fraction applied in GetInput
285 7 : this->originalValue /= (1.0 - this->dataBypassFrac); // back out bypass fraction applied in GetInput
286 : }
287 : } else {
288 2071 : if (this->curOASysNum > 0) {
289 60 : if (this->oaSysEqSizing(this->curOASysNum).AirFlow) {
290 : // Parent object sets flow rate
291 0 : this->autoSizedValue = this->oaSysEqSizing(this->curOASysNum).AirVolFlow;
292 60 : } else if (this->oaSysEqSizing(this->curOASysNum).CoolingAirFlow) {
293 : // Parent object sets flow rate
294 4 : this->autoSizedValue = this->oaSysEqSizing(this->curOASysNum).CoolingAirVolFlow;
295 56 : } else if (outsideAirSys(this->curOASysNum).AirLoopDOASNum > -1) {
296 2 : this->autoSizedValue =
297 2 : this->airloopDOAS[outsideAirSys(this->curOASysNum).AirLoopDOASNum].SizingMassFlow / state.dataEnvrn->StdRhoAir;
298 : } else {
299 54 : this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesOutAirVolFlow;
300 : }
301 2011 : } else if (this->dataAirFlowUsedForSizing > 0.0) {
302 323 : this->autoSizedValue = this->dataAirFlowUsedForSizing;
303 : } else {
304 1688 : if (this->unitarySysEqSizing(this->curSysNum).AirFlow) {
305 112 : this->autoSizedValue = this->unitarySysEqSizing(this->curSysNum).AirVolFlow;
306 1576 : } else if (this->unitarySysEqSizing(this->curSysNum).CoolingAirFlow) {
307 755 : this->autoSizedValue = this->unitarySysEqSizing(this->curSysNum).CoolingAirVolFlow;
308 : } else {
309 821 : if (this->curDuctType == DataHVACGlobals::AirDuctType::Main) {
310 725 : this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow;
311 96 : } else if (this->curDuctType == DataHVACGlobals::AirDuctType::Cooling) {
312 95 : this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesCoolVolFlow;
313 1 : } else if (this->curDuctType == DataHVACGlobals::AirDuctType::Heating) {
314 1 : this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesHeatVolFlow;
315 0 : } else if (this->curDuctType == DataHVACGlobals::AirDuctType::Other) {
316 0 : this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow;
317 : } else {
318 0 : this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow;
319 : }
320 : }
321 : }
322 : }
323 0 : } else if (this->dataNonZoneNonAirloopValue > 0) {
324 0 : this->autoSizedValue = this->dataNonZoneNonAirloopValue;
325 0 : } else if (!this->wasAutoSized) {
326 0 : this->autoSizedValue = this->originalValue;
327 : } else {
328 0 : std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete.";
329 0 : ShowSevereError(state, msg);
330 0 : this->addErrorMessage(msg);
331 0 : msg = format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue);
332 0 : ShowContinueError(state, msg);
333 0 : this->addErrorMessage(msg);
334 0 : errorsFound = true;
335 : }
336 :
337 : // override sizing string
338 3266 : if (this->overrideSizeString) {
339 1070 : if (UtilityRoutines::SameString(this->compType, "ZoneHVAC:FourPipeFanCoil")) {
340 0 : this->sizingString = "Maximum Supply Air Flow Rate [m3/s]";
341 0 : if (this->isEpJSON) this->sizingString = "maximum_supply_air_flow_rate [m3/s]";
342 1070 : } else if (this->coilType_Num == DataHVACGlobals::CoilDX_CoolingTwoSpeed) {
343 0 : if (this->dataDXSpeedNum == 1) { // mode 1 is high speed in DXCoils loop
344 0 : if (this->isEpJSON) {
345 0 : this->sizingString = "high_speed_rated_air_flow_rate [m3/s]";
346 : } else {
347 0 : this->sizingString = "High Speed Rated Air Flow Rate [m3/s]";
348 : }
349 0 : } else if (this->dataDXSpeedNum == 2) {
350 0 : if (this->isEpJSON) {
351 0 : this->sizingString = "low_speed_rated_air_flow_rate [m3/s]";
352 : } else {
353 0 : this->sizingString = "Low Speed Rated Air Flow Rate [m3/s]";
354 : }
355 : }
356 1070 : } else if (this->isEpJSON) {
357 3 : this->sizingString = "cooling_supply_air_flow_rate [m3/s]";
358 : }
359 : }
360 3266 : if (this->dataScalableSizingON) {
361 6 : if (this->zoneAirFlowSizMethod == DataSizing::SupplyAirFlowRate || this->zoneAirFlowSizMethod == DataSizing::None) {
362 0 : this->sizingStringScalable = "(scaled by flow / zone) ";
363 6 : } else if (this->zoneAirFlowSizMethod == DataSizing::FlowPerFloorArea) {
364 3 : this->sizingStringScalable = "(scaled by flow / area) ";
365 3 : } else if (this->zoneAirFlowSizMethod == DataSizing::FractionOfAutosizedCoolingAirflow ||
366 0 : this->zoneAirFlowSizMethod == DataSizing::FractionOfAutosizedHeatingAirflow) {
367 3 : this->sizingStringScalable = "(scaled by fractional multiplier) ";
368 0 : } else if (this->zoneAirFlowSizMethod == DataSizing::FlowPerCoolingCapacity ||
369 0 : this->zoneAirFlowSizMethod == DataSizing::FlowPerHeatingCapacity) {
370 0 : this->sizingStringScalable = "(scaled by flow / capacity) ";
371 : }
372 : }
373 : }
374 3304 : if (this->dataDXCoolsLowSpeedsAutozize) {
375 61 : this->autoSizedValue *= this->dataFractionUsedForSizing;
376 : }
377 3304 : this->select2StgDXHumCtrlSizerOutput(state, errorsFound);
378 :
379 3304 : if (this->isCoilReportObject) {
380 : // SizingResult is airflow in m3/s
381 3922 : state.dataRptCoilSelection->coilSelectionReportObj->setCoilAirFlow(
382 1961 : state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized);
383 : }
384 3304 : if (this->isFanReportObject) {
385 :
386 : // fill fan peak day and time here
387 0 : if (this->dataScalableSizingON) {
388 0 : DDNameFanPeak = "Scaled size, not from any peak";
389 0 : dateTimeFanPeak = "Scaled size, not from any peak";
390 : } else {
391 0 : if (coolingFlow) {
392 0 : if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 &&
393 0 : this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) {
394 0 : DDNameFanPeak = state.dataWeatherManager->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title;
395 0 : dateTimeFanPeak = format("{}/{} {}",
396 0 : state.dataWeatherManager->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month,
397 0 : state.dataWeatherManager->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth,
398 0 : state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(
399 0 : state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax));
400 : }
401 0 : } else if (heatingFlow) {
402 0 : if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 &&
403 0 : this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) {
404 0 : DDNameFanPeak = state.dataWeatherManager->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title;
405 0 : dateTimeFanPeak = format("{}/{} {}",
406 0 : state.dataWeatherManager->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month,
407 0 : state.dataWeatherManager->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth,
408 0 : state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(
409 0 : state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax));
410 : }
411 : }
412 : }
413 :
414 0 : OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchFanDesDay, this->compName, DDNameFanPeak);
415 0 : OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchFanPkTime, this->compName, dateTimeFanPeak);
416 : }
417 3304 : return this->autoSizedValue;
418 : }
419 :
420 0 : void CoolingAirFlowSizer::clearState()
421 : {
422 0 : BaseSizerWithScalableInputs::clearState();
423 0 : }
424 :
425 2313 : } // namespace EnergyPlus
|