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