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