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/WaterHeatingCoilUASizing.hh>
49 : #include <EnergyPlus/Data/EnergyPlusData.hh>
50 : #include <EnergyPlus/DataHVACGlobals.hh>
51 : #include <EnergyPlus/General.hh>
52 : #include <EnergyPlus/UtilityRoutines.hh>
53 : #include <EnergyPlus/WaterCoils.hh>
54 :
55 : namespace EnergyPlus {
56 :
57 2248 : Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValue, bool &errorsFound)
58 : {
59 2248 : if (!this->checkInitialized(state, errorsFound)) {
60 0 : return 0.0;
61 : }
62 2248 : Real64 constexpr Acc(0.0001); // Accuracy of result
63 2248 : int constexpr MaxIte(500); // Maximum number of iterations
64 2248 : int SolFla = 0; // Flag of solver
65 :
66 2248 : this->preSize(state, _originalValue);
67 2248 : if (this->curZoneEqNum > 0) {
68 1877 : if (!this->wasAutoSized && !this->sizingDesRunThisZone) {
69 0 : this->autoSizedValue = _originalValue;
70 : } else {
71 1877 : if (this->dataCapacityUsedForSizing > 0.0 && this->dataWaterFlowUsedForSizing > 0.0 && this->dataFlowUsedForSizing > 0.0) {
72 1877 : Real64 UA0 = 0.001 * this->dataCapacityUsedForSizing;
73 1877 : Real64 UA1 = this->dataCapacityUsedForSizing;
74 : // Invert the simple heating coil model: given the design inlet conditions and the design load,
75 : // find the design UA.
76 349538 : auto f = [&state, this](Real64 const UA) {
77 74901 : state.dataWaterCoils->WaterCoil(this->dataCoilNum).UACoilVariable = UA;
78 99868 : WaterCoils::CalcSimpleHeatingCoil(state, this->dataCoilNum, this->dataFanOpMode, 1.0, state.dataWaterCoils->SimCalc);
79 74901 : state.dataSize->DataDesignCoilCapacity = state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate;
80 74901 : return (dataCapacityUsedForSizing - state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate) /
81 24967 : dataCapacityUsedForSizing;
82 1877 : };
83 1877 : General::SolveRoot(state, Acc, MaxIte, SolFla, this->autoSizedValue, f, UA0, UA1);
84 1877 : if (SolFla == -1) {
85 0 : errorsFound = true;
86 0 : std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
87 0 : this->addErrorMessage(msg);
88 0 : ShowSevereError(state, msg);
89 0 : msg = " Iteration limit exceeded in calculating coil UA";
90 0 : this->addErrorMessage(msg);
91 0 : ShowContinueError(state, msg);
92 0 : msg = format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0);
93 0 : this->addErrorMessage(msg);
94 0 : ShowContinueError(state, msg);
95 0 : msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
96 0 : this->addErrorMessage(msg);
97 0 : ShowContinueError(state, msg);
98 0 : msg = format(" Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue);
99 0 : this->addErrorMessage(msg);
100 0 : ShowContinueError(state, msg);
101 0 : msg = " Zone \"" + this->finalZoneSizing(this->curZoneEqNum).ZoneName +
102 : "\" coil sizing conditions (may be different than Sizing inputs):";
103 0 : this->addErrorMessage(msg);
104 0 : ShowContinueError(state, msg);
105 0 : msg = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp);
106 0 : this->addErrorMessage(msg);
107 0 : ShowContinueError(state, msg);
108 0 : msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
109 0 : this->addErrorMessage(msg);
110 0 : ShowContinueError(state, msg);
111 0 : msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing);
112 0 : this->addErrorMessage(msg);
113 0 : ShowContinueError(state, msg);
114 : // TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil
115 0 : msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity);
116 0 : this->addErrorMessage(msg);
117 0 : ShowContinueError(state, msg);
118 0 : if (this->dataNomCapInpMeth) {
119 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
120 0 : this->addErrorMessage(msg);
121 0 : ShowContinueError(state, msg);
122 0 : msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp);
123 0 : this->addErrorMessage(msg);
124 0 : ShowContinueError(state, msg);
125 0 : msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
126 0 : this->addErrorMessage(msg);
127 0 : ShowContinueError(state, msg);
128 0 : } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) {
129 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
130 0 : this->addErrorMessage(msg);
131 0 : ShowContinueError(state, msg);
132 : } else {
133 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
134 0 : this->addErrorMessage(msg);
135 0 : ShowContinueError(state, msg);
136 0 : msg = format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp);
137 0 : this->addErrorMessage(msg);
138 0 : ShowContinueError(state, msg);
139 0 : msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir",
140 0 : this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat);
141 0 : this->addErrorMessage(msg);
142 0 : ShowContinueError(state, msg);
143 : }
144 0 : this->dataErrorsFound = true;
145 1877 : } else if (SolFla == -2) {
146 0 : this->errorType = AutoSizingResultType::ErrorType1;
147 0 : errorsFound = true;
148 0 : std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
149 0 : this->addErrorMessage(msg);
150 0 : ShowSevereError(state, msg);
151 0 : msg = " Bad starting values for UA";
152 0 : this->addErrorMessage(msg);
153 0 : ShowContinueError(state, msg);
154 0 : msg = format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0);
155 0 : this->addErrorMessage(msg);
156 0 : ShowContinueError(state, msg);
157 0 : msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
158 0 : this->addErrorMessage(msg);
159 0 : ShowContinueError(state, msg);
160 0 : msg = " Zone \"" + this->finalZoneSizing(this->curZoneEqNum).ZoneName +
161 : "\" coil sizing conditions (may be different than Sizing inputs):";
162 0 : this->addErrorMessage(msg);
163 0 : ShowContinueError(state, msg);
164 0 : msg = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp);
165 0 : this->addErrorMessage(msg);
166 0 : ShowContinueError(state, msg);
167 0 : msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
168 0 : this->addErrorMessage(msg);
169 0 : ShowContinueError(state, msg);
170 0 : msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing);
171 0 : this->addErrorMessage(msg);
172 0 : ShowContinueError(state, msg);
173 0 : msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity);
174 0 : this->addErrorMessage(msg);
175 0 : ShowContinueError(state, msg);
176 0 : if (this->dataNomCapInpMeth) {
177 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
178 0 : this->addErrorMessage(msg);
179 0 : ShowContinueError(state, msg);
180 0 : msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp);
181 0 : this->addErrorMessage(msg);
182 0 : ShowContinueError(state, msg);
183 0 : msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
184 0 : this->addErrorMessage(msg);
185 0 : ShowContinueError(state, msg);
186 0 : } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) {
187 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
188 0 : this->addErrorMessage(msg);
189 0 : ShowContinueError(state, msg);
190 : } else {
191 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
192 0 : this->addErrorMessage(msg);
193 0 : ShowContinueError(state, msg);
194 0 : msg = format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp);
195 0 : this->addErrorMessage(msg);
196 0 : ShowContinueError(state, msg);
197 0 : msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir",
198 0 : this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat);
199 0 : this->addErrorMessage(msg);
200 0 : ShowContinueError(state, msg);
201 : }
202 : // TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil
203 0 : if (this->dataDesignCoilCapacity < this->dataCapacityUsedForSizing) {
204 0 : msg = " Inadequate water side capacity: in Plant Sizing for this hot water loop";
205 0 : this->addErrorMessage(msg);
206 0 : ShowContinueError(state, msg);
207 0 : msg = " increase design loop exit temperature and/or decrease design loop delta T";
208 0 : this->addErrorMessage(msg);
209 0 : ShowContinueError(state, msg);
210 0 : msg = " Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName;
211 0 : this->addErrorMessage(msg);
212 0 : ShowContinueError(state, msg);
213 0 : msg = format(" Plant design loop exit temperature = {:.3T} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp);
214 0 : this->addErrorMessage(msg);
215 0 : ShowContinueError(state, msg);
216 0 : msg = format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT);
217 0 : this->addErrorMessage(msg);
218 0 : ShowContinueError(state, msg);
219 : }
220 0 : this->dataErrorsFound = true;
221 1877 : }
222 : } else {
223 0 : this->autoSizedValue = 1.0;
224 0 : if (this->dataWaterFlowUsedForSizing > 0.0 && this->dataCapacityUsedForSizing == 0.0) {
225 0 : std::string msg = "The design coil load used for UA sizing is zero for Coil:Heating:Water " + this->compName;
226 0 : this->addErrorMessage(msg);
227 0 : ShowWarningError(state, msg);
228 0 : msg = "An autosize value for UA cannot be calculated";
229 0 : this->addErrorMessage(msg);
230 0 : ShowContinueError(state, msg);
231 0 : msg = "Input a value for UA, change the heating design day, or raise";
232 0 : this->addErrorMessage(msg);
233 0 : ShowContinueError(state, msg);
234 0 : msg = " the zone heating design supply air temperature";
235 0 : this->addErrorMessage(msg);
236 0 : ShowContinueError(state, msg);
237 0 : msg = "Water coil UA is set to 1 and the simulation continues.";
238 0 : this->addErrorMessage(msg);
239 0 : ShowContinueError(state, msg);
240 : }
241 : }
242 : }
243 371 : } else if (this->curSysNum > 0) {
244 371 : if (!this->wasAutoSized && !this->sizingDesRunThisAirSys) {
245 0 : this->autoSizedValue = _originalValue;
246 : } else {
247 711 : if (this->dataCapacityUsedForSizing >= DataHVACGlobals::SmallLoad && this->dataWaterFlowUsedForSizing > 0.0 &&
248 340 : this->dataFlowUsedForSizing > 0.0) {
249 340 : Real64 UA0 = 0.001 * this->dataCapacityUsedForSizing;
250 340 : Real64 UA1 = this->dataCapacityUsedForSizing;
251 : // Invert the simple heating coil model: given the design inlet conditions and the design load,
252 : // find the design UA.
253 49980 : auto f = [&state, this](Real64 const UA) {
254 10710 : state.dataWaterCoils->WaterCoil(this->dataCoilNum).UACoilVariable = UA;
255 14280 : WaterCoils::CalcSimpleHeatingCoil(state, this->dataCoilNum, this->dataFanOpMode, 1.0, state.dataWaterCoils->SimCalc);
256 10710 : state.dataSize->DataDesignCoilCapacity = state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate;
257 10710 : return (dataCapacityUsedForSizing - state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate) /
258 3570 : dataCapacityUsedForSizing;
259 340 : };
260 340 : General::SolveRoot(state, Acc, MaxIte, SolFla, this->autoSizedValue, f, UA0, UA1);
261 340 : if (SolFla == -1) {
262 0 : errorsFound = true;
263 0 : std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
264 0 : this->addErrorMessage(msg);
265 0 : ShowSevereError(state, msg);
266 0 : msg = " Iteration limit exceeded in calculating coil UA";
267 0 : this->addErrorMessage(msg);
268 0 : ShowContinueError(state, msg);
269 0 : msg = format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0);
270 0 : this->addErrorMessage(msg);
271 0 : ShowContinueError(state, msg);
272 0 : msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
273 0 : this->addErrorMessage(msg);
274 0 : ShowContinueError(state, msg);
275 0 : msg = format(" Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue);
276 0 : this->addErrorMessage(msg);
277 0 : ShowContinueError(state, msg);
278 0 : msg = " AirloopHVAC \"" + this->finalSysSizing(this->curSysNum).AirPriLoopName +
279 : "\" coil sizing conditions (may be different than Sizing inputs):";
280 0 : this->addErrorMessage(msg);
281 0 : ShowContinueError(state, msg);
282 0 : msg = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp);
283 0 : this->addErrorMessage(msg);
284 0 : ShowContinueError(state, msg);
285 0 : msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
286 0 : this->addErrorMessage(msg);
287 0 : ShowContinueError(state, msg);
288 0 : msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing);
289 0 : this->addErrorMessage(msg);
290 0 : ShowContinueError(state, msg);
291 0 : msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity);
292 0 : this->addErrorMessage(msg);
293 0 : ShowContinueError(state, msg);
294 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
295 0 : this->addErrorMessage(msg);
296 0 : ShowContinueError(state, msg);
297 0 : if (this->dataNomCapInpMeth) {
298 0 : msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp);
299 0 : this->addErrorMessage(msg);
300 0 : ShowContinueError(state, msg);
301 0 : msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
302 0 : this->addErrorMessage(msg);
303 0 : ShowContinueError(state, msg);
304 : }
305 0 : this->dataErrorsFound = true;
306 340 : } else if (SolFla == -2) {
307 0 : this->errorType = AutoSizingResultType::ErrorType1;
308 0 : errorsFound = true;
309 0 : std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
310 0 : this->addErrorMessage(msg);
311 0 : ShowSevereError(state, msg);
312 0 : msg = " Bad starting values for UA";
313 0 : this->addErrorMessage(msg);
314 0 : ShowContinueError(state, msg);
315 0 : msg = format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0);
316 0 : this->addErrorMessage(msg);
317 0 : ShowContinueError(state, msg);
318 0 : msg = format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
319 0 : this->addErrorMessage(msg);
320 0 : ShowContinueError(state, msg);
321 0 : msg = " AirloopHVAC \"" + this->finalSysSizing(this->curSysNum).AirPriLoopName +
322 : "\" coil sizing conditions (may be different than Sizing inputs):";
323 0 : this->addErrorMessage(msg);
324 0 : ShowContinueError(state, msg);
325 0 : msg = format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp);
326 0 : this->addErrorMessage(msg);
327 0 : ShowContinueError(state, msg);
328 0 : msg = format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
329 0 : this->addErrorMessage(msg);
330 0 : ShowContinueError(state, msg);
331 0 : msg = format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing);
332 0 : this->addErrorMessage(msg);
333 0 : ShowContinueError(state, msg);
334 0 : msg = format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity);
335 0 : this->addErrorMessage(msg);
336 0 : ShowContinueError(state, msg);
337 0 : msg = format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing);
338 0 : this->addErrorMessage(msg);
339 0 : ShowContinueError(state, msg);
340 0 : if (this->dataNomCapInpMeth) {
341 0 : msg = format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp);
342 0 : this->addErrorMessage(msg);
343 0 : ShowContinueError(state, msg);
344 0 : msg = format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
345 0 : this->addErrorMessage(msg);
346 0 : ShowContinueError(state, msg);
347 : }
348 0 : if (this->dataDesignCoilCapacity < this->dataCapacityUsedForSizing && !this->dataNomCapInpMeth) {
349 0 : msg = " Inadequate water side capacity: in Plant Sizing for this hot water loop";
350 0 : this->addErrorMessage(msg);
351 0 : ShowContinueError(state, msg);
352 0 : msg = " increase design loop exit temperature and/or decrease design loop delta T";
353 0 : this->addErrorMessage(msg);
354 0 : ShowContinueError(state, msg);
355 0 : msg = " Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName;
356 0 : this->addErrorMessage(msg);
357 0 : ShowContinueError(state, msg);
358 0 : msg = format(" Plant design loop exit temperature = {:.3T} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp);
359 0 : this->addErrorMessage(msg);
360 0 : ShowContinueError(state, msg);
361 0 : msg = format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT);
362 0 : this->addErrorMessage(msg);
363 0 : ShowContinueError(state, msg);
364 : }
365 0 : this->dataErrorsFound = true;
366 340 : }
367 : } else {
368 31 : this->autoSizedValue = 1.0;
369 31 : if (this->dataWaterFlowUsedForSizing > 0.0 && this->dataCapacityUsedForSizing < DataHVACGlobals::SmallLoad) {
370 0 : std::string msg = "The design coil load used for UA sizing is zero for Coil:Heating:Water " + this->compName;
371 0 : this->addErrorMessage(msg);
372 0 : ShowWarningError(state, msg);
373 0 : msg = "An autosize value for UA cannot be calculated";
374 0 : this->addErrorMessage(msg);
375 0 : ShowContinueError(state, msg);
376 0 : msg = "Input a value for UA, change the heating design day, or raise";
377 0 : this->addErrorMessage(msg);
378 0 : ShowContinueError(state, msg);
379 0 : msg = " the zone heating design supply air temperature";
380 0 : this->addErrorMessage(msg);
381 0 : ShowContinueError(state, msg);
382 0 : msg = "Water coil UA is set to 1 and the simulation continues.";
383 0 : this->addErrorMessage(msg);
384 0 : ShowContinueError(state, msg);
385 : }
386 : }
387 : }
388 : }
389 2248 : if (this->dataErrorsFound) state.dataSize->DataErrorsFound = true;
390 2248 : if (this->overrideSizeString) {
391 2248 : if (this->isEpJSON) this->sizingString = "u-factor_times_area_value [W/K]";
392 : }
393 2248 : this->selectSizerOutput(state, errorsFound);
394 2248 : if (this->isCoilReportObject && this->curSysNum <= state.dataHVACGlobal->NumPrimaryAirSys) {
395 4494 : state.dataRptCoilSelection->coilSelectionReportObj->setCoilUA(state,
396 : this->compName,
397 : this->compType,
398 : this->autoSizedValue,
399 : this->dataCapacityUsedForSizing,
400 2247 : this->wasAutoSized,
401 : this->curSysNum,
402 : this->curZoneEqNum);
403 : }
404 2248 : return this->autoSizedValue;
405 : }
406 :
407 2313 : } // namespace EnergyPlus
|