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 : // C++ Headers
49 : #include <string>
50 :
51 : // EnergyPlus Headers
52 : #include <EnergyPlus/CurveManager.hh>
53 : #include <EnergyPlus/Data/EnergyPlusData.hh>
54 : #include <EnergyPlus/DataBranchAirLoopPlant.hh>
55 : #include <EnergyPlus/DataEnvironment.hh>
56 : #include <EnergyPlus/DataHVACGlobals.hh>
57 : #include <EnergyPlus/FluidProperties.hh>
58 : #include <EnergyPlus/General.hh>
59 : #include <EnergyPlus/OutputReportPredefined.hh>
60 : #include <EnergyPlus/Plant/DataPlant.hh>
61 : #include <EnergyPlus/Psychrometrics.hh>
62 : #include <EnergyPlus/StandardRatings.hh>
63 : #include <EnergyPlus/UtilityRoutines.hh>
64 : #include <EnergyPlus/VariableSpeedCoils.hh>
65 :
66 : namespace EnergyPlus {
67 :
68 : namespace StandardRatings {
69 :
70 : // MODULE INFORMATION:
71 : // AUTHOR Chandan Sharma
72 : // DATE WRITTEN February 2012
73 : // MODIFIED February 2013, Bereket Nigusse
74 : // RE-ENGINEERED na
75 :
76 : // PURPOSE OF THIS MODULE:
77 : // This module contains the subroutines required to calculate the following standard ratings of HVAC equipment
78 : // 1) Integrated Part Load Value (IPLV) rating for EIR and Reformulated EIR chillers
79 : // 2) a) Standard Rated (net) Cooling Capacity
80 : // b) Seasonal Energy Efficiency Ratio (SEER)
81 : // c) Energy Efficiency Ratio (EER),
82 : // d) Integrated Energy Efficiency Ratio (IEER)
83 : // for Air-to-Air Direct Expansion Air Conditioner and Heat Pumps having a single-speed compressor,
84 : // fixed speed indoor supply air fan, and air-cooled condensers.
85 : // 3) Heating Seasonal Performance Factor (HSPF) for Air-Source Direct Expansion Heat Pumps having a single-speed compressor,
86 : // fixed speed indoor supply air fan
87 : // 4) Seasonal Energy Efficiency Ratio (SEER) for Air-Source Direct Expansion multi-speed compressor Heat Pumps
88 : // 5) Heating Seasonal Performance Factor (HSPF) for Air-Source Direct Expansion multi-speed compressor Heat Pumps
89 : // METHODOLOGY EMPLOYED:
90 : // Using the user specified reference capacity, reference COP and performance curves, the chiller or DX coil models are executed
91 : // for standard test conditions as specified in ANSI/AHRI 550/590, 210/240 and 340/360. Then results of the simulated test points
92 : // are processed into standard ratings according to standard's procedures.
93 :
94 : // REFERENCES:
95 : // (1) AHRI Standard 550/590-2011: Standard for Performance Rating of Water-Chilling Packages using the Vapor
96 : // Compression Cycle. Arlington, VA: Air-Conditioning, Heating,
97 : // and Refrigeration Institute.
98 : // (2) ANSI/AHRI Standard 210/240-2008: Standard for Performance Rating of Unitary Air-Conditioning and
99 : // Air-Source Heat Pumps. Arlington, VA: Air-Conditioning, Heating
100 : // , and Refrigeration Institute.
101 : // (3) ANSI/AHRI Standard 340/360-2007: Standard for Performance Rating of Commercial and Industrial
102 : // Unitary Air-Conditioning and Heat Pump Equipment. Arlington,
103 : // VA: Air-Conditioning, Heating, and Refrigeration Institute.
104 :
105 : // OTHER NOTES: none
106 :
107 : // Data
108 : Real64 constexpr IndoorCoilInletAirWetBulbTempRated(19.44); // 19.44C (67F) Tests A2, B2, B1, and F1
109 : Real64 constexpr OutdoorCoilInletAirDryBulbTempRated(35.0); // 35.00C (95F) Tests A2, B2, B1, and F1
110 : Real64 constexpr OutdoorCoilInletAirDryBulbTempTestA2(35.0); // 35.00C (95F) Test A2 (high speed)
111 : Real64 constexpr OutdoorCoilInletAirDryBulbTempTestB2(27.78); // 27.78C (82F) Test B2 (high speed)
112 : Real64 constexpr OutdoorCoilInletAirDryBulbTempTestB1(27.78); // 27.78C (82F) Test B1 (Low speed)
113 : Real64 constexpr OutdoorCoilInletAirDryBulbTempTestF1(19.44); // 19.44C (67F) Test B1 (Low speed)
114 : Real64 constexpr OutdoorCoilInletAirDryBulbTempTestEint(30.55); // 30.55 (87F) Test Eint
115 :
116 : // AHRI Standard 210/240-2008 Performance Test Conditions for Unitary Air-to-Air Air-Conditioning and Heat Pump Equipment
117 : // AHRI STANDARD 210/240 - 2023
118 : Real64 constexpr CoolingCoilInletAirWetBulbTempRated(19.44); // 19.44C (67F) Tests A and B
119 : // AHRI STANDARD 210/240 - 2023
120 : Real64 constexpr OutdoorUnitInletAirDryBulbTempRated(35.0); // 35.00C (95F) Test A (rated capacity)
121 :
122 : Real64 constexpr OutdoorUnitInletAirDryBulbTemp(27.78); // 27.78C (82F) Test B (for SEER)
123 : Real64 constexpr AirMassFlowRatioRated(1.0); // AHRI test is at the design flow rate and hence AirMassFlowRatio is 1.0
124 : // AHRI STANDARD 210/240 - 2017
125 : Real64 constexpr DefaultFanPowerPerEvapAirFlowRate(773.3); // 365 W/1000 scfm or 773.3 W/(m3/s). The AHRI standard
126 : // AHRI STANDARD 210/240 - 2023
127 : Real64 constexpr DefaultFanPowerPerEvapAirFlowRateSEER2(934.4); // 441 W/1000 scfm or 934.4 W/(m3/s). The AHRI standard
128 : // specifies a nominal/default fan electric power consumption per rated air
129 : // volume flow rate to account for indoor fan electric power consumption
130 : // when the standard tests are conducted on units that do not have an
131 : // indoor air circulating fan. Used if user doesn't enter a specific value.
132 :
133 : // AHRI STANDARD 210/240 - 2023
134 : Real64 constexpr PLRforSEER(0.5); // Part-load ratio for SEER calculation (single speed DX cooling coils)
135 :
136 : static constexpr std::array<Real64, 4> ReducedPLR = {1.0, 0.75, 0.50, 0.25}; // Reduced Capacity part-load conditions
137 : static constexpr std::array<Real64, 4> IEERWeightingFactor = {0.020, 0.617, 0.238, 0.125}; // EER Weighting factors (IEER)
138 : Real64 constexpr OADBTempLowReducedCapacityTest(18.3); // Outdoor air dry-bulb temp in degrees C (65F)
139 : // Std. AHRI AHRI 340/360 Dry-bulb Temp at reduced capacity, <= 0.444
140 :
141 : // HSPF AHRI STANDARD 210/240 - 2017
142 : int constexpr TotalNumOfStandardDHRs(16); // Total number of standard design heating requirements
143 : static constexpr std::array<Real64, 6> TotalNumOfTemperatureBins = {9, 10, 13, 15, 18, 9}; // Total number of temperature bins for a region
144 : static constexpr std::array<Real64, 16> StandardDesignHeatingRequirement = {1465.36,
145 : 2930.71,
146 : 4396.07,
147 : 5861.42,
148 : 7326.78,
149 : 8792.14,
150 : 10257.49,
151 : 11722.85,
152 : 14653.56,
153 : 17584.27,
154 : 20514.98,
155 : 23445.70,
156 : 26376.41,
157 : 29307.12,
158 : 32237.83,
159 : 38099.26};
160 :
161 : // HSPF2 AHRI STANDARD 210/240 - 2023
162 : // BPS: As Fractional Bin hours are not summing up to 1 we using an adjusted array of total number of Temperature Bins per region.
163 : // static constexpr std::array<Real64, 6> TotalNumOfTemperatureBinsHSPF2 = {8, 8, 11, 13, 16, 7}; // Total number of temperature bins for each
164 : // region
165 : static constexpr std::array<Real64, 6> TotalNumOfTemperatureBinsHSPF2 = {9, 10, 13, 15, 18, 9};
166 :
167 : // Standardized DHRs from ANSI/AHRI 210/240 - 2017
168 : Real64 constexpr CorrectionFactor(0.77); // A correction factor which tends to improve the agreement
169 : // Slope Adjustment Factor (Cx) from ANSI/AHRI 210/240 - 2023 (Section 11.2.2 - Table 14)
170 : // 1. Variable Speed Load Factor (Cvs) | Variable Speed Equipment
171 : static constexpr std::array<Real64, 6> VariableSpeedLoadFactor = {1.03, 0.99, 1.21, 1.07, 1.08, 1.03};
172 : // 2. Heating Load Line Equation Slope Factor (C) | other Equipment types
173 : static constexpr std::array<Real64, 6> SpeedLoadFactor = {1.10, 1.06, 1.30, 1.15, 1.16, 1.11};
174 :
175 : // between calculated and measured building loads, dimensionless.
176 : Real64 constexpr CyclicDegradationCoeff(0.25);
177 : // For Single Stage Systems, if the optional CFull and DFull tests are not performed, a
178 : // default value of 0.20 shall be used for the cooling Degradation Coefficient
179 : Real64 constexpr CyclicDegradationCoeffSEER2(0.20); // ANSI/AHRI 210/240 2023 Section 6.1.3.1
180 :
181 : // Default Heating Degradation Coefficient | HSPF2
182 : // ANSI/AHRI Standard 2023 Section 6.1.3.2.1 -> For Single Stage Systems, if the optional H1CFull test or H1CLow is not performed, a default value
183 : // of 0.25 shall be used for the heating Degradation Coefficient
184 : Real64 constexpr CyclicHeatingDegradationCoeffHSPF2(0.25);
185 :
186 : // AHRI STANDARD 210/240 - 2017 & 2023
187 : static constexpr std::array<Real64, 6> OutdoorDesignTemperature = {2.78, -2.78, -8.33, -15.0, -23.33, -1.11};
188 :
189 : // (Tzl)the zero-load temperature variation by climate region ANSI/AHRI 210/240 - 2023 (Section 11.2.2 - Table 14)
190 : // [ 58 57 56 55 55 57 ] in Fahrenheit
191 : static constexpr std::array<Real64, 6> ZoneLoadTemperature = {14.44, 13.89, 13.33, 12.78, 12.78, 13.89};
192 :
193 : // Outdoor design temperature for a region from ANSI/AHRI 210/240 - 2017 & 2023
194 : static constexpr std::array<Real64, 18> OutdoorBinTemperature = {
195 : 16.67, 13.89, 11.11, 8.33, 5.56, 2.78, 0.00, -2.78, -5.56, -8.33, -11.11, -13.89, -16.67, -19.44, -22.22, -25.00, -27.78, -30.56};
196 : int constexpr NumberOfRegions{6};
197 : int constexpr NumberOfBins{18};
198 : // Fractional bin hours for different bin temperatures from ANSI/AHRI 210/240 - 2017
199 : static constexpr std::array<std::array<Real64, NumberOfBins>, NumberOfRegions> FracBinHoursAtOutdoorBinTemp = {
200 : {{0.291, 0.239, 0.194, 0.129, 0.081, 0.041, 0.019, 0.005, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
201 : {0.215, 0.189, 0.163, 0.143, 0.112, 0.088, 0.056, 0.024, 0.008, 0.002, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
202 : {0.153, 0.142, 0.138, 0.137, 0.135, 0.118, 0.092, 0.047, 0.021, 0.009, 0.005, 0.002, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0},
203 : {0.132, 0.111, 0.103, 0.093, 0.1, 0.109, 0.126, 0.087, 0.055, 0.036, 0.026, 0.013, 0.006, 0.002, 0.001, 0.0, 0.0, 0.0},
204 : {0.106, 0.092, 0.086, 0.076, 0.078, 0.087, 0.102, 0.094, 0.074, 0.055, 0.047, 0.038, 0.029, 0.018, 0.01, 0.005, 0.002, 0.001},
205 : {0.113, 0.206, 0.215, 0.204, 0.141, 0.076, 0.034, 0.008, 0.003, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}};
206 :
207 : // Fractional bin hours for different bin temperatures from ANSI/AHRI 210/240 - 2023 (Section 11.2.2 - Table 14)
208 : // As the Fractional Bin Hours for each region is not summing up to 1 we're using the adjusted one down below
209 : // static constexpr std::array<std::array<Real64, NumberOfBins>, NumberOfRegions> FracBinHoursAtOutdoorBinTempHSPF2 = {
210 : //{{0.0, 0.239, 0.194, 0.129, 0.081, 0.041, 0.019, 0.005, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
211 : // {0.0, 0.0, 0.163, 0.143, 0.112, 0.088, 0.056, 0.024, 0.008, 0.002, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
212 : // {0.0, 0.0, 0.138, 0.137, 0.135, 0.118, 0.092, 0.047, 0.021, 0.009, 0.005, 0.002, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0},
213 : // {0.0, 0.0, 0.103, 0.093, 0.1, 0.109, 0.126, 0.087, 0.055, 0.036, 0.026, 0.013, 0.006, 0.002, 0.001, 0.0, 0.0, 0.0},
214 : // {0.0, 0.0, 0.086, 0.076, 0.078, 0.087, 0.102, 0.094, 0.074, 0.055, 0.047, 0.038, 0.029, 0.018, 0.01, 0.005, 0.002, 0.001},
215 : // {0.0, 0.0, 0.215, 0.204, 0.141, 0.076, 0.034, 0.008, 0.003, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}};
216 : // Adjusted to sum up to 1
217 : static constexpr std::array<std::array<Real64, NumberOfBins>, NumberOfRegions> FracBinHoursAtOutdoorBinTempHSPF2 = {{{0.0,
218 : 0.337094499,
219 : 0.273624824,
220 : 0.181946403,
221 : 0.114245416,
222 : 0.057827927,
223 : 0.026798307,
224 : 0.007052186,
225 : 0.001410437,
226 : 0.0,
227 : 0.0,
228 : 0.0,
229 : 0.0,
230 : 0.0,
231 : 0.0,
232 : 0.0,
233 : 0.0,
234 : 0.0},
235 : {0.0,
236 : 0.0,
237 : 0.273489933,
238 : 0.239932886,
239 : 0.187919463,
240 : 0.147651007,
241 : 0.093959732,
242 : 0.040268456,
243 : 0.013422819,
244 : 0.003355705,
245 : 0.0,
246 : 0.0,
247 : 0.0,
248 : 0.0,
249 : 0.0,
250 : 0.0,
251 : 0.0,
252 : 0.0},
253 : {0.0,
254 : 0.0,
255 : 0.195744681,
256 : 0.194326241,
257 : 0.191489362,
258 : 0.167375887,
259 : 0.130496454,
260 : 0.066666667,
261 : 0.029787234,
262 : 0.012765957,
263 : 0.007092199,
264 : 0.002836879,
265 : 0.00141844,
266 : 0.0,
267 : 0.0,
268 : 0.0,
269 : 0.0,
270 : 0.0},
271 : {0.0,
272 : 0.0,
273 : 0.136063408,
274 : 0.122853369,
275 : 0.132100396,
276 : 0.143989432,
277 : 0.166446499,
278 : 0.114927345,
279 : 0.072655218,
280 : 0.047556143,
281 : 0.034346103,
282 : 0.017173052,
283 : 0.007926024,
284 : 0.002642008,
285 : 0.001321004,
286 : 0.0,
287 : 0.0,
288 : 0.0},
289 : {0.0,
290 : 0.0,
291 : 0.10723192,
292 : 0.094763092,
293 : 0.097256858,
294 : 0.108478803,
295 : 0.127182045,
296 : 0.117206983,
297 : 0.092269327,
298 : 0.068578554,
299 : 0.058603491,
300 : 0.047381546,
301 : 0.036159601,
302 : 0.02244389,
303 : 0.012468828,
304 : 0.006234414,
305 : 0.002493766,
306 : 0.001246883},
307 : {0.0,
308 : 0.0,
309 : 0.315712188,
310 : 0.299559471,
311 : 0.207048458,
312 : 0.111600587,
313 : 0.049926579,
314 : 0.01174743,
315 : 0.004405286,
316 : 0.0,
317 : 0.0,
318 : 0.0,
319 : 0.0,
320 : 0.0,
321 : 0.0,
322 : 0.0,
323 : 0.0,
324 : 0.0}}};
325 :
326 : // Representative cooling season Outdoor air temperature bin from ANSI/AHRI 210/240-2008
327 : int constexpr NumOfOATempBins(8); // number of outdoor temperature bins for cooling season
328 : static constexpr std::array<Real64, NumOfOATempBins> OutdoorBinTemperatureSEER = {19.44, 22.22, 25.00, 27.78, 30.56, 33.33, 36.11, 38.89};
329 : // Fractional bin hours for different bin temperatures for cooling, from ANSI/AHRI 210/240 - 2008
330 : // AHRI STANDARD 210/240 - 2023 | This does sum up to 1
331 : static constexpr std::array<Real64, NumOfOATempBins> CoolFracBinHoursAtOutdoorBinTemp = {0.214, 0.231, 0.216, 0.161, 0.104, 0.052, 0.018, 0.004};
332 :
333 : Real64 constexpr HeatingIndoorCoilInletAirDBTempRated(21.11); // Heating coil entering air dry-bulb temperature in
334 : // degrees C (70F) Test H1, H2 and H3
335 : // (low and High Speed) Std. AHRI 210/240
336 : Real64 constexpr HeatingOutdoorCoilInletAirDBTempH0Test(16.67); // Outdoor air dry-bulb temp in degrees C (47F)
337 : // Test H0 (low and High Speed) Std. AHRI 210/240
338 :
339 : // ANSI/ASHRAE Standard 127-2012 -- Method of Testing for Rating Computer and Data Processing Room Unitary Air Conditioners
340 : // Class 1 23.9C( 75.0F ) 23.9C( 75.0F ) 23.9C( 75.0F ) 23.9C( 75.0F )
341 : // Class 2 29.4C( 85.0F ) 29.4C( 85.0F ) 29.4C( 85.0F ) 29.4C( 85.0F )
342 : // Class 3 35.0C( 95.0F ) 35.0C( 95.0F ) 35.0C( 95.0F ) 35.0C( 95.0F )
343 : // Class 4 40.5C( 105F ) 40.5C( 105F ) 40.5C( 105F ) 40.5C( 105F )
344 : static constexpr std::array<Real64, 4> IndoorDBTempClassI2IV = {23.9, 29.4, 35.0, 40.5};
345 : Real64 constexpr IndoorTDPA2D(11.1);
346 : // 35.0C( 95.0F ) 26.7C( 80.0F ) 18.3C( 65.0F ) 4.4C( 40.0F )
347 : static constexpr std::array<Real64, 4> OutdoorDBTempAllClassA2D = {35.0, 26.7, 18.3, 4.4};
348 :
349 : // AHRI Std. 340/360-2022 (IP)
350 : // Reduced Capacity part-load conditions
351 : static constexpr std::array<Real64, 4> ReducedPLRIEER = {0.25, 0.50, 0.75, 1.0};
352 : // Table 6
353 : // Cooling
354 : // Real64 CoilInletAirWetBulbTemp = 23.89; // 75F
355 : Real64 constexpr CoilInletAirCoolDryBulbIEER(35); // 95F
356 : Real64 constexpr CoilWaterOutletTempIEER(35); // 95F
357 : Real64 constexpr CoilWaterInletTempIEER(29.44); // 85F
358 : Real64 constexpr CoilInletEvapWetBulbTempIEER(23.89); // 75F
359 : Real64 constexpr CoilInletEvapDryBulbTempIEER(35); // 95F
360 : // Heating
361 : Real64 constexpr CoilHeatingInletAirWetBulbTempIEER(6.11); // 43F
362 : Real64 constexpr CoilHeatingInletAirCoolDryBulbIEER(8.33); // 47F
363 :
364 : // Functions
365 :
366 10 : void CalcChillerIPLV(EnergyPlusData &state,
367 : std::string const &ChillerName, // Name of Chiller for which IPLV is calculated
368 : DataPlant::PlantEquipmentType ChillerType, // Type of Chiller - EIR or Reformulated EIR
369 : Real64 const RefCap, // Reference capacity of chiller [W]
370 : Real64 const RefCOP, // Reference coefficient of performance [W/W]
371 : DataPlant::CondenserType const CondenserType, // Type of Condenser - Air Cooled, Water Cooled or Evap Cooled
372 : int const CapFTempCurveIndex, // Index for the total cooling capacity modifier curve
373 : int const EIRFTempCurveIndex, // Index for the energy input ratio modifier curve
374 : int const EIRFPLRCurveIndex, // Index for the EIR vs part-load ratio curve
375 : Real64 const MinUnloadRat, // Minimum unloading ratio
376 : Real64 &IPLVSI, // IPLV.SI determined using AHRI Std 551/591 (SI)
377 : Real64 &IPLVIP, // IPLV.IP determined using AHRI Std 550/590 (IP)
378 : ObjexxFCL::Optional<Real64 const> CondVolFlowRate,
379 : ObjexxFCL::Optional_int_const CondLoopNum,
380 : ObjexxFCL::Optional<Real64 const> OpenMotorEff)
381 : {
382 :
383 : // SUBROUTINE INFORMATION:
384 : // AUTHOR Chandan Sharma, FSEC
385 : // DATE WRITTEN January 2012
386 : // Modified na
387 : // RE-ENGINEERED na
388 :
389 : // PURPOSE OF THIS SUBROUTINE:
390 : // Calculates Integrated Part Load Value (IPLV) for EIR and reformulated EIR chillers.
391 : // Writes the result to EIO file.
392 : // METHODOLOGY EMPLOYED:
393 : // (1) Obtains the reference cooling capacity, reference COP and performance curves of the chiller
394 : // (2) Evaluates the cooling capacity at AHRI test conditions (Per AHRI 551/591,2011 Table 3)
395 : // (3) Evaluates the EIR at AHRI test conditions (Per AHRI 551/591,2011 Table 3)
396 : // (4) The EER is evaluated from the total cooling capacity and total electric power
397 : // evaluated at the standard rated test conditions. The IPLV is a weighted value of the COP evaluated
398 : // at four different capacities of 100%, 75%, 50% and 25%. The reduced capacity COPs are evaluated
399 : // at different outdoor coil entering temperatures.
400 : // REFERENCES:
401 : // (1) AHRI Standard 551/591-2011: Standard for Performance Rating of Water-Chilling Packages using the Vapor
402 : // Compression Cycle. Arlington, VA: Air-Conditioning, Heating,
403 : // and Refrigeration Institute.
404 :
405 : // Using/Aliasing
406 : using namespace OutputReportPredefined;
407 : using Curve::CurveValue;
408 : using Curve::GetCurveName;
409 : using General::SolveRoot;
410 :
411 10 : Real64 constexpr Acc(0.0001); // Accuracy of result
412 10 : int constexpr NumOfReducedCap(4); // Number of reduced capacity test conditions (100%,75%,50%,and 25%)
413 10 : int constexpr IterMax(500); // Maximum number of iterations
414 : static constexpr std::array<Real64, 4> IPLVWeightingFactor = {0.010, 0.42, 0.45, 0.12}; // EER Weighting factors (IPLV)
415 : static constexpr std::string_view RoutineName("CalcChillerIPLV");
416 :
417 : // INTERFACE BLOCK SPECIFICATIONS
418 : // na
419 :
420 : // DERIVED TYPE DEFINITIONS
421 : // na
422 :
423 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
424 10 : Real64 AvailChillerCap(0.0); // Chiller available capacity at current operating conditions [W]
425 10 : Real64 EnteringWaterTempReduced(0.0); // Entering Condenser Water Temperature at reduced conditions [C]
426 10 : Real64 EnteringAirDryBulbTempReduced(0.0); // Outdoor unit entering air dry-bulb temperature
427 : // at reduced capacity [C]
428 10 : Real64 EnteringAirWetBulbTempReduced(0.0); // Outdoor unit entering air wet-bulb temperature
429 : // at reduced capacity [C]
430 10 : Real64 CondenserInletTemp(0.0); // Entering Condenser Temperature at reduced conditions [C]
431 10 : Real64 CondenserOutletTemp0(0.0); // Lower bound for condenser outlet temperature [C]
432 10 : Real64 CondenserOutletTemp1(0.0); // Upper bound for condenser outlet temperature [C]
433 10 : Real64 CondenserOutletTemp(0.0); // Calculated condenser outlet temperature which corresponds
434 : // to EnteringWaterTempReduced above [C]
435 10 : Real64 Cp(0.0); // Water specific heat [J/(kg*C)]
436 10 : Real64 Rho(0.0); // Water density [kg/m3]
437 10 : Real64 EIR(0.0); // Inverse of COP at reduced capacity test conditions (100%, 75%, 50%, and 25%)
438 10 : Real64 Power(0.0); // Power at reduced capacity test conditions (100%, 75%, 50%, and 25%)
439 10 : Real64 COPReduced(0.0); // COP at reduced capacity test conditions (100%, 75%, 50%, and 25%)
440 10 : Real64 LoadFactor(0.0); // Fractional "on" time for last stage at the desired reduced capacity,
441 : // (dimensionless)
442 10 : Real64 DegradationCoeff(0.0); // Degradation coefficient, (dimensionless)
443 10 : Real64 ChillerCapFT_rated(0.0); // Chiller capacity fraction at AHRI rated conditions (evaluated as a function of temperature)
444 10 : Real64 ChillerCapFT(0.0); // Chiller capacity fraction (evaluated as a function of temperature)
445 10 : Real64 ChillerEIRFT_rated(0.0); // Chiller electric input ratio (EIR = 1 / COP) at AHRI rated conditions as a function of temperature
446 10 : Real64 ChillerEIRFT(0.0); // Chiller electric input ratio (EIR = 1 / COP) as a function of temperature
447 10 : Real64 ChillerEIRFPLR(0.0); // Chiller EIR as a function of part-load ratio (PLR)
448 10 : Real64 PartLoadRatio(0.0); // Part load ratio (PLR) at which chiller is operating at reduced capacity
449 : int RedCapNum; // Integer counter for reduced capacity
450 : int SolFla; // Flag of solver
451 :
452 : // Initialize local variables
453 10 : AvailChillerCap = 0.0;
454 10 : EnteringWaterTempReduced = 0.0;
455 10 : EnteringAirDryBulbTempReduced = 0.0;
456 10 : EnteringAirWetBulbTempReduced = 0.0;
457 10 : CondenserInletTemp = 0.0;
458 10 : CondenserOutletTemp0 = 0.0;
459 10 : CondenserOutletTemp1 = 0.0;
460 10 : CondenserOutletTemp = 0.0;
461 10 : Cp = 0.0;
462 10 : Rho = 0.0;
463 10 : IPLVSI = 0.0;
464 10 : IPLVIP = 0.0;
465 10 : EIR = 0.0;
466 10 : Power = 0.0;
467 10 : COPReduced = 0.0;
468 10 : LoadFactor = 0.0;
469 10 : DegradationCoeff = 0.0;
470 10 : ChillerCapFT_rated = 0.0;
471 10 : ChillerCapFT = 0.0;
472 10 : ChillerEIRFT_rated = 0.0;
473 10 : ChillerEIRFT = 0.0;
474 10 : ChillerEIRFPLR = 0.0;
475 10 : PartLoadRatio = 0.0;
476 :
477 10 : CheckCurveLimitsForIPLV(state, ChillerName, ChillerType, CondenserType, CapFTempCurveIndex, EIRFTempCurveIndex);
478 :
479 10 : Real64 IPLV = 0.0; // current IPLV
480 10 : Real64 EvapOutletTemp = 0.0; // evaporator leaving water temperature, deg C
481 10 : Real64 constexpr EvapOutletTempSI = 7.0; // evaporator LWT, 2011 AHRI Std 551 / 591(SI)
482 10 : Real64 constexpr EvapOutletTempIP = 6.67; // evaporator LWT, 2011 AHRI Std 550 / 590(IP), (44F)
483 10 : bool ReportStdRatingsOnce = true;
484 :
485 30 : for (const auto &AhriStd : {AhriChillerStd::AHRI550_590, AhriChillerStd::AHRI551_591}) {
486 20 : if (AhriStd == AhriChillerStd::AHRI550_590) {
487 10 : EvapOutletTemp = EvapOutletTempIP;
488 10 : ReportStdRatingsOnce = true;
489 10 : } else if (AhriStd == AhriChillerStd::AHRI551_591) {
490 10 : EvapOutletTemp = EvapOutletTempSI;
491 10 : ReportStdRatingsOnce = false;
492 : }
493 20 : IPLV = 0.0;
494 :
495 : // IPLV calculations:
496 100 : for (RedCapNum = 0; RedCapNum < NumOfReducedCap; ++RedCapNum) {
497 :
498 80 : CondenserInletTemp = CondenserEnteringFluidTemperature(CondenserType, AhriStd, ReducedPLR[RedCapNum]);
499 :
500 80 : if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricEIR) {
501 56 : if (RedCapNum == 0) {
502 : // Get curve modifier values at rated conditions (load = 100%)
503 14 : ChillerCapFT_rated = CurveValue(state, CapFTempCurveIndex, EvapOutletTemp, CondenserInletTemp);
504 14 : ChillerEIRFT_rated = CurveValue(state, EIRFTempCurveIndex, EvapOutletTemp, CondenserInletTemp);
505 :
506 : // Report rated capacity and chiller COP
507 14 : if (ReportStdRatingsOnce) {
508 7 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechRatCap, ChillerName, RefCap * ChillerCapFT_rated);
509 7 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechRatEff, ChillerName, RefCOP / ChillerEIRFT_rated);
510 : }
511 : }
512 :
513 : // Get capacity curve info with respect to CW setpoint and entering condenser temps
514 56 : ChillerCapFT = CurveValue(state, CapFTempCurveIndex, EvapOutletTemp, CondenserInletTemp);
515 :
516 56 : ChillerEIRFT = CurveValue(state, EIRFTempCurveIndex, EvapOutletTemp, CondenserInletTemp);
517 :
518 56 : PartLoadRatio = ReducedPLR[RedCapNum] * ChillerCapFT_rated / ChillerCapFT;
519 :
520 56 : if (PartLoadRatio >= MinUnloadRat) {
521 52 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, PartLoadRatio);
522 : } else {
523 4 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, MinUnloadRat);
524 4 : PartLoadRatio = MinUnloadRat;
525 : }
526 :
527 24 : } else if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricReformEIR) {
528 24 : EnteringWaterTempReduced = CondenserInletTemp;
529 24 : Cp = state.dataPlnt->PlantLoop(CondLoopNum).glycol->getSpecificHeat(state, EnteringWaterTempReduced, RoutineName);
530 :
531 24 : Rho = state.dataPlnt->PlantLoop(CondLoopNum).glycol->getDensity(state, EnteringWaterTempReduced, RoutineName);
532 :
533 24 : Real64 reducedPLR = ReducedPLR[RedCapNum];
534 24 : CondenserOutletTemp0 = EnteringWaterTempReduced + 0.1;
535 24 : CondenserOutletTemp1 = EnteringWaterTempReduced + 10.0;
536 :
537 : // CONST_LAMBDA_CAPTURE Issue, see PR 9670
538 24 : Real64 tmpEvapOutletTemp = EvapOutletTemp;
539 81 : auto f = [&state,
540 : EnteringWaterTempReduced,
541 : Cp,
542 : reducedPLR,
543 : CondVolFlowRate,
544 : Rho,
545 : CapFTempCurveIndex,
546 : EIRFTempCurveIndex,
547 : EIRFPLRCurveIndex,
548 : RefCap,
549 : RefCOP,
550 : OpenMotorEff,
551 : tmpEvapOutletTemp,
552 : ChillerCapFT_rated](Real64 const CondenserOutletTemp) {
553 81 : Real64 AvailChillerCap(0.0); // Chiller available capacity at current operating conditions [W]
554 81 : Real64 CondenserInletTemp(0.0); // Calculated condenser inlet temperature [C]
555 81 : Real64 QEvap(0.0); // Rate of heat transfer to the evaporator coil [W]
556 81 : Real64 QCond(0.0); // Rate of heat transfer to the condenser coil [W]
557 81 : Real64 Power(0.0); // Power at reduced capacity test conditions (100%, 75%, 50%, and 25%)
558 81 : Real64 ReformEIRChillerCapFT(0.0); // Chiller capacity fraction (evaluated as a function of temperature)
559 81 : Real64 ReformEIRChillerEIRFT(0.0); // Chiller electric input ratio (EIR = 1 / COP) as a function of temperature
560 81 : Real64 ReformEIRChillerEIRFPLR(0.0); // Chiller EIR as a function of part-load ratio (PLR)
561 81 : Real64 PartLoadRatio(0.0); // Chiller part load ratio
562 :
563 81 : ReformEIRChillerCapFT = CurveValue(state, CapFTempCurveIndex, tmpEvapOutletTemp, CondenserOutletTemp);
564 :
565 81 : ReformEIRChillerEIRFT = CurveValue(state, EIRFTempCurveIndex, tmpEvapOutletTemp, CondenserOutletTemp);
566 :
567 : // Available chiller capacity as a function of temperature
568 81 : AvailChillerCap = RefCap * ReformEIRChillerCapFT;
569 :
570 81 : switch (state.dataCurveManager->curves(EIRFPLRCurveIndex)->numDims) {
571 0 : case 1:
572 0 : ReformEIRChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp);
573 0 : break;
574 81 : case 2:
575 81 : ReformEIRChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp, reducedPLR);
576 81 : break;
577 0 : case 3:
578 : default: // this default allows the simulation to continue, but will issue a warning, should be removed eventually
579 0 : ReformEIRChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp, reducedPLR, 0.0);
580 0 : break;
581 : }
582 :
583 81 : Power = (AvailChillerCap / RefCOP) * ReformEIRChillerEIRFPLR * ReformEIRChillerEIRFT;
584 :
585 81 : if (reducedPLR >= 1.0) {
586 21 : PartLoadRatio = reducedPLR;
587 : } else {
588 60 : PartLoadRatio = reducedPLR * ChillerCapFT_rated / ReformEIRChillerCapFT;
589 : }
590 :
591 81 : QEvap = AvailChillerCap * PartLoadRatio;
592 :
593 81 : QCond = Power * OpenMotorEff + QEvap;
594 :
595 81 : if (CondVolFlowRate > DataBranchAirLoopPlant::MassFlowTolerance) {
596 81 : CondenserInletTemp = CondenserOutletTemp - QCond / (CondVolFlowRate * Rho) / Cp;
597 : }
598 81 : return (EnteringWaterTempReduced - CondenserInletTemp) / EnteringWaterTempReduced;
599 24 : };
600 :
601 24 : General::SolveRoot(state, Acc, IterMax, SolFla, CondenserOutletTemp, f, CondenserOutletTemp0, CondenserOutletTemp1);
602 24 : if (SolFla == -1) {
603 0 : ShowWarningError(state, "Iteration limit exceeded in calculating Reform Chiller IPLV");
604 0 : ShowContinueError(state, format("Reformulated Chiller IPLV calculation failed for {}", ChillerName));
605 24 : } else if (SolFla == -2) {
606 4 : ShowWarningError(state, "Bad starting values for calculating Reform Chiller IPLV");
607 2 : ShowContinueError(state, format("Reformulated Chiller IPLV calculation failed for {}", ChillerName));
608 : }
609 :
610 24 : if (RedCapNum == 0) {
611 : // Get curve modifier values at rated conditions (load = 100%)
612 6 : ChillerCapFT_rated = CurveValue(state, CapFTempCurveIndex, EvapOutletTemp, CondenserOutletTemp);
613 6 : ChillerEIRFT_rated = CurveValue(state, EIRFTempCurveIndex, EvapOutletTemp, CondenserOutletTemp);
614 :
615 : // Report rated capacity and chiller COP
616 6 : if (ReportStdRatingsOnce) {
617 3 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechRatCap, ChillerName, RefCap * ChillerCapFT_rated);
618 3 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechRatEff, ChillerName, RefCOP / ChillerEIRFT_rated);
619 : }
620 : }
621 :
622 24 : ChillerCapFT = CurveValue(state, CapFTempCurveIndex, EvapOutletTemp, CondenserOutletTemp);
623 :
624 24 : ChillerEIRFT = CurveValue(state, EIRFTempCurveIndex, EvapOutletTemp, CondenserOutletTemp);
625 :
626 24 : PartLoadRatio = ReducedPLR[RedCapNum] * ChillerCapFT_rated / ChillerCapFT;
627 :
628 24 : if (PartLoadRatio >= MinUnloadRat) {
629 24 : switch (state.dataCurveManager->curves(EIRFPLRCurveIndex)->numDims) {
630 0 : case 1:
631 0 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp);
632 0 : break;
633 24 : case 2:
634 24 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp, PartLoadRatio);
635 24 : break;
636 0 : case 3:
637 : default: // this default allows the simulation to continue, but will issue a warning, should be removed eventually
638 0 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp, PartLoadRatio, 0.0);
639 0 : break;
640 : }
641 : } else {
642 0 : switch (state.dataCurveManager->curves(EIRFPLRCurveIndex)->numDims) {
643 0 : case 1:
644 0 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp);
645 0 : break;
646 0 : case 2:
647 0 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp, MinUnloadRat);
648 0 : break;
649 0 : case 3:
650 : default: // this default allows the simulation to continue, but will issue a warning, should be removed eventually
651 0 : ChillerEIRFPLR = CurveValue(state, EIRFPLRCurveIndex, CondenserOutletTemp, MinUnloadRat, 0.0);
652 0 : break;
653 : }
654 0 : PartLoadRatio = MinUnloadRat;
655 : }
656 24 : } else {
657 0 : assert(false);
658 : }
659 :
660 : // Available chiller capacity as a function of temperature
661 80 : if (RefCap > 0.0 && RefCOP > 0.0 && ChillerCapFT > 0.0 && ChillerEIRFT > 0.0) {
662 80 : AvailChillerCap = RefCap * ChillerCapFT;
663 80 : Power = (AvailChillerCap / RefCOP) * ChillerEIRFPLR * ChillerEIRFT;
664 80 : EIR = Power / (PartLoadRatio * AvailChillerCap);
665 :
666 80 : if (ReducedPLR[RedCapNum] >= MinUnloadRat) {
667 80 : COPReduced = 1.0 / EIR;
668 : } else {
669 0 : LoadFactor = (ReducedPLR[RedCapNum] * RefCap) / (MinUnloadRat * AvailChillerCap);
670 0 : DegradationCoeff = 1.130 - 0.130 * LoadFactor;
671 0 : COPReduced = 1.0 / (DegradationCoeff * EIR);
672 : }
673 80 : IPLV += IPLVWeightingFactor[RedCapNum] * COPReduced;
674 : } else {
675 : {
676 0 : if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricEIR) {
677 0 : ShowWarningError(
678 0 : state, format("Chiller:Electric:EIR = {}: Integrated Part Load Value (IPLV) cannot be calculated.", ChillerName));
679 0 : } else if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricReformEIR) {
680 :
681 0 : ShowWarningError(state,
682 0 : format("Chiller:Electric:ReformulatedEIR = {}: Integrated Part Load Value (IPLV) cannot be calculated.",
683 : ChillerName));
684 : }
685 : }
686 0 : if (RefCap <= 0.0) {
687 0 : ShowContinueError(
688 : state,
689 0 : format(" Check the chiller autosized or user specified capacity. Autosized or specified chiller capacity = {:.2R}",
690 : RefCap));
691 : }
692 0 : if (RefCOP <= 0.0) {
693 0 : ShowContinueError(state, format(" Check the chiller reference or rated COP specified. Specified COP = {:.2R}", RefCOP));
694 : }
695 0 : if (ChillerCapFT <= 0.0) {
696 0 : ShowContinueError(state,
697 0 : format(" Check limits in Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}.",
698 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
699 0 : GetCurveName(state, CapFTempCurveIndex)));
700 0 : ShowContinueError(state, format(" ..ChillerCapFT value at standard test condition = {:.2R}", ChillerCapFT));
701 : }
702 0 : if (ChillerEIRFT <= 0.0) {
703 0 : ShowContinueError(state,
704 0 : format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}.",
705 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
706 0 : GetCurveName(state, EIRFTempCurveIndex)));
707 0 : ShowContinueError(state, format(" ..ChillerEIRFT value at standard test condition = {:.2R}", ChillerEIRFT));
708 : }
709 0 : IPLV = 0.0;
710 0 : break;
711 : }
712 : }
713 :
714 20 : if (AhriStd == AhriChillerStd::AHRI550_590) {
715 10 : IPLVIP = IPLV;
716 : } else {
717 10 : IPLVSI = IPLV;
718 : }
719 : }
720 : // Writes the IPLV value to the EIO file and standard tabular output tables
721 10 : ReportChillerIPLV(state, ChillerName, ChillerType, IPLVSI, IPLVIP * ConvFromSIToIP);
722 10 : }
723 :
724 10 : void ReportChillerIPLV(EnergyPlusData &state,
725 : std::string const &ChillerName, // Name of Chiller for which IPLV is calculated
726 : DataPlant::PlantEquipmentType ChillerType, // Type of Chiller - EIR or Reformulated EIR
727 : Real64 const IPLVValueSI, // IPLV value in SI units {W/W}
728 : Real64 const IPLVValueIP // IPLV value in IP units {Btu/W-h}
729 : )
730 : {
731 :
732 : // SUBROUTINE INFORMATION:
733 : // AUTHOR Chandan Sharma
734 : // DATE WRITTEN January 2012
735 : // MODIFIED na
736 : // RE-ENGINEERED na
737 :
738 : // PURPOSE OF THIS SUBROUTINE:
739 : // This subroutine writes the IPLV values in SI and IP units to
740 : // the "eio" and tabular output files for EIR Chillers.
741 :
742 : // Using/Aliasing
743 : using namespace OutputReportPredefined;
744 :
745 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
746 :
747 10 : if (state.dataHVACGlobal->StandardRatingsMyOneTimeFlag) {
748 10 : print(state.files.eio,
749 : "{}\n",
750 : "! <Chiller Standard Rating Information>, Component Type, Component Name, IPLV in SI Units {W/W}, IPLV in IP Units {Btu/W-h}");
751 10 : state.dataHVACGlobal->StandardRatingsMyOneTimeFlag = false;
752 : }
753 :
754 : {
755 : static constexpr std::string_view Format_991(" Chiller Standard Rating Information, {}, {}, {:.2R}, {:.2R}\n");
756 10 : if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricEIR) {
757 :
758 7 : print(state.files.eio, Format_991, "Chiller:Electric:EIR", ChillerName, IPLVValueSI, IPLVValueIP);
759 7 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechType, ChillerName, "Chiller:Electric:EIR");
760 :
761 3 : } else if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricReformEIR) {
762 :
763 3 : print(state.files.eio, Format_991, "Chiller:Electric:ReformulatedEIR", ChillerName, IPLVValueSI, IPLVValueIP);
764 3 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechType, ChillerName, "Chiller:Electric:ReformulatedEIR");
765 : }
766 : }
767 :
768 : // Note: We don't want unit conversion, here, but it's ok since W/W will convert to itself since the column heading has "SI" as a hint
769 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechIPLVSI, ChillerName, IPLVValueSI, 2);
770 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchMechIPLVIP, ChillerName, IPLVValueIP, 2);
771 10 : }
772 :
773 10 : void CheckCurveLimitsForIPLV(EnergyPlusData &state,
774 : std::string const &ChillerName, // Name of Chiller
775 : DataPlant::PlantEquipmentType ChillerType, // Type of Chiller - EIR or ReformulatedEIR
776 : DataPlant::CondenserType const CondenserType, // Type of Condenser - Air Cooled, Water Cooled or Evap Cooled
777 : int const CapFTempCurveIndex, // Index for the total cooling capacity modifier curve
778 : int const EIRFTempCurveIndex // Index for the energy input ratio modifier curve
779 : )
780 : {
781 :
782 : // SUBROUTINE INFORMATION:
783 : // AUTHOR Chandan Sharma, FSEC
784 : // DATE WRITTEN January 2012
785 : // MODIFIED na
786 : // RE-ENGINEERED na
787 :
788 : // PURPOSE OF THIS SUBROUTINE:
789 : // Checks the limits of the various curves used in EIR chiller and returns .FALSE. if the limits do not include
790 : // the standard test condition(s).
791 :
792 : // Using/Aliasing
793 : using Curve::GetCurveMinMaxValues;
794 : using Curve::GetCurveName;
795 :
796 : // Following parameters are taken from AHRI 551/591,2011 Table 3
797 10 : Real64 constexpr HighEWTemp(30.0); // Entering water temp in degrees C at full load capacity (85F)
798 10 : Real64 constexpr LowEWTemp(19.0); // Entering water temp in degrees C at minimum reduced capacity (65F)
799 10 : Real64 constexpr OAHighEDBTemp(35.0); // Outdoor air dry-bulb temp in degrees C at full load capacity (95F)
800 10 : Real64 constexpr OALowEDBTemp(12.78); // Outdoor air dry-bulb temp in degrees C at part load capacity for AirCooled Chillers (55F)
801 10 : Real64 constexpr OAHighEWBTemp(24.0); // Outdoor air wet-bulb temp in degrees C at full load capacity (75F)
802 10 : Real64 constexpr OALowEWBTemp(13.47); // Outdoor air wet-bulb temp in degrees C at full load capacity for EvapCooled Chillers (56.25F)
803 10 : Real64 constexpr LeavingWaterTemp(6.67); // Evaporator leaving water temperature in degrees C [44 F]
804 :
805 : // Minimum and Maximum independent variable limits from Total Cooling Capacity Function of Temperature Curve
806 10 : Real64 CapacityLWTempMin(0.0); // Capacity modifier Min value (leaving water temp), from the Curve:BiQuadratic object
807 10 : Real64 CapacityLWTempMax(0.0); // Capacity modifier Max value (leaving water temp), from the Curve:BiQuadratic object
808 10 : Real64 CapacityEnteringCondTempMin(0.0); // Capacity modifier Min value (entering cond temp), from the Curve:BiQuadratic object
809 10 : Real64 CapacityEnteringCondTempMax(0.0); // Capacity modifier Max value (entering cond temp), from the Curve:BiQuadratic object
810 :
811 : // Minimum and Maximum independent variable limits from Energy Input Ratio (EIR) Function of Temperature Curve
812 10 : Real64 EIRLWTempMin(0.0); // EIR modifier Min value (leaving water temp), from the Curve:BiQuadratic object
813 10 : Real64 EIRLWTempMax(0.0); // EIR modifier Max value (leaving water temp), from the Curve:BiQuadratic object
814 10 : Real64 EIREnteringCondTempMin(0.0); // EIR modifier Min value (entering cond temp), from the Curve:BiQuadratic object
815 10 : Real64 EIREnteringCondTempMax(0.0); // EIR modifier Max value (entering cond temp), from the Curve:BiQuadratic object
816 :
817 10 : Real64 HighCondenserEnteringTempLimit(0.0); // High limit of entering condenser temperature
818 10 : Real64 LowCondenserEnteringTempLimit(0.0); // Low limit of entering condenser temperature
819 :
820 10 : bool CapCurveIPLVLimitsExceeded(false); // Logical for capacity curve temperature limits being exceeded (IPLV calcs)
821 10 : bool EIRCurveIPLVLimitsExceeded(false); // Logical for EIR temperature limits being exceeded (IPLV calcs)
822 :
823 10 : GetCurveMinMaxValues(
824 : state, CapFTempCurveIndex, CapacityLWTempMin, CapacityLWTempMax, CapacityEnteringCondTempMin, CapacityEnteringCondTempMax);
825 10 : GetCurveMinMaxValues(state, EIRFTempCurveIndex, EIRLWTempMin, EIRLWTempMax, EIREnteringCondTempMin, EIREnteringCondTempMax);
826 :
827 10 : if (CondenserType == DataPlant::CondenserType::WaterCooled) {
828 6 : HighCondenserEnteringTempLimit = HighEWTemp;
829 6 : LowCondenserEnteringTempLimit = LowEWTemp;
830 4 : } else if (CondenserType == DataPlant::CondenserType::AirCooled) {
831 3 : HighCondenserEnteringTempLimit = OAHighEDBTemp;
832 3 : LowCondenserEnteringTempLimit = OALowEDBTemp;
833 : } else { // Evaporatively Cooled Condenser
834 1 : HighCondenserEnteringTempLimit = OAHighEWBTemp;
835 1 : LowCondenserEnteringTempLimit = OALowEWBTemp;
836 : }
837 :
838 : // Checking the limits of capacity modifying curve for temperatures (IPLV high and low test conditions)
839 10 : if (CapacityEnteringCondTempMax < HighCondenserEnteringTempLimit || CapacityEnteringCondTempMin > LowCondenserEnteringTempLimit ||
840 1 : CapacityLWTempMax < LeavingWaterTemp || CapacityLWTempMin > LeavingWaterTemp) {
841 10 : CapCurveIPLVLimitsExceeded = true;
842 : }
843 : // Checking the limits of EIR modifying curve for temperatures (IPLV high and low test conditions)
844 10 : if (EIREnteringCondTempMax < HighCondenserEnteringTempLimit || EIREnteringCondTempMin > LowCondenserEnteringTempLimit ||
845 2 : EIRLWTempMax < LeavingWaterTemp || EIRLWTempMin > LeavingWaterTemp) {
846 9 : EIRCurveIPLVLimitsExceeded = true;
847 : }
848 :
849 : // For IPLV:
850 10 : if (CapCurveIPLVLimitsExceeded || EIRCurveIPLVLimitsExceeded) {
851 10 : if (state.dataGlobal->DisplayExtraWarnings) {
852 :
853 0 : if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricEIR) {
854 :
855 0 : ShowWarningError(
856 : state,
857 0 : format("Chiller:Electric:EIR = {}: Integrated Part Load Value (IPLV) calculated is not at the AHRI test condition.",
858 : ChillerName));
859 0 : } else if (ChillerType == DataPlant::PlantEquipmentType::Chiller_ElectricReformEIR) {
860 :
861 0 : ShowWarningError(
862 : state,
863 0 : format(
864 : "Chiller:Electric:ReformulatedEIR = {}: Integrated Part Load Value (IPLV) calculated is not at the AHRI test condition.",
865 : ChillerName));
866 : }
867 0 : if (CapCurveIPLVLimitsExceeded) {
868 0 : ShowContinueError(state,
869 0 : format(" Check limits in Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
870 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
871 0 : GetCurveName(state, CapFTempCurveIndex)));
872 : }
873 0 : if (EIRCurveIPLVLimitsExceeded) {
874 0 : ShowContinueError(state,
875 0 : format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
876 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
877 0 : GetCurveName(state, EIRFTempCurveIndex)));
878 : }
879 : }
880 : }
881 10 : }
882 :
883 68 : void CalcDXCoilStandardRating(
884 : EnergyPlusData &state,
885 : std::string const &DXCoilName, // Name of DX coil for which HSPF is calculated
886 : std::string const &DXCoilType, // Type of DX coil for which HSPF is calculated
887 : int const DXCoilType_Num, // Integer Type of DX coil - heating or cooling
888 : int const ns, // Number of compressor speeds
889 : Array1A<Real64> const RatedTotalCapacity, // Reference capacity of DX coil [W]
890 : Array1A<Real64> const RatedCOP, // Reference coefficient of performance [W/W]
891 : Array1A_int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
892 : Array1A_int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
893 : Array1A_int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
894 : Array1A_int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
895 : Array1A_int const PLFFPLRCurveIndex, // Index for the PLF vs part-load ratio curve
896 : Array1A<Real64> const RatedAirVolFlowRate, // Reference air flow rate of DX coil [m3/s]
897 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput, // Reference fan power per evap air flow rate [W/(m3/s)]
898 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput_2023,
899 : Array1D<DataHeatBalance::RefrigCondenserType> CondenserType,
900 : ObjexxFCL::Optional_int_const
901 : RegionNum, // Region number for calculating HSPF of single speed DX heating coil //Autodesk:OPTIONAL Used without PRESENT check
902 : ObjexxFCL::Optional<Real64 const>
903 : MinOATCompressor, // Minimum OAT for heat pump compressor operation [C] //Autodesk:OPTIONAL Used without PRESENT check
904 : ObjexxFCL::Optional<Real64 const>
905 : OATempCompressorOn, // The outdoor temperature when the compressor is automatically turned //Autodesk:OPTIONAL Used without PRESENT check
906 : ObjexxFCL::Optional_bool_const
907 : OATempCompressorOnOffBlank, // Flag used to determine low temperature cut out factor //Autodesk:OPTIONAL Used without PRESENT check
908 : ObjexxFCL::Optional<HPdefrostControl const>
909 : DefrostControl, // defrost control; 1=timed, 2=on-demand //Autodesk:OPTIONAL Used without PRESENT check
910 : ObjexxFCL::Optional_bool_const ASHRAE127StdRprt, // true if user wishes to report ASHRAE 127 standard ratings
911 : ObjexxFCL::Optional<Real64 const> GrossRatedTotalCoolingCapacityVS, // Gross Rated Total Cooling Capacity At Selected Nominal Speed Level {W}
912 : ObjexxFCL::Optional<Real64 const> RatedVolumetricAirFlowRateVS // Rated Air Flow Rate At Selected Nominal Speed Level {m3/s}
913 : )
914 : {
915 :
916 : // SUBROUTINE INFORMATION:
917 : // AUTHOR Bereket Nigusse, Chandan Sharma FSEC
918 : // DATE WRITTEN February 2010,
919 : // B. Nigusse, May 2010 Added EER and IEER Calculation
920 : // C. Sharma, March 2012 Added HSPF Calculation for single speed HP
921 : // B. Nigusse, August 2012 Added SEER Calculation for Multi-speed HP
922 : // B. Nigusse, November 2012 Added HSPF Calculation for Multi-speed HP
923 :
924 : // RE-ENGINEERED na
925 :
926 : // PURPOSE OF THIS SUBROUTINE:
927 : // Calculates:
928 : // (1) Standard Rated (net) Cooling Capacity
929 : // (2) Seasonal Energy Efficiency Ratio (SEER)
930 : // (3) Energy Efficiency Ratio (EER),
931 : // (4) Integrated Energy Efficiency Ratio (IEER)
932 : // for Air-to-Air Direct Expansion Air Conditioner and Heat Pumps having a single-speed compressor,
933 : // fixed speed indoor supply air fan, and air-cooled condensers. Writes the result to EIO file.
934 : // (5) Heating Seasonal Performance Factor (HSPF) for Air-Source Direct Expansion Heat Pumps having
935 : // a single-speed compressor, fixed speed indoor supply air fan
936 : // (6) Standard Rated (net) Cooling Capacity; and
937 : // (7) Seasonal Energy Efficiency Ratio (SEER) for Air-to-Air Heat Pumps having multi-speed
938 : // compressor.
939 : // (8) Heating Seasonal Performance Factor (HSPF) for Air-to-Air Heat Pumps having multi-speed
940 : // compressor.
941 : // METHODOLOGY EMPLOYED:
942 : // (A) Methodology for calculating standard ratings for DX air conditioners
943 : // (1) Obtains the rated condition parameters:
944 : // Cooling capacity (User specified or Autosized Value)
945 : // Rated Air volume flow rate through the DX Cooling Coil (User specified or autosized value)
946 : // (2) Evaluates the total cooling coil capacity at AHRI test conditions 26.7C/19.4C/27.8C. Then net
947 : // cooling capacity is determined from the total cooling capacity of the DX coil at the AHRI test
948 : // conditions and accounting for the INDOOR supply air fan heat.
949 : // (3) Calculates the electric power consumed by the DX Coil Unit (compressor + outdoor condenser fan).
950 : // Evaluates the EIR capacity and flow fraction modifiers at 26.7C/19.4C/27.8C. The net electric
951 : // power consumption is determined by adding the indoor fan electric power to the electric power
952 : // consumption by the DX Coil Condenser Fan and Compressor at the AHRI test conditions.
953 : // (4) The EER is evaluated from the total net cooling capacity and total electric power
954 : // evaluated at the standard rated test conditions. The IEER is a weighted value of the EER evaluated
955 : // at four different capacities of 100%, 75%, 50% and 25%. The reduced capacity EERs are evaluated
956 : // at different outdoor coil entering air dry-bulb temperatures.
957 : // (B) Methodology for calculating standard ratings for DX air air source heat pumps
958 : // (1) Obtains the rated condition parameters:
959 : // heating capacity (User specified or Autosized Value), COP, Rated Air volume flow rate through the
960 : // DX Cooling Coil (User specified or autosized value) and Fan power per rated air flow rate
961 : // (2) Evaluates the heating coil capacities for AHRI tests H1, H2 and H3 using the performance curves and
962 : // input values specified at (1) above. Then net heating capacity is determined from the total heating capacity
963 : // of the DX coil at the AHRI test conditions and accounting for the INDOOR supply air fan heat.
964 : // (3) Calculates the electric power consumed by the DX Coil Unit (compressor + outdoor condenser fan).
965 : // The net electric power consumption is determined by adding the indoor fan electric power to the
966 : // electric power consumption by the DX Coil Condenser Fan and Compressor at the AHRI test conditions.
967 : // (4) High Temperature Heating Standard (Net) Rating Capacity and Low Temperature Heating Standard (Net)
968 : // Rating Capacity capacity are determined using tests H1 and H3 per ANSI/AHRI 210/240 2008.
969 : // (5) The HSPF is evaluated from the total net heating capacity and total electric power
970 : // evaluated at the standard rated test conditions. For user specified region number, the outdoor temperatures
971 : // are Binned (grouped) and fractional bin hours for each bin over the entire heating season are taken
972 : // from AHRI 210/240. Then for each bin, building load, heat pump energy and resistance space heating energy are
973 : // calculated. The sum of building load divided by sum of heat pump and resistance space heating over the
974 : // entire heating season gives the HSPF. The detailed calculation algorithms of calculating HSPF
975 : // are described in Engineering Reference.
976 : // (C) Methodology for calculating standard ratings for Multi-Speed Heat Pumps
977 : // Net Total Cooling Capacity and SEER
978 : // (1) Obtains the rated condition parameters:
979 : // Cooling capacity (User specified or Autosized Value)
980 : // Rated Air volume flow rate through the DX Cooling Coil (User specified or autosized value)
981 : // (2) Evaluates the total cooling coil capacity at AHRI A2 test conditions 26.7C/19.4C/35.0C. Then net
982 : // cooling capacity is determined from the total cooling capacity of the DX coil at the AHRI A2 test
983 : // conditions and accounting for the INDOOR supply air fan effect. The net total cooling capacity
984 : // is reported at the high (maximum) speed only.
985 : // (3) Calculates the electric power consumed by the DX Coil Unit (compressor + outdoor condenser fan).
986 : // Evaluates the EIR capacity and flow fraction modifiers at A2, B2, B1, and F1 test conditions per
987 : // AHRI/ANSI Std. 210/240 test procedure for multi-speed compressor. For any inter-
988 : // mediate operating conditions (speed), the successive lower and the higher speed performance are
989 : // weighed per the standard. Electric Power consumption is determined by adding the indoor fan
990 : // electric power to the electric power consumption by the outdoor DX Coil Fan and Compressor Power
991 : // at the AHRI test conditions. The net total cooling capacity is also corrected for the fan heat
992 : // effect for SEER calculation.
993 : // Net Heating Capacity and HSPF
994 : // (4) Obtains the rated condition parameters:
995 : // Heating capacity (User specified or Autosized Value)
996 : // Rated Air volume flow rate through the DX Heating Coil (User specified or autosized value)
997 : // (5) Evaluates the heating coil capacity at AHRI H12 test conditions 21.1C/15.6C/8.33C. Then net
998 : // heating capacity is determined from the total heating capacity of the DX coil at the AHRI H12
999 : // test conditions and accounting for the supply supply air fan effect. The net heating capacity
1000 : // is reported at the high (maximum) speed only.
1001 : // (6) Calculates the electric power consumed by the DX Coil Unit (compressor + outdoor condenser fan).
1002 : // Evaluates the EIR capacity and flow fraction modifiers per AHRI/ANSI Std. 210/240 test procedures
1003 : // for two speed compressor (H01, H11, H21, H31, H12, H22, and H32 ). This procedure was modified
1004 : // for multispeed heat pumps. For any inter-mediate operating conditions (speed), the successive
1005 : // lower and the higher speed performance are weighed per the standard.
1006 : // Electric Power consumption is determined by adding the supply fan electric power to the electric
1007 : // power consumption by the outdoor DX Coil Fan and Compressor Power at the AHRI test conditions.
1008 : // The net heating capacity is also corrected for the fan heat effect for SEER calculation.
1009 : // REFERENCES:
1010 : // (1) ANSI/AHRI Standard 210/240-2008: Standard for Performance Rating of Unitary Air-Conditioning and
1011 : // Air-Source Heat Pumps. Arlington, VA: Air-Conditioning, Heating
1012 : // , and Refrigeration Institute.
1013 : // (2) ANSI/AHRI Standard 340/360-2007: Standard for Performance Rating of Commercial and Industrial
1014 : // Unitary Air-Conditioning and Heat Pump Equipment. Arlington,
1015 : // VA: Air-Conditioning, Heating, and Refrigeration Institute.
1016 :
1017 : // USE STATEMENTS:
1018 :
1019 : // Using/Aliasing
1020 : using Curve::CurveValue;
1021 : using Curve::GetCurveMinMaxValues;
1022 : using HVAC::Coil_CoolingAirToAirVariableSpeed;
1023 : using HVAC::CoilDX_CoolingSingleSpeed;
1024 : using HVAC::CoilDX_HeatingEmpirical;
1025 : using HVAC::CoilDX_MultiSpeedCooling;
1026 : using HVAC::CoilDX_MultiSpeedHeating;
1027 :
1028 : // Argument array dimensioning
1029 68 : RatedTotalCapacity.dim(ns);
1030 68 : RatedCOP.dim(ns);
1031 68 : CapFFlowCurveIndex.dim(ns);
1032 68 : CapFTempCurveIndex.dim(ns);
1033 68 : EIRFFlowCurveIndex.dim(ns);
1034 68 : EIRFTempCurveIndex.dim(ns);
1035 68 : PLFFPLRCurveIndex.dim(ns);
1036 68 : RatedAirVolFlowRate.dim(ns);
1037 68 : FanPowerPerEvapAirFlowRateFromInput.dim(ns);
1038 :
1039 : ////TODO: this will be passed as argument in this method later on
1040 : // Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInputSEER2;
1041 68 : FanPowerPerEvapAirFlowRateFromInput_2023.dim(ns);
1042 : // Locals
1043 : // SUBROUTINE ARGUMENT DEFINITIONS:
1044 :
1045 : // back on, if applicable, following automatic shut off. This field is
1046 : // used only for HSPF calculation. [C]
1047 :
1048 : // SUBROUTINE PARAMETER DEFINITIONS:
1049 :
1050 : // INTERFACE BLOCK SPECIFICATIONS
1051 : // na
1052 :
1053 : // DERIVED TYPE DEFINITIONS
1054 : // na
1055 :
1056 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
1057 68 : Array1D<Real64> FanPowerPerEvapAirFlowRate(ns); // Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
1058 :
1059 : // Intermediate values calculated from the inputs in the idf file
1060 : int spnum; // compressor speed number
1061 :
1062 : // Calculated and reported to the EIO file
1063 68 : Real64 SEER_User(0.0); // Seasonal Energy Efficiency Ratio using user PLF curve in SI [W/W]
1064 68 : Real64 SEER_Standard(0.0); // Seasonal Energy Efficiency Ratio using AHRI 210/240 PLF default curve & C_D in SI [W/W]
1065 68 : Real64 EER(0.0); // Energy Efficiency Ratio using AHRI 210-240 2017 in SI [W/W]
1066 68 : Real64 IEER(0.0); // Integrated Energy Efficiency Ratio in SI [W/W]
1067 :
1068 : // SEER2 ANSI/AHRI 210/240 Standard 2023 Ratings
1069 68 : Real64 SEER2_User(0.0); // Seasonal Energy Efficiency Ratio using user PLF curve in SI [W/W]
1070 68 : Real64 SEER2_Standard(0.0); // Seasonal Energy Efficiency Ratio using AHRI 210/240 PLF default curve & C_D in SI [W/W]
1071 68 : Real64 EER2(0.0); // Energy Efficiency Ratio using AHRI 210/140 - 2023
1072 68 : Real64 EER_2022(0.0); // Energy Efficiency Ratio in SI [W/W]
1073 68 : Real64 IEER_2022(0.0); // Integrated Energy Efficiency Ratio in SI [W/W]
1074 :
1075 68 : Real64 HSPF(0.0); // Heating Seasonal Performance Factor in SI [W/W]
1076 68 : Real64 NetHeatingCapRatedHighTemp(0.0); // Net Rated heating capacity at high temp [W]
1077 68 : Real64 NetHeatingCapRatedLowTemp(0.0); // Net Rated heating capacity at low temp [W]
1078 :
1079 : // HSPF2 ANSI/AHRI 210/240 Standard 2023 Ratings
1080 68 : Real64 HSPF2_2023(0.0); // Heating Seasonal Performance Factor in SI [W/W]
1081 68 : Real64 NetHeatingCapRatedHighTemp_2023(0.0); // Net Rated heating capacity at high temp [W]
1082 68 : Real64 NetHeatingCapRatedLowTemp_2023(0.0); // Net Rated heating capacity at low temp [W]
1083 :
1084 68 : Array1D<Real64> NetCoolingCapRated(ns); // Net Cooling Coil capacity at Rated conditions, accounting for supply fan heat [W]
1085 68 : Array1D<Real64> NetTotCoolingCapRated(16); // net total cooling capacity of DX Coils for the sixteen ASHRAE Std 127 Test conditions
1086 68 : Array1D<Real64> TotElectricPowerRated(16); // total electric power of DX Coils for the sixteen ASHRAE Std 127 Test conditions
1087 :
1088 68 : Array1D<Real64> NetCoolingCapRated_2023(ns); // Net Cooling Coil capacity at Rated conditions, accounting for supply fan heat [W]
1089 68 : Array1D<Real64> NetTotCoolingCapRated_2023(16); // net total cooling capacity of DX Coils for the sixteen ASHRAE Std 127 Test conditions
1090 68 : Array1D<Real64> TotElectricPowerRated_2023(16); // total electric power of DX Coils for the sixteen ASHRAE Std 127 Test conditions
1091 :
1092 68 : NetCoolingCapRated = 0.0;
1093 :
1094 68 : switch (DXCoilType_Num) {
1095 :
1096 36 : case CoilDX_CoolingSingleSpeed: { // Coil:Cooling:DX:SingleSpeed
1097 :
1098 180 : CheckCurveLimitsForStandardRatings(state,
1099 : DXCoilName,
1100 : DXCoilType,
1101 : DXCoilType_Num,
1102 36 : CapFTempCurveIndex(1),
1103 36 : CapFFlowCurveIndex(1),
1104 36 : EIRFTempCurveIndex(1),
1105 36 : EIRFFlowCurveIndex(1),
1106 36 : PLFFPLRCurveIndex(1));
1107 :
1108 : // Calculated Net Cooling Capacity, SEER, SEER Default, EER, and IEER of single speed DX cooling coils
1109 : std::map<std::string, Real64> StandarRatingResults = SingleSpeedDXCoolingCoilStandardRatings(state,
1110 : DXCoilName,
1111 : DXCoilType,
1112 72 : CapFTempCurveIndex(1),
1113 72 : CapFFlowCurveIndex(1),
1114 72 : EIRFTempCurveIndex(1),
1115 72 : EIRFFlowCurveIndex(1),
1116 72 : PLFFPLRCurveIndex(1),
1117 72 : RatedTotalCapacity(1),
1118 72 : RatedCOP(1),
1119 72 : RatedAirVolFlowRate(1),
1120 72 : FanPowerPerEvapAirFlowRateFromInput(1),
1121 72 : FanPowerPerEvapAirFlowRateFromInput_2023(1),
1122 36 : CondenserType(1));
1123 72 : NetCoolingCapRated(1) = StandarRatingResults["NetCoolingCapRated"];
1124 72 : SEER_User = StandarRatingResults["SEER_User"];
1125 72 : SEER_Standard = StandarRatingResults["SEER_Standard"];
1126 72 : EER = StandarRatingResults["EER"];
1127 72 : IEER = StandarRatingResults["IEER"];
1128 :
1129 72 : NetCoolingCapRated_2023(1) = StandarRatingResults["NetCoolingCapRated2023"];
1130 72 : SEER2_User = StandarRatingResults["SEER2_User"];
1131 72 : SEER2_Standard = StandarRatingResults["SEER2_Standard"];
1132 72 : EER_2022 = StandarRatingResults["EER_2022"];
1133 36 : IEER_2022 = StandarRatingResults["IEER_2022"];
1134 :
1135 : // Writes the net rated cooling capacity, SEER, SEER Default, EER and IEER values to the EIO file and standard tabular output tables
1136 72 : ReportDXCoilRating(state,
1137 : DXCoilType,
1138 : DXCoilName,
1139 : DXCoilType_Num,
1140 36 : NetCoolingCapRated(1),
1141 : SEER_User * ConvFromSIToIP,
1142 : SEER_Standard * ConvFromSIToIP,
1143 : EER,
1144 : EER * ConvFromSIToIP,
1145 : IEER * ConvFromSIToIP,
1146 : NetHeatingCapRatedHighTemp,
1147 : NetHeatingCapRatedLowTemp,
1148 : HSPF * ConvFromSIToIP,
1149 : RegionNum,
1150 : false);
1151 :
1152 : // ANSI/AHRI 210/240 Std. 2023 Ratings
1153 : // Writes the net rated cooling capacity, SEER2_USER, SEER2_Standard, EER and IEER values to the EIO file and standard tabular output
1154 : // tables
1155 72 : ReportDXCoilRating(state,
1156 : DXCoilType,
1157 : DXCoilName,
1158 : DXCoilType_Num,
1159 36 : NetCoolingCapRated_2023(1),
1160 : SEER2_User * ConvFromSIToIP,
1161 : SEER2_Standard * ConvFromSIToIP,
1162 : EER_2022,
1163 : EER_2022 * ConvFromSIToIP,
1164 : IEER_2022 * ConvFromSIToIP,
1165 : NetHeatingCapRatedHighTemp_2023,
1166 : NetHeatingCapRatedLowTemp_2023,
1167 : HSPF2_2023 * ConvFromSIToIP,
1168 : RegionNum,
1169 : true);
1170 :
1171 36 : if (ASHRAE127StdRprt) {
1172 0 : DXCoolingCoilDataCenterStandardRatings(state,
1173 : DXCoilName,
1174 : DXCoilType,
1175 0 : CapFTempCurveIndex(1),
1176 0 : CapFFlowCurveIndex(1),
1177 0 : EIRFTempCurveIndex(1),
1178 0 : EIRFFlowCurveIndex(1),
1179 0 : PLFFPLRCurveIndex(1),
1180 0 : RatedTotalCapacity(1),
1181 0 : RatedCOP(1),
1182 0 : RatedAirVolFlowRate(1),
1183 0 : FanPowerPerEvapAirFlowRateFromInput(1),
1184 : NetTotCoolingCapRated,
1185 : TotElectricPowerRated);
1186 0 : ReportDXCoolCoilDataCenterApplication(state, DXCoilType, DXCoilName, DXCoilType_Num, NetTotCoolingCapRated, TotElectricPowerRated);
1187 : }
1188 36 : break;
1189 36 : }
1190 5 : case CoilDX_HeatingEmpirical: { // Coil:Heating:DX:SingleSpeed
1191 :
1192 25 : CheckCurveLimitsForStandardRatings(state,
1193 : DXCoilName,
1194 : DXCoilType,
1195 : DXCoilType_Num,
1196 5 : CapFTempCurveIndex(1),
1197 5 : CapFFlowCurveIndex(1),
1198 5 : EIRFTempCurveIndex(1),
1199 5 : EIRFFlowCurveIndex(1),
1200 5 : PLFFPLRCurveIndex(1));
1201 : // Calculate the standard ratings for single speed DX heating coil
1202 : std::map<std::string, Real64> StandardRatingsResults =
1203 : SingleSpeedDXHeatingCoilStandardRatings(state,
1204 : DXCoilType,
1205 10 : RatedTotalCapacity(1),
1206 10 : RatedCOP(1),
1207 10 : CapFFlowCurveIndex(1),
1208 10 : CapFTempCurveIndex(1),
1209 10 : EIRFFlowCurveIndex(1),
1210 10 : EIRFTempCurveIndex(1),
1211 10 : RatedAirVolFlowRate(1),
1212 10 : FanPowerPerEvapAirFlowRateFromInput(1),
1213 5 : FanPowerPerEvapAirFlowRateFromInput_2023(1),
1214 : RegionNum,
1215 : MinOATCompressor,
1216 : OATempCompressorOn,
1217 : OATempCompressorOnOffBlank,
1218 10 : DefrostControl);
1219 10 : NetHeatingCapRatedHighTemp = StandardRatingsResults["NetHeatingCapRated"];
1220 10 : NetHeatingCapRatedLowTemp = StandardRatingsResults["NetHeatingCapH3Test"];
1221 10 : HSPF = StandardRatingsResults["HSPF"];
1222 :
1223 10 : NetHeatingCapRatedHighTemp_2023 = StandardRatingsResults["NetHeatingCapRated_2023"];
1224 10 : NetHeatingCapRatedLowTemp_2023 = StandardRatingsResults["NetHeatingCapH3Test_2023"];
1225 10 : HSPF2_2023 = StandardRatingsResults["HSPF2_2023"];
1226 5 : IEER_2022 = StandardRatingsResults["IEER_2022"];
1227 : // Writes the HSPF value to the EIO file and standard tabular output tables
1228 10 : ReportDXCoilRating(state,
1229 : DXCoilType,
1230 : DXCoilName,
1231 : DXCoilType_Num,
1232 5 : NetCoolingCapRated(1),
1233 : SEER_User * ConvFromSIToIP,
1234 : SEER_Standard * ConvFromSIToIP,
1235 : EER,
1236 : EER * ConvFromSIToIP,
1237 : IEER * ConvFromSIToIP,
1238 : NetHeatingCapRatedHighTemp,
1239 : NetHeatingCapRatedLowTemp,
1240 : HSPF * ConvFromSIToIP,
1241 : RegionNum,
1242 : false);
1243 :
1244 : // ANSI/AHRI 210/240 Std. 2023 Ratings
1245 : // Writes the HSPF2 value to the EIO file and standard tabular output tables
1246 10 : ReportDXCoilRating(state,
1247 : DXCoilType,
1248 : DXCoilName,
1249 : DXCoilType_Num,
1250 5 : NetCoolingCapRated_2023(1),
1251 : SEER2_User * ConvFromSIToIP,
1252 : SEER2_Standard * ConvFromSIToIP,
1253 : EER_2022,
1254 : EER_2022 * ConvFromSIToIP,
1255 : IEER_2022 * ConvFromSIToIP,
1256 : NetHeatingCapRatedHighTemp_2023,
1257 : NetHeatingCapRatedLowTemp_2023,
1258 : HSPF2_2023 * ConvFromSIToIP,
1259 : RegionNum,
1260 : true);
1261 5 : break;
1262 5 : }
1263 10 : case CoilDX_MultiSpeedCooling: { // Coil:Cooling:DX:MultiSpeed,
1264 :
1265 31 : for (spnum = 1; spnum <= ns; ++spnum) {
1266 105 : CheckCurveLimitsForStandardRatings(state,
1267 : DXCoilName,
1268 : DXCoilType,
1269 : DXCoilType_Num,
1270 21 : CapFTempCurveIndex(spnum),
1271 21 : CapFFlowCurveIndex(spnum),
1272 21 : EIRFTempCurveIndex(spnum),
1273 21 : EIRFFlowCurveIndex(spnum),
1274 21 : PLFFPLRCurveIndex(spnum));
1275 : }
1276 : // Calculate the standard ratings for multispeed DX cooling coil
1277 : std::map<std::string, Real64> StandardRatingsResult = MultiSpeedDXCoolingCoilStandardRatings(state,
1278 : DXCoilType,
1279 : DXCoilName,
1280 : CapFTempCurveIndex,
1281 : CapFFlowCurveIndex,
1282 : EIRFTempCurveIndex,
1283 : EIRFFlowCurveIndex,
1284 : PLFFPLRCurveIndex,
1285 : RatedTotalCapacity,
1286 : RatedCOP,
1287 : RatedAirVolFlowRate,
1288 : FanPowerPerEvapAirFlowRateFromInput,
1289 : FanPowerPerEvapAirFlowRateFromInput_2023,
1290 : ns,
1291 10 : CondenserType);
1292 20 : NetCoolingCapRated(ns) = StandardRatingsResult["NetCoolingCapRatedMaxSpeed"];
1293 20 : SEER_User = StandardRatingsResult["SEER_User"];
1294 20 : SEER_Standard = StandardRatingsResult["SEER_Standard"];
1295 20 : EER = StandardRatingsResult["EER"];
1296 :
1297 20 : NetCoolingCapRated_2023(ns) = StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"];
1298 20 : SEER2_User = StandardRatingsResult["SEER2_User"];
1299 20 : SEER2_Standard = StandardRatingsResult["SEER2_Standard"];
1300 20 : EER2 = StandardRatingsResult["EER2"];
1301 :
1302 20 : IEER_2022 = StandardRatingsResult["IEER_2022"];
1303 10 : EER_2022 = StandardRatingsResult["EER_2022"];
1304 :
1305 : // Writes the SEER value to the EIO file and standard tabular output tables
1306 10 : ReportDXCoilRating(state,
1307 : DXCoilType,
1308 : DXCoilName,
1309 : DXCoilType_Num,
1310 10 : NetCoolingCapRated(ns),
1311 : SEER_User * ConvFromSIToIP,
1312 : SEER_Standard * ConvFromSIToIP,
1313 : EER,
1314 : EER * ConvFromSIToIP,
1315 : 0.0,
1316 : 0.0,
1317 : 0.0,
1318 : 0.0,
1319 : 0,
1320 : false);
1321 :
1322 : // Writes the SEER value to the EIO file and standard tabular output tables
1323 10 : ReportDXCoilRating(state,
1324 : DXCoilType,
1325 : DXCoilName,
1326 : DXCoilType_Num,
1327 10 : NetCoolingCapRated_2023(ns),
1328 : SEER2_User * ConvFromSIToIP,
1329 : SEER2_Standard * ConvFromSIToIP,
1330 : EER_2022,
1331 : EER_2022 * ConvFromSIToIP,
1332 : IEER_2022 * ConvFromSIToIP,
1333 : 0.0,
1334 : 0.0,
1335 : 0.0,
1336 : 0,
1337 : true);
1338 :
1339 10 : break;
1340 10 : }
1341 7 : case CoilDX_MultiSpeedHeating: { // Coil:Heating:DX:MultiSpeed
1342 :
1343 23 : for (spnum = 1; spnum <= ns; ++spnum) {
1344 80 : CheckCurveLimitsForStandardRatings(state,
1345 : DXCoilName,
1346 : DXCoilType,
1347 : DXCoilType_Num,
1348 16 : CapFTempCurveIndex(spnum),
1349 16 : CapFFlowCurveIndex(spnum),
1350 16 : EIRFTempCurveIndex(spnum),
1351 16 : EIRFFlowCurveIndex(spnum),
1352 16 : PLFFPLRCurveIndex(spnum));
1353 : }
1354 : // Calculate Net heating capacity and HSPF & HSPF2 of multispeed DX heating coils
1355 : std::map<std::string, Real64> StandardRatingsResult = MultiSpeedDXHeatingCoilStandardRatings(state,
1356 : DXCoilName,
1357 : DXCoilType,
1358 : CapFTempCurveIndex,
1359 : CapFFlowCurveIndex,
1360 : EIRFTempCurveIndex,
1361 : EIRFFlowCurveIndex,
1362 : PLFFPLRCurveIndex,
1363 : RatedTotalCapacity,
1364 : RatedCOP,
1365 : RatedAirVolFlowRate,
1366 : FanPowerPerEvapAirFlowRateFromInput,
1367 : FanPowerPerEvapAirFlowRateFromInput_2023,
1368 : ns,
1369 : RegionNum,
1370 : MinOATCompressor,
1371 : OATempCompressorOn,
1372 : OATempCompressorOnOffBlank,
1373 7 : DefrostControl);
1374 :
1375 14 : NetHeatingCapRatedHighTemp = StandardRatingsResult["NetHeatingCapRatedHighTemp"];
1376 14 : NetHeatingCapRatedLowTemp = StandardRatingsResult["NetHeatingCapRatedLowTemp"];
1377 14 : HSPF = StandardRatingsResult["HSPF"];
1378 :
1379 14 : NetHeatingCapRatedHighTemp_2023 = StandardRatingsResult["NetHeatingCapRatedHighTemp_2023"];
1380 14 : NetHeatingCapRatedLowTemp_2023 = StandardRatingsResult["NetHeatingCapRatedLowTemp_2023"];
1381 14 : HSPF2_2023 = StandardRatingsResult["HSPF2_2023"];
1382 :
1383 7 : IEER_2022 = StandardRatingsResult["IEER_2022"];
1384 : // ANSI/AHRI Std. 2017 Ratings
1385 : // Writes the HSPF value to the EIO file and standard tabular output tables
1386 14 : ReportDXCoilRating(state,
1387 : DXCoilType,
1388 : DXCoilName,
1389 : DXCoilType_Num,
1390 7 : NetCoolingCapRated(ns),
1391 : SEER_User * ConvFromSIToIP,
1392 : SEER_Standard * ConvFromSIToIP,
1393 : EER,
1394 : EER * ConvFromSIToIP,
1395 : IEER * ConvFromSIToIP,
1396 : NetHeatingCapRatedHighTemp,
1397 : NetHeatingCapRatedLowTemp,
1398 : HSPF * ConvFromSIToIP,
1399 : RegionNum,
1400 : false);
1401 :
1402 : // ANSI/AHRI 210/240 Std. 2023 Ratings
1403 : // Writes the HSPF2 value to the EIO file and standard tabular output tables
1404 14 : ReportDXCoilRating(state,
1405 : DXCoilType,
1406 : DXCoilName,
1407 : DXCoilType_Num,
1408 7 : NetCoolingCapRated(ns),
1409 : SEER_User * ConvFromSIToIP,
1410 : SEER_Standard * ConvFromSIToIP,
1411 : EER,
1412 : EER * ConvFromSIToIP,
1413 : IEER_2022 * ConvFromSIToIP,
1414 : NetHeatingCapRatedHighTemp_2023,
1415 : NetHeatingCapRatedLowTemp_2023,
1416 : HSPF2_2023 * ConvFromSIToIP,
1417 : RegionNum,
1418 : true);
1419 :
1420 7 : break;
1421 7 : }
1422 10 : case Coil_CoolingAirToAirVariableSpeed: {
1423 63 : for (spnum = 1; spnum <= ns; ++spnum) {
1424 265 : CheckCurveLimitsForStandardRatings(state,
1425 : DXCoilName,
1426 : DXCoilType,
1427 : DXCoilType_Num,
1428 53 : CapFTempCurveIndex(spnum),
1429 53 : CapFFlowCurveIndex(spnum),
1430 53 : EIRFTempCurveIndex(spnum),
1431 53 : EIRFFlowCurveIndex(spnum),
1432 53 : PLFFPLRCurveIndex(spnum));
1433 : }
1434 :
1435 : // Calculate the standard ratings for multispeed DX cooling coil
1436 10 : std::map<std::string, Real64> StandardRatingsResult = VariableSpeedDXCoolingCoilStandardRatings(state,
1437 : DXCoilType,
1438 : DXCoilName,
1439 : CapFTempCurveIndex,
1440 : CapFFlowCurveIndex,
1441 : EIRFTempCurveIndex,
1442 : EIRFFlowCurveIndex,
1443 10 : PLFFPLRCurveIndex(1),
1444 : RatedTotalCapacity,
1445 : RatedCOP,
1446 : RatedAirVolFlowRate,
1447 : FanPowerPerEvapAirFlowRateFromInput,
1448 : FanPowerPerEvapAirFlowRateFromInput_2023,
1449 : ns,
1450 20 : CondenserType(1),
1451 : GrossRatedTotalCoolingCapacityVS,
1452 20 : RatedVolumetricAirFlowRateVS);
1453 :
1454 20 : NetCoolingCapRated_2023(ns) = StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"];
1455 20 : SEER2_User = StandardRatingsResult["SEER2_User"];
1456 20 : SEER2_Standard = StandardRatingsResult["SEER2_Standard"];
1457 20 : EER2 = StandardRatingsResult["EER2"];
1458 :
1459 20 : IEER_2022 = StandardRatingsResult["IEER_2022"];
1460 20 : EER_2022 = StandardRatingsResult["EER_2022"];
1461 :
1462 10 : NetCoolingCapRated(ns) = StandardRatingsResult["NetCoolingCapRatedMaxSpeed"];
1463 :
1464 : // Writes the SEER2 & IEER 2022 value to the EIO file and standard tabular output tables | 2023
1465 10 : ReportDXCoilRating(state,
1466 : DXCoilType,
1467 : DXCoilName,
1468 : DXCoilType_Num,
1469 10 : NetCoolingCapRated_2023(ns),
1470 : SEER2_User * ConvFromSIToIP,
1471 : SEER2_Standard * ConvFromSIToIP,
1472 : EER_2022,
1473 : EER_2022 * ConvFromSIToIP,
1474 : IEER_2022 * ConvFromSIToIP,
1475 : 0.0,
1476 : 0.0,
1477 : 0.0,
1478 : 0,
1479 : true);
1480 10 : break;
1481 10 : }
1482 0 : default:
1483 0 : break; //... other DX Coil types will follow here
1484 : }
1485 68 : }
1486 :
1487 4 : void CalcTwoSpeedDXCoilRating(EnergyPlusData &state,
1488 : std::string const &DXCoilName,
1489 : std::string const &DXCoilType,
1490 : int const DXCoilType_Num,
1491 : Array1A<Real64> const &RatedTotalCapacity,
1492 : Real64 const RatedTotCap2,
1493 : Array1A<Real64> const &RatedCOP,
1494 : Real64 const RatedCOP2,
1495 : Array1A_int const &CapFFlowCurveIndex, // only hs
1496 : Array1A_int const &CapFTempCurveIndex,
1497 : int const CCapFTemp2,
1498 : Array1A_int const &EIRFFlowCurveIndex, // only hs
1499 : Array1A_int const &EIRFTempCurveIndex,
1500 : int const EIRFTemp2,
1501 : Array1A<Real64> const &RatedAirVolFlowRate,
1502 : Real64 const RatedAirVolFlowRate2,
1503 : Array1A<Real64> const &FanPowerPerEvapAirFlowRate_2023,
1504 : Array1A<Real64> const &FanPowerPerEvapAirFlowRate_2023_LowSpeed,
1505 : Array1D<DataHeatBalance::RefrigCondenserType> const &CondenserType,
1506 : int const PLFFPLRCurveIndex)
1507 : {
1508 4 : std::map<std::string, Real64> StandardRatingsResult;
1509 :
1510 : // Intermediate values calculated from the inputs in the idf file
1511 : // SEER2 ANSI/AHRI 210/240 Standard 2023 Ratings
1512 4 : Real64 SEER2_User(0.0); // Seasonal Energy Efficiency Ratio using user PLF curve in SI [W/W]
1513 4 : Real64 SEER2_Standard(0.0); // Seasonal Energy Efficiency Ratio using AHRI 210/240 PLF default curve & C_D in SI [W/W]
1514 4 : Real64 EER2(0.0); // Energy Efficiency Ratio using AHRI 210/240 - 2023
1515 4 : Real64 NetCoolingCapRatedMaxSpeed2023(0.0); // net cooling capacity at maximum speed
1516 :
1517 4 : Real64 EER_2022(0.0); // Energy Efficiency Ratio in SI [W/W]
1518 4 : Real64 IEER_2022(0.0); // Integrated Energy Efficiency Ratio in SI [W/W]
1519 4 : Real64 NetCoolingCapRated2022(0.0);
1520 :
1521 4 : Real64 EER(0.0);
1522 4 : Real64 NetCoolingCapRated(0.0);
1523 :
1524 8 : StandardRatingsResult = TwoSpeedDXCoilStandardRatings(state,
1525 : DXCoilName,
1526 : DXCoilType,
1527 : DXCoilType_Num,
1528 : RatedTotalCapacity,
1529 : RatedTotCap2,
1530 : RatedCOP,
1531 : RatedCOP2,
1532 : CapFFlowCurveIndex, // only hs
1533 : CapFTempCurveIndex,
1534 : CCapFTemp2,
1535 : EIRFFlowCurveIndex, // only hs
1536 : EIRFTempCurveIndex,
1537 : EIRFTemp2,
1538 : RatedAirVolFlowRate,
1539 : RatedAirVolFlowRate2,
1540 : FanPowerPerEvapAirFlowRate_2023,
1541 : FanPowerPerEvapAirFlowRate_2023_LowSpeed,
1542 : CondenserType,
1543 4 : PLFFPLRCurveIndex);
1544 :
1545 : // From SEER2 implementation
1546 8 : NetCoolingCapRatedMaxSpeed2023 = StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"];
1547 8 : SEER2_User = StandardRatingsResult["SEER2_User"];
1548 8 : SEER2_Standard = StandardRatingsResult["SEER2_Standard"];
1549 8 : EER2 = StandardRatingsResult["EER2"];
1550 :
1551 : // From IEER 2022 implementation
1552 8 : NetCoolingCapRated2022 = StandardRatingsResult["NetCoolingCapRatedMaxSpeed"];
1553 8 : IEER_2022 = StandardRatingsResult["IEER_2022"];
1554 4 : EER_2022 = StandardRatingsResult["EER_2022"];
1555 :
1556 4 : NetCoolingCapRated = NetCoolingCapRatedMaxSpeed2023;
1557 : // for the Report routine to correctly initialize with EER value.
1558 8 : if (StandardRatingsResult["SEER2_Standard"] > 0.0) {
1559 2 : EER = EER2;
1560 4 : } else if (StandardRatingsResult["IEER_2022"] > 0.0) {
1561 2 : EER = EER_2022;
1562 2 : NetCoolingCapRated = NetCoolingCapRated2022;
1563 : }
1564 :
1565 : // Writes the SEER & IEER value to the EIO file and standard tabular output tables
1566 4 : ReportDXCoilRating(state,
1567 : DXCoilType,
1568 : DXCoilName,
1569 : DXCoilType_Num,
1570 : NetCoolingCapRated,
1571 : SEER2_User * ConvFromSIToIP,
1572 : SEER2_Standard * ConvFromSIToIP,
1573 : EER,
1574 : EER * ConvFromSIToIP,
1575 : IEER_2022 * ConvFromSIToIP,
1576 : 0.0,
1577 : 0.0,
1578 : 0.0,
1579 : 0,
1580 : true);
1581 4 : }
1582 :
1583 7 : std::map<std::string, Real64> TwoSpeedDXCoilStandardRatings(EnergyPlusData &state,
1584 : std::string const &DXCoilName,
1585 : std::string const &DXCoilType,
1586 : int const &DXCoilType_Num,
1587 : Array1A<Real64> const &RatedTotalCapacity,
1588 : Real64 const &RatedTotCap2,
1589 : Array1A<Real64> const &RatedCOP,
1590 : Real64 const &RatedCOP2,
1591 : Array1A_int const &CapFFlowCurveIndex, // only hs
1592 : Array1A_int const &CapFTempCurveIndex,
1593 : int const &CCapFTemp2,
1594 : Array1A_int const &EIRFFlowCurveIndex, // only hs
1595 : Array1A_int const &EIRFTempCurveIndex,
1596 : int const &EIRFTemp2,
1597 : Array1A<Real64> const &RatedAirVolFlowRate,
1598 : Real64 const &RatedAirVolFlowRate2,
1599 : Array1A<Real64> const &FanPowerPerEvapAirFlowRate_2023,
1600 : Array1A<Real64> const &FanPowerPerEvapAirFlowRate_2023_LowSpeed,
1601 : Array1D<DataHeatBalance::RefrigCondenserType> const &CondenserType,
1602 : int const &PLFFPLRCurveIndex)
1603 : {
1604 7 : std::map<std::string, Real64> StandardRatingsResult;
1605 :
1606 : // Intermediate values calculated from the inputs in the idf file
1607 : // SEER2 ANSI/AHRI 210/240 Standard 2023 Ratings
1608 7 : Real64 SEER2_User(0.0); // Seasonal Energy Efficiency Ratio using user PLF curve in SI [W/W]
1609 7 : Real64 SEER2_Standard(0.0); // Seasonal Energy Efficiency Ratio using AHRI 210/240 PLF default curve & C_D in SI [W/W]
1610 7 : Real64 EER2(0.0); // Energy Efficiency Ratio using AHRI 210/240 - 2023
1611 7 : Real64 NetCoolingCapRatedMaxSpeed2023(0.0); // net cooling capacity at maximum speed
1612 :
1613 7 : Real64 EER_2022(0.0); // Energy Efficiency Ratio in SI [W/W]
1614 7 : Real64 IEER_2022(0.0); // Integrated Energy Efficiency Ratio in SI [W/W]
1615 7 : Real64 NetCoolingCapRated2022(0.0);
1616 :
1617 7 : int constexpr ns = 2;
1618 7 : Array1D<Real64> NetTotCoolingCapRated_2023(16); // net total cooling capacity of DX Coils for the sixteen ASHRAE Std 127 Test conditions
1619 7 : Array1D<Real64> TotElectricPowerRated_2023(16); // total electric power of DX Coils for the sixteen ASHRAE Std 127 Test conditions
1620 :
1621 7 : Array1D_int TSCCapFTemp;
1622 7 : TSCCapFTemp.push_back(CapFTempCurveIndex(1));
1623 7 : TSCCapFTemp.push_back(CCapFTemp2);
1624 :
1625 7 : Array1D<Real64> TSFanPowerPerEvapAirFlowRate2023;
1626 7 : TSFanPowerPerEvapAirFlowRate2023.push_back(FanPowerPerEvapAirFlowRate_2023(1));
1627 7 : TSFanPowerPerEvapAirFlowRate2023.push_back(FanPowerPerEvapAirFlowRate_2023_LowSpeed(1));
1628 :
1629 7 : Array1D<Real64> TSRatedTotCap;
1630 7 : TSRatedTotCap.push_back(RatedTotalCapacity(1));
1631 7 : TSRatedTotCap.push_back(RatedTotCap2);
1632 :
1633 7 : Array1D<Real64> TSRatedAirVolFlowRate;
1634 7 : TSRatedAirVolFlowRate.push_back(RatedAirVolFlowRate(1));
1635 7 : TSRatedAirVolFlowRate.push_back(RatedAirVolFlowRate2);
1636 :
1637 7 : Array1D_int TSEIRFTemp;
1638 7 : TSEIRFTemp.push_back(EIRFTempCurveIndex(1));
1639 7 : TSEIRFTemp.push_back(EIRFTemp2);
1640 :
1641 7 : Array1D<Real64> TSRatedCOP;
1642 7 : TSRatedCOP.push_back(RatedCOP(1));
1643 7 : TSRatedCOP.push_back(RatedCOP2);
1644 :
1645 21 : for (int spnum = 1; spnum <= ns; ++spnum) {
1646 : // TODO:BPS Implement Two Speed Case :
1647 70 : CheckCurveLimitsForStandardRatings(state,
1648 : DXCoilName,
1649 : DXCoilType,
1650 : DXCoilType_Num,
1651 14 : TSCCapFTemp(spnum),
1652 14 : CapFFlowCurveIndex(1), // only HS
1653 14 : TSEIRFTemp(spnum),
1654 14 : EIRFFlowCurveIndex(1), // Only HS
1655 : PLFFPLRCurveIndex); // Only Coil Level
1656 : }
1657 :
1658 7 : if (RatedTotalCapacity(1) > 0.0 && RatedAirVolFlowRate(1) > 0.0) {
1659 :
1660 : Real64 TotCapTempModFac =
1661 7 : Curve::CurveValue(state, CapFTempCurveIndex(1), CoolingCoilInletAirWetBulbTempRated, CoilInletAirCoolDryBulbIEER);
1662 7 : Real64 TotCapFlowModFac = Curve::CurveValue(state, CapFFlowCurveIndex(1), AirMassFlowRatioRated);
1663 7 : NetCoolingCapRatedMaxSpeed2023 =
1664 7 : RatedTotalCapacity(1) * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(1);
1665 : // TODO: Commercial and industrial unitary air-conditioning condensing units with a capacity greater than 135,000 Btu/h (39564.59445
1666 : // Watts) as defined in ANSI/AHRI Standard 365(I-P). | Scope 2.2.6 (ANSI/AHRI 340-360 2022)
1667 :
1668 7 : if (CondenserType(1) == DataHeatBalance::RefrigCondenserType::Air) {
1669 : // ANSI/AHRI 210/240 Standard 2023 only applies for solely to Air Cooled Cooling Coils
1670 : // Also, this standard applies to factory-made Unitary Air-conditioners and Unitary Air-source Heat Pumps with
1671 : // capacities less than 65,000 Btu/h (19049.61955 Watts) | Section 2.1
1672 : // Removal of water-cooled and evaporatively-cooled products from the scope | Foreword (ANSI/AHRI 210-240 2023)
1673 :
1674 : // SEER2 Calculations ANSI/AHRI 210/240 Standard 2023
1675 5 : std::tie(NetCoolingCapRatedMaxSpeed2023, SEER2_User, SEER2_Standard, EER2) =
1676 10 : TwoSpeedDXCoolingCoilSEER2(state,
1677 : // 2, // nsp will always be 2 in case of Two Speed Coil
1678 : CapFFlowCurveIndex, // only HS
1679 : TSRatedTotCap,
1680 : TSCCapFTemp,
1681 : TSFanPowerPerEvapAirFlowRate2023,
1682 : TSRatedAirVolFlowRate,
1683 : EIRFFlowCurveIndex, // only HS
1684 : TSRatedCOP,
1685 : TSEIRFTemp,
1686 5 : PLFFPLRCurveIndex); // only coil level
1687 : }
1688 :
1689 : // Calculate the IEER 2022 Standard ratings for Two Speed DX cooling coil | AHRI 340/360
1690 14 : std::tie(IEER_2022, NetCoolingCapRated2022, EER_2022) = IEERCalculationTwoSpeed(state,
1691 : DXCoilType,
1692 : CondenserType,
1693 : TSCCapFTemp,
1694 : TSRatedTotCap,
1695 : CapFFlowCurveIndex,
1696 : TSFanPowerPerEvapAirFlowRate2023,
1697 : TSRatedAirVolFlowRate,
1698 : TSEIRFTemp,
1699 : TSRatedCOP,
1700 7 : EIRFFlowCurveIndex);
1701 : } else {
1702 0 : ShowSevereError(state,
1703 : "Standard Ratings: Coil:Cooling:DX:TwoSpeed either has a zero rated total cooling capacity or zero air flow rate. "
1704 : "Standard ratings cannot be calculated.");
1705 : }
1706 :
1707 : // From SEER2 implementation
1708 14 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRatedMaxSpeed2023;
1709 14 : StandardRatingsResult["SEER2_User"] = SEER2_User;
1710 14 : StandardRatingsResult["SEER2_Standard"] = SEER2_Standard;
1711 14 : StandardRatingsResult["EER2"] = EER2;
1712 :
1713 : // From IEER2 implementation
1714 14 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed"] = NetCoolingCapRated2022;
1715 14 : StandardRatingsResult["IEER_2022"] = IEER_2022;
1716 14 : StandardRatingsResult["EER_2022"] = EER_2022;
1717 :
1718 14 : return StandardRatingsResult;
1719 7 : }
1720 :
1721 8 : Real64 SingleSpeedHeatingHSPF(const Real64 NetHeatingCapRated,
1722 : ObjexxFCL::Optional_int_const RegionNum,
1723 : const Real64 NetHeatingCapH3Test,
1724 : const Real64 ElecPowerH3Test,
1725 : const Real64 ElecPowerRated,
1726 : const Real64 NetHeatingCapH2Test,
1727 : const Real64 ElecPowerH2Test,
1728 : ObjexxFCL::Optional<Real64 const> MinOATCompressor,
1729 : ObjexxFCL::Optional_bool_const OATempCompressorOnOffBlank,
1730 : ObjexxFCL::Optional<Real64 const> OATempCompressorOn,
1731 : ObjexxFCL::Optional<const HPdefrostControl> DefrostControl)
1732 : {
1733 : int BinNum; // bin number counter
1734 : Int64 StandardDHRNum; // Integer counter for standardized DHRs
1735 8 : Real64 CheckCOP(0.0); // Checking COP at an outdoor bin temperature against unity [-]
1736 8 : Real64 DesignHeatingRequirement(0.0); // The amount of heating required to maintain a given indoor temperature
1737 : // at a particular outdoor design temperature. [W]
1738 8 : Real64 DesignHeatingRequirementMin(0.0); // minimum design heating requirement [W]
1739 8 : Real64 FractionalBinHours(0.0); // Fractional bin hours for the heating season [-]
1740 8 : Real64 BuildingLoad(0.0); // Building space conditioning load corresponding to an outdoor bin temperature [W]
1741 :
1742 8 : Real64 HeatingModeLoadFactor(0.0); // Heating mode load factor corresponding to an outdoor bin temperature [-]
1743 8 : Real64 NetHeatingCapReduced(0.0); // Net Heating Coil capacity corresponding to an outdoor bin temperature [W]
1744 8 : Real64 TotalBuildingLoad(0.0); // Sum of building load over the entire heating season [W]
1745 :
1746 8 : Real64 TotalElectricalEnergy(0.0); // Sum of electrical energy consumed by the heatpump over the heating season [W]
1747 8 : Real64 DemandDeforstCredit(1.0); // A factor to adjust HSPF if coil has demand defrost control [-]
1748 :
1749 8 : Real64 ElectricalPowerConsumption(0.0); // Electrical power corresponding to an outdoor bin temperature [W]
1750 8 : Real64 HeatPumpElectricalEnergy(0.0); // Heatpump electrical energy corresponding to an outdoor bin temperature [W]
1751 8 : Real64 TotalHeatPumpElectricalEnergy(0.0); // Sum of Heatpump electrical energy over the entire heating season [W]
1752 8 : Real64 ResistiveSpaceHeatingElectricalEnergy(0.0); // resistance heating electrical energy corresponding to an
1753 : // outdoor bin temperature [W]
1754 8 : Real64 TotalResistiveSpaceHeatingElectricalEnergy(0.0); // Sum of resistance heating electrical energy over the
1755 : // entire heating season [W]
1756 : Real64 PartLoadFactor;
1757 8 : Real64 LowTempCutOutFactor(0.0); // Factor which corresponds to compressor operation depending on outdoor temperature
1758 8 : Real64 OATempCompressorOff(0.0); // Minimum outdoor air temperature to turn the compressor off, [C]
1759 8 : Real64 HSPF(0.0);
1760 :
1761 8 : if (RegionNum == 5) {
1762 0 : DesignHeatingRequirementMin = NetHeatingCapRated;
1763 : } else {
1764 8 : DesignHeatingRequirementMin = NetHeatingCapRated * 1.8 * (18.33 - OutdoorDesignTemperature[static_cast<int64_t>(RegionNum) - 1]) / 60.0;
1765 : }
1766 :
1767 128 : for (StandardDHRNum = 0; StandardDHRNum < TotalNumOfStandardDHRs - 1; ++StandardDHRNum) {
1768 158 : if (StandardDesignHeatingRequirement[StandardDHRNum] <= DesignHeatingRequirementMin &&
1769 38 : StandardDesignHeatingRequirement[StandardDHRNum + 1] >= DesignHeatingRequirementMin) {
1770 9 : if ((DesignHeatingRequirementMin - StandardDesignHeatingRequirement[StandardDHRNum]) >
1771 9 : (StandardDesignHeatingRequirement[StandardDHRNum + 1] - DesignHeatingRequirementMin)) {
1772 3 : DesignHeatingRequirementMin = StandardDesignHeatingRequirement[StandardDHRNum + 1];
1773 : } else {
1774 6 : DesignHeatingRequirementMin = StandardDesignHeatingRequirement[StandardDHRNum];
1775 : }
1776 : }
1777 : }
1778 8 : if (StandardDesignHeatingRequirement[0] >= DesignHeatingRequirementMin) {
1779 3 : DesignHeatingRequirement = StandardDesignHeatingRequirement[0];
1780 5 : } else if (StandardDesignHeatingRequirement[TotalNumOfStandardDHRs - 1] <= DesignHeatingRequirementMin) {
1781 0 : DesignHeatingRequirement = StandardDesignHeatingRequirement[TotalNumOfStandardDHRs - 1];
1782 : } else {
1783 5 : DesignHeatingRequirement = DesignHeatingRequirementMin;
1784 : }
1785 :
1786 122 : for (BinNum = 0; BinNum < TotalNumOfTemperatureBins[static_cast<int64_t>(RegionNum) - 1]; ++BinNum) {
1787 :
1788 114 : FractionalBinHours = FracBinHoursAtOutdoorBinTemp[static_cast<int64_t>(RegionNum) - 1][BinNum];
1789 :
1790 114 : BuildingLoad = (18.33 - OutdoorBinTemperature[BinNum]) / (18.33 - OutdoorDesignTemperature[static_cast<int64_t>(RegionNum) - 1]) *
1791 : CorrectionFactor * DesignHeatingRequirement;
1792 :
1793 114 : if ((OutdoorBinTemperature[BinNum] <= -8.33) || (OutdoorBinTemperature[BinNum] >= 7.22)) {
1794 74 : NetHeatingCapReduced =
1795 74 : NetHeatingCapH3Test + (NetHeatingCapRated - NetHeatingCapH3Test) * (OutdoorBinTemperature[BinNum] + 8.33) / (16.67);
1796 74 : ElectricalPowerConsumption = ElecPowerH3Test + (ElecPowerRated - ElecPowerH3Test) * (OutdoorBinTemperature[BinNum] + 8.33) / (16.67);
1797 : } else {
1798 40 : NetHeatingCapReduced =
1799 40 : NetHeatingCapH3Test + (NetHeatingCapH2Test - NetHeatingCapH3Test) * (OutdoorBinTemperature[BinNum] + 8.33) / (10.0);
1800 40 : ElectricalPowerConsumption = ElecPowerH3Test + (ElecPowerH2Test - ElecPowerH3Test) * (OutdoorBinTemperature[BinNum] + 8.33) / (10.0);
1801 : }
1802 :
1803 114 : if (NetHeatingCapReduced != 0.0) {
1804 99 : HeatingModeLoadFactor = BuildingLoad / NetHeatingCapReduced;
1805 : }
1806 :
1807 114 : if (HeatingModeLoadFactor > 1.0) {
1808 34 : HeatingModeLoadFactor = 1.0;
1809 : }
1810 :
1811 114 : PartLoadFactor = 1 - CyclicDegradationCoeff * (1 - HeatingModeLoadFactor);
1812 :
1813 114 : if (ElectricalPowerConsumption != 0.0) {
1814 99 : CheckCOP = NetHeatingCapReduced / ElectricalPowerConsumption;
1815 : }
1816 :
1817 114 : OATempCompressorOff = MinOATCompressor;
1818 :
1819 114 : if (CheckCOP < 1.0) {
1820 29 : LowTempCutOutFactor = 0.0;
1821 : } else {
1822 85 : if (!OATempCompressorOnOffBlank) {
1823 9 : if (OutdoorBinTemperature[BinNum] <= OATempCompressorOff) {
1824 3 : LowTempCutOutFactor = 0.0;
1825 6 : } else if (OutdoorBinTemperature[BinNum] <= OATempCompressorOn) {
1826 0 : LowTempCutOutFactor = 0.5;
1827 : } else {
1828 6 : LowTempCutOutFactor = 1.0;
1829 : }
1830 : } else {
1831 76 : LowTempCutOutFactor = 1.0;
1832 : }
1833 : }
1834 :
1835 114 : if (PartLoadFactor != 0.0) {
1836 114 : HeatPumpElectricalEnergy =
1837 114 : (HeatingModeLoadFactor * ElectricalPowerConsumption * LowTempCutOutFactor) * FractionalBinHours / PartLoadFactor;
1838 : }
1839 :
1840 114 : ResistiveSpaceHeatingElectricalEnergy =
1841 114 : (BuildingLoad - HeatingModeLoadFactor * NetHeatingCapReduced * LowTempCutOutFactor) * FractionalBinHours;
1842 :
1843 114 : TotalBuildingLoad += (BuildingLoad * FractionalBinHours);
1844 :
1845 114 : TotalHeatPumpElectricalEnergy += HeatPumpElectricalEnergy;
1846 :
1847 114 : TotalResistiveSpaceHeatingElectricalEnergy += ResistiveSpaceHeatingElectricalEnergy;
1848 : }
1849 :
1850 8 : TotalElectricalEnergy = TotalHeatPumpElectricalEnergy + TotalResistiveSpaceHeatingElectricalEnergy;
1851 :
1852 8 : if (DefrostControl == HPdefrostControl::Timed) {
1853 4 : DemandDeforstCredit = 1.0; // Timed defrost control
1854 : } else {
1855 4 : DemandDeforstCredit = 1.03; // Demand defrost control
1856 : }
1857 :
1858 8 : if (TotalElectricalEnergy != 0.0) {
1859 8 : HSPF = TotalBuildingLoad * DemandDeforstCredit / TotalElectricalEnergy;
1860 : }
1861 8 : return HSPF;
1862 : }
1863 :
1864 8 : Real64 SingleSpeedHeatingHSPF2(const Real64 NetHeatingCapRated_2023,
1865 : ObjexxFCL::Optional_int_const RegionNum,
1866 : const Real64 NetHeatingCapH3Test_2023,
1867 : const Real64 ElecPowerH3Test2023,
1868 : const Real64 ElecPowerRated2023,
1869 : const Real64 NetHeatingCapH2Test2023,
1870 : const Real64 ElecPowerH2Test2023,
1871 : ObjexxFCL::Optional<Real64 const> MinOATCompressor,
1872 : ObjexxFCL::Optional_bool_const OATempCompressorOnOffBlank,
1873 : ObjexxFCL::Optional<Real64 const> OATempCompressorOn,
1874 : ObjexxFCL::Optional<const HPdefrostControl> DefrostControl)
1875 : {
1876 8 : Real64 DesignHeatingRequirement2023(0.0); // HSPF2 minimum design heating requirement [W]
1877 8 : Real64 FractionalBinHours2023(0.0); // HSPF2 Fractional bin hours for the heating season [-]
1878 8 : Real64 BuildingLoad2023(0.0); // HSPF2 Building space conditioning load corresponding to an outdoor bin temperature [W]
1879 8 : Real64 NetHeatingCapReduced2023(0.0); // HSPF2 Net Heating Coil capacity corresponding to an outdoor bin temperature [W]
1880 8 : Real64 ElectricalPowerConsumption2023(0.0); // HSPF2 Electrical power corresponding to an outdoor bin temperature [W]
1881 8 : Real64 HeatingModeLoadFactor2023(0.0); // HSPF2 Heating mode load factor corresponding to an outdoor bin temperature [-]
1882 : Real64 PartLoadFactor2023;
1883 8 : Real64 CheckCOP2023(0.0); // HSPF2 Checking COP at an outdoor bin temperature against unity [-]
1884 8 : Real64 OATempCompressorOff2023(0.0); // HSPF2 Minimum outdoor air temperature to turn the compressor off, [C]
1885 8 : Real64 LowTempCutOutFactor2023(0.0); // Factor which corresponds to compressor operation depending on outdoor temperature
1886 8 : Real64 HeatPumpElectricalEnergy2023(0.0); // HSPF2 Heatpump electrical energy corresponding to an outdoor bin temperature [W]
1887 8 : Real64 ResistiveSpaceHeatingElectricalEnergy2023(0.0); // HSPF2 resistance heating electrical energy corresponding to an
1888 : // outdoor bin temperature [W]
1889 8 : Real64 TotalBuildingLoad2023(0.0); // Sum of building load over the entire heating season [W]
1890 8 : Real64 TotalHeatPumpElectricalEnergy2023(0.0); // HSPF2 Sum of Heatpump electrical energy over the entire heating season [W]
1891 8 : Real64 TotalResistiveSpaceHeatingElectricalEnergy2023(0.0); // Sum of resistance heating electrical energy over the
1892 : // entire heating season [W]
1893 8 : Real64 TotalElectricalEnergy2023(0.0); // HSPF2 Sum of electrical energy consumed by the heatpump over the heating season [W]
1894 8 : Real64 DemandDeforstCredit2023(1.0); // A factor to adjust HSPF2 if coil has demand defrost control [-]
1895 8 : Real64 HSPF2_2023(0.0);
1896 :
1897 : // For ANSI/AHRI 210/240 Standard 2023 | Concept of DHRI min and max is removed
1898 : // Section 11.2.2.1 Equation 11.104 which suggests QAFull is used instead of DHRI min
1899 8 : DesignHeatingRequirement2023 = NetHeatingCapRated_2023;
1900 8 : Int64 RN = static_cast<int64_t>(RegionNum);
1901 :
1902 122 : for (int BinNum2023 = 0; BinNum2023 < TotalNumOfTemperatureBinsHSPF2[RN - 1]; ++BinNum2023) {
1903 :
1904 114 : FractionalBinHours2023 = FracBinHoursAtOutdoorBinTempHSPF2[RN - 1][BinNum2023];
1905 :
1906 114 : BuildingLoad2023 = (ZoneLoadTemperature[RN - 1] - OutdoorBinTemperature[BinNum2023]) /
1907 114 : (ZoneLoadTemperature[RN - 1] - OutdoorDesignTemperature[RN - 1]) * SpeedLoadFactor[RN - 1] *
1908 : DesignHeatingRequirement2023;
1909 114 : if ((OutdoorBinTemperature[BinNum2023] <= -8.33) || (OutdoorBinTemperature[BinNum2023] >= 7.22)) {
1910 148 : NetHeatingCapReduced2023 = NetHeatingCapH3Test_2023 + (NetHeatingCapRated_2023 - NetHeatingCapH3Test_2023) *
1911 74 : (OutdoorBinTemperature[BinNum2023] + 8.33) / (16.67);
1912 74 : ElectricalPowerConsumption2023 =
1913 74 : ElecPowerH3Test2023 + (ElecPowerRated2023 - ElecPowerH3Test2023) * (OutdoorBinTemperature[BinNum2023] + 8.33) / (16.67);
1914 : } else {
1915 40 : NetHeatingCapReduced2023 = NetHeatingCapH3Test_2023 +
1916 40 : (NetHeatingCapH2Test2023 - NetHeatingCapH3Test_2023) * (OutdoorBinTemperature[BinNum2023] + 8.33) / (10.0);
1917 40 : ElectricalPowerConsumption2023 =
1918 40 : ElecPowerH3Test2023 + (ElecPowerH2Test2023 - ElecPowerH3Test2023) * (OutdoorBinTemperature[BinNum2023] + 8.33) / (10.0);
1919 : }
1920 114 : if (NetHeatingCapReduced2023 != 0.0) {
1921 99 : HeatingModeLoadFactor2023 = BuildingLoad2023 / NetHeatingCapReduced2023;
1922 : }
1923 :
1924 114 : if (HeatingModeLoadFactor2023 > 1.0) {
1925 44 : HeatingModeLoadFactor2023 = 1.0;
1926 : }
1927 114 : PartLoadFactor2023 = 1 - CyclicHeatingDegradationCoeffHSPF2 * (1 - HeatingModeLoadFactor2023);
1928 114 : if (ElectricalPowerConsumption2023 != 0.0) {
1929 99 : CheckCOP2023 = NetHeatingCapReduced2023 / ElectricalPowerConsumption2023;
1930 : }
1931 114 : OATempCompressorOff2023 = MinOATCompressor;
1932 114 : if (CheckCOP2023 < 1.0) {
1933 29 : LowTempCutOutFactor2023 = 0.0;
1934 : } else {
1935 85 : if (!OATempCompressorOnOffBlank) {
1936 9 : if (OutdoorBinTemperature[BinNum2023] <= OATempCompressorOff2023) {
1937 3 : LowTempCutOutFactor2023 = 0.0;
1938 6 : } else if (OutdoorBinTemperature[BinNum2023] <= OATempCompressorOn) {
1939 0 : LowTempCutOutFactor2023 = 0.5;
1940 : } else {
1941 6 : LowTempCutOutFactor2023 = 1.0;
1942 : }
1943 : } else {
1944 76 : LowTempCutOutFactor2023 = 1.0;
1945 : }
1946 : }
1947 :
1948 114 : if (PartLoadFactor2023 != 0.0) {
1949 114 : HeatPumpElectricalEnergy2023 = (HeatingModeLoadFactor2023 * ElectricalPowerConsumption2023 * LowTempCutOutFactor2023) *
1950 : FractionalBinHours2023 / PartLoadFactor2023;
1951 : }
1952 :
1953 114 : ResistiveSpaceHeatingElectricalEnergy2023 =
1954 114 : (BuildingLoad2023 - HeatingModeLoadFactor2023 * NetHeatingCapReduced2023 * LowTempCutOutFactor2023) * FractionalBinHours2023;
1955 :
1956 114 : TotalBuildingLoad2023 += (BuildingLoad2023 * FractionalBinHours2023);
1957 :
1958 114 : TotalHeatPumpElectricalEnergy2023 += HeatPumpElectricalEnergy2023;
1959 :
1960 114 : TotalResistiveSpaceHeatingElectricalEnergy2023 += ResistiveSpaceHeatingElectricalEnergy2023;
1961 : }
1962 8 : TotalElectricalEnergy2023 = TotalHeatPumpElectricalEnergy2023 + TotalResistiveSpaceHeatingElectricalEnergy2023;
1963 :
1964 8 : if (DefrostControl == HPdefrostControl::Timed) {
1965 4 : DemandDeforstCredit2023 = 1.0; // Timed defrost control
1966 : } else {
1967 4 : DemandDeforstCredit2023 = 1.03; // Demand defrost control
1968 : }
1969 :
1970 8 : if (TotalElectricalEnergy2023 != 0.0) {
1971 7 : HSPF2_2023 = TotalBuildingLoad2023 * DemandDeforstCredit2023 / TotalElectricalEnergy2023;
1972 : }
1973 8 : return HSPF2_2023;
1974 : }
1975 :
1976 9 : std::map<std::string, Real64> SingleSpeedDXHeatingCoilStandardRatings(
1977 : EnergyPlusData &state,
1978 : [[maybe_unused]] std::string const &DXCoilType, // Type of DX coil for which HSPF is calculated
1979 : Real64 const RatedTotalCapacity, // Reference capacity of DX coil [W]
1980 : Real64 const RatedCOP, // Reference coefficient of performance [W/W]
1981 : int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
1982 : int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
1983 : int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
1984 : int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
1985 : Real64 const RatedAirVolFlowRate, // Rated air volume flow rate [m3/s]
1986 : Real64 const FanPowerPerEvapAirFlowRateFromInput, // 2017 Fan power per air volume flow rate [W/(m3/s)]
1987 : Real64 const FanPowerPerEvapAirFlowRateFromInput_2023, // 2023 Fan power per air volume flow rate [W/(m3/s)]
1988 : ObjexxFCL::Optional_int_const RegionNum, // Region number for calculating HSPF of single speed DX heating coil
1989 : ObjexxFCL::Optional<Real64 const> MinOATCompressor, // Minimum OAT for heat pump compressor operation [C]
1990 : ObjexxFCL::Optional<Real64 const> OATempCompressorOn, // The outdoor temperature when the compressor is automatically turned
1991 : ObjexxFCL::Optional_bool_const OATempCompressorOnOffBlank, // Flag used to determine low temperature cut out factor
1992 : ObjexxFCL::Optional<HPdefrostControl const> DefrostControl // defrost control; 1=timed, 2=on-demand
1993 : )
1994 : {
1995 9 : Real64 NetHeatingCapRated(0.0); // Net Heating Coil capacity at Rated conditions,
1996 9 : Real64 NetHeatingCapH3Test(0.0); // Net Heating Coil capacity at H3 test conditions
1997 9 : Real64 HSPF(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil
1998 :
1999 : // ANSI/AHRI 210/240 Standard 2023
2000 9 : Real64 NetHeatingCapRated_2023(0.0); // Net Heating Coil capacity at Rated conditions,
2001 9 : Real64 NetHeatingCapH3Test_2023(0.0); // Net Heating Coil capacity at H3 test conditions
2002 9 : Real64 HSPF2_2023(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil
2003 9 : Real64 IEER_2022(0.0);
2004 9 : std::map<std::string, Real64> StandardRatingsResults;
2005 : // SUBROUTINE INFORMATION:
2006 : // AUTHOR Chandan Sharma
2007 : // DATE WRITTEN February 2012
2008 : // MODIFIED B Nigusse, December 2012
2009 : // RE-ENGINEERED na
2010 :
2011 : // PURPOSE OF THIS SUBROUTINE:
2012 : // na
2013 :
2014 : // METHODOLOGY EMPLOYED:
2015 : // na
2016 :
2017 : // REFERENCES:
2018 : // na
2019 :
2020 : // Using/Aliasing
2021 : using Curve::CurveValue;
2022 : using Curve::GetCurveMinMaxValues;
2023 : using Curve::GetCurveName;
2024 :
2025 : // Locals
2026 : // SUBROUTINE ARGUMENT DEFINITIONS:
2027 :
2028 : // back on, if applicable, following automatic shut off. This field is
2029 : // used only for HSPF calculation. [C]
2030 : // accounting for supply fan heat [W]
2031 : // accounting for supply fan heat [W]
2032 :
2033 : // SUBROUTINE PARAMETER DEFINITIONS:
2034 : // na
2035 : // INTERFACE BLOCK SPECIFICATIONS
2036 : // na
2037 :
2038 : // DERIVED TYPE DEFINITIONS
2039 : // na
2040 :
2041 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
2042 9 : Real64 TotalHeatingCapRated(0.0); // Heating Coil capacity at Rated conditions, without accounting supply fan heat [W]
2043 9 : Real64 EIRRated(0.0); // EIR at Rated conditions [-]
2044 9 : Real64 TotCapTempModFacRated(0.0); // Total capacity as a function of temperature modifier at rated conditions [-]
2045 9 : Real64 EIRTempModFacRated(0.0); // EIR as a function of temperature modifier at rated conditions [-]
2046 9 : Real64 TotalHeatingCapH2Test(0.0); // Heating Coil capacity at H2 test conditions, without accounting supply fan heat [W]
2047 9 : Real64 TotalHeatingCapH3Test(0.0); // Heating Coil capacity at H3 test conditions, without accounting supply fan heat [W]
2048 9 : Real64 CapTempModFacH2Test(0.0); // Total capacity as a function of temperature modifier at H2 test conditions [-]
2049 9 : Real64 EIRTempModFacH2Test(0.0); // EIR as a function of temperature modifier at H2 test conditions [-]
2050 9 : Real64 EIRH2Test(0.0); // EIR at H2 test conditions [-]
2051 9 : Real64 CapTempModFacH3Test(0.0); // Total capacity as a function of temperature modifier at H3 test conditions [-]
2052 9 : Real64 EIRTempModFacH3Test(0.0); // EIR as a function of temperature modifier at H3 test conditions [-]
2053 9 : Real64 EIRH3Test(0.0); // EIR at H3 test conditions [-]
2054 9 : Real64 TotCapFlowModFac(0.0); // Total capacity modifier (function of actual supply air flow vs rated flow)
2055 9 : Real64 EIRFlowModFac(0.0); // EIR modifier (function of actual supply air flow vs rated flow)
2056 9 : Real64 FanPowerPerEvapAirFlowRate(0.0); // 2017 Fan power per air volume flow rate [W/(m3/s)]
2057 9 : Real64 FanPowerPerEvapAirFlowRate_2023(0.0); // 2023 Fan power per air volume flow rate [W/(m3/s)]
2058 :
2059 : Real64 ElecPowerRated; // Total system power at Rated conditions accounting for supply fan heat [W]
2060 : Real64 ElecPowerH2Test; // Total system power at H2 test conditions accounting for supply fan heat [W]
2061 : Real64 ElecPowerH3Test; // Total system power at H3 test conditions accounting for supply fan heat [W]
2062 :
2063 : // For ANSI/AHRI 210/240 Standard 2023
2064 : Real64 ElecPowerRated2023; // Total system power at Rated conditions accounting for supply fan heat [W]
2065 : Real64 ElecPowerH2Test2023; // Total system power at H2 test conditions accounting for supply fan heat [W]
2066 : Real64 ElecPowerH3Test2023; // Total system power at H3 test conditions accounting for supply fan heat [W]
2067 :
2068 : Real64 NetHeatingCapH2Test; // Net Heating Coil capacity at H2 test conditions accounting for supply fan heat [W]
2069 : Real64 NetHeatingCapH2Test2023; // (for 2023 Standard) Net Heating Coil capacity at H2 test conditions accounting for supply fan heat [W]
2070 :
2071 : // Calculate the supply air fan electric power consumption. The electric power consumption is estimated
2072 : // using either user supplied or AHRI default value for fan power per air volume flow rate
2073 9 : if (FanPowerPerEvapAirFlowRateFromInput <= 0.0) {
2074 2 : FanPowerPerEvapAirFlowRate = DefaultFanPowerPerEvapAirFlowRate;
2075 : } else {
2076 7 : FanPowerPerEvapAirFlowRate = FanPowerPerEvapAirFlowRateFromInput;
2077 : }
2078 9 : if (FanPowerPerEvapAirFlowRateFromInput_2023 <= 0.0) {
2079 2 : FanPowerPerEvapAirFlowRate_2023 = DefaultFanPowerPerEvapAirFlowRateSEER2;
2080 : } else {
2081 7 : FanPowerPerEvapAirFlowRate_2023 = FanPowerPerEvapAirFlowRateFromInput_2023;
2082 : }
2083 :
2084 9 : TotCapFlowModFac = CurveValue(state, CapFFlowCurveIndex, AirMassFlowRatioRated);
2085 9 : EIRFlowModFac = CurveValue(state, EIRFFlowCurveIndex, AirMassFlowRatioRated);
2086 :
2087 : {
2088 9 : if (state.dataCurveManager->curves(CapFTempCurveIndex)->numDims == 1) {
2089 6 : TotCapTempModFacRated = CurveValue(state, CapFTempCurveIndex, HeatingOutdoorCoilInletAirDBTempRated);
2090 :
2091 6 : CapTempModFacH2Test = CurveValue(state, CapFTempCurveIndex, HeatingOutdoorCoilInletAirDBTempH2Test);
2092 :
2093 6 : CapTempModFacH3Test = CurveValue(state, CapFTempCurveIndex, HeatingOutdoorCoilInletAirDBTempH3Test);
2094 : } else {
2095 3 : TotCapTempModFacRated =
2096 3 : CurveValue(state, CapFTempCurveIndex, HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempRated);
2097 :
2098 3 : CapTempModFacH2Test =
2099 3 : CurveValue(state, CapFTempCurveIndex, HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH2Test);
2100 :
2101 3 : CapTempModFacH3Test =
2102 3 : CurveValue(state, CapFTempCurveIndex, HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH3Test);
2103 : }
2104 : }
2105 :
2106 : {
2107 9 : if (state.dataCurveManager->curves(EIRFTempCurveIndex)->numDims == 1) {
2108 6 : EIRTempModFacRated = CurveValue(state, EIRFTempCurveIndex, HeatingOutdoorCoilInletAirDBTempRated);
2109 :
2110 6 : EIRTempModFacH2Test = CurveValue(state, EIRFTempCurveIndex, HeatingOutdoorCoilInletAirDBTempH2Test);
2111 :
2112 6 : EIRTempModFacH3Test = CurveValue(state, EIRFTempCurveIndex, HeatingOutdoorCoilInletAirDBTempH3Test);
2113 : } else {
2114 3 : EIRTempModFacRated =
2115 3 : CurveValue(state, EIRFTempCurveIndex, HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempRated);
2116 :
2117 3 : EIRTempModFacH2Test =
2118 3 : CurveValue(state, EIRFTempCurveIndex, HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH2Test);
2119 :
2120 3 : EIRTempModFacH3Test =
2121 3 : CurveValue(state, EIRFTempCurveIndex, HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH3Test);
2122 : }
2123 : }
2124 :
2125 9 : TotalHeatingCapRated = RatedTotalCapacity * TotCapTempModFacRated * TotCapFlowModFac;
2126 9 : NetHeatingCapRated = TotalHeatingCapRated + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2127 9 : NetHeatingCapRated_2023 = TotalHeatingCapRated + FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
2128 :
2129 9 : TotalHeatingCapH2Test = RatedTotalCapacity * CapTempModFacH2Test * TotCapFlowModFac;
2130 9 : NetHeatingCapH2Test = TotalHeatingCapH2Test + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2131 9 : NetHeatingCapH2Test2023 = TotalHeatingCapH2Test + FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
2132 :
2133 9 : TotalHeatingCapH3Test = RatedTotalCapacity * CapTempModFacH3Test * TotCapFlowModFac;
2134 9 : NetHeatingCapH3Test = TotalHeatingCapH3Test + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2135 9 : NetHeatingCapH3Test_2023 = TotalHeatingCapH3Test + FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
2136 :
2137 : // check curves value
2138 9 : if (TotCapTempModFacRated < 0.0 || CapTempModFacH2Test < 0.0 || CapTempModFacH3Test < 0.0 || EIRTempModFacRated < 0.0 ||
2139 8 : EIRTempModFacH2Test < 0.0 || EIRTempModFacH3Test < 0.0) {
2140 1 : if (TotCapTempModFacRated < 0.0) {
2141 0 : ShowSevereError(
2142 : state,
2143 0 : format(" Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}",
2144 : TotCapTempModFacRated,
2145 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
2146 0 : GetCurveName(state, CapFTempCurveIndex)));
2147 0 : ShowContinueError(state,
2148 : " ...Net heating capacity at high temperature is set to zero. The curve value must be > 0. Check the curve.");
2149 0 : NetHeatingCapRated = 0.0;
2150 0 : NetHeatingCapRated_2023 = 0.0;
2151 : }
2152 1 : if (CapTempModFacH3Test < 0.0) {
2153 2 : ShowSevereError(
2154 : state,
2155 2 : format(" Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}",
2156 : CapTempModFacH3Test,
2157 1 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
2158 2 : GetCurveName(state, CapFTempCurveIndex)));
2159 2 : ShowContinueError(state, " ...Net heating capacity at low temperature is set to zero. The curve value must be > 0. Check the curve.");
2160 1 : NetHeatingCapH3Test = 0.0;
2161 1 : NetHeatingCapH3Test_2023 = 0.0;
2162 : }
2163 1 : if (CapTempModFacH2Test < 0.0) {
2164 0 : ShowSevereError(
2165 : state,
2166 0 : format(" Invalid Total Heating Capacity Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}",
2167 : CapTempModFacH2Test,
2168 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
2169 0 : GetCurveName(state, CapFTempCurveIndex)));
2170 0 : ShowContinueError(state, " ...HSPF calculation is incorrect. The curve value must be > 0. Check the curve.");
2171 0 : NetHeatingCapH3Test = 0.0;
2172 0 : NetHeatingCapH3Test_2023 = 0.0;
2173 : }
2174 : // check EIR curve values
2175 1 : if (EIRTempModFacRated < 0.0) {
2176 2 : ShowSevereError(state,
2177 2 : format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}",
2178 : EIRTempModFacRated,
2179 1 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
2180 2 : GetCurveName(state, EIRFTempCurveIndex)));
2181 3 : ShowContinueError(state, " ...HSPF calculation is incorrect. The curve value must be > 0. Check the curve.");
2182 : }
2183 1 : if (EIRTempModFacH2Test < 0.0) {
2184 0 : ShowSevereError(state,
2185 0 : format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}",
2186 : EIRTempModFacH2Test,
2187 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
2188 0 : GetCurveName(state, EIRFTempCurveIndex)));
2189 0 : ShowContinueError(state, " ...HSPF calculation is incorrect. The curve value must be > 0. Check the curve.");
2190 : }
2191 1 : if (EIRTempModFacH3Test < 0.0) {
2192 0 : ShowSevereError(state,
2193 0 : format(" Invalid EIR Function of Temperature Curve value = {:.2R}, Curve Type = {}, Curve Name = {}",
2194 : EIRTempModFacH3Test,
2195 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
2196 0 : GetCurveName(state, EIRFTempCurveIndex)));
2197 0 : ShowContinueError(state, " ...HSPF calculation is incorrect. The curve value must be > 0. Check the curve.");
2198 : }
2199 2 : ShowContinueError(state, " ...HSPF value has been reset to 0.0 and simulation is continuing.");
2200 1 : HSPF = 0.0;
2201 1 : HSPF2_2023 = 0.0;
2202 1 : IEER_2022 = 0.0;
2203 :
2204 2 : StandardRatingsResults["NetHeatingCapRated"] = NetHeatingCapRated;
2205 2 : StandardRatingsResults["NetHeatingCapH3Test"] = NetHeatingCapH3Test;
2206 2 : StandardRatingsResults["HSPF"] = HSPF;
2207 2 : StandardRatingsResults["NetHeatingCapRated_2023"] = NetHeatingCapRated_2023;
2208 2 : StandardRatingsResults["NetHeatingCapH3Test_2023"] = NetHeatingCapH3Test_2023;
2209 2 : StandardRatingsResults["HSPF2_2023"] = HSPF2_2023;
2210 1 : return StandardRatingsResults;
2211 : }
2212 :
2213 8 : if (RatedCOP > 0.0) { // RatedCOP <= 0.0 is trapped in GetInput, but keep this as "safety"
2214 :
2215 7 : EIRRated = EIRTempModFacRated * EIRFlowModFac / RatedCOP;
2216 7 : EIRH2Test = EIRTempModFacH2Test * EIRFlowModFac / RatedCOP;
2217 7 : EIRH3Test = EIRTempModFacH3Test * EIRFlowModFac / RatedCOP;
2218 : }
2219 :
2220 8 : ElecPowerRated = EIRRated * TotalHeatingCapRated + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2221 8 : ElecPowerH2Test = EIRH2Test * TotalHeatingCapH2Test + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2222 8 : ElecPowerH3Test = EIRH3Test * TotalHeatingCapH3Test + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2223 :
2224 8 : ElecPowerRated2023 = EIRRated * TotalHeatingCapRated + FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
2225 8 : ElecPowerH2Test2023 = EIRH2Test * TotalHeatingCapH2Test + FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
2226 8 : ElecPowerH3Test2023 = EIRH3Test * TotalHeatingCapH3Test + FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
2227 :
2228 8 : HSPF2_2023 = SingleSpeedHeatingHSPF2(NetHeatingCapRated_2023,
2229 : RegionNum,
2230 : NetHeatingCapH3Test_2023,
2231 : ElecPowerH3Test2023,
2232 : ElecPowerRated2023,
2233 : NetHeatingCapH2Test2023,
2234 : ElecPowerH2Test2023,
2235 : MinOATCompressor,
2236 : OATempCompressorOnOffBlank,
2237 : OATempCompressorOn,
2238 : DefrostControl);
2239 :
2240 8 : HSPF = SingleSpeedHeatingHSPF(NetHeatingCapRated,
2241 : RegionNum,
2242 : NetHeatingCapH3Test,
2243 : ElecPowerH3Test,
2244 : ElecPowerRated,
2245 : NetHeatingCapH2Test,
2246 : ElecPowerH2Test,
2247 : MinOATCompressor,
2248 : OATempCompressorOnOffBlank,
2249 : OATempCompressorOn,
2250 : DefrostControl);
2251 :
2252 16 : StandardRatingsResults["NetHeatingCapRated"] = NetHeatingCapRated;
2253 16 : StandardRatingsResults["NetHeatingCapH3Test"] = NetHeatingCapH3Test;
2254 16 : StandardRatingsResults["HSPF"] = HSPF;
2255 16 : StandardRatingsResults["NetHeatingCapRated_2023"] = NetHeatingCapRated_2023;
2256 16 : StandardRatingsResults["NetHeatingCapH3Test_2023"] = NetHeatingCapH3Test_2023;
2257 16 : StandardRatingsResults["HSPF2_2023"] = HSPF2_2023;
2258 8 : return StandardRatingsResults;
2259 0 : }
2260 :
2261 48 : std::tuple<Real64, Real64> IEERSingleSpeedCooling(EnergyPlus::EnergyPlusData &state,
2262 : const int CapFTempCurveIndex,
2263 : const Real64 RatedTotalCapacity,
2264 : const Real64 TotCapFlowModFac,
2265 : const Real64 FanPowerPerEvapAirFlowRate,
2266 : const Real64 RatedAirVolFlowRate,
2267 : const int EIRFTempCurveIndex,
2268 : const Real64 RatedCOP,
2269 : const Real64 EIRFlowModFac)
2270 : {
2271 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
2272 48 : int constexpr NumOfReducedCap(4); // Number of reduced capacity test conditions (100%,75%,50%,and 25%)
2273 48 : Real64 TotCapTempModFac(0.0); // Total capacity modifier (function of entering wetbulb, outside drybulb) [-]
2274 48 : Real64 OutdoorUnitInletAirDryBulbTempReduced(0.0); // Outdoor unit entering air dry-bulb temperature at reduced capacity [C]
2275 48 : Real64 NetCoolingCapReduced(0.0); // Net Cooling Coil capacity at reduced conditions, accounting for supply fan heat [W]
2276 48 : Real64 EIRTempModFac(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) [-]
2277 48 : Real64 EIR(0.0); // Energy Efficiency Ratio at AHRI test conditions for SEER [-]
2278 48 : Real64 LoadFactor(0.0); // Fractional "on" time for last stage at the desired reduced capacity, (dimensionless)
2279 48 : Real64 DegradationCoeff(0.0); // Degradation coefficient, (dimensionless)
2280 48 : Real64 ElecPowerReducedCap(0.0); // Net power consumption (Cond Fan+Compressor) at reduced test condition [W]
2281 48 : Real64 EERReduced(0.0); // EER at reduced capacity test conditions (100%, 75%, 50%, and 25%)
2282 48 : Real64 IEER = 0.0; // Integrated energy efficiency ratio of single speed DX cooling coil
2283 48 : Real64 NetCoolingCapRated = 0.0; // net cooling capacity of single speed DX cooling coil
2284 :
2285 : // Calculate the net cooling capacity at the rated conditions (19.44C WB and 35.0C DB )
2286 48 : TotCapTempModFac = Curve::CurveValue(state, CapFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempRated);
2287 48 : NetCoolingCapRated = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2288 : // RedCapNum : Integer counter for reduced capacity
2289 240 : for (int RedCapNum = 0; RedCapNum < NumOfReducedCap; ++RedCapNum) {
2290 : // get the outdoor air dry bulb temperature for the reduced capacity test conditions
2291 192 : if (ReducedPLR[RedCapNum] > 0.444) {
2292 144 : OutdoorUnitInletAirDryBulbTempReduced = 5.0 + 30.0 * ReducedPLR[RedCapNum];
2293 : } else {
2294 48 : OutdoorUnitInletAirDryBulbTempReduced = OADBTempLowReducedCapacityTest;
2295 : }
2296 : TotCapTempModFac =
2297 192 : Curve::CurveValue(state, CapFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempReduced);
2298 192 : NetCoolingCapReduced = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
2299 192 : EIRTempModFac = Curve::CurveValue(state, EIRFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempReduced);
2300 192 : if (RatedCOP > 0.0) {
2301 192 : EIR = EIRTempModFac * EIRFlowModFac / RatedCOP;
2302 : } else {
2303 0 : EIR = 0.0;
2304 : }
2305 192 : if (NetCoolingCapReduced > 0.0) {
2306 192 : LoadFactor = ReducedPLR[RedCapNum] * NetCoolingCapRated / NetCoolingCapReduced;
2307 : } else {
2308 0 : LoadFactor = 1.0;
2309 : }
2310 192 : DegradationCoeff = 1.130 - 0.130 * LoadFactor;
2311 192 : ElecPowerReducedCap = DegradationCoeff * EIR * (RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac);
2312 192 : EERReduced = (LoadFactor * NetCoolingCapReduced) / (LoadFactor * ElecPowerReducedCap + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate);
2313 192 : IEER += IEERWeightingFactor[RedCapNum] * EERReduced;
2314 : }
2315 96 : return std::make_tuple(IEER, NetCoolingCapRated);
2316 : }
2317 :
2318 102 : Real64 GetIEEREquationResult(const Real64 A, const Real64 B, const Real64 C, const Real64 D)
2319 : {
2320 102 : return (0.020 * A) + (0.617 * B) + (0.238 * C) + (0.125 * D);
2321 : }
2322 :
2323 453 : Real64 GetOutdoorUnitInletAirDryBulbTempReduced(Real64 const ReducedPLR, DataHeatBalance::RefrigCondenserType const CondenserType)
2324 : {
2325 453 : Real64 OutdoorUnitInletAirDryBulbTempReduced(0.0);
2326 : // As per Table 9. IEER Part-Load Rating Conditions | AHRI Std.340/360-2022(IP)
2327 453 : if (ReducedPLR == 0.25) {
2328 112 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Air) {
2329 : // Entering Dry Bulb Temperature (OAT)
2330 98 : OutdoorUnitInletAirDryBulbTempReduced = 18.33; // 65F
2331 14 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Water) {
2332 : // Entering Condenser Water Temperature (EWT)
2333 0 : OutdoorUnitInletAirDryBulbTempReduced = 12.77; // 55F
2334 14 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Evap) {
2335 : // Entering Air Wet-bulb/Air Dry-bulb/Makeup Water Temperature EWB/DB/MW
2336 : // OutdoorUnitInletAirDryBulbTempReduced = 52.8F/65.0F/77.0F
2337 14 : OutdoorUnitInletAirDryBulbTempReduced = 18.33;
2338 : }
2339 341 : } else if (ReducedPLR == 0.50) {
2340 119 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Air) {
2341 105 : OutdoorUnitInletAirDryBulbTempReduced = 20; // 68F
2342 14 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Water) {
2343 0 : OutdoorUnitInletAirDryBulbTempReduced = 16.66; // 62F
2344 14 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Evap) {
2345 : // OutdoorUnitInletAirDryBulbTempReduced = 57.5F / 68.0F / 77.0F EWB / DB / MW
2346 14 : OutdoorUnitInletAirDryBulbTempReduced = 20;
2347 : }
2348 222 : } else if (ReducedPLR == 0.75) {
2349 120 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Air) {
2350 108 : OutdoorUnitInletAirDryBulbTempReduced = 27.5; // 81.5F
2351 12 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Water) {
2352 0 : OutdoorUnitInletAirDryBulbTempReduced = 23.05; // 73.5F
2353 12 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Evap) {
2354 : // OutdoorUnitInletAirDryBulbTempReduced = 66.2F / 81.5F / 77.0F EWB / DB / MW
2355 12 : OutdoorUnitInletAirDryBulbTempReduced = 27.5; // 81.5F
2356 : }
2357 102 : } else if (ReducedPLR == 1.0) {
2358 102 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Air) {
2359 90 : OutdoorUnitInletAirDryBulbTempReduced = 35; // 95.0F
2360 12 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Water) {
2361 0 : OutdoorUnitInletAirDryBulbTempReduced = 29.44; // 85.0F
2362 12 : } else if (CondenserType == DataHeatBalance::RefrigCondenserType::Evap) {
2363 : // OutdoorUnitInletAirDryBulbTempReduced = 75.0F / 95.0F / 85.0F EWB / DB / MW
2364 12 : OutdoorUnitInletAirDryBulbTempReduced = 35;
2365 : }
2366 : }
2367 453 : return OutdoorUnitInletAirDryBulbTempReduced;
2368 : }
2369 :
2370 453 : Real64 CalculateInterMediateEER(EnergyPlus::EnergyPlusData &state,
2371 : Real64 QAFull,
2372 : Real64 OutdoorUnitInletAirDryBulbTempReduced,
2373 : int CapFTempCurveIndex,
2374 : Real64 CoolingCoilInletAirWetBulbTempRated,
2375 : Real64 RatedTotalCapacity,
2376 : Real64 TotCapFlowModFac,
2377 : Real64 FanPowerPerEvapAirFlowRate_2023,
2378 : Real64 RatedAirVolFlowRate,
2379 : Real64 EIRFTempCurveIndex,
2380 : Real64 RatedCOP,
2381 : Real64 EIRFlowModFac,
2382 : Real64 ReducedPLR)
2383 : {
2384 : Real64 TotCapTempModFac =
2385 453 : Curve::CurveValue(state, CapFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempReduced);
2386 : // TBD: Discuss TotCapTempModFac Calculation for both Evap and Water Cooled.
2387 : // This will be our Qlx
2388 453 : Real64 NetCoolingCapReduced =
2389 453 : RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
2390 : Real64 EIRTempModFac =
2391 453 : Curve::CurveValue(state, EIRFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempReduced);
2392 :
2393 453 : Real64 EIR(0.0);
2394 453 : if (RatedCOP > 0.0) {
2395 453 : EIR = EIRTempModFac * EIRFlowModFac / RatedCOP;
2396 : } else {
2397 0 : EIR = 0.0;
2398 : }
2399 453 : Real64 EER(0.0); // Energy Efficiency Rating
2400 :
2401 453 : Real64 CD(0.0); // Degradation Cofficient, (Btu/h)/(Btu/h)
2402 453 : Real64 LF(0.0); // Fraction "on" time for the last stage at the tested load Point | Load Factor
2403 453 : Real64 PL = ReducedPLR * 100; // Percent Load
2404 :
2405 453 : Real64 Qlx = NetCoolingCapReduced; // Part Load Net Capacity (Btu/h) | Previously NetCoolingCapReduced
2406 453 : if (Qlx > 0.0) {
2407 453 : LF = ((PL / 100) * QAFull) / Qlx;
2408 : } else {
2409 0 : LF = 1.0;
2410 : }
2411 : // PC - Compressor power at the lowest machine unloading point operating at the applicable part-load Rating condition, W
2412 : // PCD - Condenser Section Power, at the applicable part-load Rating condition, W
2413 453 : Real64 PIF(0.0); // Indoor Fan Power, W
2414 453 : Real64 PCT(0.0); // Control Circuit Power and any auxilary Power, W
2415 453 : Real64 q(0.0); // Cooling Capacity at the lowest machine unloading point operating at the applicable part-load Rating condition, Btu/h
2416 :
2417 453 : q = Qlx;
2418 453 : PIF = FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate; // Calculated for each Speed
2419 453 : PCT = 0; // Control Circuit Power and any auxilary Power not in Energy Plus Object.
2420 453 : Real64 PC_plus_PCD = EIR * (RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac);
2421 453 : CD = (-0.13 * LF) + 1.13; // DegradationCoeff
2422 453 : EER = (LF * q) / (LF * (CD * (PC_plus_PCD)) + PIF + PCT);
2423 453 : return EER;
2424 : }
2425 :
2426 4 : std::tuple<Real64, Real64, Real64, Real64> SEER2CalulcationCurveFit(EnergyPlusData &state,
2427 : [[maybe_unused]] std::string const &CoilType,
2428 : EnergyPlus::CoilCoolingDXCurveFitOperatingMode operatingMode)
2429 : {
2430 4 : Real64 EEER2(0.0);
2431 4 : Real64 SEER2_User(0.0);
2432 4 : Real64 SEER2_Standard(0.0);
2433 4 : Real64 NetCoolingCapRated2023(0.0); // QAFull
2434 :
2435 4 : Array1D<int> MSCCapFTemp;
2436 4 : Array1D<Real64> MSRatedTotCap;
2437 4 : Array1D<int> MSCCapAirFFlow;
2438 4 : Array1D<Real64> MSRatedEvaporatorFanPowerPerVolumeFlowRate2023;
2439 4 : Array1D<Real64> MSRatedAirVolFlowRate;
2440 4 : Array1D<int> MSEIRFTemp;
2441 4 : Array1D<Real64> MSRatedCOP;
2442 4 : Array1D<int> MSEIRAirFFlow;
2443 4 : Array1D<int> MSPLRFPLF;
2444 :
2445 4 : int const nsp = operatingMode.speeds.size();
2446 :
2447 14 : for (int i = 0; i < nsp; ++i) {
2448 10 : CoilCoolingDXCurveFitSpeed speed = operatingMode.speeds[i];
2449 10 : MSCCapFTemp.push_back(speed.indexCapFT);
2450 :
2451 : // Calculate the rated cooling capacity for the speed using Gross Total Cooling Capacity
2452 : // and Gross Total Cooling Capacity Fraction of the speed.
2453 10 : MSRatedTotCap.push_back(speed.rated_total_capacity); // get the capcity at each speed bymultiplying this fraCTION WITH the gross.
2454 10 : MSCCapAirFFlow.push_back(speed.indexCapFFF);
2455 10 : MSRatedEvaporatorFanPowerPerVolumeFlowRate2023.push_back(speed.rated_evap_fan_power_per_volume_flow_rate_2023);
2456 : // Calculate the rated evap air flow rate for the speed using Rated Evaporator Air flow Rate
2457 : // and Rated Evaporator Air flow fraction of the speed
2458 10 : MSRatedAirVolFlowRate.push_back(speed.evap_air_flow_rate);
2459 :
2460 10 : MSEIRFTemp.push_back(speed.indexEIRFT);
2461 10 : MSRatedCOP.push_back(speed.ratedCOP);
2462 10 : MSEIRAirFFlow.push_back(speed.indexEIRFFF);
2463 10 : MSPLRFPLF.push_back(speed.indexPLRFPLF);
2464 10 : }
2465 :
2466 4 : std::tie(NetCoolingCapRated2023, SEER2_User, SEER2_Standard, EEER2) =
2467 8 : VariableSpeedDXCoolingCoilSEER2(state,
2468 : nsp,
2469 : MSCCapAirFFlow,
2470 : MSRatedTotCap,
2471 : MSCCapFTemp,
2472 : MSRatedEvaporatorFanPowerPerVolumeFlowRate2023,
2473 : MSRatedAirVolFlowRate,
2474 : MSEIRAirFFlow,
2475 : MSRatedCOP,
2476 : MSEIRFTemp,
2477 4 : MSPLRFPLF);
2478 :
2479 8 : return std::make_tuple(NetCoolingCapRated2023, SEER2_User, SEER2_Standard, EEER2);
2480 4 : }
2481 :
2482 : std::tuple<Real64, Real64, Real64>
2483 4 : IEERCalulcationCurveFit(EnergyPlusData &state, std::string const &CoilType, EnergyPlus::CoilCoolingDXCurveFitOperatingMode operatingMode)
2484 : {
2485 4 : Real64 IEER_2022(0.0);
2486 4 : Real64 EER_2022(0.0);
2487 4 : Real64 NetCoolingCapRated2022(0.0); // QAFull
2488 :
2489 4 : Array1D<int> MSCCapFTemp;
2490 4 : Array1D<Real64> MSRatedTotCap;
2491 4 : Array1D<int> MSCCapAirFFlow;
2492 4 : Array1D<Real64> MSRatedEvaporatorFanPowerPerVolumeFlowRate2023;
2493 4 : Array1D<Real64> MSRatedAirVolFlowRate;
2494 4 : Array1D<int> MSEIRFTemp;
2495 4 : Array1D<Real64> MSRatedCOP;
2496 4 : Array1D<int> MSEIRAirFFlow;
2497 :
2498 4 : int const nsp = operatingMode.speeds.size();
2499 :
2500 14 : for (int i = 0; i < nsp; ++i) {
2501 10 : CoilCoolingDXCurveFitSpeed speed = operatingMode.speeds[i];
2502 10 : MSCCapFTemp.push_back(speed.indexCapFT);
2503 : // Calculate the rated cooling capacity for the speed using Gross Total Cooling Capacity
2504 : // and Gross Total Cooling Capacity Fraction of the speed.
2505 10 : MSRatedTotCap.push_back(speed.rated_total_capacity); // get the capcity at each speed bymultiplying this fraCTION WITH the gross.
2506 10 : MSCCapAirFFlow.push_back(speed.indexCapFFF);
2507 10 : MSRatedEvaporatorFanPowerPerVolumeFlowRate2023.push_back(speed.rated_evap_fan_power_per_volume_flow_rate_2023);
2508 : // Calculate the rated evap air flow rate for the speed using Rated Evaporator Air flow Rate
2509 : // and Rated Evaporator Air flow fraction of the speed
2510 10 : MSRatedAirVolFlowRate.push_back(speed.evap_air_flow_rate);
2511 10 : MSEIRFTemp.push_back(speed.indexEIRFT);
2512 10 : MSRatedCOP.push_back(speed.ratedCOP);
2513 10 : MSEIRAirFFlow.push_back(speed.indexEIRFFF);
2514 10 : }
2515 :
2516 : // For Condenser Type
2517 : DataHeatBalance::RefrigCondenserType _CondenserType;
2518 4 : switch (operatingMode.condenserType) {
2519 0 : case CoilCoolingDXCurveFitOperatingMode::CondenserType::EVAPCOOLED:
2520 0 : _CondenserType = DataHeatBalance::RefrigCondenserType::Evap;
2521 0 : break;
2522 4 : case CoilCoolingDXCurveFitOperatingMode::CondenserType::AIRCOOLED:
2523 : default:
2524 4 : _CondenserType = DataHeatBalance::RefrigCondenserType::Air;
2525 4 : break;
2526 : }
2527 :
2528 8 : std::tie(IEER_2022, NetCoolingCapRated2022, EER_2022) = IEERCalculationVariableSpeed(state,
2529 : CoilType,
2530 : nsp,
2531 : MSCCapFTemp,
2532 : MSRatedTotCap,
2533 : MSCCapAirFFlow,
2534 : MSRatedEvaporatorFanPowerPerVolumeFlowRate2023,
2535 : MSRatedAirVolFlowRate,
2536 : MSEIRFTemp,
2537 : MSRatedCOP,
2538 : MSEIRAirFFlow,
2539 4 : _CondenserType);
2540 :
2541 8 : return std::make_tuple(IEER_2022, NetCoolingCapRated2022, EER_2022);
2542 4 : }
2543 :
2544 30 : std::tuple<Real64, Real64, Real64> IEERCalculationVariableSpeed(
2545 : EnergyPlusData &state,
2546 : std::string const &VSCoilType, // Type of DX coil
2547 : int const nsp,
2548 : Array1A_int const &CapFTempCurveIndex,
2549 : Array1A<Real64> const &RatedTotalCapacity,
2550 : Array1A_int const &CapFFlowCurveIndex,
2551 : Array1A<Real64> const &FanPowerPerEvapAirFlowRateFromInput_2023, // 2023 Rated Fan Power per air volume flow rate through the evaporator coil
2552 : Array1A<Real64> const &RatedAirVolFlowRate,
2553 : Array1A_int const &EIRFTempCurveIndex,
2554 : Array1A<Real64> const &RatedCOP, // Reference coefficient of performance [W/W]
2555 : Array1A_int const &EIRFFlowCurveIndex,
2556 : DataHeatBalance::RefrigCondenserType const _CondenserType) // Type of condenser user by the DX Cooling Coil
2557 : {
2558 30 : Real64 IEER_2022(0.0);
2559 30 : Real64 EER_2022(0.0);
2560 30 : Real64 QAFull(0.0);
2561 30 : Array1D<Real64> Q_A_Full(nsp); // Total cooling capacity at A2 test condition (High speed) | q_A_Full
2562 30 : Array1D<Real64> FanPowerPerEvapAirFlowRate_2023(nsp); // 2023 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
2563 : // Calculate these for each speed
2564 : // hint : curve index will change, AirFlow rate will remain same
2565 30 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
2566 30 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
2567 30 : Array1D<Real64> TotCapTempModFac(nsp);
2568 30 : Array1D<Real64> NetCoolingCapRated(nsp);
2569 30 : Real64 OutdoorUnitInletAirDryBulbTempReduced(0.0); // Outdoor unit entering air dry-bulb temperature at reduced capacity [C]
2570 : // EER Reduced
2571 30 : Real64 A(0.0); // EER, (Btu/h)/W, at 100% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2572 30 : Real64 B(0.0); // EER, (Btu/h)/W, at 75% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2573 30 : Real64 C(0.0); // EER, (Btu/h)/W, at 50% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2574 30 : Real64 D(0.0); // EER, (Btu/h)/W, at 25% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2575 :
2576 30 : Array1D<DataHeatBalance::RefrigCondenserType> CondenserType(nsp);
2577 :
2578 178 : for (int spnum = 1; spnum <= nsp; ++spnum) {
2579 148 : FanPowerPerEvapAirFlowRate_2023(spnum) = 0.0;
2580 148 : if (FanPowerPerEvapAirFlowRateFromInput_2023(spnum) <= 0.0) {
2581 0 : FanPowerPerEvapAirFlowRate_2023(spnum) = DefaultFanPowerPerEvapAirFlowRateSEER2;
2582 : } else {
2583 148 : FanPowerPerEvapAirFlowRate_2023(spnum) = FanPowerPerEvapAirFlowRateFromInput_2023(spnum);
2584 : }
2585 148 : CondenserType(spnum) = _CondenserType;
2586 : }
2587 :
2588 178 : for (int spnum = nsp; spnum > 0; --spnum) {
2589 : // TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2590 148 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2591 : // EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2592 148 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2593 :
2594 : // if CondenserType is AirCooled
2595 148 : if (CondenserType(spnum) == DataHeatBalance::RefrigCondenserType::Air) {
2596 : // Cooling Coil | Calculate the net cooling capacity at the rated conditions (23.89C(75F) Wet Bulb and 35.0C(95F) Dry Bulb )
2597 148 : if (VSCoilType.find("Cooling") != std::string::npos) {
2598 148 : TotCapTempModFac(spnum) =
2599 148 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoolingCoilInletAirWetBulbTempRated, CoilInletAirCoolDryBulbIEER);
2600 : } else { // Heating Coil | Calculate the net cooling capacity at the rated conditions (6.11C(43F) Wet Bulb and 8.33C(47F) Dry Bulb )
2601 0 : TotCapTempModFac(spnum) =
2602 0 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoilHeatingInletAirWetBulbTempIEER, CoilHeatingInletAirCoolDryBulbIEER);
2603 : }
2604 : }
2605 : // if CondenserType is WaterCooled
2606 148 : if (CondenserType(spnum) == DataHeatBalance::RefrigCondenserType::Water) {
2607 : // Calculate the net cooling capacity at the rated conditions (35.0C(95F) Outlet and 29.44C(85F) Inlet )
2608 :
2609 0 : TotCapTempModFac(spnum) = Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoilWaterOutletTempIEER, CoilWaterInletTempIEER);
2610 : }
2611 : // if CondesnerType is EvaporativelyCooled
2612 148 : if (CondenserType(spnum) == DataHeatBalance::RefrigCondenserType::Evap) {
2613 : // Calculate the net cooling capacity at the rated conditions (23.89C(75F) Wet Bulb and 35.0C(95F) Dry Bulb )
2614 0 : TotCapTempModFac(spnum) =
2615 0 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoilInletEvapWetBulbTempIEER, CoilInletEvapDryBulbTempIEER);
2616 : }
2617 :
2618 : // This Will be our QAFull
2619 148 : NetCoolingCapRated(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFac(spnum) * TotCapFlowModFac(spnum) -
2620 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
2621 148 : Q_A_Full(spnum) = NetCoolingCapRated(spnum);
2622 : }
2623 :
2624 30 : QAFull = Q_A_Full(nsp);
2625 :
2626 30 : Real64 _100PercentCoolCap = RatedTotalCapacity(nsp);
2627 30 : Real64 _75PercentCoolCap = RatedTotalCapacity(nsp) * 0.75;
2628 30 : Real64 _50PercentCoolCap = RatedTotalCapacity(nsp) * 0.50;
2629 30 : Real64 _25PercentCoolCap = RatedTotalCapacity(nsp) * 0.25;
2630 :
2631 30 : Array1D<int> speedsForA;
2632 30 : Array1D<int> speedsForB;
2633 30 : Array1D<int> speedsForC;
2634 30 : Array1D<int> speedsForD;
2635 30 : Array1D<Real64> ratioArray;
2636 :
2637 30 : if (nsp > 4) {
2638 14 : int smallerThanSpeedB = 0;
2639 14 : int largerThanSpeedB = 0;
2640 14 : int smallerThanSpeedC = 0;
2641 14 : int largerThanSpeedC = 0;
2642 14 : int smallerThanSpeedD = 0;
2643 14 : int largerThanSpeedD = 0;
2644 14 : bool bFound = false;
2645 14 : bool cFound = false;
2646 14 : bool dFound = false;
2647 125 : for (int i = 1; i <= nsp; ++i) {
2648 111 : Real64 ratioAtithSpeed = (RatedTotalCapacity(i) / _100PercentCoolCap) * 100;
2649 111 : ratioArray.push_back(ratioAtithSpeed);
2650 : }
2651 125 : for (int i = 1; i <= nsp; ++i) {
2652 111 : if ((int)(ratioArray(i)) == 100.0) {
2653 14 : speedsForA.push_back(i);
2654 14 : continue;
2655 97 : } else if ((int)(ratioArray(i)) == 75.0) {
2656 0 : speedsForB.push_back(i);
2657 0 : bFound = true;
2658 0 : smallerThanSpeedB = 0;
2659 0 : largerThanSpeedB = 0;
2660 0 : continue;
2661 97 : } else if ((int)(ratioArray(i)) == 50.0) {
2662 2 : speedsForC.push_back(i);
2663 2 : cFound = true;
2664 2 : smallerThanSpeedC = 0;
2665 2 : largerThanSpeedC = 0;
2666 2 : continue;
2667 95 : } else if ((int)(ratioArray(i)) == 25.0) {
2668 3 : speedsForD.push_back(i);
2669 3 : dFound = true;
2670 3 : smallerThanSpeedD = 0;
2671 3 : largerThanSpeedD = 0;
2672 3 : continue;
2673 : } else {
2674 92 : if (((int)(ratioArray(i)) > 0.0 && (int)(ratioArray(i)) < 25.0) && !dFound) {
2675 14 : if (smallerThanSpeedD == 0) {
2676 11 : smallerThanSpeedD = i;
2677 : } else {
2678 6 : if (std::abs(RatedTotalCapacity(smallerThanSpeedD) - _25PercentCoolCap) >
2679 3 : std::abs(RatedTotalCapacity(i) - _25PercentCoolCap)) {
2680 3 : smallerThanSpeedD = i;
2681 : }
2682 : }
2683 : }
2684 92 : if (((int)(ratioArray(i)) > 25.0 && (int)(ratioArray(i)) < 50.0) && !dFound) {
2685 27 : if (largerThanSpeedD == 0) {
2686 11 : largerThanSpeedD = i;
2687 : } else {
2688 32 : if (std::abs(RatedTotalCapacity(largerThanSpeedD) - _25PercentCoolCap) >
2689 16 : std::abs(RatedTotalCapacity(i) - _25PercentCoolCap)) {
2690 0 : largerThanSpeedD = i;
2691 : }
2692 : }
2693 : }
2694 92 : if (((int)(ratioArray(i)) > 25.0 && (int)(ratioArray(i)) < 50.0) && !cFound) {
2695 31 : if (smallerThanSpeedC == 0) {
2696 13 : smallerThanSpeedC = i;
2697 : } else {
2698 36 : if (std::abs(RatedTotalCapacity(smallerThanSpeedC) - _50PercentCoolCap) >
2699 18 : std::abs(RatedTotalCapacity(i) - _50PercentCoolCap)) {
2700 18 : smallerThanSpeedC = i;
2701 : }
2702 : }
2703 : }
2704 92 : if (((int)(ratioArray(i)) > 50.0 && (int)(ratioArray(i)) < 75.0) && !cFound) {
2705 24 : if (largerThanSpeedC == 0) {
2706 10 : largerThanSpeedC = i;
2707 : } else {
2708 28 : if (std::abs(RatedTotalCapacity(largerThanSpeedC) - _50PercentCoolCap) >
2709 14 : std::abs(RatedTotalCapacity(i) - _50PercentCoolCap)) {
2710 0 : largerThanSpeedC = i;
2711 : }
2712 : }
2713 : }
2714 92 : if (((int)(ratioArray(i)) > 50.0 && (int)(ratioArray(i)) < 75.0) && !bFound) {
2715 26 : if (smallerThanSpeedB == 0) {
2716 11 : smallerThanSpeedB = i;
2717 : } else {
2718 30 : if (std::abs(RatedTotalCapacity(smallerThanSpeedB) - _75PercentCoolCap) >
2719 15 : std::abs(RatedTotalCapacity(i) - _75PercentCoolCap)) {
2720 15 : smallerThanSpeedB = i;
2721 : }
2722 : }
2723 : }
2724 92 : if (((int)(ratioArray(i)) > 75.0 && (int)(ratioArray(i)) < 100.0) && !bFound) {
2725 21 : if (largerThanSpeedB == 0) {
2726 14 : largerThanSpeedB = i;
2727 : } else {
2728 14 : if (std::abs(RatedTotalCapacity(largerThanSpeedB) - _75PercentCoolCap) >
2729 7 : std::abs(RatedTotalCapacity(i) - _75PercentCoolCap)) {
2730 0 : largerThanSpeedB = i;
2731 : }
2732 : }
2733 : }
2734 : }
2735 : }
2736 :
2737 14 : if (smallerThanSpeedB != 0) {
2738 11 : speedsForB.push_back(smallerThanSpeedB);
2739 : }
2740 14 : if (largerThanSpeedB != 0) {
2741 14 : speedsForB.push_back(largerThanSpeedB);
2742 : }
2743 :
2744 14 : if (smallerThanSpeedC != 0) {
2745 12 : speedsForC.push_back(smallerThanSpeedC);
2746 : }
2747 14 : if (largerThanSpeedC != 0) {
2748 10 : speedsForC.push_back(largerThanSpeedC);
2749 : }
2750 :
2751 14 : if (smallerThanSpeedD != 0) {
2752 10 : speedsForD.push_back(smallerThanSpeedD);
2753 : }
2754 14 : if (largerThanSpeedD != 0) {
2755 11 : speedsForD.push_back(largerThanSpeedD);
2756 : }
2757 :
2758 : // int totalEERCount = speedsForA.size() + speedsForB.size() + speedsForC.size() + speedsForD.size();
2759 : // For A | 100% - ReducedPLRIEER[3]
2760 14 : int RedCapNum = speedsForA(1);
2761 14 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(1.00, CondenserType(RedCapNum));
2762 :
2763 140 : A = CalculateInterMediateEER(state,
2764 : QAFull,
2765 : OutdoorUnitInletAirDryBulbTempReduced,
2766 14 : CapFTempCurveIndex(RedCapNum),
2767 : CoolingCoilInletAirWetBulbTempRated,
2768 14 : RatedTotalCapacity(RedCapNum),
2769 14 : TotCapFlowModFac(RedCapNum),
2770 14 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
2771 14 : RatedAirVolFlowRate(RedCapNum),
2772 14 : EIRFTempCurveIndex(RedCapNum),
2773 14 : RatedCOP(RedCapNum),
2774 14 : EIRFlowModFac(RedCapNum),
2775 14 : ReducedPLRIEER[3]);
2776 :
2777 : // For B | 75% - ReducedPLRIEER[2]
2778 14 : Real64 EER_BLow(0.0);
2779 14 : Real64 EER_BHigh(0.0);
2780 42 : for (int i = 1; i <= 2; ++i) {
2781 28 : if ((unsigned long)i > speedsForB.size()) {
2782 3 : continue;
2783 : }
2784 :
2785 25 : RedCapNum = speedsForB(i);
2786 25 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(0.75, CondenserType(RedCapNum));
2787 :
2788 250 : Real64 EER = CalculateInterMediateEER(state,
2789 : QAFull,
2790 : OutdoorUnitInletAirDryBulbTempReduced,
2791 25 : CapFTempCurveIndex(RedCapNum),
2792 : CoolingCoilInletAirWetBulbTempRated,
2793 25 : RatedTotalCapacity(RedCapNum),
2794 25 : TotCapFlowModFac(RedCapNum),
2795 25 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
2796 25 : RatedAirVolFlowRate(RedCapNum),
2797 25 : EIRFTempCurveIndex(RedCapNum),
2798 25 : RatedCOP(RedCapNum),
2799 25 : EIRFlowModFac(RedCapNum),
2800 25 : ReducedPLRIEER[2]);
2801 25 : if (speedsForB.size() == 1) {
2802 3 : B = EER;
2803 : } else {
2804 22 : if (i == 1) {
2805 11 : EER_BLow = EER; // ?? Check first is low or high
2806 11 : } else if (i == 2) {
2807 11 : EER_BHigh = EER;
2808 : }
2809 : }
2810 : }
2811 : // Do the interpolation for B if required
2812 14 : if (speedsForB.size() == 2) {
2813 11 : B = ((EER_BHigh - EER_BLow) / (ratioArray(speedsForB(2)) - ratioArray(speedsForB(1)))) * (75 - ratioArray(speedsForB(1))) + EER_BLow;
2814 : }
2815 :
2816 : // For C | 50% - ReducedPLRIEER[1]
2817 14 : Real64 EER_CLow(0.0);
2818 14 : Real64 EER_CHigh(0.0);
2819 42 : for (int i = 1; i <= 2; ++i) {
2820 28 : if ((unsigned long)i > speedsForC.size()) {
2821 4 : continue;
2822 : }
2823 :
2824 24 : RedCapNum = speedsForC(i);
2825 24 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(0.50, CondenserType(RedCapNum));
2826 :
2827 240 : Real64 EER = CalculateInterMediateEER(state,
2828 : QAFull,
2829 : OutdoorUnitInletAirDryBulbTempReduced,
2830 24 : CapFTempCurveIndex(RedCapNum),
2831 : CoolingCoilInletAirWetBulbTempRated,
2832 24 : RatedTotalCapacity(RedCapNum),
2833 24 : TotCapFlowModFac(RedCapNum),
2834 24 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
2835 24 : RatedAirVolFlowRate(RedCapNum),
2836 24 : EIRFTempCurveIndex(RedCapNum),
2837 24 : RatedCOP(RedCapNum),
2838 24 : EIRFlowModFac(RedCapNum),
2839 24 : ReducedPLRIEER[1]);
2840 24 : if (speedsForC.size() == 1) {
2841 4 : C = EER;
2842 : } else {
2843 20 : if (i == 1) {
2844 10 : EER_CLow = EER; // ?? Check first is low or high
2845 10 : } else if (i == 2) {
2846 10 : EER_CHigh = EER;
2847 : }
2848 : }
2849 : }
2850 : // Do the interpolation for C if required
2851 14 : if (speedsForC.size() == 2) {
2852 10 : C = ((EER_CHigh - EER_CLow) / (ratioArray(speedsForC(2)) - ratioArray(speedsForC(1)))) * (50 - ratioArray(speedsForC(1))) + EER_CLow;
2853 : }
2854 :
2855 : // For D | 25% - ReducedPLRIEER[0]
2856 14 : Real64 EER_DLow(0.0);
2857 14 : Real64 EER_DHigh(0.0);
2858 42 : for (int i = 1; i <= 2; ++i) {
2859 28 : if ((unsigned long)i > speedsForD.size()) {
2860 4 : continue;
2861 : }
2862 :
2863 24 : RedCapNum = speedsForD(i);
2864 24 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(0.25, CondenserType(RedCapNum));
2865 :
2866 240 : Real64 EER = CalculateInterMediateEER(state,
2867 : QAFull,
2868 : OutdoorUnitInletAirDryBulbTempReduced,
2869 24 : CapFTempCurveIndex(RedCapNum),
2870 : CoolingCoilInletAirWetBulbTempRated,
2871 24 : RatedTotalCapacity(RedCapNum),
2872 24 : TotCapFlowModFac(RedCapNum),
2873 24 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
2874 24 : RatedAirVolFlowRate(RedCapNum),
2875 24 : EIRFTempCurveIndex(RedCapNum),
2876 24 : RatedCOP(RedCapNum),
2877 24 : EIRFlowModFac(RedCapNum),
2878 24 : ReducedPLRIEER[0]);
2879 24 : if (speedsForD.size() == 1) {
2880 4 : D = EER;
2881 : } else {
2882 20 : if (i == 1) {
2883 10 : EER_DLow = EER; // ?? Check first is low or high
2884 10 : } else if (i == 2) {
2885 10 : EER_DHigh = EER;
2886 : }
2887 : }
2888 : }
2889 : // Do the interpolation for D if required
2890 14 : if (speedsForD.size() == 2) {
2891 10 : D = ((EER_DHigh - EER_DLow) / (ratioArray(speedsForD(2)) - ratioArray(speedsForD(1)))) * (25 - ratioArray(speedsForD(1))) + EER_DLow;
2892 : }
2893 :
2894 14 : IEER_2022 = GetIEEREquationResult(A, B, C, D);
2895 14 : EER_2022 = A;
2896 16 : } else if (nsp == 2 || nsp == 3 || nsp == 4) {
2897 : // 2, 3 & 4 Speeds
2898 11 : Real64 QAFull_(0.0);
2899 22 : std::tie(IEER_2022, QAFull_, EER_2022) = IEERCalculationMultiSpeed(state,
2900 : VSCoilType,
2901 : nsp,
2902 : CapFTempCurveIndex,
2903 : RatedTotalCapacity,
2904 : CapFFlowCurveIndex,
2905 : FanPowerPerEvapAirFlowRate_2023,
2906 : RatedAirVolFlowRate,
2907 : EIRFTempCurveIndex,
2908 : RatedCOP,
2909 : EIRFFlowCurveIndex,
2910 11 : CondenserType);
2911 16 : } else if (nsp == 1) {
2912 : // 1 Speed
2913 5 : Real64 QAFull_(0.0);
2914 10 : std::tie(IEER_2022, QAFull_, EER_2022) = IEERCalculationSingleSpeed(state,
2915 : VSCoilType,
2916 5 : CapFTempCurveIndex(1),
2917 5 : RatedTotalCapacity(1),
2918 5 : TotCapFlowModFac(1),
2919 5 : FanPowerPerEvapAirFlowRate_2023(1),
2920 5 : RatedAirVolFlowRate(1),
2921 5 : EIRFTempCurveIndex(1),
2922 5 : RatedCOP(1),
2923 5 : EIRFlowModFac(1),
2924 10 : CondenserType(1));
2925 : }
2926 :
2927 60 : return std::make_tuple(IEER_2022, QAFull, EER_2022);
2928 30 : }
2929 :
2930 30 : std::tuple<Real64, Real64, Real64> IEERCalculationMultiSpeed(
2931 : EnergyPlus::EnergyPlusData &state,
2932 : std::string const &DXCoilType, // Type of DX coil
2933 : int const nsp,
2934 : Array1A_int const &CapFTempCurveIndex,
2935 : Array1A<Real64> const &RatedTotalCapacity,
2936 : Array1A_int const &CapFFlowCurveIndex,
2937 : Array1A<Real64> const &FanPowerPerEvapAirFlowRateFromInput_2023, // 2023 Rated Fan Power per air volume flow rate through the evaporator coil
2938 : Array1A<Real64> const &RatedAirVolFlowRate,
2939 : Array1A_int const &EIRFTempCurveIndex,
2940 : Array1A<Real64> const &RatedCOP, // Reference coefficient of performance [W/W]
2941 : Array1A_int const &EIRFFlowCurveIndex,
2942 : Array1D<DataHeatBalance::RefrigCondenserType> const &CondenserType) // Type of condenser user by the DX Cooling Coil
2943 : {
2944 30 : Real64 IEER_2022(0.0);
2945 30 : Real64 EER_2022(0.0);
2946 30 : Real64 QAFull(0.0);
2947 30 : Array1D<Real64> Q_A_Full(nsp); // Total cooling capacity at A2 test condition (High speed) | q_A_Full
2948 30 : Array1D<Real64> FanPowerPerEvapAirFlowRate_2023(nsp); // 2023 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
2949 : // Calculate these for each speed
2950 : // hint : curve index will change, AirFlow rate will remain same
2951 30 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
2952 30 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
2953 30 : Array1D<Real64> TotCapTempModFac(nsp);
2954 30 : Array1D<Real64> NetCoolingCapRated(nsp);
2955 30 : Real64 OutdoorUnitInletAirDryBulbTempReduced(0.0); // Outdoor unit entering air dry-bulb temperature at reduced capacity [C]
2956 30 : Real64 EER(0.0); // Energy Efficiency Rating
2957 30 : Real64 PartLoad(0.0);
2958 : // EER Reduced
2959 30 : Real64 A(0.0); // EER, (Btu/h)/W, at 100% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2960 30 : Real64 B(0.0); // EER, (Btu/h)/W, at 75% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2961 30 : Real64 C(0.0); // EER, (Btu/h)/W, at 50% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2962 30 : Real64 D(0.0); // EER, (Btu/h)/W, at 25% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
2963 :
2964 109 : for (int spnum = 1; spnum <= nsp; ++spnum) {
2965 79 : FanPowerPerEvapAirFlowRate_2023(spnum) = 0.0;
2966 79 : if (FanPowerPerEvapAirFlowRateFromInput_2023(spnum) <= 0.0) {
2967 0 : FanPowerPerEvapAirFlowRate_2023(spnum) = DefaultFanPowerPerEvapAirFlowRateSEER2;
2968 : } else {
2969 79 : FanPowerPerEvapAirFlowRate_2023(spnum) = FanPowerPerEvapAirFlowRateFromInput_2023(spnum);
2970 : }
2971 : }
2972 :
2973 : // int maxSpeed = nsp;
2974 109 : for (int spnum = nsp; spnum > 0; --spnum) {
2975 : // TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2976 79 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2977 : // EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2978 79 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
2979 :
2980 : // if CondenserType is AirCooled
2981 79 : if (CondenserType(spnum) == DataHeatBalance::RefrigCondenserType::Air) {
2982 : // Cooling Coil | Calculate the net cooling capacity at the rated conditions (23.89C(75F) Wet Bulb and 35.0C(95F) Dry Bulb )
2983 79 : if (DXCoilType.find("Cooling") != std::string::npos) {
2984 79 : TotCapTempModFac(spnum) =
2985 79 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoolingCoilInletAirWetBulbTempRated, CoilInletAirCoolDryBulbIEER);
2986 : } else { // Heating Coil | Calculate the net cooling capacity at the rated conditions (6.11C(43F) Wet Bulb and 8.33C(47F) Dry Bulb )
2987 0 : TotCapTempModFac(spnum) =
2988 0 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoilHeatingInletAirWetBulbTempIEER, CoilHeatingInletAirCoolDryBulbIEER);
2989 : }
2990 : }
2991 : // if CondenserType is WaterCooled
2992 79 : if (CondenserType(spnum) == DataHeatBalance::RefrigCondenserType::Water) {
2993 : // Calculate the net cooling capacity at the rated conditions (35.0C(95F) Outlet and 29.44C(85F) Inlet )
2994 :
2995 0 : TotCapTempModFac(spnum) = Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoilWaterOutletTempIEER, CoilWaterInletTempIEER);
2996 : }
2997 : // if CondesnerType is EvaporativelyCooled
2998 79 : if (CondenserType(spnum) == DataHeatBalance::RefrigCondenserType::Evap) {
2999 : // Calculate the net cooling capacity at the rated conditions (23.89C(75F) Wet Bulb and 35.0C(95F) Dry Bulb )
3000 0 : TotCapTempModFac(spnum) =
3001 0 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), CoilInletEvapWetBulbTempIEER, CoilInletEvapDryBulbTempIEER);
3002 : }
3003 :
3004 : // This Will be our QAFull
3005 79 : NetCoolingCapRated(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFac(spnum) * TotCapFlowModFac(spnum) -
3006 79 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
3007 79 : Q_A_Full(spnum) = NetCoolingCapRated(spnum);
3008 : }
3009 30 : QAFull = Q_A_Full(nsp);
3010 :
3011 30 : Real64 _100PercentCoolCap = RatedTotalCapacity(nsp);
3012 :
3013 30 : Array1D<int> speedsForA;
3014 30 : Array1D<int> speedsForB;
3015 30 : Array1D<int> speedsForC;
3016 30 : Array1D<int> speedsForD;
3017 30 : Array1D<Real64> ratioArray;
3018 :
3019 30 : if (nsp == 4) {
3020 :
3021 : // RedCapNum : Integer counter for reduced capacity
3022 30 : for (int RedCapNum = nsp; RedCapNum > 0; --RedCapNum) {
3023 :
3024 24 : PartLoad = ReducedPLRIEER[RedCapNum - 1.0];
3025 24 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(PartLoad, CondenserType(RedCapNum));
3026 :
3027 216 : EER = CalculateInterMediateEER(state,
3028 : QAFull,
3029 : OutdoorUnitInletAirDryBulbTempReduced,
3030 24 : CapFTempCurveIndex(RedCapNum),
3031 : CoolingCoilInletAirWetBulbTempRated,
3032 24 : RatedTotalCapacity(RedCapNum),
3033 24 : TotCapFlowModFac(RedCapNum),
3034 24 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
3035 24 : RatedAirVolFlowRate(RedCapNum),
3036 24 : EIRFTempCurveIndex(RedCapNum),
3037 24 : RatedCOP(RedCapNum),
3038 24 : EIRFlowModFac(RedCapNum),
3039 : PartLoad);
3040 :
3041 24 : if (PartLoad == 1.00) {
3042 6 : A = EER;
3043 18 : } else if (PartLoad == 0.75) {
3044 6 : B = EER;
3045 12 : } else if (PartLoad == 0.50) {
3046 6 : C = EER;
3047 6 : } else if (PartLoad == 0.25) {
3048 6 : D = EER;
3049 : }
3050 : }
3051 6 : IEER_2022 = GetIEEREquationResult(A, B, C, D);
3052 6 : EER_2022 = A;
3053 24 : } else if (nsp == 3) {
3054 7 : speedsForA.push_back(3);
3055 :
3056 7 : speedsForB.push_back(2);
3057 7 : speedsForB.push_back(3);
3058 :
3059 7 : speedsForC.push_back(1);
3060 7 : speedsForC.push_back(2);
3061 :
3062 7 : speedsForD.push_back(1);
3063 :
3064 28 : for (int i = 1; i <= nsp; ++i) {
3065 21 : Real64 ratioAtithSpeed = (RatedTotalCapacity(i) / _100PercentCoolCap) * 100;
3066 21 : ratioArray.push_back(ratioAtithSpeed);
3067 : }
3068 :
3069 : // For A | 100% - ReducedPLRIEER[3]
3070 7 : int RedCapNum = speedsForA(1);
3071 :
3072 7 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(1.00, CondenserType(RedCapNum));
3073 :
3074 70 : A = CalculateInterMediateEER(state,
3075 : QAFull,
3076 : OutdoorUnitInletAirDryBulbTempReduced,
3077 7 : CapFTempCurveIndex(RedCapNum),
3078 : CoolingCoilInletAirWetBulbTempRated,
3079 7 : RatedTotalCapacity(RedCapNum),
3080 7 : TotCapFlowModFac(RedCapNum),
3081 7 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
3082 7 : RatedAirVolFlowRate(RedCapNum),
3083 7 : EIRFTempCurveIndex(RedCapNum),
3084 7 : RatedCOP(RedCapNum),
3085 7 : EIRFlowModFac(RedCapNum),
3086 7 : ReducedPLRIEER[3]);
3087 :
3088 : // For B | 75% - ReducedPLRIEER[2]
3089 7 : Real64 EER_BLow(0.0);
3090 7 : Real64 EER_BHigh(0.0);
3091 21 : for (int i = 1; i <= 2; ++i) {
3092 14 : if ((unsigned long)i > speedsForB.size()) {
3093 0 : continue;
3094 : }
3095 :
3096 14 : RedCapNum = speedsForB(i);
3097 14 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(0.75, CondenserType(RedCapNum));
3098 :
3099 140 : EER = CalculateInterMediateEER(state,
3100 : QAFull,
3101 : OutdoorUnitInletAirDryBulbTempReduced,
3102 14 : CapFTempCurveIndex(RedCapNum),
3103 : CoolingCoilInletAirWetBulbTempRated,
3104 14 : RatedTotalCapacity(RedCapNum),
3105 14 : TotCapFlowModFac(RedCapNum),
3106 14 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
3107 14 : RatedAirVolFlowRate(RedCapNum),
3108 14 : EIRFTempCurveIndex(RedCapNum),
3109 14 : RatedCOP(RedCapNum),
3110 14 : EIRFlowModFac(RedCapNum),
3111 14 : ReducedPLRIEER[2]);
3112 :
3113 14 : if (i == 1) {
3114 7 : EER_BLow = EER; // ?? Check first is low or high
3115 7 : } else if (i == 2) {
3116 7 : EER_BHigh = EER;
3117 : }
3118 : }
3119 : // Do the interpolation for B if required
3120 7 : if (speedsForB.size() == 2) {
3121 7 : B = ((EER_BHigh - EER_BLow) / (ratioArray(speedsForB(2)) - ratioArray(speedsForB(1)))) * (75 - ratioArray(speedsForB(1))) + EER_BLow;
3122 : }
3123 :
3124 : // For C | 50% - ReducedPLRIEER[1]
3125 7 : Real64 EER_CLow(0.0);
3126 7 : Real64 EER_CHigh(0.0);
3127 21 : for (int i = 1; i <= 2; ++i) {
3128 14 : if ((unsigned long)i > speedsForC.size()) {
3129 0 : continue;
3130 : }
3131 :
3132 14 : RedCapNum = speedsForC(i);
3133 14 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(0.50, CondenserType(RedCapNum));
3134 :
3135 140 : EER = CalculateInterMediateEER(state,
3136 : QAFull,
3137 : OutdoorUnitInletAirDryBulbTempReduced,
3138 14 : CapFTempCurveIndex(RedCapNum),
3139 : CoolingCoilInletAirWetBulbTempRated,
3140 14 : RatedTotalCapacity(RedCapNum),
3141 14 : TotCapFlowModFac(RedCapNum),
3142 14 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
3143 14 : RatedAirVolFlowRate(RedCapNum),
3144 14 : EIRFTempCurveIndex(RedCapNum),
3145 14 : RatedCOP(RedCapNum),
3146 14 : EIRFlowModFac(RedCapNum),
3147 14 : ReducedPLRIEER[1]);
3148 :
3149 14 : if (i == 1) {
3150 7 : EER_CLow = EER; // ?? Check first is low or high
3151 7 : } else if (i == 2) {
3152 7 : EER_CHigh = EER;
3153 : }
3154 : }
3155 : // Do the interpolation for C if required
3156 7 : if (speedsForC.size() == 2) {
3157 7 : C = ((EER_CHigh - EER_CLow) / (ratioArray(speedsForC(2)) - ratioArray(speedsForC(1)))) * (50 - ratioArray(speedsForC(1))) + EER_CLow;
3158 : }
3159 :
3160 : // For D | 25% - ReducedPLRIEER[0]
3161 :
3162 7 : RedCapNum = speedsForD(1);
3163 7 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(0.25, CondenserType(RedCapNum));
3164 :
3165 70 : D = CalculateInterMediateEER(state,
3166 : QAFull,
3167 : OutdoorUnitInletAirDryBulbTempReduced,
3168 7 : CapFTempCurveIndex(RedCapNum),
3169 : CoolingCoilInletAirWetBulbTempRated,
3170 7 : RatedTotalCapacity(RedCapNum),
3171 7 : TotCapFlowModFac(RedCapNum),
3172 7 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
3173 7 : RatedAirVolFlowRate(RedCapNum),
3174 7 : EIRFTempCurveIndex(RedCapNum),
3175 7 : RatedCOP(RedCapNum),
3176 7 : EIRFlowModFac(RedCapNum),
3177 7 : ReducedPLRIEER[0]);
3178 :
3179 7 : IEER_2022 = GetIEEREquationResult(A, B, C, D);
3180 7 : EER_2022 = A;
3181 17 : } else if (nsp == 2) {
3182 : // Having 2 Speeds
3183 17 : Real64 QAFull_(0.0);
3184 : // Reversing the input arrays because IEERCalculationTwoSpeed is expecting High Speed Data before the Low Speed.
3185 17 : Array1D<Real64> FanPowerPerEvapAirFlowRateHighAndLow(FanPowerPerEvapAirFlowRate_2023.size()); // Ensure ReversedArray has the same size
3186 17 : std::reverse_copy(
3187 : FanPowerPerEvapAirFlowRate_2023.begin(), FanPowerPerEvapAirFlowRate_2023.end(), FanPowerPerEvapAirFlowRateHighAndLow.begin());
3188 :
3189 17 : Array1D<Real64> RatedAirVolFlowRateHighAndLow(RatedAirVolFlowRate.size());
3190 17 : std::reverse_copy(RatedAirVolFlowRate.begin(), RatedAirVolFlowRate.end(), RatedAirVolFlowRateHighAndLow.begin());
3191 :
3192 17 : Array1D<Real64> RatedCOPHighAndLow(RatedCOP.size());
3193 17 : std::reverse_copy(RatedCOP.begin(), RatedCOP.end(), RatedCOPHighAndLow.begin());
3194 :
3195 17 : Array1D<Real64> RatedTotalCapacityHighAndLow(RatedTotalCapacity.size());
3196 17 : std::reverse_copy(RatedTotalCapacity.begin(), RatedTotalCapacity.end(), RatedTotalCapacityHighAndLow.begin());
3197 :
3198 34 : std::tie(IEER_2022, QAFull_, EER_2022) = IEERCalculationTwoSpeed(state,
3199 : DXCoilType,
3200 : CondenserType,
3201 : CapFTempCurveIndex,
3202 : RatedTotalCapacityHighAndLow,
3203 : CapFFlowCurveIndex, // Only for HIGH SPEED
3204 : FanPowerPerEvapAirFlowRateHighAndLow,
3205 : RatedAirVolFlowRateHighAndLow,
3206 : EIRFTempCurveIndex,
3207 : RatedCOPHighAndLow,
3208 : EIRFFlowCurveIndex // Only for HIGH SPEED
3209 17 : );
3210 17 : } else if (nsp == 1) {
3211 : // NA : The minimum number of speeds for cooling is 2 and the maximum number is 4 for Coil:Cooling:DX:MultiSpeed
3212 : }
3213 60 : return std::make_tuple(IEER_2022, QAFull, EER_2022);
3214 30 : }
3215 :
3216 25 : std::tuple<Real64, Real64, Real64> IEERCalculationTwoSpeed(
3217 : EnergyPlusData &state,
3218 : std::string const &DXCoilType, // Type of DX coil
3219 : Array1D<DataHeatBalance::RefrigCondenserType> const &CondenserType,
3220 : Array1A_int const &CapFTempCurveIndex,
3221 : Array1A<Real64> const &RatedTotalCapacity,
3222 : Array1A_int const &CCapFFlowCurveIndex, // | Only for HIGH SPEED
3223 : Array1A<Real64> const &FanPowerPerEvapAirFlowRateFromInput_2023, // 2023 Rated Fan Power per air volume flow rate through the evaporator coil
3224 : Array1A<Real64> const &RatedAirVolFlowRate,
3225 : Array1A_int const &EIRFTempCurveIndex,
3226 : Array1A<Real64> const &RatedCOP, // Reference coefficient of performance [W/W]
3227 : Array1A_int const &EIRFFlowCurveIndex // | Only for HIGH SPEED
3228 : )
3229 : {
3230 25 : int constexpr nsp = 4; // As IEER Requires EER for at least 4 different Speeds,
3231 : // we'll be carrying out the calculations with low and high speed in such a way that we have
3232 : // A,B,C,D for the required IEER equation. So nsp is initialized as 4 here.
3233 25 : Real64 IEER_2022(0.0);
3234 25 : Real64 EER_2022(0.0);
3235 25 : Real64 QAFull(0.0);
3236 25 : Array1D<Real64> Q_A_Full(nsp); // Total cooling capacity at A2 test condition (High speed) | q_A_Full
3237 25 : Array1D<Real64> FanPowerPerEvapAirFlowRate_2023(nsp); // 2023 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
3238 : // Calculate these for each speed
3239 : // hint : curve index will change, AirFlow rate will remain same
3240 25 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
3241 25 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
3242 25 : Array1D<Real64> TotCapTempModFac(nsp);
3243 25 : Array1D<Real64> NetCoolingCapRated(nsp);
3244 25 : Real64 OutdoorUnitInletAirDryBulbTempReduced(0.0); // Outdoor unit entering air dry-bulb temperature at reduced capacity [C]
3245 25 : Real64 EER(0.0); // Energy Efficiency Rating
3246 25 : Real64 PartLoad(0.0);
3247 : // EER Reduced
3248 25 : Real64 A(0.0); // EER, (Btu/h)/W, at 100% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3249 25 : Real64 B(0.0); // EER, (Btu/h)/W, at 75% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3250 25 : Real64 C(0.0); // EER, (Btu/h)/W, at 50% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3251 25 : Real64 D(0.0); // EER, (Btu/h)/W, at 25% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3252 25 : Array1D<DataHeatBalance::RefrigCondenserType> _condenserType(nsp);
3253 :
3254 125 : for (int spnum = 1; spnum <= nsp; ++spnum) {
3255 100 : FanPowerPerEvapAirFlowRate_2023(spnum) = 0.0;
3256 100 : if (spnum == 1 || spnum == 2) { // First two speeds will have Low Speed Props
3257 50 : if (FanPowerPerEvapAirFlowRateFromInput_2023(2) <= 0.0) {
3258 0 : FanPowerPerEvapAirFlowRate_2023(spnum) = DefaultFanPowerPerEvapAirFlowRateSEER2;
3259 : } else {
3260 50 : FanPowerPerEvapAirFlowRate_2023(spnum) = FanPowerPerEvapAirFlowRateFromInput_2023(2);
3261 : }
3262 50 : _condenserType(spnum) = CondenserType(1);
3263 50 : } else if (spnum == 3 || spnum == 4) {
3264 50 : if (FanPowerPerEvapAirFlowRateFromInput_2023(1) <= 0.0) { // Last two speeds will have High Speed Props
3265 0 : FanPowerPerEvapAirFlowRate_2023(spnum) = DefaultFanPowerPerEvapAirFlowRateSEER2;
3266 : } else {
3267 50 : FanPowerPerEvapAirFlowRate_2023(spnum) = FanPowerPerEvapAirFlowRateFromInput_2023(1);
3268 : }
3269 50 : _condenserType(spnum) = CondenserType(2);
3270 : }
3271 : }
3272 :
3273 : // Calculate QAFull, EIRFlowModeFac & TotCapFlowModFac
3274 125 : for (int spnum = nsp; spnum > 0; --spnum) {
3275 :
3276 100 : if (spnum == 3 || spnum == 4) {
3277 100 : if (DXCoilType == "Coil:Cooling:DX:TwoSpeed") {
3278 16 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CCapFFlowCurveIndex(1), AirMassFlowRatioRated);
3279 16 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(1), AirMassFlowRatioRated);
3280 : } else {
3281 : // Coil:Cooling:DX:MultiSpeed || Coil:Cooling:DX:VariableSpeed
3282 34 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CCapFFlowCurveIndex(2), AirMassFlowRatioRated);
3283 34 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(2), AirMassFlowRatioRated);
3284 : }
3285 50 : } else if (spnum == 1 || spnum == 2) {
3286 50 : if (DXCoilType == "Coil:Cooling:DX:TwoSpeed") {
3287 16 : TotCapFlowModFac(spnum) = 1; // As per IO Reference there are no CCapFFlowCurve for Low Speed | Section ??
3288 16 : EIRFlowModFac(spnum) = 1; // As per IO Reference there are no EIRFFlowCurve for Low Speed | Section ??
3289 : } else {
3290 : // Coil:Cooling:DX:MultiSpeed || Coil:Cooling:DX:VariableSpeed
3291 34 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CCapFFlowCurveIndex(1), AirMassFlowRatioRated);
3292 34 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(1), AirMassFlowRatioRated);
3293 : }
3294 : }
3295 :
3296 100 : if (_condenserType(spnum) == DataHeatBalance::RefrigCondenserType::Air) { // Case: CondenserType is AirCooled
3297 96 : if (spnum == 3 || spnum == 4) {
3298 : // Cooling Coil | Calculate the net cooling capacity at the rated conditions (23.89C(75F) Wet Bulb and 35.0C(95F) Dry Bulb )
3299 100 : if (DXCoilType.find("Cooling") != std::string::npos) {
3300 50 : TotCapTempModFac(spnum) =
3301 50 : Curve::CurveValue(state, CapFTempCurveIndex(1), CoolingCoilInletAirWetBulbTempRated, CoilInletAirCoolDryBulbIEER);
3302 : } else { // Heating Coil | Calculate the net cooling capacity at the rated conditions (6.11C(43F) Wet Bulb and 8.33C(47F) Dry Bulb
3303 : // )
3304 0 : TotCapTempModFac(spnum) =
3305 0 : Curve::CurveValue(state, CapFTempCurveIndex(1), CoilHeatingInletAirWetBulbTempIEER, CoilHeatingInletAirCoolDryBulbIEER);
3306 : }
3307 46 : } else if (spnum == 1 || spnum == 2) {
3308 : // Cooling Coil | Calculate the net cooling capacity at the rated conditions (23.89C(75F) Wet Bulb and 35.0C(95F) Dry Bulb )
3309 46 : if (DXCoilType.find("Cooling") != std::string::npos) {
3310 46 : TotCapTempModFac(spnum) =
3311 46 : Curve::CurveValue(state, CapFTempCurveIndex(2), CoolingCoilInletAirWetBulbTempRated, CoilInletAirCoolDryBulbIEER);
3312 : } else { // Heating Coil | Calculate the net cooling capacity at the rated conditions (6.11C(43F) Wet Bulb and 8.33C(47F) Dry Bulb
3313 : // )
3314 0 : TotCapTempModFac(spnum) =
3315 0 : Curve::CurveValue(state, CapFTempCurveIndex(2), CoilHeatingInletAirWetBulbTempIEER, CoilHeatingInletAirCoolDryBulbIEER);
3316 : }
3317 : }
3318 4 : } else if (_condenserType(spnum) == DataHeatBalance::RefrigCondenserType::Water) { // Case: CondenserType is WaterCooled
3319 : // Calculate the net cooling capacity at the rated conditions (35.0C(95F) Outlet and 29.44C(85F) Inlet )
3320 0 : if (spnum == 3 || spnum == 4) {
3321 0 : TotCapTempModFac(spnum) = Curve::CurveValue(state, CapFTempCurveIndex(1), CoilWaterOutletTempIEER, CoilWaterInletTempIEER);
3322 0 : } else if (spnum == 1 || spnum == 2) {
3323 0 : TotCapTempModFac(spnum) = Curve::CurveValue(state, CapFTempCurveIndex(2), CoilWaterOutletTempIEER, CoilWaterInletTempIEER);
3324 : }
3325 4 : } else if (_condenserType(spnum) == DataHeatBalance::RefrigCondenserType::Evap) { // Case: CondesnerType is EvaporativelyCooled
3326 : // Calculate the net cooling capacity at the rated conditions (23.89C(75F) Wet Bulb and 35.0C(95F) Dry Bulb )
3327 4 : if (spnum == 3 || spnum == 4) {
3328 0 : TotCapTempModFac(spnum) =
3329 0 : Curve::CurveValue(state, CapFTempCurveIndex(1), CoilInletEvapWetBulbTempIEER, CoilInletEvapDryBulbTempIEER);
3330 4 : } else if (spnum == 1 || spnum == 2) {
3331 4 : TotCapTempModFac(spnum) =
3332 4 : Curve::CurveValue(state, CapFTempCurveIndex(2), CoilInletEvapWetBulbTempIEER, CoilInletEvapDryBulbTempIEER);
3333 : }
3334 : }
3335 : // This Will be our QAFull
3336 100 : if (spnum == 3 || spnum == 4) {
3337 100 : NetCoolingCapRated(spnum) = RatedTotalCapacity(1) * TotCapTempModFac(spnum) * TotCapFlowModFac(spnum) -
3338 50 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(1);
3339 50 : } else if (spnum == 1 || spnum == 2) {
3340 100 : NetCoolingCapRated(spnum) = RatedTotalCapacity(2) * TotCapTempModFac(spnum) * TotCapFlowModFac(spnum) -
3341 50 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(2);
3342 : }
3343 100 : Q_A_Full(spnum) = NetCoolingCapRated(spnum);
3344 : }
3345 25 : QAFull = Q_A_Full(nsp);
3346 :
3347 : // RedCapNum : Integer counter for reduced capacity
3348 125 : for (int RedCapNum = nsp; RedCapNum > 0; --RedCapNum) {
3349 :
3350 100 : PartLoad = ReducedPLRIEER[(int)RedCapNum - 1.0];
3351 100 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(PartLoad, _condenserType(RedCapNum));
3352 :
3353 100 : if (RedCapNum == 3 || RedCapNum == 4) {
3354 :
3355 50 : EER = CalculateInterMediateEER(state,
3356 : QAFull,
3357 : OutdoorUnitInletAirDryBulbTempReduced,
3358 50 : CapFTempCurveIndex(1),
3359 : CoolingCoilInletAirWetBulbTempRated,
3360 50 : RatedTotalCapacity(1),
3361 50 : TotCapFlowModFac(RedCapNum),
3362 50 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
3363 50 : RatedAirVolFlowRate(1),
3364 50 : EIRFTempCurveIndex(1),
3365 50 : RatedCOP(1),
3366 50 : EIRFlowModFac(RedCapNum),
3367 : PartLoad);
3368 :
3369 50 : } else if (RedCapNum == 1 || RedCapNum == 2) {
3370 :
3371 50 : EER = CalculateInterMediateEER(state,
3372 : QAFull,
3373 : OutdoorUnitInletAirDryBulbTempReduced,
3374 50 : CapFTempCurveIndex(2),
3375 : CoolingCoilInletAirWetBulbTempRated,
3376 50 : RatedTotalCapacity(2),
3377 50 : TotCapFlowModFac(RedCapNum),
3378 50 : FanPowerPerEvapAirFlowRate_2023(RedCapNum),
3379 50 : RatedAirVolFlowRate(2),
3380 50 : EIRFTempCurveIndex(2),
3381 50 : RatedCOP(2),
3382 50 : EIRFlowModFac(RedCapNum),
3383 : PartLoad);
3384 : }
3385 :
3386 100 : if (PartLoad == 1.00) {
3387 25 : A = EER;
3388 75 : } else if (PartLoad == 0.75) {
3389 25 : B = EER;
3390 50 : } else if (PartLoad == 0.50) {
3391 25 : C = EER;
3392 25 : } else if (PartLoad == 0.25) {
3393 25 : D = EER;
3394 : }
3395 : }
3396 :
3397 25 : IEER_2022 = GetIEEREquationResult(A, B, C, D);
3398 25 : EER_2022 = A;
3399 50 : return std::make_tuple(IEER_2022, QAFull, EER_2022);
3400 25 : }
3401 :
3402 50 : std::tuple<Real64, Real64, Real64> IEERCalculationSingleSpeed(EnergyPlus::EnergyPlusData &state,
3403 : std::string const &DXCoilType, // Type of DX coil for which HSPF is calculated
3404 : const int CapFTempCurveIndex,
3405 : const Real64 RatedTotalCapacity,
3406 : const Real64 TotCapFlowModFac,
3407 : const Real64 FanPowerPerEvapAirFlowRate,
3408 : const Real64 RatedAirVolFlowRate,
3409 : const int EIRFTempCurveIndex,
3410 : const Real64 RatedCOP,
3411 : const Real64 EIRFlowModFac,
3412 : DataHeatBalance::RefrigCondenserType const CondenserType)
3413 : {
3414 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
3415 50 : int constexpr NumOfReducedCap(4); // Number of reduced capacity test conditions (100%,75%,50%,and 25%)
3416 50 : Real64 TotCapTempModFac(0.0); // Total capacity modifier (function of entering wetbulb, outside drybulb) [-]
3417 50 : Real64 OutdoorUnitInletAirDryBulbTempReduced(0.0); // Outdoor unit entering air dry-bulb temperature at reduced capacity [C]
3418 50 : Real64 EERReduced(0.0); // EER at reduced capacity test conditions (100%, 75%, 50%, and 25%)
3419 50 : Real64 IEER = 0.0; // Integareted energy efficiency ratio of single speed DX cooling coil
3420 50 : Real64 NetCoolingCapRated = 0.0; // net cooling capacity of single speed DX cooling coil
3421 50 : Real64 EER2 = 0.0; // EER at high speed
3422 50 : Real64 CoilInletAirWetBulbTemp = 19.44; // 67F
3423 : // EER Reduced
3424 50 : Real64 A(0.0); // EER, (Btu/h)/W, at 100% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3425 50 : Real64 B(0.0); // EER, (Btu/h)/W, at 75% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3426 50 : Real64 C(0.0); // EER, (Btu/h)/W, at 50% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3427 50 : Real64 D(0.0); // EER, (Btu/h)/W, at 25% Capacity at AHRI Standard Rating Conditions (see Table 6)| AHRI Std.340/360-2022(IP)
3428 50 : Real64 QAFull(0.0); // Full Load Net Capacity (Btu/h) | Previously NetCoolingCapRated
3429 :
3430 : // if CondenserType is AirCooled
3431 50 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Air) {
3432 : // Calculate the net cooling capacity at the rated conditions (19.44C(67F) Wet Bulb and 35.0C(95F) Dry Bulb )
3433 38 : if (DXCoilType.find("Cooling") != std::string::npos) {
3434 38 : TotCapTempModFac = Curve::CurveValue(state, CapFTempCurveIndex, CoilInletAirWetBulbTemp, CoilInletAirCoolDryBulbIEER);
3435 : } else {
3436 : TotCapTempModFac =
3437 0 : Curve::CurveValue(state, CapFTempCurveIndex, CoilHeatingInletAirWetBulbTempIEER, CoilHeatingInletAirCoolDryBulbIEER);
3438 : }
3439 : }
3440 : // if CondenserType is WaterCooled
3441 50 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Water) {
3442 : // Calculate the net cooling capacity at the rated conditions (19.44C(67F) Wet Bulb and 29.44C(85F) Dry Bulb )
3443 0 : TotCapTempModFac = Curve::CurveValue(state, CapFTempCurveIndex, CoilInletAirWetBulbTemp, CoilWaterInletTempIEER);
3444 : }
3445 : // if CondesnerType is EvaporativelyCooled
3446 50 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Evap) {
3447 : // Calculate the net cooling capacity at the rated conditions (19.44C(67F) Wet Bulb and 35.0C(95F) Dry Bulb )
3448 12 : TotCapTempModFac = Curve::CurveValue(state, CapFTempCurveIndex, CoilInletAirWetBulbTemp, CoilInletEvapDryBulbTempIEER);
3449 : }
3450 : // This Will be our QAFull
3451 50 : NetCoolingCapRated = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3452 50 : QAFull = NetCoolingCapRated;
3453 :
3454 : // RedCapNum : Integer counter for reduced capacity
3455 250 : for (int RedCapNum = 0; RedCapNum < NumOfReducedCap; ++RedCapNum) {
3456 : // Get the outdoor air dry bulb temperature for the reduced capacity test conditions
3457 200 : OutdoorUnitInletAirDryBulbTempReduced = GetOutdoorUnitInletAirDryBulbTempReduced(ReducedPLRIEER[RedCapNum], CondenserType);
3458 :
3459 200 : EERReduced = CalculateInterMediateEER(state,
3460 : QAFull,
3461 : OutdoorUnitInletAirDryBulbTempReduced,
3462 : CapFTempCurveIndex,
3463 : CoolingCoilInletAirWetBulbTempRated,
3464 : RatedTotalCapacity,
3465 : TotCapFlowModFac,
3466 : FanPowerPerEvapAirFlowRate,
3467 : RatedAirVolFlowRate,
3468 : EIRFTempCurveIndex,
3469 : RatedCOP,
3470 : EIRFlowModFac,
3471 200 : ReducedPLRIEER[RedCapNum]);
3472 :
3473 200 : if (ReducedPLRIEER[RedCapNum] == 1.00) {
3474 50 : A = EERReduced;
3475 150 : } else if (ReducedPLRIEER[RedCapNum] == 0.75) {
3476 50 : B = EERReduced;
3477 100 : } else if (ReducedPLRIEER[RedCapNum] == 0.50) {
3478 50 : C = EERReduced;
3479 50 : } else if (ReducedPLRIEER[RedCapNum] == 0.25) {
3480 50 : D = EERReduced;
3481 : }
3482 : }
3483 50 : IEER = GetIEEREquationResult(A, B, C, D);
3484 50 : EER2 = A;
3485 100 : return std::make_tuple(IEER, QAFull, EER2);
3486 : }
3487 :
3488 96 : Real64 EERSingleSpeedCooling(EnergyPlus::EnergyPlusData &state,
3489 : const int CapFTempCurveIndex,
3490 : const Real64 RatedTotalCapacity,
3491 : const Real64 TotCapFlowModFac,
3492 : const Real64 FanPowerPerEvapAirFlowRate,
3493 : const Real64 RatedAirVolFlowRate,
3494 : const int EIRFTempCurveIndex,
3495 : const Real64 RatedCOP,
3496 : const Real64 EIRFlowModFac)
3497 : {
3498 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
3499 96 : Real64 EER = 0.0; // energy efficiency ratio of single speed DX cooling coil
3500 96 : Real64 TotCapTempModFac(0.0); // Total capacity modifier (function of entering wetbulb, outside drybulb) [-]
3501 96 : Real64 NetCoolingCapRated(0.0); // net cooling capacity of single speed DX cooling coil
3502 96 : Real64 EIRTempModFac(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) [-]
3503 96 : Real64 EIR(0.0); // Energy Efficiency Ratio at AHRI test conditions for SEER [-]
3504 96 : Real64 TotalElecPowerRated(0.0); // Net power consumption (Cond Fan+Compressor+Indoor Fan) at Rated test conditions [W]
3505 : // Calculate the net cooling capacity at the rated conditions (19.44C WB and 35.0C DB )
3506 96 : TotCapTempModFac = Curve::CurveValue(state, CapFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempRated);
3507 96 : NetCoolingCapRated = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3508 : // Calculate Energy Efficiency Ratio (EER) at (19.44C WB and 35.0C DB ), ANSI/AHRI Std. 340/360
3509 96 : EIRTempModFac = Curve::CurveValue(state, EIRFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempRated);
3510 96 : if (RatedCOP > 0.0) {
3511 : // RatedCOP <= 0.0 is trapped in GetInput, but keep this as "safety"
3512 96 : EIR = EIRTempModFac * EIRFlowModFac / RatedCOP;
3513 : } else {
3514 0 : EIR = 0.0;
3515 : }
3516 96 : TotalElecPowerRated = EIR * (RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac) + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3517 96 : if (TotalElecPowerRated > 0.0) {
3518 96 : EER = NetCoolingCapRated / TotalElecPowerRated;
3519 : } else {
3520 0 : EER = 0.0;
3521 : }
3522 96 : return EER;
3523 : }
3524 :
3525 84 : std::tuple<Real64, Real64> SEERSingleStageCalculation(EnergyPlusData &state,
3526 : int CapFTempCurveIndex,
3527 : Real64 RatedTotalCapacity,
3528 : Real64 TotCapFlowModFac,
3529 : int EIRFTempCurveIndex,
3530 : Real64 EIRFlowModFac,
3531 : [[maybe_unused]] int EIRFFlowCurveIndex,
3532 : Real64 RatedCOP,
3533 : Real64 FanPowerPerEvapAirFlowRate,
3534 : Real64 RatedAirVolFlowRate,
3535 : int PLFFPLRCurveIndex,
3536 : Real64 const CyclicDegradationCoefficient)
3537 : {
3538 : // SUBROUTINE INFORMATION:
3539 : // AUTHOR B. Nigusse, FSEC
3540 : // DATE WRITTEN December 2012
3541 : // MODIFIED
3542 : // RE-ENGINEERED Brijendra Singh, D-Alchemy
3543 :
3544 : // PURPOSE OF THIS SUBROUTINE:
3545 : // Calculates the SEER values for single speed based on AHRI 210/230 2017 & 2023
3546 :
3547 : // METHODOLOGY EMPLOYED:
3548 : // na
3549 :
3550 : // REFERENCES:
3551 : // AHRI Standard 340/360 (2022)
3552 :
3553 : // Locals
3554 : // SUBROUTINE ARGUMENT DEFINITIONS:
3555 :
3556 : // SUBROUTINE PARAMETER DEFINITIONS:
3557 :
3558 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
3559 : // SEER calculations:
3560 84 : Real64 TotCapTempModFac(0.0); // Total capacity modifier (function of entering wetbulb, outside drybulb) [-]
3561 84 : Real64 TotCoolingCapAHRI(0.0); // Total Cooling Coil capacity (gross) at AHRI test conditions [W]
3562 84 : Real64 EIRTempModFac(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) [-]
3563 84 : Real64 NetCoolingCapAHRI(0.0); // Net Cooling Coil capacity at AHRI TestB conditions, accounting for fan heat [W]
3564 84 : Real64 EIR(0.0); // Energy Efficiency Ratio at AHRI test conditions for SEER [-]
3565 84 : Real64 TotalElecPower(0.0); // Net power consumption (Cond Fan+Compressor+Indoor Fan) at AHRI test conditions [W]
3566 84 : Real64 PartLoadFactorUser(
3567 : 0.0); // Part load factor based on user-input PLF curve and C_D value that accounts for thermal lag at compressor startup [-]
3568 84 : Real64 PartLoadFactorStandard(
3569 : 0.0); // part-load factor that accounts for the cyclic degradation from AHRI Standard 210/240-2008 default PLF curve and C_D value, [-]
3570 84 : Real64 SEER_User = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil, from user-input PLF curve and C_D value
3571 84 : Real64 SEER_Standard = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil, from user-input PLF curve and C_D value
3572 :
3573 84 : TotCapTempModFac = Curve::CurveValue(state, CapFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTemp);
3574 84 : TotCoolingCapAHRI = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac;
3575 84 : EIRTempModFac = Curve::CurveValue(state, EIRFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTemp);
3576 84 : EIR = (RatedCOP > 0.0) ? EIRTempModFac * EIRFlowModFac / RatedCOP : 0.0;
3577 :
3578 : // Calculate net cooling capacity
3579 84 : NetCoolingCapAHRI = TotCoolingCapAHRI - FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3580 84 : TotalElecPower = EIR * TotCoolingCapAHRI + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3581 : // Calculate SEER value from the Energy Efficiency Ratio (EER) at the AHRI test conditions and the part load factor.
3582 : // First evaluate the Part Load Factor curve at PLR = 0.5 (AHRI Standard 210/240)
3583 84 : PartLoadFactorUser = Curve::CurveValue(state, PLFFPLRCurveIndex, PLRforSEER);
3584 84 : PartLoadFactorStandard = 1.0 - (1 - PLRforSEER) * CyclicDegradationCoefficient;
3585 :
3586 84 : if (TotalElecPower > 0.0) {
3587 84 : SEER_User = (NetCoolingCapAHRI / TotalElecPower) * PartLoadFactorUser;
3588 84 : SEER_Standard = (NetCoolingCapAHRI / TotalElecPower) * PartLoadFactorStandard;
3589 : }
3590 168 : return std::make_tuple(SEER_User, SEER_Standard);
3591 : }
3592 :
3593 48 : std::map<std::string, Real64> SingleSpeedDXCoolingCoilStandardRatings(
3594 : EnergyPlusData &state,
3595 : std::string const &DXCoilName, // Name of DX coil for which HSPF is calculated
3596 : std::string const &DXCoilType, // Type of DX coil - heating or cooling
3597 : int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
3598 : int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
3599 : int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
3600 : int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
3601 : int const PLFFPLRCurveIndex, // Index for the EIR vs part-load ratio curve
3602 : Real64 const RatedTotalCapacity, // Rated gross total cooling capacity
3603 : Real64 const RatedCOP, // Rated gross COP
3604 : Real64 const RatedAirVolFlowRate, // air flow rate through the coil at rated condition
3605 : Real64 const FanPowerPerEvapAirFlowRateFromInput, // 2017 Fan power per air volume flow rate through the evaporator coil
3606 : Real64 const FanPowerPerEvapAirFlowRateFromInput_2023, // 2023 Fan power per air volume flow rate through the evaportor coil
3607 : DataHeatBalance::RefrigCondenserType CondenserType)
3608 : {
3609 : // SUBROUTINE INFORMATION:
3610 : // AUTHOR B. Nigusse, FSEC
3611 : // DATE WRITTEN December 2012
3612 : // MODIFIED
3613 : // RE-ENGINEERED na
3614 :
3615 : // PURPOSE OF THIS SUBROUTINE:
3616 : // Calculates the standard ratings net cooling capacity and, SEER, EER and IEER values for single speed
3617 : // DX cooling coils at the AHRI standard test condition(s).
3618 :
3619 : // METHODOLOGY EMPLOYED:
3620 : // na
3621 :
3622 : // REFERENCES:
3623 : // na
3624 :
3625 : // Using/Aliasing
3626 : using Curve::CurveValue;
3627 :
3628 : // Locals
3629 : // SUBROUTINE ARGUMENT DEFINITIONS:
3630 :
3631 : // SUBROUTINE PARAMETER DEFINITIONS:
3632 :
3633 : // INTERFACE BLOCK SPECIFICATIONS
3634 : // na
3635 :
3636 : // DERIVED TYPE DEFINITIONS
3637 : // na
3638 :
3639 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
3640 48 : Real64 TotCapFlowModFac(0.0); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
3641 48 : Real64 EIRFlowModFac(0.0); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
3642 48 : Real64 TotCapTempModFac(0.0); // Total capacity modifier (function of entering wetbulb, outside drybulb) [-]
3643 : Real64 FanPowerPerEvapAirFlowRate; // 2017 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
3644 : Real64 FanPowerPerEvapAirFlowRate_2023; // 2023 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
3645 :
3646 48 : Real64 NetCoolingCapRated(0.0); // net cooling capacity of single speed DX cooling coil
3647 48 : Real64 SEER_User(0.0); // seasonal energy efficiency ratio of single speed DX cooling coil, from user-input PLF curve and C_D value
3648 48 : Real64 SEER_Standard(0.0); // seasonal energy efficiency ratio of single speed DX cooling coil, from user-input PLF curve and C_D value
3649 48 : Real64 EER(0.0); // energy efficiency ratio of single speed DX cooling coil
3650 48 : Real64 IEER(0.0); // Integareted energy efficiency ratio of single speed DX cooling coil
3651 :
3652 48 : Real64 NetCoolingCapRated2023(0.0); // net cooling capacity of single speed DX cooling coil
3653 48 : Real64 SEER2_User(0.0); // seasonal energy efficiency ratio of single speed DX cooling coil, from user-input PLF curve and C_D value
3654 48 : Real64 SEER2_Standard(0.0); // seasonal energy efficiency ratio of single speed DX cooling coil, from user-input PLF curve and C_D value
3655 48 : Real64 EER_2022(0.0); // energy efficiency ratio of single speed DX cooling coil
3656 48 : Real64 IEER_2022(0.0); // Integrated energy efficiency ratio
3657 :
3658 48 : std::map<std::string, Real64> StandarRatingResults;
3659 : // StandarRatingResults["NetCoolingCapRated"] = NetCoolingCapRated;
3660 : // StandarRatingResults["SEER_User"] = SEER_User;
3661 : // StandarRatingResults["SEER_Standard"] = SEER_Standard;
3662 : // StandarRatingResults["EER"] = EER;
3663 : // StandarRatingResults["IEER"] = IEER;
3664 : // StandarRatingResults["NetCoolingCapRated2023"] = NetCoolingCapRated2023;
3665 : // StandarRatingResults["SEER2_User"] = SEER2_User;
3666 : // StandarRatingResults["SEER2_Standard"] = SEER2_Standard;
3667 : // StandarRatingResults["EER_2022"] = EER_2022;
3668 : // StandarRatingResults["IEER_2022"] = IEER_2022;
3669 :
3670 48 : if (FanPowerPerEvapAirFlowRateFromInput <= 0.0) {
3671 4 : FanPowerPerEvapAirFlowRate = DefaultFanPowerPerEvapAirFlowRate;
3672 : } else {
3673 44 : FanPowerPerEvapAirFlowRate = FanPowerPerEvapAirFlowRateFromInput;
3674 : }
3675 :
3676 48 : if (FanPowerPerEvapAirFlowRateFromInput_2023 <= 0.0) {
3677 4 : FanPowerPerEvapAirFlowRate_2023 = DefaultFanPowerPerEvapAirFlowRateSEER2;
3678 : } else {
3679 44 : FanPowerPerEvapAirFlowRate_2023 = FanPowerPerEvapAirFlowRateFromInput_2023;
3680 : }
3681 :
3682 : // SEER2 standard applies to factory-made Unitary Air-conditioners and Unitary Air-source Heat Pumps with
3683 : // capacities less than 65,000 Btu/h (19049.61955 Watts) | Section 2.1 (ANSI/AHRI 210-240 2023)
3684 48 : if (RatedTotalCapacity > 0.0 && RatedAirVolFlowRate > 0.0) {
3685 : // Standard Rating Cooling (net) Capacity calculations:
3686 48 : TotCapFlowModFac = CurveValue(state, CapFFlowCurveIndex, AirMassFlowRatioRated);
3687 48 : TotCapTempModFac = CurveValue(state, CapFTempCurveIndex, CoolingCoilInletAirWetBulbTempRated, OutdoorUnitInletAirDryBulbTempRated);
3688 : // Net Cooling = Gross Capacity - Fan Power Consumption
3689 48 : NetCoolingCapRated = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3690 96 : StandarRatingResults["NetCoolingCapRated"] = NetCoolingCapRated;
3691 48 : NetCoolingCapRated2023 = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac - FanPowerPerEvapAirFlowRate_2023 * RatedAirVolFlowRate;
3692 96 : StandarRatingResults["NetCoolingCapRated2023"] = NetCoolingCapRated2023;
3693 48 : EIRFlowModFac = Curve::CurveValue(state, EIRFFlowCurveIndex, AirMassFlowRatioRated);
3694 :
3695 : // IEER calculations
3696 : // EER calculations:
3697 48 : EER = EERSingleSpeedCooling(state,
3698 : CapFTempCurveIndex,
3699 : RatedTotalCapacity,
3700 : TotCapFlowModFac,
3701 : FanPowerPerEvapAirFlowRate,
3702 : RatedAirVolFlowRate,
3703 : EIRFTempCurveIndex,
3704 : RatedCOP,
3705 : EIRFlowModFac);
3706 96 : StandarRatingResults["EER"] = EER;
3707 :
3708 : // EER2 calculations:
3709 48 : EER_2022 = EERSingleSpeedCooling(state,
3710 : CapFTempCurveIndex,
3711 : RatedTotalCapacity,
3712 : TotCapFlowModFac,
3713 : FanPowerPerEvapAirFlowRate_2023,
3714 : RatedAirVolFlowRate,
3715 : EIRFTempCurveIndex,
3716 : RatedCOP,
3717 : EIRFlowModFac);
3718 96 : StandarRatingResults["EER_2022"] = EER_2022;
3719 :
3720 : // TODO: Commercial and industrial unitary air-conditioning condensing units with a capacity greater than 135,000 Btu/h (39564.59445
3721 : // Watts) as defined in ANSI/AHRI Standard 365(I-P). | Scope 2.2.6 (ANSI/AHRI 340-360 2022)
3722 :
3723 : // SEER2 standard applies to factory-made Unitary Air-conditioners and Unitary Air-source Heat Pumps with
3724 : // capacities less than 65,000 Btu/h (19049.61955 Watts) | Section 2.1 (ANSI/AHRI 210-240 2023)
3725 : // Removal of water-cooled and evaporatively-cooled products from the scope | Foreword (ANSI/AHRI 210-240 2023)
3726 :
3727 48 : std::tie(SEER_User, SEER_Standard) = SEERSingleStageCalculation(state,
3728 : CapFTempCurveIndex,
3729 : RatedTotalCapacity,
3730 : TotCapFlowModFac,
3731 : EIRFTempCurveIndex,
3732 : EIRFlowModFac,
3733 : EIRFFlowCurveIndex,
3734 : RatedCOP,
3735 : FanPowerPerEvapAirFlowRate,
3736 : RatedAirVolFlowRate,
3737 : PLFFPLRCurveIndex,
3738 48 : CyclicDegradationCoeff);
3739 96 : StandarRatingResults["SEER_User"] = SEER_User;
3740 96 : StandarRatingResults["SEER_Standard"] = SEER_Standard;
3741 48 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Air) {
3742 36 : std::tie(SEER2_User, SEER2_Standard) = SEERSingleStageCalculation(state,
3743 : CapFTempCurveIndex,
3744 : RatedTotalCapacity,
3745 : TotCapFlowModFac,
3746 : EIRFTempCurveIndex,
3747 : EIRFlowModFac,
3748 : EIRFFlowCurveIndex,
3749 : RatedCOP,
3750 : FanPowerPerEvapAirFlowRate_2023,
3751 : RatedAirVolFlowRate,
3752 : PLFFPLRCurveIndex,
3753 36 : CyclicDegradationCoeffSEER2);
3754 72 : StandarRatingResults["SEER2_User"] = SEER2_User;
3755 108 : StandarRatingResults["SEER2_Standard"] = SEER2_Standard;
3756 : }
3757 :
3758 48 : std::tie(IEER, NetCoolingCapRated) = IEERSingleSpeedCooling(state,
3759 : CapFTempCurveIndex,
3760 : RatedTotalCapacity,
3761 : TotCapFlowModFac,
3762 : FanPowerPerEvapAirFlowRate,
3763 : RatedAirVolFlowRate,
3764 : EIRFTempCurveIndex,
3765 : RatedCOP,
3766 48 : EIRFlowModFac);
3767 :
3768 96 : StandarRatingResults["IEER"] = IEER;
3769 96 : StandarRatingResults["NetCoolingCapRated"] = NetCoolingCapRated;
3770 :
3771 : // IEER 2022 Calculations
3772 92 : if (DXCoilType == "Coil:Cooling:DX:SingleSpeed") {
3773 :
3774 44 : std::tie(IEER_2022, NetCoolingCapRated2023, EER_2022) = IEERCalculationSingleSpeed(state,
3775 : DXCoilType,
3776 : CapFTempCurveIndex,
3777 : RatedTotalCapacity,
3778 : TotCapFlowModFac,
3779 : FanPowerPerEvapAirFlowRate_2023,
3780 : RatedAirVolFlowRate,
3781 : EIRFTempCurveIndex,
3782 : RatedCOP,
3783 : EIRFlowModFac,
3784 44 : CondenserType);
3785 88 : StandarRatingResults["IEER_2022"] = IEER_2022;
3786 88 : StandarRatingResults["EER_2022"] = EER_2022;
3787 132 : StandarRatingResults["NetCoolingCapRated2023"] = NetCoolingCapRated2023;
3788 : }
3789 :
3790 : } else {
3791 0 : ShowSevereError(state,
3792 0 : format("Standard Ratings: {} {} has esither zero rated total cooling capacity or zero rated air volume flow rate. "
3793 : "Standard ratings cannot be calculated.",
3794 : DXCoilType,
3795 : DXCoilName));
3796 : }
3797 96 : return StandarRatingResults;
3798 0 : }
3799 :
3800 0 : void DXCoolingCoilDataCenterStandardRatings(
3801 : EnergyPlusData &state,
3802 : std::string const &DXCoilName, // Name of DX coil for which HSPF is calculated
3803 : std::string const &DXCoilType, // Type of DX coil - heating or cooling
3804 : int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
3805 : int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
3806 : int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
3807 : int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
3808 : [[maybe_unused]] int const PLFFPLRCurveIndex, // Index for the EIR vs part-load ratio curve
3809 : Real64 const RatedTotalCapacity, // Rated gross total cooling capacity
3810 : Real64 const RatedCOP, // Rated gross COP
3811 : Real64 const RatedAirVolFlowRate, // air flow rate through the coil at rated condition
3812 : Real64 const FanPowerPerEvapAirFlowRateFromInput, // Fan power per air volume flow rate through the evaporator coil
3813 : Array1D<Real64> &NetCoolingCapRated, // net cooling capacity of single speed DX cooling coil
3814 : Array1D<Real64> &TotElectricPowerRated // total electric power including supply fan
3815 : )
3816 : {
3817 :
3818 : // SUBROUTINE INFORMATION:
3819 : // AUTHOR B. Nigusse, FSEC
3820 : // DATE WRITTEN October 2014
3821 : // MODIFIED
3822 : // RE-ENGINEERED na
3823 :
3824 : // PURPOSE OF THIS SUBROUTINE:
3825 : // Calculates the standard ratings net cooling capacity and total electric power
3826 : // for room unitary air conditioners single speed DX cooling coils.
3827 :
3828 : // METHODOLOGY EMPLOYED:
3829 : // na
3830 :
3831 : // REFERENCES:
3832 : // ANSI/ASHRAE Standard 127-2012 - Method of Testing for Rating Computer and Data Processing
3833 : // Room Unitary Air Conditioners
3834 :
3835 : // Using/Aliasing
3836 : using Curve::CurveValue;
3837 : using Psychrometrics::PsyTwbFnTdbWPb;
3838 : using Psychrometrics::PsyWFnTdpPb;
3839 :
3840 : // Locals
3841 : // SUBROUTINE ARGUMENT DEFINITIONS:
3842 : // na
3843 :
3844 : // SUBROUTINE PARAMETER DEFINITIONS:
3845 : // na
3846 :
3847 : // INTERFACE BLOCK SPECIFICATIONS
3848 : // na
3849 :
3850 : // DERIVED TYPE DEFINITIONS
3851 : // na
3852 :
3853 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
3854 0 : Real64 TotCapFlowModFac(0.0); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
3855 0 : Real64 EIRFlowModFac(0.0); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
3856 0 : Real64 TotCapTempModFac(0.0); // Total capacity modifier (function of entering wetbulb, outside drybulb) [-]
3857 0 : Real64 EIRTempModFac(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) [-]
3858 0 : Real64 TotCoolingCapRated(0.0); // Total Cooling Coil capacity (gross) at one of the rated test conditions [W]
3859 0 : Real64 EIR(0.0); // Energy Efficiency Ratio at AHRI test conditions for SEER [-]
3860 : Real64 FanPowerPerEvapAirFlowRate; // Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
3861 :
3862 : Real64 TWBIndoor; // indoor air dry bulb temperature
3863 : Real64 TDBOutdoor; // outdor air dry bulb temperature
3864 :
3865 0 : if (FanPowerPerEvapAirFlowRateFromInput <= 0.0) {
3866 0 : FanPowerPerEvapAirFlowRate = DefaultFanPowerPerEvapAirFlowRate;
3867 : } else {
3868 0 : FanPowerPerEvapAirFlowRate = FanPowerPerEvapAirFlowRateFromInput;
3869 : }
3870 0 : if (RatedTotalCapacity > 0.0) {
3871 : int Num; // text number counter
3872 :
3873 0 : for (int ClassNum = 1; ClassNum <= 4; ++ClassNum) {
3874 0 : TWBIndoor = PsyTwbFnTdbWPb(state,
3875 0 : IndoorDBTempClassI2IV[ClassNum - 1],
3876 0 : PsyWFnTdpPb(state, IndoorTDPA2D, state.dataEnvrn->StdBaroPress),
3877 0 : state.dataEnvrn->StdBaroPress);
3878 0 : for (int TestNum = 1; TestNum <= 4; ++TestNum) {
3879 0 : TDBOutdoor = OutdoorDBTempAllClassA2D[TestNum - 1];
3880 0 : Num = (ClassNum - 1) * 4 + TestNum;
3881 : // Standard Rating Net Cooling Capacity at Test A:
3882 0 : TotCapFlowModFac = CurveValue(state, CapFFlowCurveIndex, AirMassFlowRatioRated);
3883 0 : TotCapTempModFac = CurveValue(state, CapFTempCurveIndex, TWBIndoor, TDBOutdoor);
3884 0 : TotCoolingCapRated = RatedTotalCapacity * TotCapTempModFac * TotCapFlowModFac;
3885 0 : NetCoolingCapRated(Num) = TotCoolingCapRated - FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3886 : // Standard Rating total electric power at Test A:
3887 0 : EIRTempModFac = CurveValue(state, EIRFTempCurveIndex, TWBIndoor, TDBOutdoor);
3888 0 : EIRFlowModFac = CurveValue(state, EIRFFlowCurveIndex, AirMassFlowRatioRated);
3889 0 : EIR = 0.0;
3890 0 : if (RatedCOP > 0.0) {
3891 0 : EIR = EIRTempModFac * EIRFlowModFac / RatedCOP;
3892 : }
3893 : // Calculate net cooling capacity at Test A:
3894 0 : TotElectricPowerRated(Num) = EIR * TotCoolingCapRated + FanPowerPerEvapAirFlowRate * RatedAirVolFlowRate;
3895 : }
3896 : }
3897 : } else {
3898 0 : ShowSevereError(state,
3899 0 : format("Standard Ratings: {} {} has zero rated total cooling capacity. Capacity and Power cannot be calculated.",
3900 : DXCoilType,
3901 : DXCoilName));
3902 : }
3903 0 : }
3904 :
3905 18 : std::tuple<Real64, Real64, Real64, Real64> MultiSpeedDXCoolingCoilSEER(EnergyPlusData &state,
3906 : int const nsp,
3907 : Array1A_int const CapFFlowCurveIndex,
3908 : Array1A<Real64> const RatedTotalCapacity,
3909 : Array1A_int const CapFTempCurveIndex,
3910 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput,
3911 : Array1A<Real64> const RatedAirVolFlowRate,
3912 : Array1A_int const EIRFFlowCurveIndex,
3913 : Array1A<Real64> const RatedCOP,
3914 : Array1A_int EIRFTempCurveIndex,
3915 : Array1A_int const PLFFPLRCurveIndex)
3916 : {
3917 : // Intermediate values calculated from the inputs in the idf file
3918 18 : Array1D<Real64> FanPowerPerEvapAirFlowRate(nsp); // 2017 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
3919 18 : Array1D<Real64> TotCoolCapTestA2(nsp); // Total cooling capacity at A2 test condition (High speed)
3920 18 : Array1D<Real64> TotCoolCapTestB2(nsp); // Total cooling capacity at B2 test condition (High speed)
3921 18 : Array1D<Real64> TotCoolCapTestB1(nsp); // Total cooling capacity at B1 test condition (Low speed)
3922 18 : Array1D<Real64> TotCoolCapTestF1(nsp); // Total cooling capacity at F1 test condition (Low speed)
3923 18 : Array1D<Real64> OutdoorUnitPowerTestA2(nsp); // Outdoor Unit electric power at A2 test condition (High speed)
3924 18 : Array1D<Real64> OutdoorUnitPowerTestB2(nsp); // Outdoor Unit electric power at B2 test condition (High speed)
3925 18 : Array1D<Real64> OutdoorUnitPowerTestB1(nsp); // Outdoor Unit electric power at B1 test condition (Low speed)
3926 18 : Array1D<Real64> OutdoorUnitPowerTestF1(nsp); // Outdoor Unit electric power at F1 test condition
3927 :
3928 18 : Real64 PartLoadRatio(0.0); // compressor cycling ratio between successive speeds, [-]
3929 18 : Real64 PartLoadFactorUser(0.0); // part-load factor based on user-input PLF curve and C_D value that accounts for the cyclic degradation, [-]
3930 18 : Real64 PartLoadFactorStandard(
3931 : 0.0); // part-load factorn that accounts for the cyclic degradation from AHRI standard 210/240 default PLF curve and C_D value, [-]
3932 18 : Real64 NetCoolingCapWeighted(0.0); // net tot cooling cap weighted by the fraction of the binned cooling hours [W]
3933 18 : Real64 TotCoolingElecPowerWeighted(0.0); // net total cooling electric power input weighted by the fraction of the temperature bins
3934 18 : Real64 TotCoolingElecPowerWeightedDefault(0.0); // net total cooling electric power input weighted by the fraction of the temperature bins
3935 : // from AHRI 201/240 default PLF curve and C_D value,
3936 :
3937 : // binned cooling hours
3938 18 : Real64 BuildingCoolingLoad(0.0); // Building space cooling load corresponding to an outdoor bin temperature [W]
3939 18 : Real64 NetTotCoolCapBinned(0.0); // Net tot cooling cap corresponding to an outdoor bin temperature [W]
3940 18 : Real64 TotCoolElecPowerBinned(0.0); // Total cooling electric power corresponding to an outdoor bin temperature [W]
3941 18 : Real64 TotCoolElecPowerBinnedDefault(
3942 : 0.0); // Total cooling electric power corresponding to an outdoor bin temperature from AHRI 201/240 default PLF curve and C_D value, [W]
3943 18 : Real64 LoadFactor(0.0); // "on" time for last stage at the desired reduced capacity, (dimensionless)
3944 :
3945 : int BinNum; // bin number counter
3946 18 : Array1D<Real64> NetCoolingCapRated(nsp); // net cooling capacity at each speed
3947 18 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
3948 18 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
3949 18 : Real64 CoolingCapacityLS(0.0); // cooling capacity of Mult-speed DX coil at lower speed, [W]
3950 18 : Real64 CoolingCapacityHS(0.0); // cooling capacity of Mult-speed DX coil at higher speed, [W]
3951 18 : Real64 CoolingElecPowerLS(0.0); // outdoor unit electric power input at low speed, [W]
3952 18 : Real64 CoolingElecPowerHS(0.0); // outdoor unit electric power input at high speed, [W]
3953 18 : Real64 CoolingCapacityMax(0.0); // cooling capacity of Mult-speed DX coil at max speed, [W]
3954 18 : Real64 CoolingElecPowerMax(0.0); // outdoor unit electric power input at Max speed, [W]
3955 :
3956 18 : Real64 constexpr SizingFactor(1.10); // sizing factor per AHRI Std 210/240-2008
3957 :
3958 18 : Real64 NetCoolingCapRatedMaxSpeed = 0.0;
3959 18 : Real64 SEER_User = 0.0;
3960 18 : Real64 SEER_Standard = 0.0;
3961 18 : Real64 EER = 0.0;
3962 :
3963 18 : NetCoolingCapWeighted = 0.0;
3964 18 : TotCoolingElecPowerWeighted = 0.0;
3965 18 : TotCoolingElecPowerWeightedDefault = 0.0;
3966 :
3967 61 : for (int spnum = 1; spnum <= nsp; ++spnum) {
3968 43 : FanPowerPerEvapAirFlowRate(spnum) = 0.0;
3969 43 : if (FanPowerPerEvapAirFlowRateFromInput(spnum) <= 0.0) {
3970 2 : FanPowerPerEvapAirFlowRate(spnum) = DefaultFanPowerPerEvapAirFlowRate;
3971 : } else {
3972 41 : FanPowerPerEvapAirFlowRate(spnum) = FanPowerPerEvapAirFlowRateFromInput(spnum);
3973 : }
3974 : }
3975 :
3976 : // Calculate the capacity and power for each speed
3977 61 : for (int spnum = 1; spnum <= nsp; ++spnum) {
3978 43 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, static_cast<int64_t>(CapFFlowCurveIndex(spnum)), AirMassFlowRatioRated);
3979 86 : TotCoolCapTestA2(spnum) =
3980 43 : RatedTotalCapacity(spnum) *
3981 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
3982 43 : TotCapFlowModFac(spnum) -
3983 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
3984 :
3985 86 : TotCoolCapTestB2(spnum) =
3986 43 : RatedTotalCapacity(spnum) *
3987 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) *
3988 43 : TotCapFlowModFac(spnum) -
3989 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
3990 :
3991 86 : TotCoolCapTestB1(spnum) =
3992 43 : RatedTotalCapacity(spnum) *
3993 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) *
3994 43 : TotCapFlowModFac(spnum) -
3995 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
3996 :
3997 86 : TotCoolCapTestF1(spnum) =
3998 43 : RatedTotalCapacity(spnum) *
3999 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) *
4000 43 : TotCapFlowModFac(spnum) -
4001 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
4002 :
4003 43 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
4004 43 : if (RatedCOP(spnum) > 0.0) {
4005 86 : OutdoorUnitPowerTestA2(spnum) =
4006 43 : TotCoolCapTestA2(spnum) * EIRFlowModFac(spnum) *
4007 86 : Curve::CurveValue(
4008 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) /
4009 43 : RatedCOP(spnum) +
4010 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
4011 :
4012 86 : OutdoorUnitPowerTestB2(spnum) =
4013 43 : TotCoolCapTestB2(spnum) * EIRFlowModFac(spnum) *
4014 86 : Curve::CurveValue(
4015 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) /
4016 43 : RatedCOP(spnum) +
4017 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
4018 :
4019 86 : OutdoorUnitPowerTestB1(spnum) =
4020 43 : TotCoolCapTestB1(spnum) * EIRFlowModFac(spnum) *
4021 86 : Curve::CurveValue(
4022 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) /
4023 43 : RatedCOP(spnum) +
4024 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
4025 :
4026 43 : OutdoorUnitPowerTestF1(spnum) =
4027 43 : TotCoolCapTestF1(spnum) * EIRFlowModFac(spnum) *
4028 86 : Curve::CurveValue(
4029 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) /
4030 43 : RatedCOP(spnum) +
4031 43 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
4032 : }
4033 : }
4034 : // Standard Rating cooling (net) capacity calculations:
4035 18 : NetCoolingCapRated(nsp) = TotCoolCapTestA2(nsp);
4036 18 : NetCoolingCapRatedMaxSpeed = NetCoolingCapRated(nsp);
4037 :
4038 : // EER2 calculation | Section 3.1.16(AHRI 210/240 2017)
4039 : // A ratio of the cooling capacity in Btu/h to the Total Power in watts at AFull test conditions and expressed in Btu/(W-h)
4040 : // In case of Coil:Cooling:DX:MultiSpeed coil we're picking the max speed.
4041 18 : EER = TotCoolCapTestA2(nsp) / OutdoorUnitPowerTestA2(nsp);
4042 :
4043 : // Calculate the SEER value based on contribution of each outdoor air bin temperature
4044 162 : for (BinNum = 0; BinNum < NumOfOATempBins; ++BinNum) {
4045 : // Equation 11.60 (AHRI-2017)
4046 144 : BuildingCoolingLoad = (OutdoorBinTemperatureSEER[BinNum] - 18.3) / (35.0 - 18.3) * (TotCoolCapTestA2(nsp) / SizingFactor);
4047 : // determine the speed number
4048 144 : CoolingCapacityMax = TotCoolCapTestB2(nsp) + ((TotCoolCapTestA2(nsp) - TotCoolCapTestB2(nsp)) /
4049 144 : (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4050 144 : (OutdoorBinTemperatureSEER[BinNum] - OutdoorCoilInletAirDryBulbTempTestB2);
4051 144 : CoolingElecPowerMax = OutdoorUnitPowerTestB2(nsp) + ((OutdoorUnitPowerTestA2(nsp) - OutdoorUnitPowerTestB2(nsp)) /
4052 144 : (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4053 144 : (OutdoorBinTemperatureSEER[BinNum] - OutdoorCoilInletAirDryBulbTempTestB2);
4054 :
4055 160 : for (int spnum = 1; spnum <= nsp - 1; ++spnum) {
4056 160 : CoolingCapacityLS = TotCoolCapTestF1(spnum) + ((TotCoolCapTestB1(spnum) - TotCoolCapTestF1(spnum)) /
4057 160 : (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
4058 160 : (OutdoorBinTemperatureSEER[BinNum] - OutdoorCoilInletAirDryBulbTempTestF1);
4059 160 : CoolingElecPowerLS = OutdoorUnitPowerTestF1(spnum) + ((OutdoorUnitPowerTestB1(spnum) - OutdoorUnitPowerTestF1(spnum)) /
4060 160 : (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
4061 160 : (OutdoorBinTemperatureSEER[BinNum] - OutdoorCoilInletAirDryBulbTempTestF1);
4062 160 : CoolingCapacityHS = TotCoolCapTestB2(spnum + 1) + ((TotCoolCapTestA2(spnum + 1) - TotCoolCapTestB2(spnum + 1)) /
4063 160 : (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4064 160 : (OutdoorBinTemperatureSEER[BinNum] - OutdoorCoilInletAirDryBulbTempTestB2);
4065 160 : CoolingElecPowerHS =
4066 160 : OutdoorUnitPowerTestB2(spnum + 1) + ((OutdoorUnitPowerTestA2(spnum + 1) - OutdoorUnitPowerTestB2(spnum + 1)) /
4067 160 : (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4068 160 : (OutdoorBinTemperatureSEER[BinNum] - OutdoorCoilInletAirDryBulbTempTestB2);
4069 :
4070 160 : if (BuildingCoolingLoad <= CoolingCapacityLS) {
4071 64 : PartLoadRatio = min(1.0, BuildingCoolingLoad / CoolingCapacityLS);
4072 64 : NetTotCoolCapBinned = PartLoadRatio * CoolingCapacityLS;
4073 64 : PartLoadFactorUser = Curve::CurveValue(state, PLFFPLRCurveIndex(spnum), PartLoadRatio);
4074 64 : PartLoadFactorStandard = 1.0 - CyclicDegradationCoeff * (1.0 - PartLoadRatio);
4075 64 : TotCoolElecPowerBinned = (PartLoadRatio / PartLoadFactorUser) * CoolingElecPowerLS;
4076 64 : TotCoolElecPowerBinnedDefault = (PartLoadRatio / PartLoadFactorStandard) * CoolingElecPowerLS;
4077 64 : goto SpeedLoop_exit;
4078 96 : } else if (BuildingCoolingLoad < CoolingCapacityHS) {
4079 : // cycle between speed "spnum" and "spnum + 1"
4080 62 : LoadFactor = min(1.0, (CoolingCapacityHS - BuildingCoolingLoad) / (CoolingCapacityHS - CoolingCapacityLS));
4081 62 : LoadFactor = max(0.0, LoadFactor);
4082 62 : NetTotCoolCapBinned = LoadFactor * CoolingCapacityLS + (1.0 - LoadFactor) * CoolingCapacityHS;
4083 62 : TotCoolElecPowerBinned = LoadFactor * CoolingElecPowerLS + (1.0 - LoadFactor) * CoolingElecPowerHS;
4084 62 : TotCoolElecPowerBinnedDefault = TotCoolElecPowerBinned;
4085 :
4086 : // TBD: // Suggestion for improvement as per 2017 Standard MCQ & MCE are differently calculated
4087 : // and so does the load factor for Cooling and Power
4088 : // Real64 LoadFactorQEnt_2023 =
4089 : // min(1.0, (TotCoolCapTestEint(spnum2023) - CoolingCapacityLS_2023) / (CoolingCapacityHS_2023 - CoolingCapacityLS_2023));
4090 : // LoadFactorQEnt_2023 = max(0.0, LoadFactorQEnt_2023);
4091 : // Real64 LoadFactorPEnt_2023 = min(
4092 : // 1.0, (OutdoorUnitPowerTestEint(spnum2023) - CoolingElecPowerLS_2023) / (CoolingElecPowerHS_2023 -
4093 : // CoolingElecPowerLS_2023));
4094 : // LoadFactorPEnt_2023 = max(0.0, LoadFactorPEnt_2023);
4095 :
4096 : // NetTotCoolCapBinned_2023 = LoadFactorQEnt_2023 * CoolingCapacityHS_2023 + (1.0 - LoadFactorQEnt_2023) * CoolingCapacityLS_2023;
4097 : // TotCoolElecPowerBinned_2023 =
4098 : // LoadFactorPEnt_2023 * CoolingElecPowerHS_2023 + (1.0 - LoadFactorPEnt_2023) * CoolingElecPowerLS_2023;
4099 : // TotCoolElecPowerBinnedDefault_2023 = TotCoolElecPowerBinned_2023;
4100 62 : goto SpeedLoop_exit;
4101 34 : } else if (BuildingCoolingLoad >= CoolingCapacityMax) {
4102 18 : NetTotCoolCapBinned = CoolingCapacityMax;
4103 18 : TotCoolElecPowerBinned = CoolingElecPowerMax;
4104 18 : TotCoolElecPowerBinnedDefault = CoolingElecPowerMax;
4105 18 : goto SpeedLoop_exit;
4106 : }
4107 : }
4108 0 : SpeedLoop_exit:;
4109 :
4110 144 : NetCoolingCapWeighted += NetTotCoolCapBinned * CoolFracBinHoursAtOutdoorBinTemp[BinNum];
4111 144 : TotCoolingElecPowerWeighted += TotCoolElecPowerBinned * CoolFracBinHoursAtOutdoorBinTemp[BinNum];
4112 144 : TotCoolingElecPowerWeightedDefault += TotCoolElecPowerBinnedDefault * CoolFracBinHoursAtOutdoorBinTemp[BinNum];
4113 : }
4114 18 : SEER_User = 0.0;
4115 18 : SEER_Standard = 0.0;
4116 18 : if (TotCoolingElecPowerWeighted > 0.0) {
4117 18 : SEER_User = NetCoolingCapWeighted / TotCoolingElecPowerWeighted;
4118 18 : SEER_Standard = NetCoolingCapWeighted / TotCoolingElecPowerWeightedDefault;
4119 : }
4120 :
4121 36 : return std::make_tuple(NetCoolingCapRatedMaxSpeed, SEER_User, SEER_Standard, EER);
4122 18 : }
4123 :
4124 112 : std::pair<Real64, int> GetMatchingSpeedFromBuildingLoad(Real64 buildingLoad, const Array1A<Real64> &speedList)
4125 : {
4126 112 : std::pair<int, Real64> result = {-1, -1}; // Initialize result to indicate no suitable number found
4127 513 : for (int i = 0; i < speedList.isize(); ++i) {
4128 508 : Real64 scaledSpeed = speedList[i];
4129 508 : if (scaledSpeed >= buildingLoad) {
4130 107 : result = {speedList[i], i};
4131 107 : break;
4132 : }
4133 : }
4134 112 : return result;
4135 : }
4136 :
4137 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
4138 : // q - total bin capacity for SEER2 Standard.
4139 : // e - total bin energy for SEER2 Standard.
4140 : // NetTotCoolCapBinned_2023 - total bin capacity for SEER2 User.
4141 : // TotCoolElecPowerBinned_2023 - total bin energy for SEER2 Standard.
4142 : std::tuple<Real64, Real64, Real64, Real64>
4143 157 : IntermediateCapacityAndPowerSEER2Case1(EnergyPlusData &state, Real64 bl, Real64 q_low, Real64 n, Real64 p_low, int PLFFPLRCurveIndex)
4144 : {
4145 : // Case I. Building load is less than Low Stage capacity, BL(tj) < qLow(tj). Calculate total bin capacity by using Equation 11.73
4146 : // and total bin energy by using Equation 11.74.
4147 157 : Real64 e(0.0);
4148 157 : Real64 q(0.0);
4149 157 : Real64 NetTotCoolCapBinned_2023(0.0);
4150 157 : Real64 TotCoolElecPowerBinned_2023(0.0);
4151 157 : Real64 clf_low = bl / q_low; // Equation 11.75 (AHRI-2023)
4152 :
4153 : // SEER2 STANDARD
4154 157 : Real64 plf_low = 1.0 - CyclicDegradationCoeff * (1.0 - clf_low); // Equation 11.76 (AHRI-2023)
4155 157 : q = clf_low * q_low * n; // Total Bin Capacity, Equation 11.73 (AHRI-2023)
4156 157 : e = clf_low * p_low * n / plf_low; // Total Bin Energy, Equation 11.74 (AHRI-2023)
4157 :
4158 : // SEER2 USER
4159 157 : NetTotCoolCapBinned_2023 = clf_low * q_low * n;
4160 157 : Real64 PartLoadFactorUser_2023 = Curve::CurveValue(state, PLFFPLRCurveIndex, clf_low);
4161 157 : TotCoolElecPowerBinned_2023 = (clf_low / PartLoadFactorUser_2023) * p_low * n;
4162 314 : return std::make_tuple(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023);
4163 : }
4164 :
4165 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed & full
4166 : // Speed
4167 : // q - total bin capacity for SEER2 Standard.
4168 : // e - total bin energy for SEER2 Standard.
4169 : // NetTotCoolCapBinned_2023 - total bin capacity for SEER2 User.
4170 : // TotCoolElecPowerBinned_2023 - total bin energy for SEER2 Standard.
4171 92 : std::tuple<Real64, Real64, Real64, Real64> IntermediateCapacityAndPowerSEER2Case2A(
4172 : Real64 p_int, Real64 q_int, Real64 q_low, Real64 bl, Real64 n, Real64 Q_E_Int, Real64 q_full, Real64 P_E_Int, Real64 p_full, Real64 p_low)
4173 : {
4174 92 : Real64 e(0.0);
4175 92 : Real64 q(0.0);
4176 :
4177 92 : Real64 cop_low = q_low / p_low;
4178 92 : Real64 cop_int = q_int / p_int;
4179 92 : Real64 cop_full = q_full / p_full; // About half of the variables in this function are unused
4180 : // Low Speed
4181 92 : Real64 cop_int_bin = cop_low + (cop_int - cop_low) / (q_int - q_low) * (bl - q_low); // Equation 11.101 (AHRI-2023)
4182 92 : q = bl * n; // 11.92 --> n is missing in the print ?
4183 92 : e = q / cop_int_bin; // 11.93 --> adjusted to 11.101
4184 92 : Real64 NetTotCoolCapBinned_2023(0.0);
4185 92 : Real64 TotCoolElecPowerBinned_2023(0.0);
4186 : // full Speed
4187 92 : Real64 LoadFactorQEnt_2023 = min(1.0, (Q_E_Int - q_low) / (q_full - q_low));
4188 92 : LoadFactorQEnt_2023 = max(0.0, LoadFactorQEnt_2023);
4189 92 : Real64 LoadFactorPEnt_2023 = min(1.0, (P_E_Int - p_low) / (p_full - p_low));
4190 92 : LoadFactorPEnt_2023 = max(0.0, LoadFactorPEnt_2023);
4191 92 : NetTotCoolCapBinned_2023 = LoadFactorQEnt_2023 * q_full + (1.0 - LoadFactorQEnt_2023) * q_low;
4192 92 : TotCoolElecPowerBinned_2023 = LoadFactorPEnt_2023 * p_full + (1.0 - LoadFactorPEnt_2023) * p_low;
4193 184 : return std::make_tuple(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023);
4194 : }
4195 :
4196 : // Building load can be matched by modulating the compressor speed between low speed &
4197 : // full Speed |Section 11.2.1.3.2 CASE 2 (AHRI 210-240 2023)
4198 : // q - total bin capacity for SEER2 Standard.
4199 : // e - total bin energy for SEER2 Standard.
4200 : // NetTotCoolCapBinned_2023 - total bin capacity for SEER2 User.
4201 : // TotCoolElecPowerBinned_2023 - total bin energy for SEER2 Standard.
4202 89 : std::tuple<Real64, Real64, Real64, Real64> IntermediateCapacityAndPowerSEER2Case2B(
4203 : Real64 p_int, Real64 bl, Real64 q_int, Real64 n, Real64 Q_E_Int, Real64 P_E_Int, Real64 q_low, Real64 p_low, Real64 q_full, Real64 p_full)
4204 : {
4205 89 : Real64 e(0.0);
4206 89 : Real64 q(0.0);
4207 89 : Real64 NetTotCoolCapBinned_2023(0.0);
4208 89 : Real64 TotCoolElecPowerBinned_2023(0.0);
4209 89 : Real64 cop_low = q_low / p_low;
4210 89 : Real64 cop_int = q_int / p_int;
4211 89 : Real64 cop_full = q_full / p_full;
4212 89 : Real64 LoadFactorQEnt_2023 = min(1.0, (Q_E_Int - q_low) / (q_full - q_low));
4213 89 : LoadFactorQEnt_2023 = max(0.0, LoadFactorQEnt_2023);
4214 89 : Real64 LoadFactorPEnt_2023 = min(1.0, (P_E_Int - p_low) / (p_full - p_low));
4215 89 : LoadFactorPEnt_2023 = max(0.0, LoadFactorPEnt_2023);
4216 89 : NetTotCoolCapBinned_2023 = LoadFactorQEnt_2023 * q_full + (1.0 - LoadFactorQEnt_2023) * q_low;
4217 89 : TotCoolElecPowerBinned_2023 = LoadFactorPEnt_2023 * p_full + (1.0 - LoadFactorPEnt_2023) * p_low;
4218 : // Full Speed
4219 89 : Real64 cop_int_bin = cop_int + (cop_full - cop_int) / (q_full - q_int) * (bl - q_int); // Equation 11.102 (AHRI-2023)
4220 89 : q = bl * n; // 11.92 --> n is missing in the print ?
4221 89 : e = q / cop_int_bin; // 11.93 --> adjusted to 11.102
4222 178 : return std::make_tuple(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023);
4223 : }
4224 :
4225 : // Section 11.2.1.3.3 CASE 3 - Building load is equal to or greater than unit capacity at full stage
4226 : // q - total bin capacity for SEER2 Standard.
4227 : // e - total bin energy for SEER2 Standard.
4228 : // NetTotCoolCapBinned_2023 - total bin capacity for SEER2 User.
4229 : // TotCoolElecPowerBinned_2023 - total bin energy for SEER2 Standard.
4230 : std::tuple<Real64, Real64, Real64, Real64>
4231 41 : IntermediateCapacityAndPowerSEER2Case3(Real64 q_full, Real64 p_full, Real64 CoolingCapacityMax_2023, Real64 CoolingElecPowerMax_2023, Real64 n)
4232 : {
4233 41 : Real64 e(0.0);
4234 41 : Real64 q(0.0);
4235 41 : q = q_full * n; // Equation 11.88 (AHRI-2023)
4236 41 : e = p_full * n; // Equation 11.89 (AHRI-2023)
4237 41 : Real64 NetTotCoolCapBinned_2023(0.0);
4238 41 : Real64 TotCoolElecPowerBinned_2023(0.0);
4239 41 : NetTotCoolCapBinned_2023 = CoolingCapacityMax_2023 * n;
4240 41 : TotCoolElecPowerBinned_2023 = CoolingElecPowerMax_2023 * n;
4241 82 : return std::make_tuple(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023);
4242 : }
4243 :
4244 : // N_Cq - Capacity adjustment factor in cooling mode SEER2 #1
4245 : // M_Cq - Capacity adjustment factor in cooling mode SEER2 #2
4246 : std::tuple<Real64, Real64>
4247 464 : CapacityAdjustmentFactorsInCoolingModeSEER2(Real64 q_F_low, Real64 q_B_low, Real64 BN, Real64 q_B_full, Real64 q_A_full, Real64 q_E_int)
4248 : {
4249 : // Equation 11.90 (AHRI-2023)
4250 464 : Real64 q_87_low = q_F_low + (q_B_low - q_F_low) * ((OutdoorBinTemperatureSEER[BN] - 19.44 / 27.77 - 19.44));
4251 464 : Real64 q_87_full = q_B_full + (q_A_full - q_B_full) * ((OutdoorBinTemperatureSEER[BN] - 19.44 / 27.77 - 19.44));
4252 : // Equation 11.96 (AHRI-2023)
4253 464 : Real64 N_Cq = (q_E_int - q_87_low) / (q_87_full - q_87_low);
4254 : // Equation 11.95 (AHRI-2023)
4255 464 : Real64 M_Cq = (q_B_low - q_F_low) / (27.77 - 19.44) * (1. - N_Cq) + (q_A_full - q_B_full) / (35.0 - 27.77) * N_Cq;
4256 928 : return std::make_tuple(N_Cq, M_Cq);
4257 : }
4258 :
4259 : // N_CE - Energy adjustment factor in cooling mode SEER2 #1
4260 : // M_CE - Energy adjustment factor in cooling mode SEER2 #2
4261 : std::tuple<Real64, Real64>
4262 464 : EnergyAdjustmentFactorsInCoolingModeSEER2(Real64 p_F_low, Real64 p_B_low, Real64 BN, Real64 p_B_full, Real64 p_A_full, Real64 p_E_int)
4263 : {
4264 : // Equation 11.91 (AHRI-2023)
4265 464 : Real64 p_87_low = p_F_low + (p_B_low - p_F_low) * ((OutdoorBinTemperatureSEER[BN] - 19.44 / 27.77 - 19.44));
4266 464 : Real64 p_87_full = p_B_full + (p_A_full - p_B_full) * ((OutdoorBinTemperatureSEER[BN] - 19.44 / 27.77 - 19.44));
4267 :
4268 : // Equation 11.99 (AHRI-2023)
4269 464 : Real64 N_CE = (p_E_int - p_87_low) / (p_87_full - p_87_low);
4270 :
4271 : // Equaition 11.98 (AHRI-2023)
4272 464 : Real64 M_CE = (p_B_low - p_F_low) / (27.77 - 19.44) * (1. - N_CE) + (p_A_full - p_B_full) / (35.0 - 27.77) * N_CE;
4273 928 : return std::make_tuple(N_CE, M_CE);
4274 : }
4275 :
4276 : // q_int - Intermediate Steady State Capacity SEER2
4277 : // p_int - Intermediate Steady State Power SEER2
4278 464 : std::tuple<Real64, Real64> IntermediateSteadyStateCpacityAndPowerSEER2(Real64 q_E_int, Real64 M_Cq, Real64 p_E_int, Real64 M_CE, Real64 t)
4279 : {
4280 : // Equation 11.94 (AHRI-2023)
4281 464 : Real64 q_int = q_E_int + M_Cq * (t - 30.55);
4282 :
4283 : // Equation 11.97 (AHRI-2023)
4284 464 : Real64 p_int = p_E_int + M_CE * (t - 30.55);
4285 928 : return std::make_tuple(q_int, p_int);
4286 : }
4287 :
4288 30 : std::tuple<Real64, Real64, Real64, Real64> VariableSpeedDXCoolingCoilSEER2(EnergyPlusData &state,
4289 : int const nsp,
4290 : Array1A_int const CapFFlowCurveIndex,
4291 : Array1A<Real64> const GrossRatedCapacityAtSpeedLevel,
4292 : Array1A_int const CapFTempCurveIndex,
4293 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput_2023,
4294 : Array1A<Real64> const LoopVolumetricAirFlowRateAtSpeedLevel,
4295 : Array1A_int const EIRFFlowCurveIndex,
4296 : Array1A<Real64> const RatedCOP,
4297 : Array1A_int EIRFTempCurveIndex,
4298 : Array1A_int const PLFFPLRCurveIndex)
4299 : {
4300 :
4301 30 : Real64 NetCoolingCapRatedMaxSpeed2023 = 0.0;
4302 30 : Real64 SEER2_User = 0.0;
4303 30 : Real64 SEER2_Standard = 0.0;
4304 30 : Real64 EER2 = 0.0;
4305 :
4306 : // Intermediate values calculated from the inputs in the idf file
4307 : // ANSI/AHRI 210/240 Std. 2023
4308 30 : Array1D<Real64> FanPowerPerEvapAirFlowRate_2023(nsp); // 2023 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
4309 30 : Array1D<Real64> Q_A_Full(nsp); // Total cooling capacity at A2 test condition (High speed) | q_A_Full
4310 30 : Array1D<Real64> Q_B_Full(nsp); // Total cooling capacity at B2 test condition (High speed) | q_B_Full
4311 30 : Array1D<Real64> Q_B_Low(nsp); // Total cooling capacity at B1 test condition (Low speed) | q_B_Low
4312 30 : Array1D<Real64> Q_F_Low(nsp); // Total cooling capacity at F1 test condition (Low speed) | q_F_Low
4313 30 : Array1D<Real64> Q_E_Int(nsp); // Total cooling capacity at Eint (Ev) test condition | q_E_Int
4314 30 : Array1D<Real64> P_A_Full(nsp); // Outdoor Unit electric power at A2 test condition (High speed) | p_A_Full
4315 30 : Array1D<Real64> P_B_Full(nsp); // Outdoor Unit electric power at B2 test condition (High speed) | p_B_Full
4316 30 : Array1D<Real64> P_B_Low(nsp); // Outdoor Unit electric power at B1 test condition (Low speed) | p_B_Low
4317 30 : Array1D<Real64> P_F_Low(nsp); // Outdoor Unit electric power at F1 test condition | p_F_Low
4318 30 : Array1D<Real64> P_E_Int(nsp); // Outdoor Unit electric power at Eint (Ev) test conditon | p_E_Int
4319 :
4320 30 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
4321 30 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
4322 30 : Array1D<Real64> NetCoolingCapRated_2023(nsp); // net cooling capacity at each speed
4323 30 : Real64 q_low(0.0); // cooling capacity of Mult-speed DX coil at lower speed, [W]
4324 30 : Real64 q_full(0.0); // cooling capacity of Mult-speed DX coil at higher speed, [W]
4325 30 : Real64 p_low(0.0); // outdoor unit electric power input at low speed, [W]
4326 30 : Real64 p_full(0.0); // outdoor unit electric power input at high speed, [W]
4327 30 : Real64 CoolingCapacityMax_2023(0.0); // cooling capacity of Mult-speed DX coil at max speed, [W]
4328 30 : Real64 CoolingElecPowerMax_2023(0.0); // outdoor unit electric power input at Max speed, [W]
4329 :
4330 : // binned cooling hours
4331 30 : Real64 BuildingCoolingLoad_2023(0.0); // Building space cooling load corresponding to an outdoor bin temperature [W]
4332 30 : Real64 NetTotCoolCapBinned_2023(0.0); // Net tot cooling cap corresponding to an outdoor bin temperature [W]
4333 30 : Real64 TotCoolElecPowerBinned_2023(0.0); // Total cooling electric power corresponding to an outdoor bin temperature [W]
4334 :
4335 30 : Real64 constexpr SF(1.10); // Sizing Factor as per AHRI Std 210/240-2023 | equation 11.68
4336 : // Real64 constexpr V(1); // V = 0.93 for Variable Speed Heat Pumps, otherwise V = 1.0
4337 30 : Real64 constexpr V(0.93); // V = 0.93 for Variable Speed Heat Pumps, otherwise V = 1.0
4338 : // part-load factor based on user-input PLF curve and C_D value that accounts for the cyclic degradation, [-]
4339 30 : Real64 PartLoadFactorUser_2023(0.0);
4340 :
4341 178 : for (int spnum = 1; spnum <= nsp; ++spnum) {
4342 148 : FanPowerPerEvapAirFlowRate_2023(spnum) = 0.0;
4343 148 : if (FanPowerPerEvapAirFlowRateFromInput_2023(spnum) <= 0.0) {
4344 0 : FanPowerPerEvapAirFlowRate_2023(spnum) = DefaultFanPowerPerEvapAirFlowRateSEER2;
4345 : } else {
4346 148 : FanPowerPerEvapAirFlowRate_2023(spnum) = FanPowerPerEvapAirFlowRateFromInput_2023(spnum);
4347 : }
4348 : }
4349 :
4350 : // Calculate the capacity and power for each speed
4351 178 : for (int spnum = 1; spnum <= nsp; ++spnum) {
4352 148 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
4353 :
4354 296 : Q_A_Full(spnum) =
4355 148 : GrossRatedCapacityAtSpeedLevel(spnum) *
4356 148 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
4357 148 : TotCapFlowModFac(spnum) -
4358 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4359 :
4360 296 : Q_B_Full(spnum) =
4361 148 : GrossRatedCapacityAtSpeedLevel(spnum) *
4362 148 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) *
4363 148 : TotCapFlowModFac(spnum) -
4364 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4365 :
4366 296 : Q_B_Low(spnum) =
4367 148 : GrossRatedCapacityAtSpeedLevel(spnum) *
4368 148 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) *
4369 148 : TotCapFlowModFac(spnum) -
4370 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4371 :
4372 296 : Q_F_Low(spnum) =
4373 148 : GrossRatedCapacityAtSpeedLevel(spnum) *
4374 148 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) *
4375 148 : TotCapFlowModFac(spnum) -
4376 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4377 :
4378 296 : Q_E_Int(spnum) =
4379 148 : GrossRatedCapacityAtSpeedLevel(spnum) *
4380 148 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestEint) *
4381 148 : TotCapFlowModFac(spnum) -
4382 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4383 :
4384 148 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
4385 148 : if (RatedCOP(spnum) > 0.0) {
4386 296 : P_A_Full(spnum) =
4387 148 : Q_A_Full(spnum) * EIRFlowModFac(spnum) *
4388 296 : Curve::CurveValue(
4389 148 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) /
4390 148 : RatedCOP(spnum) +
4391 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4392 :
4393 296 : P_B_Full(spnum) =
4394 148 : Q_B_Full(spnum) * EIRFlowModFac(spnum) *
4395 296 : Curve::CurveValue(
4396 148 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) /
4397 148 : RatedCOP(spnum) +
4398 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4399 :
4400 148 : P_B_Low(spnum) = Q_B_Low(spnum) * EIRFlowModFac(spnum) *
4401 296 : Curve::CurveValue(
4402 148 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) /
4403 148 : RatedCOP(spnum) +
4404 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4405 :
4406 148 : P_F_Low(spnum) = Q_F_Low(spnum) * EIRFlowModFac(spnum) *
4407 296 : Curve::CurveValue(
4408 148 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) /
4409 148 : RatedCOP(spnum) +
4410 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4411 :
4412 148 : P_E_Int(spnum) =
4413 148 : Q_E_Int(spnum) * EIRFlowModFac(spnum) *
4414 296 : Curve::CurveValue(
4415 148 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestEint) /
4416 148 : RatedCOP(spnum) +
4417 148 : FanPowerPerEvapAirFlowRate_2023(spnum) * LoopVolumetricAirFlowRateAtSpeedLevel(spnum);
4418 : }
4419 : }
4420 : // Standard Rating cooling (net) capacity calculations:
4421 30 : NetCoolingCapRated_2023(nsp) = Q_A_Full(nsp);
4422 30 : NetCoolingCapRatedMaxSpeed2023 = NetCoolingCapRated_2023(nsp);
4423 :
4424 : // EER2 calculation | Section 3.1.16(AHRI 210/240 2023)
4425 : // A ratio of the cooling capacity in Btu/h to the Total Power in watts at AFull test conditions and expressed in Btu/(W-h)
4426 : // In case of Coil:Cooling:DX:MultiSpeed coil we're picking the max speed.
4427 30 : EER2 = Q_A_Full(nsp) / P_A_Full(nsp);
4428 : // Calculate the SEER2 value based on contribution of each outdoor air bin temperature
4429 30 : Real64 q_sum = 0.0;
4430 30 : Real64 e_sum = 0.0;
4431 30 : Real64 NetCoolingCapWeighted2_2023 = 0.0;
4432 30 : Real64 TotCoolingElecPowerWeighted2_2023 = 0.0;
4433 30 : SEER2_User = 0.0;
4434 30 : SEER2_Standard = 0.0;
4435 30 : std::vector<int> speedsUsed;
4436 : // speedsUsed.push_back(1);
4437 270 : for (int BN = 0; BN < NumOfOATempBins; ++BN) {
4438 : // Equation 11.67 (AHRI-2023)
4439 240 : BuildingCoolingLoad_2023 = ((OutdoorBinTemperatureSEER[BN] - 18.3) / (35.0 - 18.3) * (Q_A_Full(nsp) / SF)) * V;
4440 : // determine the speed number
4441 240 : CoolingCapacityMax_2023 =
4442 240 : Q_B_Full(nsp) + ((Q_A_Full(nsp) - Q_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4443 240 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4444 240 : CoolingElecPowerMax_2023 =
4445 240 : P_B_Full(nsp) + ((P_A_Full(nsp) - P_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4446 240 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4447 : // Equation 11.69 (AHRI-2023)
4448 240 : q_low = Q_F_Low(1) + ((Q_B_Low(1) - Q_F_Low(1)) / (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
4449 240 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestF1);
4450 : // Equation 11.70 (AHRI-2023)4
4451 240 : p_low = P_F_Low(1) + ((P_B_Low(1) - P_F_Low(1)) / (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
4452 240 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestF1);
4453 : // Equation 11.71 (AHRI-2023)
4454 240 : q_full =
4455 240 : Q_B_Full(nsp) + ((Q_A_Full(nsp) - Q_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4456 240 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4457 : // Equation 11.72 (AHRI-2023)
4458 240 : p_full =
4459 240 : P_B_Full(nsp) + ((P_A_Full(nsp) - P_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4460 240 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4461 240 : Real64 q(0.0);
4462 240 : Real64 e(0.0);
4463 :
4464 : // # Intermediate Capacity
4465 240 : Real64 q_A_full = Q_A_Full(nsp);
4466 240 : Real64 q_B_full = Q_B_Full(nsp);
4467 240 : Real64 q_B_low = Q_B_Low(1);
4468 240 : Real64 q_F_low = Q_F_Low(1);
4469 : // # Intermediate Power
4470 240 : Real64 p_A_full = P_A_Full(nsp);
4471 240 : Real64 p_B_full = P_B_Full(nsp);
4472 240 : Real64 p_B_low = P_B_Low(1);
4473 240 : Real64 p_F_low = P_F_Low(1);
4474 :
4475 240 : Real64 N_Cq(0.0);
4476 240 : Real64 M_Cq(0.0);
4477 :
4478 240 : Real64 N_CE(0.0);
4479 240 : Real64 M_CE(0.0);
4480 :
4481 240 : Real64 q_int(0.0);
4482 240 : Real64 p_int(0.0);
4483 240 : Real64 t = OutdoorBinTemperatureSEER[BN];
4484 240 : Real64 n = CoolFracBinHoursAtOutdoorBinTemp[BN];
4485 240 : Real64 bl = BuildingCoolingLoad_2023;
4486 240 : if ((nsp >= 5 && nsp <= 10)) {
4487 : // New speed selection strategy :
4488 112 : auto result = GetMatchingSpeedFromBuildingLoad(BuildingCoolingLoad_2023, GrossRatedCapacityAtSpeedLevel);
4489 112 : if (result.second != -1) {
4490 107 : int spnum = result.second + 1;
4491 : // found a speed that meets the building load
4492 : // # Intermediate Capacity
4493 107 : Real64 q_E_int = Q_E_Int(spnum);
4494 107 : std::tie(N_Cq, M_Cq) = CapacityAdjustmentFactorsInCoolingModeSEER2(q_F_low, q_B_low, BN, q_B_full, q_A_full, q_E_int);
4495 :
4496 : // # Intermediate Power
4497 107 : Real64 p_E_int = P_E_Int(spnum);
4498 107 : std::tie(N_CE, M_CE) = EnergyAdjustmentFactorsInCoolingModeSEER2(p_F_low, p_B_low, BN, p_B_full, p_A_full, p_E_int);
4499 :
4500 107 : std::tie(q_int, p_int) = IntermediateSteadyStateCpacityAndPowerSEER2(q_E_int, M_Cq, p_E_int, M_CE, t);
4501 :
4502 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
4503 107 : if (BuildingCoolingLoad_2023 <= q_low) {
4504 27 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4505 54 : IntermediateCapacityAndPowerSEER2Case1(state, bl, q_low, n, p_low, PLFFPLRCurveIndex(spnum));
4506 27 : speedsUsed.push_back(spnum);
4507 27 : goto SpeedLoop3_exit;
4508 80 : } else if (BuildingCoolingLoad_2023 < q_full) {
4509 : // Case 2A:
4510 71 : if (bl < q_int) {
4511 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed &
4512 59 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2A(
4513 118 : p_int, q_int, q_low, bl, n, Q_E_Int(spnum), q_full, P_E_Int(spnum), p_full, p_low);
4514 59 : speedsUsed.push_back(spnum);
4515 59 : goto SpeedLoop3_exit;
4516 : } else { // bl < q_full
4517 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed &
4518 : // full Speed
4519 12 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2B(
4520 24 : p_int, bl, q_int, n, Q_E_Int(spnum), P_E_Int(spnum), q_low, p_low, q_full, p_full);
4521 12 : speedsUsed.push_back(spnum);
4522 12 : goto SpeedLoop3_exit;
4523 : }
4524 : } else {
4525 : // Case 3:
4526 : // Section 11.2.1.3.3 CASE 3 - Building load is equal to or greater than unit capacity at full stage
4527 9 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4528 18 : IntermediateCapacityAndPowerSEER2Case3(q_full, p_full, CoolingCapacityMax_2023, CoolingElecPowerMax_2023, n);
4529 9 : speedsUsed.push_back(spnum);
4530 9 : goto SpeedLoop3_exit;
4531 : }
4532 : } else {
4533 : // << ",, BIN NUMBER (C3), " << BN + 1 << ", NO SPEEDS MATCHED ??, " << spnum << std::endl;
4534 : }
4535 133 : } else if (nsp == 4) {
4536 48 : for (int spnum = 1; spnum <= nsp; ++spnum) {
4537 : // # Intermediate Capacity
4538 : Real64 q_E_int;
4539 48 : if (spnum == 2 || spnum == 3) {
4540 21 : q_E_int = (Q_E_Int(2) + Q_E_Int(3)) * 0.5;
4541 : } else {
4542 27 : q_E_int = Q_E_Int(spnum);
4543 : }
4544 : // # Intermediate Power
4545 : Real64 p_E_int;
4546 48 : if (spnum == 2 || spnum == 3) {
4547 21 : p_E_int = (P_E_Int(2) + P_E_Int(3)) * 0.5;
4548 : } else {
4549 27 : p_E_int = P_E_Int(spnum);
4550 : }
4551 :
4552 48 : std::tie(N_Cq, M_Cq) = CapacityAdjustmentFactorsInCoolingModeSEER2(q_F_low, q_B_low, BN, q_B_full, q_A_full, q_E_int);
4553 :
4554 48 : std::tie(N_CE, M_CE) = EnergyAdjustmentFactorsInCoolingModeSEER2(p_F_low, p_B_low, BN, p_B_full, p_A_full, p_E_int);
4555 :
4556 48 : std::tie(q_int, p_int) = IntermediateSteadyStateCpacityAndPowerSEER2(q_E_int, M_Cq, p_E_int, M_CE, t);
4557 :
4558 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
4559 48 : if (bl <= q_low) {
4560 6 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4561 12 : IntermediateCapacityAndPowerSEER2Case1(state, bl, q_low, n, p_low, PLFFPLRCurveIndex(spnum));
4562 : // This is the case and speed we're looking for now we exit and try calculating against the next bin
4563 6 : goto SpeedLoop3_exit;
4564 42 : } else if (bl < q_full && (spnum == 2 || spnum == 3)) { // bl > q_low
4565 :
4566 : // Case 2A:
4567 15 : if (bl < q_int) {
4568 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed & full
4569 : // Speed
4570 10 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2A(
4571 20 : p_int, q_int, q_low, bl, n, Q_E_Int(spnum), q_full, P_E_Int(spnum), p_full, p_low);
4572 10 : goto SpeedLoop3_exit;
4573 : } else { // bl < q_full
4574 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed &
4575 : // full Speed
4576 5 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2B(
4577 10 : p_int, bl, q_int, n, Q_E_Int(spnum), P_E_Int(spnum), q_low, p_low, q_full, p_full);
4578 5 : goto SpeedLoop3_exit;
4579 : }
4580 27 : } else if (bl >= q_full && spnum > 3) {
4581 : // Case 3:
4582 : // Section 11.2.1.3.3 CASE 3 - Building load is equal to or greater than unit capacity at full stage
4583 3 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4584 6 : IntermediateCapacityAndPowerSEER2Case3(q_full, p_full, CoolingCapacityMax_2023, CoolingElecPowerMax_2023, n);
4585 3 : goto SpeedLoop3_exit;
4586 : }
4587 : }
4588 104 : } else if (nsp == 3) {
4589 32 : for (int spnum = 1; spnum <= nsp; ++spnum) {
4590 : // # Intermediate Capacity
4591 32 : Real64 q_E_int = Q_E_Int(spnum);
4592 32 : std::tie(N_Cq, M_Cq) = CapacityAdjustmentFactorsInCoolingModeSEER2(q_F_low, q_B_low, BN, q_B_full, q_A_full, q_E_int);
4593 :
4594 : // # Intermediate Power
4595 32 : Real64 p_E_int = P_E_Int(spnum);
4596 32 : std::tie(N_CE, M_CE) = EnergyAdjustmentFactorsInCoolingModeSEER2(p_F_low, p_B_low, BN, p_B_full, p_A_full, p_E_int);
4597 :
4598 32 : std::tie(q_int, p_int) = IntermediateSteadyStateCpacityAndPowerSEER2(q_E_int, M_Cq, p_E_int, M_CE, t);
4599 :
4600 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
4601 32 : if (bl <= q_low) {
4602 10 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4603 20 : IntermediateCapacityAndPowerSEER2Case1(state, bl, q_low, n, p_low, PLFFPLRCurveIndex(spnum));
4604 : // This is the case and speed we're looking for now we exit and try calculating against the next bin
4605 10 : goto SpeedLoop3_exit;
4606 22 : } else if (bl < q_full) { // bl > q_low
4607 : // Case 2A:
4608 18 : if (bl < q_int) {
4609 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed & full
4610 : // Speed
4611 1 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2A(
4612 2 : p_int, q_int, q_low, bl, n, Q_E_Int(spnum), q_full, P_E_Int(spnum), p_full, p_low);
4613 1 : goto SpeedLoop3_exit;
4614 : } else { // bl < q_full
4615 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed &
4616 : // full Speed
4617 17 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2B(
4618 34 : p_int, bl, q_int, n, Q_E_Int(spnum), P_E_Int(spnum), q_low, p_low, q_full, p_full);
4619 17 : goto SpeedLoop3_exit;
4620 : }
4621 : } else { // bl >= q_full
4622 : // Case 3:
4623 : // Section 11.2.1.3.3 CASE 3 - Building load is equal to or greater than unit capacity at full stage
4624 4 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4625 8 : IntermediateCapacityAndPowerSEER2Case3(q_full, p_full, CoolingCapacityMax_2023, CoolingElecPowerMax_2023, n);
4626 4 : goto SpeedLoop3_exit;
4627 : }
4628 : }
4629 72 : } else if (nsp == 2) {
4630 36 : for (int spnum = 1; spnum <= nsp; ++spnum) {
4631 : // # Intermediate Capacity
4632 36 : Real64 q_E_int = Q_E_Int(1);
4633 36 : std::tie(N_Cq, M_Cq) = CapacityAdjustmentFactorsInCoolingModeSEER2(q_F_low, q_B_low, BN, q_B_full, q_A_full, q_E_int);
4634 :
4635 : // # Intermediate Power
4636 36 : Real64 p_E_int = P_E_Int(1);
4637 36 : std::tie(N_CE, M_CE) = EnergyAdjustmentFactorsInCoolingModeSEER2(p_F_low, p_B_low, BN, p_B_full, p_A_full, p_E_int);
4638 :
4639 36 : std::tie(q_int, p_int) = IntermediateSteadyStateCpacityAndPowerSEER2(q_E_int, M_Cq, p_E_int, M_CE, t);
4640 :
4641 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
4642 36 : if (bl <= q_low) {
4643 12 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4644 24 : IntermediateCapacityAndPowerSEER2Case1(state, bl, q_low, n, p_low, PLFFPLRCurveIndex(spnum));
4645 : // This is the case and speed we're looking for now we exit and try calculating against the next bin
4646 12 : goto SpeedLoop3_exit;
4647 24 : } else if (bl < q_full) { // bl > q_low
4648 : // Case 2A:
4649 16 : if (bl < q_int) {
4650 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed & full
4651 : // Speed
4652 3 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2A(
4653 6 : p_int, q_int, q_low, bl, n, Q_E_Int(spnum), q_full, P_E_Int(spnum), p_full, p_low);
4654 3 : goto SpeedLoop3_exit;
4655 : } else { // bl < q_full
4656 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed &
4657 : // full Speed
4658 13 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2B(
4659 26 : p_int, bl, q_int, n, Q_E_Int(spnum), P_E_Int(spnum), q_low, p_low, q_full, p_full);
4660 13 : goto SpeedLoop3_exit;
4661 : }
4662 8 : } else if (spnum == nsp) { // bl >= q_full
4663 : // Case 3:
4664 : // Section 11.2.1.3.3 CASE 3 - Building load is equal to or greater than unit capacity at full stage
4665 4 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4666 8 : IntermediateCapacityAndPowerSEER2Case3(q_full, p_full, CoolingCapacityMax_2023, CoolingElecPowerMax_2023, n);
4667 4 : goto SpeedLoop3_exit;
4668 : }
4669 : }
4670 40 : } else if (nsp == 1) {
4671 : // Every calculation for each of the bins will be using only one speed i.e, Speed 1
4672 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
4673 : // # Intermediate Capacity
4674 40 : Real64 q_E_int = Q_E_Int(1);
4675 40 : std::tie(N_Cq, M_Cq) = CapacityAdjustmentFactorsInCoolingModeSEER2(q_F_low, q_B_low, BN, q_B_full, q_A_full, q_E_int);
4676 :
4677 : // # Intermediate Power
4678 40 : Real64 p_E_int = P_E_Int(1);
4679 40 : std::tie(N_CE, M_CE) = EnergyAdjustmentFactorsInCoolingModeSEER2(p_F_low, p_B_low, BN, p_B_full, p_A_full, p_E_int);
4680 :
4681 40 : std::tie(q_int, p_int) = IntermediateSteadyStateCpacityAndPowerSEER2(q_E_int, M_Cq, p_E_int, M_CE, t);
4682 :
4683 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
4684 40 : if (BuildingCoolingLoad_2023 <= q_low) {
4685 : // Case 1:
4686 35 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4687 70 : IntermediateCapacityAndPowerSEER2Case1(state, bl, q_low, n, p_low, PLFFPLRCurveIndex(1));
4688 35 : goto SpeedLoop3_exit;
4689 :
4690 5 : } else if (BuildingCoolingLoad_2023 < q_full) {
4691 : // Case 2:
4692 : // Case 2A:
4693 0 : if (bl < q_int) {
4694 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed & full
4695 : // Speed
4696 0 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4697 0 : IntermediateCapacityAndPowerSEER2Case2A(p_int, q_int, q_low, bl, n, Q_E_Int(1), q_full, P_E_Int(1), p_full, p_low);
4698 0 : goto SpeedLoop3_exit;
4699 : } else { // bl < q_full
4700 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed &
4701 : // full Speed
4702 0 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4703 0 : IntermediateCapacityAndPowerSEER2Case2B(p_int, bl, q_int, n, Q_E_Int(1), P_E_Int(1), q_low, p_low, q_full, p_full);
4704 0 : goto SpeedLoop3_exit;
4705 : }
4706 : // Case 2B:
4707 : } else {
4708 : // Case 3:
4709 : // Section 11.2.1.3.3 CASE 3 - Building load is equal to or greater than unit capacity at full stage
4710 5 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
4711 10 : IntermediateCapacityAndPowerSEER2Case3(q_full, p_full, CoolingCapacityMax_2023, CoolingElecPowerMax_2023, n);
4712 5 : goto SpeedLoop3_exit;
4713 : }
4714 : }
4715 0 : SpeedLoop3_exit:;
4716 240 : NetCoolingCapWeighted2_2023 += NetTotCoolCapBinned_2023;
4717 240 : TotCoolingElecPowerWeighted2_2023 += TotCoolElecPowerBinned_2023;
4718 :
4719 240 : q_sum += q;
4720 240 : e_sum += e;
4721 : }
4722 30 : if (e_sum > 0.0) {
4723 30 : SEER2_User = NetCoolingCapWeighted2_2023 / TotCoolingElecPowerWeighted2_2023;
4724 30 : SEER2_Standard = q_sum / e_sum; // Equation 11.66 (AHRI-2023)
4725 : }
4726 60 : return std::make_tuple(NetCoolingCapRatedMaxSpeed2023, SEER2_User, SEER2_Standard, EER2);
4727 30 : }
4728 :
4729 6 : std::tuple<Real64, Real64, Real64, Real64> TwoSpeedDXCoolingCoilSEER2(EnergyPlusData &state,
4730 : // int const nsp,
4731 : Array1A_int const CapFFlowCurveIndex,
4732 : Array1A<Real64> const RatedTotalCapacity,
4733 : Array1A_int const CapFTempCurveIndex,
4734 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput_2023,
4735 : Array1A<Real64> const RatedAirVolFlowRate,
4736 : Array1A_int const EIRFFlowCurveIndex,
4737 : Array1A<Real64> const RatedCOP,
4738 : Array1A_int EIRFTempCurveIndex,
4739 : Array1A_int const PLFFPLRCurveIndex)
4740 : {
4741 6 : int nsp = 2;
4742 6 : Real64 NetCoolingCapRatedMaxSpeed2023 = 0.0;
4743 6 : Real64 SEER2_User = 0.0;
4744 6 : Real64 SEER2_Standard = 0.0;
4745 6 : Real64 EER2 = 0.0;
4746 :
4747 6 : Real64 constexpr SF(1.10); // Sizing Factor as per AHRI Std 210/240-2023 | equation 11.68
4748 6 : Real64 constexpr V(1); // V = 0.93 for Variable Speed Heat Pumps, otherwise V = 1.0
4749 :
4750 6 : Array1D<Real64> FanPowerPerEvapAirFlowRate_2023(nsp); // 2023 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
4751 6 : Array1D<Real64> Q_A_Full(nsp); // Total cooling capacity at A2 test condition (High speed) | q_A_Full
4752 6 : Array1D<Real64> Q_B_Full(nsp); // Total cooling capacity at B2 test condition (High speed) | q_B_Full
4753 6 : Array1D<Real64> Q_B_Low(nsp); // Total cooling capacity at B1 test condition (Low speed) | q_B_Low
4754 6 : Array1D<Real64> Q_F_Low(nsp); // Total cooling capacity at F1 test condition (Low speed) | q_F_Low
4755 6 : Array1D<Real64> P_A_Full(nsp); // Outdoor Unit electric power at A2 test condition (High speed) | p_A_Full
4756 6 : Array1D<Real64> P_B_Full(nsp); // Outdoor Unit electric power at B2 test condition (High speed) | p_B_Full
4757 6 : Array1D<Real64> P_B_Low(nsp); // Outdoor Unit electric power at B1 test condition (Low speed) | p_B_Low
4758 6 : Array1D<Real64> P_F_Low(nsp); // Outdoor Unit electric power at F1 test condition | p_F_Low
4759 :
4760 6 : Real64 PartLoadFactorUser_2023(0.0); // part-load factor based on user-input PLF curve and C_D value that accounts
4761 : // for the cyclic degradation, [-]
4762 :
4763 : // binned cooling hours
4764 6 : Real64 BuildingCoolingLoad_2023(0.0); // Building space cooling load corresponding to an outdoor bin temperature [W]
4765 6 : Real64 NetTotCoolCapBinned_2023(0.0); // Net tot cooling cap corresponding to an outdoor bin temperature [W]
4766 6 : Real64 TotCoolElecPowerBinned_2023(0.0); // Total cooling electric power corresponding to an outdoor bin temperature [W]
4767 :
4768 6 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
4769 6 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
4770 6 : Array1D<Real64> NetCoolingCapRated_2023(nsp); // net cooling capacity at each speed
4771 :
4772 6 : Real64 FanPowerPerEvapAirFlowRate_2023_LS(0.0);
4773 6 : Real64 FanPowerPerEvapAirFlowRate_2023_HS(0.0);
4774 : // Low Stage
4775 6 : if (FanPowerPerEvapAirFlowRateFromInput_2023(2) <= 0.0) {
4776 0 : FanPowerPerEvapAirFlowRate_2023_LS = DefaultFanPowerPerEvapAirFlowRateSEER2;
4777 0 : FanPowerPerEvapAirFlowRate_2023(1) = DefaultFanPowerPerEvapAirFlowRateSEER2;
4778 : } else {
4779 6 : FanPowerPerEvapAirFlowRate_2023_LS = FanPowerPerEvapAirFlowRateFromInput_2023(2);
4780 6 : FanPowerPerEvapAirFlowRate_2023(1) = FanPowerPerEvapAirFlowRateFromInput_2023(2);
4781 : }
4782 : // High Stage
4783 6 : if (FanPowerPerEvapAirFlowRateFromInput_2023(1) <= 0.0) {
4784 0 : FanPowerPerEvapAirFlowRate_2023_HS = DefaultFanPowerPerEvapAirFlowRateSEER2;
4785 0 : FanPowerPerEvapAirFlowRate_2023(2) = DefaultFanPowerPerEvapAirFlowRateSEER2;
4786 : } else {
4787 6 : FanPowerPerEvapAirFlowRate_2023_HS = FanPowerPerEvapAirFlowRateFromInput_2023(1);
4788 6 : FanPowerPerEvapAirFlowRate_2023(2) = FanPowerPerEvapAirFlowRateFromInput_2023(1);
4789 : }
4790 :
4791 : // Calculate the capacity and power for each speed
4792 : // Low Stage
4793 6 : TotCapFlowModFac(1) = 1; // As per IO Reference there are no CCapFFlowCurve for Low Speed | Section ??
4794 6 : EIRFlowModFac(1) = 1; // As per IO Reference there are no EIRFFlowCurve for Low Speed | Section ??
4795 :
4796 6 : Q_A_Full(1) = RatedTotalCapacity(2) *
4797 6 : Curve::CurveValue(state, CapFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
4798 6 : TotCapFlowModFac(1) -
4799 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4800 :
4801 6 : Q_B_Full(1) = RatedTotalCapacity(2) *
4802 6 : Curve::CurveValue(state, CapFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) *
4803 6 : TotCapFlowModFac(1) -
4804 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4805 :
4806 6 : Q_B_Low(1) = RatedTotalCapacity(2) *
4807 6 : Curve::CurveValue(state, CapFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) *
4808 6 : TotCapFlowModFac(1) -
4809 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4810 :
4811 6 : Q_F_Low(1) = RatedTotalCapacity(2) *
4812 6 : Curve::CurveValue(state, CapFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) *
4813 6 : TotCapFlowModFac(1) -
4814 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4815 :
4816 6 : if (RatedCOP(2) > 0.0) {
4817 12 : P_A_Full(1) =
4818 6 : Q_A_Full(1) * EIRFlowModFac(1) *
4819 6 : Curve::CurveValue(state, EIRFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) /
4820 6 : RatedCOP(2) +
4821 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4822 :
4823 12 : P_B_Full(1) =
4824 6 : Q_B_Full(1) * EIRFlowModFac(1) *
4825 6 : Curve::CurveValue(state, EIRFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) /
4826 6 : RatedCOP(2) +
4827 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4828 :
4829 12 : P_B_Low(1) =
4830 6 : Q_B_Low(1) * EIRFlowModFac(1) *
4831 6 : Curve::CurveValue(state, EIRFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) /
4832 6 : RatedCOP(2) +
4833 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4834 :
4835 6 : P_F_Low(1) =
4836 6 : Q_F_Low(1) * EIRFlowModFac(1) *
4837 6 : Curve::CurveValue(state, EIRFTempCurveIndex(2), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) /
4838 6 : RatedCOP(2) +
4839 6 : FanPowerPerEvapAirFlowRate_2023(1) * RatedAirVolFlowRate(2);
4840 : }
4841 : // High Stage
4842 6 : TotCapFlowModFac(2) = Curve::CurveValue(state, CapFFlowCurveIndex(1), AirMassFlowRatioRated);
4843 6 : EIRFlowModFac(2) = Curve::CurveValue(state, EIRFFlowCurveIndex(1), AirMassFlowRatioRated);
4844 :
4845 6 : Q_A_Full(2) = RatedTotalCapacity(1) *
4846 6 : Curve::CurveValue(state, CapFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
4847 6 : TotCapFlowModFac(2) -
4848 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4849 :
4850 6 : Q_B_Full(2) = RatedTotalCapacity(1) *
4851 6 : Curve::CurveValue(state, CapFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) *
4852 6 : TotCapFlowModFac(2) -
4853 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4854 :
4855 6 : Q_B_Low(2) = RatedTotalCapacity(1) *
4856 6 : Curve::CurveValue(state, CapFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) *
4857 6 : TotCapFlowModFac(2) -
4858 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4859 :
4860 6 : Q_F_Low(2) = RatedTotalCapacity(1) *
4861 6 : Curve::CurveValue(state, CapFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) *
4862 6 : TotCapFlowModFac(2) -
4863 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4864 :
4865 6 : if (RatedCOP(1) > 0.0) {
4866 12 : P_A_Full(2) =
4867 6 : Q_A_Full(2) * EIRFlowModFac(2) *
4868 6 : Curve::CurveValue(state, EIRFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) /
4869 6 : RatedCOP(1) +
4870 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4871 :
4872 12 : P_B_Full(2) =
4873 6 : Q_B_Full(2) * EIRFlowModFac(2) *
4874 6 : Curve::CurveValue(state, EIRFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) /
4875 6 : RatedCOP(1) +
4876 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4877 :
4878 12 : P_B_Low(2) =
4879 6 : Q_B_Low(2) * EIRFlowModFac(2) *
4880 6 : Curve::CurveValue(state, EIRFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) /
4881 6 : RatedCOP(1) +
4882 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4883 :
4884 6 : P_F_Low(2) =
4885 6 : Q_F_Low(2) * EIRFlowModFac(2) *
4886 6 : Curve::CurveValue(state, EIRFTempCurveIndex(1), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) /
4887 6 : RatedCOP(1) +
4888 6 : FanPowerPerEvapAirFlowRate_2023(2) * RatedAirVolFlowRate(1);
4889 : }
4890 :
4891 : // Standard Rating cooling (net) capacity calculations:
4892 6 : NetCoolingCapRated_2023(2) = Q_A_Full(2);
4893 6 : NetCoolingCapRatedMaxSpeed2023 = NetCoolingCapRated_2023(2);
4894 :
4895 : // EER2 calculation | Section 3.1.16(AHRI 210/240 2023)
4896 : // A ratio of the cooling capacity in Btu/h to the Total Power in watts at AFull test conditions and expressed in Btu/(W-h)
4897 : // In case of Coil:Cooling:DX:TwoSpeed coil we're picking the High Speed for the same.
4898 6 : EER2 = Q_A_Full(2) / P_A_Full(2);
4899 :
4900 : // Calculate the SEER value based on contribution of each outdoor air bin temperature
4901 6 : Real64 q_sum = 0.0;
4902 6 : Real64 e_sum = 0.0;
4903 6 : Real64 NetCoolingCapWeighted2_2023 = 0.0;
4904 6 : Real64 TotCoolingElecPowerWeighted2_2023 = 0.0;
4905 :
4906 6 : Real64 CoolingCapacityMax_2023(0.0);
4907 6 : Real64 CoolingElecPowerMax_2023(0.0);
4908 :
4909 6 : Real64 q_low(0.0);
4910 6 : Real64 p_low(0.0);
4911 6 : Real64 q_full(0.0);
4912 6 : Real64 p_full(0.0);
4913 :
4914 6 : Real64 SEER2_USER_C2(0.0);
4915 6 : Real64 SEER2_STANDARD_C2(0.0);
4916 :
4917 6 : q_sum = 0.0;
4918 6 : e_sum = 0.0;
4919 6 : NetCoolingCapWeighted2_2023 = 0.0;
4920 6 : TotCoolingElecPowerWeighted2_2023 = 0.0;
4921 :
4922 54 : for (int BN = 0; BN < NumOfOATempBins; ++BN) {
4923 : // Equation 11.67 (AHRI-2023)
4924 48 : BuildingCoolingLoad_2023 = ((OutdoorBinTemperatureSEER[BN] - 18.3) / (35.0 - 18.3) * (Q_A_Full(nsp) / SF)) * V;
4925 :
4926 : // determine the speed number
4927 48 : CoolingCapacityMax_2023 =
4928 48 : Q_B_Full(nsp) + ((Q_A_Full(nsp) - Q_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4929 48 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4930 48 : CoolingElecPowerMax_2023 =
4931 48 : P_B_Full(nsp) + ((P_A_Full(nsp) - P_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4932 48 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4933 :
4934 : // LOW STAGE :
4935 : // The calculated Low Stage system capacity rate at each bin temperature shall be calculated by Equation 11.69
4936 : // Equation 11.69 (AHRI-2023)
4937 48 : q_low = Q_F_Low(1) + ((Q_B_Low(1) - Q_F_Low(1)) / (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
4938 48 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestF1);
4939 :
4940 : // The calculated Low Stage energy consumption at each bin temperature shall be calculated by Equation 11.70
4941 : // Equation 11.70 (AHRI-2023)
4942 48 : p_low = P_F_Low(1) + ((P_B_Low(1) - P_F_Low(1)) / (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
4943 48 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestF1);
4944 :
4945 : // HIGH STAGE :
4946 : // The calculated Full Stage system capacity at each bin temperature shall be calculated by Equation 11.71.
4947 : // Equation 11.71 (AHRI-2023)
4948 48 : q_full = Q_B_Full(2) + ((Q_A_Full(2) - Q_B_Full(2)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4949 48 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4950 :
4951 : // The calculated Full Stage energy consumption at each bin temperature shall be calculated by Equation 11.72.
4952 : // Equation 11.72 (AHRI-2023)
4953 48 : p_full = P_B_Full(2) + ((P_A_Full(2) - P_B_Full(2)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
4954 48 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
4955 :
4956 48 : Real64 bl = BuildingCoolingLoad_2023;
4957 48 : Real64 t = OutdoorBinTemperatureSEER[BN];
4958 48 : Real64 n = CoolFracBinHoursAtOutdoorBinTemp[BN];
4959 48 : Real64 q(0.0);
4960 48 : Real64 e(0.0);
4961 : // Section 6.1.3.1.2 | For Two-capacity Systems, if the optional CLow and DLow tests are not performed, a default value of 0.20 shall
4962 : // be used for the Low Stage cooling Degradation Coefficient, cd_low. In this case, if using default value for cd_low, use default
4963 : // value for cd_full. For Two-capacity Systems that lock out low capacity operation at high outdoor temperatures, if the optional
4964 : // CFull and DFull tests are not performed, the default value for Full Stage shall be the value used for Low Stage.
4965 48 : Real64 CyclicDegradationCoefficient(0.20);
4966 48 : if (bl < q_low) {
4967 : // Case I. Building load is less than Low Stage capacity, BL(tj) < qLow(tj). Calculate total bin capacity by using Equation 11.73
4968 : // and total bin energy by using Equation 11.74.
4969 12 : Real64 clf_low = bl / q_low; // Equation 11.75 (AHRI-2023)
4970 :
4971 : // SEER2 USER
4972 12 : PartLoadFactorUser_2023 = Curve::CurveValue(state, PLFFPLRCurveIndex(1), clf_low);
4973 12 : NetTotCoolCapBinned_2023 = clf_low * q_low * CoolFracBinHoursAtOutdoorBinTemp[BN];
4974 12 : TotCoolElecPowerBinned_2023 = (clf_low / PartLoadFactorUser_2023) * p_low * CoolFracBinHoursAtOutdoorBinTemp[BN];
4975 :
4976 : // SEER2 STANDARD
4977 12 : Real64 plf_low = 1.0 - CyclicDegradationCoefficient * (1.0 - clf_low); // Equation 11.76 (AHRI-2023)
4978 12 : q = clf_low * q_low * n; // Total Bin Capacity, Equation 11.73 (AHRI-2023)
4979 12 : e = clf_low * p_low * n / plf_low; // Total Bin Energy, Equation 11.74 (AHRI-2023)
4980 :
4981 36 : } else if (q_low < bl && bl < q_full) {
4982 : // Case II. Building load is greater than the Low Stage capacity, but less than the Full Stage capacity, qLow(tj) < BL(tj) <
4983 : // qFull(tj) and the unit cycles between "Low Stage" operation and "Full Stage" operation. Calculate total bin capacity by using
4984 : // Equation 11.79 and total bin energy by using Equation 11.80
4985 :
4986 : // Prerequisites for Equations 11.79 & 11.80
4987 30 : Real64 clf_low_c2 = (q_full - bl) / (q_full - q_low); // Equation 11.81 (AHRI-2023)
4988 30 : Real64 clf_full_c2 = 1 - clf_low_c2; // Equation 11.82 (AHRI-2023)
4989 :
4990 : // SEER2 USER
4991 : // Real64 LoadFactor_Low_2023 = min(1.0, (Q_E_Int(spnum) - q_low) / (q_full - q_low));
4992 : // LoadFactorQEnt_2023 = max(0.0, LoadFactorQEnt_2023);
4993 : // TODO:BPS : Visit again to figure out if there is a way to leverage Coil Data/Curve to get this.
4994 30 : Real64 NetTotCoolCapBinned_2023_c2 = ((clf_low_c2 * q_low) + (clf_full_c2 * q_full)) * CoolFracBinHoursAtOutdoorBinTemp[BN];
4995 30 : Real64 TotCoolElecPowerBinned_2023_c2 = ((clf_low_c2 * p_low) + (clf_full_c2 * p_full)) * CoolFracBinHoursAtOutdoorBinTemp[BN];
4996 :
4997 : // SEER2 STANDARD
4998 30 : Real64 q_c2 = ((clf_low_c2 * q_low) + (clf_full_c2 * q_full)) * n; // Total Bin Capacity, Equation 11.79 (AHRI-2023)
4999 30 : Real64 e_c2 = ((clf_low_c2 * p_low) + (clf_full_c2 * p_full)) * n; // Total Bin Energy, Equation 11.80 (AHRI-2023)
5000 :
5001 : // Case III. Building load is greater than the Low Stage capacity, but less than the Full Stage capacity, qLow(tj) < BL(tj) <
5002 : // qFull(tj) and the unit cycles between "off" and "Full Stage" operation.Calculate total bin capacity by using Equation 11.83 and
5003 : // total bin energy by using Equation 11.84
5004 :
5005 : // Prerequisites for Equations 11.83 & 11.84
5006 : // If the optional c_full and d_full Tests (see Table 7 AHRI-2023) are not conducted, set ccd_full equal to the lower of a) the
5007 : // ccd_low value calculated as per Equation 11.77 or b) the default value identified in Section 6.1.3.1
5008 30 : Real64 ccd_full_c3 = CyclicDegradationCoefficient;
5009 30 : Real64 clf_full_c3 = bl / q_full; // Equation 11.85 (AHRI-2023)
5010 :
5011 : // SEER2 USER
5012 30 : Real64 PartLoadFactorUser_2023_c3 = Curve::CurveValue(state, PLFFPLRCurveIndex(1), clf_full_c3);
5013 30 : Real64 NetTotCoolCapBinned_2023_c3 = clf_full_c3 * q_full * CoolFracBinHoursAtOutdoorBinTemp[BN];
5014 30 : Real64 TotCoolElecPowerBinned_2023_c3 = (clf_full_c3 / PartLoadFactorUser_2023_c3) * p_full * CoolFracBinHoursAtOutdoorBinTemp[BN];
5015 :
5016 : // The code below calculates coil Capacity and Energy for the case when a coil support for 'locked out'
5017 : // of the low stage on the compressor when outdoor air is very hot. In this case, the compressor will cycle
5018 : // directly from off to the High Stage, bypassing the low stage.
5019 : // EnergyPlus DX Cooling Coil data does not include a property for indicating if the coil supports this behavior,
5020 : // so these values are not currently used.
5021 :
5022 : // SEER2 STANDARD
5023 30 : Real64 plf_full_c3 = 1 - (ccd_full_c3 * (1 - clf_full_c3)); // Equation 11.86 (AHRI-2023)
5024 30 : Real64 q_c3 = clf_full_c3 * q_full * n; // Total Bin Capacity, Equation 11.83 (AHRI-2023)
5025 30 : Real64 e_c3 = (clf_full_c3 * p_full * n) / plf_full_c3; // Total Bin Energy, Equation 11.84 (AHRI-2023)
5026 :
5027 : // SEER2 USER
5028 30 : NetTotCoolCapBinned_2023 = NetTotCoolCapBinned_2023_c2;
5029 30 : TotCoolElecPowerBinned_2023 = TotCoolElecPowerBinned_2023_c2;
5030 : // SEER2 STANDARD
5031 30 : q = q_c2;
5032 30 : e = e_c2;
5033 :
5034 36 : } else if (bl >= q_full) {
5035 : // Case IV. Building load is greater than or equal to the unit capacity, BL(tj) >= qFull(tj).Calculate total bin capacity by using
5036 : // Equation 11.88 and total bin energy by using Equation 11.89.
5037 : // Section 11.2.1.3.3 CASE 4 - Building load is equal to or greater than unit capacity at full stage
5038 :
5039 : // SEER2 USER
5040 6 : NetTotCoolCapBinned_2023 = CoolingCapacityMax_2023 * CoolFracBinHoursAtOutdoorBinTemp[BN];
5041 6 : TotCoolElecPowerBinned_2023 = CoolingElecPowerMax_2023 * CoolFracBinHoursAtOutdoorBinTemp[BN];
5042 :
5043 : // SEER2 STANDARD
5044 6 : q = q_full * n; // Equation 11.88 (AHRI-2023)
5045 6 : e = p_full * n; // Equation 11.89 (AHRI-2023)
5046 : }
5047 :
5048 : // SEER2 USER | Sum up Bin Capacity and Bin Energy
5049 48 : NetCoolingCapWeighted2_2023 += NetTotCoolCapBinned_2023;
5050 48 : TotCoolingElecPowerWeighted2_2023 += TotCoolElecPowerBinned_2023;
5051 :
5052 : // SEER2 STANDARD | Sum up Bin Capacity and Bin Energy
5053 48 : q_sum += q;
5054 48 : e_sum += e;
5055 : }
5056 :
5057 6 : SEER2_User = 0.0;
5058 6 : SEER2_Standard = 0.0;
5059 6 : if (e_sum > 0.0) {
5060 6 : SEER2_User = NetCoolingCapWeighted2_2023 / TotCoolingElecPowerWeighted2_2023;
5061 6 : SEER2_Standard = q_sum / e_sum; // Equation 11.66 (AHRI-2023)
5062 : }
5063 :
5064 12 : return std::make_tuple(NetCoolingCapRatedMaxSpeed2023, SEER2_User, SEER2_Standard, EER2);
5065 6 : }
5066 :
5067 18 : std::tuple<Real64, Real64, Real64, Real64> MultiSpeedDXCoolingCoilSEER2(EnergyPlusData &state,
5068 : int const nsp,
5069 : Array1A_int const CapFFlowCurveIndex,
5070 : Array1A<Real64> const RatedTotalCapacity,
5071 : Array1A_int const CapFTempCurveIndex,
5072 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput_2023,
5073 : Array1A<Real64> const RatedAirVolFlowRate,
5074 : Array1A_int const EIRFFlowCurveIndex,
5075 : Array1A<Real64> const RatedCOP,
5076 : Array1A_int EIRFTempCurveIndex,
5077 : Array1A_int const PLFFPLRCurveIndex)
5078 : {
5079 : // Intermediate values calculated from the inputs in the idf file
5080 : // ANSI/AHRI 210/240 Std. 2023
5081 18 : Array1D<Real64> FanPowerPerEvapAirFlowRate_2023(nsp); // 2023 Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
5082 18 : Array1D<Real64> Q_A_Full(nsp); // Total cooling capacity at A2 test condition (High speed) | q_A_Full
5083 18 : Array1D<Real64> Q_B_Full(nsp); // Total cooling capacity at B2 test condition (High speed) | q_B_Full
5084 18 : Array1D<Real64> Q_B_Low(nsp); // Total cooling capacity at B1 test condition (Low speed) | q_B_Low
5085 18 : Array1D<Real64> Q_F_Low(nsp); // Total cooling capacity at F1 test condition (Low speed) | q_F_Low
5086 18 : Array1D<Real64> Q_E_Int(nsp); // Total cooling capacity at Eint (Ev) test condition | q_E_Int
5087 18 : Array1D<Real64> P_A_Full(nsp); // Outdoor Unit electric power at A2 test condition (High speed) | p_A_Full
5088 18 : Array1D<Real64> P_B_Full(nsp); // Outdoor Unit electric power at B2 test condition (High speed) | p_B_Full
5089 18 : Array1D<Real64> P_B_Low(nsp); // Outdoor Unit electric power at B1 test condition (Low speed) | p_B_Low
5090 18 : Array1D<Real64> P_F_Low(nsp); // Outdoor Unit electric power at F1 test condition | p_F_Low
5091 18 : Array1D<Real64> P_E_Int(nsp); // Outdoor Unit electric power at Eint (Ev) test conditon | p_E_Int
5092 :
5093 18 : Real64 PartLoadFactorUser_2023(
5094 : 0.0); // part-load factor based on user-input PLF curve and C_D value that accounts for the cyclic degradation, [-]
5095 :
5096 18 : Real64 NetCoolingCapWeighted_2023(0.0); // net tot cooling cap weighted by the fraction of the binned cooling hours [W]
5097 18 : Real64 TotCoolingElecPowerWeighted_2023(0.0); // net total cooling electric power input weighted by the fraction of the temperature bins
5098 18 : Real64 TotCoolingElecPowerWeightedDefault(0.0); // net total cooling electric power input weighted by the fraction of the temperature bins
5099 : // from AHRI 201/240 default PLF curve and C_D value,
5100 :
5101 : // binned cooling hours
5102 18 : Real64 BuildingCoolingLoad_2023(0.0); // Building space cooling load corresponding to an outdoor bin temperature [W]
5103 18 : Real64 NetTotCoolCapBinned_2023(0.0); // Net tot cooling cap corresponding to an outdoor bin temperature [W]
5104 18 : Real64 TotCoolElecPowerBinned_2023(0.0); // Total cooling electric power corresponding to an outdoor bin temperature [W]
5105 :
5106 18 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
5107 18 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
5108 18 : Array1D<Real64> NetCoolingCapRated_2023(nsp); // net cooling capacity at each speed
5109 18 : Real64 q_low(0.0); // cooling capacity of Mult-speed DX coil at lower speed, [W]
5110 18 : Real64 q_full(0.0); // cooling capacity of Mult-speed DX coil at higher speed, [W]
5111 18 : Real64 p_low(0.0); // outdoor unit electric power input at low speed, [W]
5112 18 : Real64 p_full(0.0); // outdoor unit electric power input at high speed, [W]
5113 18 : Real64 CoolingCapacityMax_2023(0.0); // cooling capacity of Mult-speed DX coil at max speed, [W]
5114 18 : Real64 CoolingElecPowerMax_2023(0.0); // outdoor unit electric power input at Max speed, [W]
5115 :
5116 18 : Real64 constexpr SF(1.10); // Sizing Factor as per AHRI Std 210/240-2023 | equation 11.68
5117 : // Real64 constexpr V(1); // V = 0.93 for Variable Speed Heat Pumps, otherwise V = 1.0
5118 18 : Real64 constexpr V(0.93); // V = 0.93 for Variable Speed Heat Pumps, otherwise V = 1.0
5119 :
5120 18 : Real64 NetCoolingCapRatedMaxSpeed2023 = 0.0;
5121 18 : Real64 SEER2_User = 0.0;
5122 18 : Real64 SEER2_Standard = 0.0;
5123 18 : Real64 EER2 = 0.0;
5124 :
5125 18 : NetCoolingCapWeighted_2023 = 0.0;
5126 18 : TotCoolingElecPowerWeighted_2023 = 0.0;
5127 18 : TotCoolingElecPowerWeightedDefault = 0.0;
5128 :
5129 61 : for (int spnum = 1; spnum <= nsp; ++spnum) {
5130 43 : FanPowerPerEvapAirFlowRate_2023(spnum) = 0.0;
5131 43 : if (FanPowerPerEvapAirFlowRateFromInput_2023(spnum) <= 0.0) {
5132 0 : FanPowerPerEvapAirFlowRate_2023(spnum) = DefaultFanPowerPerEvapAirFlowRateSEER2;
5133 : } else {
5134 43 : FanPowerPerEvapAirFlowRate_2023(spnum) = FanPowerPerEvapAirFlowRateFromInput_2023(spnum);
5135 : }
5136 : }
5137 :
5138 : // Calculate the capacity and power for each speed
5139 61 : for (int spnum = 1; spnum <= nsp; ++spnum) {
5140 43 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
5141 :
5142 86 : Q_A_Full(spnum) =
5143 43 : RatedTotalCapacity(spnum) *
5144 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
5145 43 : TotCapFlowModFac(spnum) -
5146 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5147 :
5148 86 : Q_B_Full(spnum) =
5149 43 : RatedTotalCapacity(spnum) *
5150 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) *
5151 43 : TotCapFlowModFac(spnum) -
5152 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5153 :
5154 86 : Q_B_Low(spnum) =
5155 43 : RatedTotalCapacity(spnum) *
5156 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) *
5157 43 : TotCapFlowModFac(spnum) -
5158 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5159 :
5160 86 : Q_F_Low(spnum) =
5161 43 : RatedTotalCapacity(spnum) *
5162 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) *
5163 43 : TotCapFlowModFac(spnum) -
5164 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5165 :
5166 86 : Q_E_Int(spnum) =
5167 43 : RatedTotalCapacity(spnum) *
5168 43 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestEint) *
5169 43 : TotCapFlowModFac(spnum) -
5170 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5171 :
5172 43 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
5173 43 : if (RatedCOP(spnum) > 0.0) {
5174 86 : P_A_Full(spnum) =
5175 43 : Q_A_Full(spnum) * EIRFlowModFac(spnum) *
5176 86 : Curve::CurveValue(
5177 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) /
5178 43 : RatedCOP(spnum) +
5179 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5180 :
5181 86 : P_B_Full(spnum) =
5182 43 : Q_B_Full(spnum) * EIRFlowModFac(spnum) *
5183 86 : Curve::CurveValue(
5184 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB2) /
5185 43 : RatedCOP(spnum) +
5186 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5187 :
5188 43 : P_B_Low(spnum) = Q_B_Low(spnum) * EIRFlowModFac(spnum) *
5189 86 : Curve::CurveValue(
5190 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestB1) /
5191 43 : RatedCOP(spnum) +
5192 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5193 :
5194 43 : P_F_Low(spnum) = Q_F_Low(spnum) * EIRFlowModFac(spnum) *
5195 86 : Curve::CurveValue(
5196 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestF1) /
5197 43 : RatedCOP(spnum) +
5198 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5199 :
5200 43 : P_E_Int(spnum) =
5201 43 : Q_E_Int(spnum) * EIRFlowModFac(spnum) *
5202 86 : Curve::CurveValue(
5203 43 : state, EIRFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestEint) /
5204 43 : RatedCOP(spnum) +
5205 43 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
5206 : }
5207 : }
5208 : // Standard Rating cooling (net) capacity calculations:
5209 18 : NetCoolingCapRated_2023(nsp) = Q_A_Full(nsp);
5210 18 : NetCoolingCapRatedMaxSpeed2023 = NetCoolingCapRated_2023(nsp);
5211 :
5212 : // EER2 calculation | Section 3.1.16(AHRI 210/240 2023)
5213 : // A ratio of the cooling capacity in Btu/h to the Total Power in watts at AFull test conditions and expressed in Btu/(W-h)
5214 : // In case of Coil:Cooling:DX:MultiSpeed coil we're picking the max speed.
5215 18 : EER2 = Q_A_Full(nsp) / P_A_Full(nsp);
5216 :
5217 : // Calculate the SEER value based on contribution of each outdoor air bin temperature
5218 18 : Real64 q_sum = 0.0;
5219 18 : Real64 e_sum = 0.0;
5220 18 : Real64 NetCoolingCapWeighted2_2023 = 0.0;
5221 18 : Real64 TotCoolingElecPowerWeighted2_2023 = 0.0;
5222 162 : for (int BN = 0; BN < NumOfOATempBins; ++BN) {
5223 : // Equation 11.67 (AHRI-2023)
5224 144 : BuildingCoolingLoad_2023 = ((OutdoorBinTemperatureSEER[BN] - 18.3) / (35.0 - 18.3) * (Q_A_Full(nsp) / SF)) * V;
5225 : // determine the speed number
5226 144 : CoolingCapacityMax_2023 =
5227 144 : Q_B_Full(nsp) + ((Q_A_Full(nsp) - Q_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
5228 144 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
5229 144 : CoolingElecPowerMax_2023 =
5230 144 : P_B_Full(nsp) + ((P_A_Full(nsp) - P_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
5231 144 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
5232 :
5233 : // Equation 11.69 (AHRI-2023)
5234 144 : q_low = Q_F_Low(1) + ((Q_B_Low(1) - Q_F_Low(1)) / (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
5235 144 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestF1);
5236 : // Equation 11.70 (AHRI-2023)
5237 144 : p_low = P_F_Low(1) + ((P_B_Low(1) - P_F_Low(1)) / (OutdoorCoilInletAirDryBulbTempTestB1 - OutdoorCoilInletAirDryBulbTempTestF1)) *
5238 144 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestF1);
5239 : // Equation 11.71 (AHRI-2023)
5240 144 : q_full =
5241 144 : Q_B_Full(nsp) + ((Q_A_Full(nsp) - Q_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
5242 144 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
5243 : // Equation 11.72 (AHRI-2023)
5244 144 : p_full =
5245 144 : P_B_Full(nsp) + ((P_A_Full(nsp) - P_B_Full(nsp)) / (OutdoorCoilInletAirDryBulbTempTestA2 - OutdoorCoilInletAirDryBulbTempTestB2)) *
5246 144 : (OutdoorBinTemperatureSEER[BN] - OutdoorCoilInletAirDryBulbTempTestB2);
5247 :
5248 144 : Real64 q(0.0);
5249 144 : Real64 e(0.0);
5250 144 : Real64 N_Cq(0.0);
5251 144 : Real64 M_Cq(0.0);
5252 144 : Real64 N_CE(0.0);
5253 144 : Real64 M_CE(0.0);
5254 144 : Real64 q_int(0.0);
5255 144 : Real64 p_int(0.0);
5256 144 : Real64 t = OutdoorBinTemperatureSEER[BN];
5257 144 : Real64 n = CoolFracBinHoursAtOutdoorBinTemp[BN];
5258 144 : Real64 bl = BuildingCoolingLoad_2023;
5259 201 : for (int spnum = 1; spnum <= nsp; ++spnum) {
5260 : // # Intermediate Capacity
5261 201 : Real64 q_A_full = Q_A_Full(spnum);
5262 201 : Real64 q_B_full = Q_B_Full(spnum);
5263 201 : Real64 q_B_low = Q_B_Low(spnum);
5264 201 : Real64 q_F_low = Q_F_Low(spnum);
5265 201 : Real64 q_E_int = Q_E_Int(spnum);
5266 :
5267 201 : std::tie(N_Cq, M_Cq) = CapacityAdjustmentFactorsInCoolingModeSEER2(q_F_low, q_B_low, BN, q_B_full, q_A_full, q_E_int);
5268 :
5269 : // # Intermediate Power
5270 201 : Real64 p_A_full = P_A_Full(spnum);
5271 201 : Real64 p_B_full = P_B_Full(spnum);
5272 201 : Real64 p_B_low = P_B_Low(spnum);
5273 201 : Real64 p_F_low = P_F_Low(spnum);
5274 201 : Real64 p_E_int = P_E_Int(spnum);
5275 :
5276 201 : std::tie(N_CE, M_CE) = EnergyAdjustmentFactorsInCoolingModeSEER2(p_F_low, p_B_low, BN, p_B_full, p_A_full, p_E_int);
5277 :
5278 201 : std::tie(q_int, p_int) = IntermediateSteadyStateCpacityAndPowerSEER2(q_E_int, M_Cq, p_E_int, M_CE, t);
5279 :
5280 : // Section 11.2.1.3.1 CASE 1 - Building load is no greater than unit capacity at low speed.
5281 201 : if (bl <= q_low) {
5282 67 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
5283 134 : IntermediateCapacityAndPowerSEER2Case1(state, bl, q_low, n, p_low, PLFFPLRCurveIndex(spnum));
5284 : // This is the case and speed we're looking for now we exit and try calculating against the next bin
5285 67 : goto SpeedLoop3_exit;
5286 : } else {
5287 : //
5288 134 : if (spnum < nsp - 1) {
5289 : // As part of our new experiment if the first case is not satisfied then we'll go and try the next speed
5290 : // instead of going to the next case.
5291 : } else {
5292 : // if we're here then all the speeds (apart from max speed) failed to satisfy the first case.
5293 : // Now we've to try second case.
5294 95 : if (bl < q_int) {
5295 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed & full
5296 : // Speed
5297 19 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2A(
5298 38 : p_int, q_int, q_low, bl, n, Q_E_Int(spnum), q_full, P_E_Int(spnum), p_full, p_low);
5299 19 : goto SpeedLoop3_exit;
5300 : } else {
5301 : // if we're here then all the speeds (apart from max speed) failed to staisfy the case 2A
5302 76 : if (bl < q_full) {
5303 : // Section 11.2.1.3.2 CASE 2 - Building load can be matched by modulating the compressor speed between low speed &
5304 : // full Speed
5305 42 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) = IntermediateCapacityAndPowerSEER2Case2B(
5306 84 : p_int, bl, q_int, n, Q_E_Int(spnum), P_E_Int(spnum), q_low, p_low, q_full, p_full);
5307 42 : goto SpeedLoop3_exit;
5308 : } else {
5309 : // if we're here then all the speeds (apart form max speed ?? ) failed to staisfy the case 2B
5310 : // max speed should include in cases 1,2A,2B or not ?? TBD:
5311 :
5312 34 : if (spnum == nsp - 1) {
5313 : // Case 4 if applicable for nsp-1 then we're skipping it to nsp( max speed )
5314 : } else {
5315 : // Section 11.2.1.3.3 CASE 3 - Building load is equal to or greater than unit capacity at full stage
5316 16 : std::tie(q, e, NetTotCoolCapBinned_2023, TotCoolElecPowerBinned_2023) =
5317 32 : IntermediateCapacityAndPowerSEER2Case3(q_full, p_full, CoolingCapacityMax_2023, CoolingElecPowerMax_2023, n);
5318 16 : goto SpeedLoop3_exit;
5319 : }
5320 : }
5321 : }
5322 : }
5323 : }
5324 : }
5325 0 : SpeedLoop3_exit:;
5326 144 : NetCoolingCapWeighted2_2023 += NetTotCoolCapBinned_2023;
5327 144 : TotCoolingElecPowerWeighted2_2023 += TotCoolElecPowerBinned_2023;
5328 :
5329 144 : q_sum += q;
5330 144 : e_sum += e;
5331 : }
5332 18 : SEER2_User = 0.0;
5333 18 : SEER2_Standard = 0.0;
5334 18 : if (e_sum > 0.0) {
5335 18 : SEER2_User = NetCoolingCapWeighted2_2023 / TotCoolingElecPowerWeighted2_2023;
5336 18 : SEER2_Standard = q_sum / e_sum; // Equation 11.66 (AHRI-2023)
5337 : }
5338 :
5339 36 : return std::make_tuple(NetCoolingCapRatedMaxSpeed2023, SEER2_User, SEER2_Standard, EER2);
5340 18 : }
5341 :
5342 18 : std::map<std::string, Real64> MultiSpeedDXCoolingCoilStandardRatings(
5343 : EnergyPlusData &state,
5344 : std::string const &DXCoilType, // Type of DX coil for which HSPF is calculated
5345 : std::string const &DXCoilName, // Type of DX coil for which standard Ratings are calculated
5346 : Array1A_int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
5347 : Array1A_int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
5348 : Array1A_int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
5349 : Array1A_int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
5350 : Array1A_int const PLFFPLRCurveIndex, // Index for the PLF vs part-load ratio curve
5351 : Array1A<Real64> const RatedTotalCapacity, // Reference capacity of DX coil [W]
5352 : Array1A<Real64> const RatedCOP, // Reference coefficient of performance [W/W]
5353 : Array1A<Real64> const RatedAirVolFlowRate, // Reference air flow rate of DX coil [m3/s]
5354 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput, // 2017 rated fan power per evap air flow rate [W/(m3/s)]
5355 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput_2023, // 2023 rated fan power per evap air flow rate [W/(m3/s)]
5356 : int const nsp, // Number of compressor speeds
5357 : Array1D<DataHeatBalance::RefrigCondenserType> const &CondenserType)
5358 : {
5359 :
5360 : // SUBROUTINE INFORMATION:
5361 : // AUTHOR B. Nigusse, FSEC
5362 : // DATE WRITTEN December 2012
5363 : // MODIFIED
5364 : // RE-ENGINEERED na
5365 :
5366 : // PURPOSE OF THIS SUBROUTINE:
5367 : // Calculates the standard ratings net cooling capacity and SEER values for multi speed DX cooling coils
5368 : // at the AHRI standard test condition(s).
5369 :
5370 : // METHODOLOGY EMPLOYED:
5371 : // na
5372 :
5373 : // REFERENCES:
5374 : // na
5375 :
5376 : // Using/Aliasing
5377 : using Curve::CurveValue;
5378 :
5379 : // Argument array dimensioning
5380 18 : CapFTempCurveIndex.dim(nsp);
5381 18 : CapFFlowCurveIndex.dim(nsp);
5382 18 : EIRFTempCurveIndex.dim(nsp);
5383 18 : EIRFFlowCurveIndex.dim(nsp);
5384 18 : PLFFPLRCurveIndex.dim(nsp);
5385 18 : RatedTotalCapacity.dim(nsp);
5386 18 : RatedCOP.dim(nsp);
5387 18 : RatedAirVolFlowRate.dim(nsp);
5388 18 : FanPowerPerEvapAirFlowRateFromInput.dim(nsp);
5389 :
5390 : // Locals
5391 : // SUBROUTINE ARGUMENT DEFINITIONS:
5392 :
5393 : // SUBROUTINE PARAMETER DEFINITIONS:
5394 : // CHARACTER(len=*), PARAMETER :: RoutineName='MultiSpeedDXCoolingCoilStandardRatings: ' ! Include trailing blank space
5395 : // INTERFACE BLOCK SPECIFICATIONS
5396 : // na
5397 :
5398 : // DERIVED TYPE DEFINITIONS
5399 : // na
5400 :
5401 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
5402 :
5403 : // Intermediate values calculated from the inputs in the idf file
5404 :
5405 18 : Real64 NetCoolingCapRatedMaxSpeed(0.0); // net cooling capacity at maximum speed
5406 18 : Real64 SEER_User(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil, from user-input PLF curve and C_D value
5407 18 : Real64 SEER_Standard(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil, from AHRI Std 210/240-2008 default PLF
5408 : // curve and
5409 : // C_D value
5410 18 : Real64 EER(0.0);
5411 :
5412 : // Ratings Based on ANSI/AHRI 210/140
5413 18 : Real64 NetCoolingCapRatedMaxSpeed2023(0.0); // net cooling capacity at maximum speed
5414 18 : Real64 SEER2_User(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil, from user-input PLF curve and C_D value
5415 18 : Real64 SEER2_Standard(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil, from AHRI Std 210/240-2008 default PLF
5416 : // curve and
5417 : // C_D value
5418 18 : Real64 EER2(0.0);
5419 :
5420 : // IEER Calculation 2022
5421 18 : Real64 IEER_2022(0.0);
5422 18 : Real64 NetCoolingCapRated2023(0.0); // ?? for which speed (NetCoolingCapRatedMaxSpeed2023)
5423 18 : Real64 EER_2022(0.0);
5424 18 : std::map<std::string, Real64> StandardRatingsResult;
5425 : // StandardRatingsResult["NetCoolingCapRatedMaxSpeed"] = NetCoolingCapRatedMaxSpeed;
5426 : // StandardRatingsResult["SEER_User"] = SEER_User;
5427 : // StandardRatingsResult["SEER_Standard"] = SEER_Standard;
5428 : // StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRatedMaxSpeed2023;
5429 : // StandardRatingsResult["SEER2_User"] = SEER2_User;
5430 : // StandardRatingsResult["SEER2_Standard"] = SEER2_Standard;
5431 18 : Real64 TotCapFlowModFac = Curve::CurveValue(state, CapFFlowCurveIndex(nsp), AirMassFlowRatioRated);
5432 18 : NetCoolingCapRatedMaxSpeed =
5433 18 : RatedTotalCapacity(nsp) *
5434 18 : Curve::CurveValue(state, CapFTempCurveIndex(nsp), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
5435 18 : TotCapFlowModFac -
5436 18 : FanPowerPerEvapAirFlowRateFromInput(nsp) * RatedAirVolFlowRate(nsp);
5437 18 : if (RatedTotalCapacity(nsp) > 0.0 && RatedAirVolFlowRate(nsp) > 0.0) {
5438 :
5439 18 : NetCoolingCapRated2023 =
5440 18 : RatedTotalCapacity(nsp) *
5441 18 : Curve::CurveValue(state, CapFTempCurveIndex(nsp), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
5442 18 : TotCapFlowModFac -
5443 18 : FanPowerPerEvapAirFlowRateFromInput_2023(nsp) * RatedAirVolFlowRate(nsp);
5444 36 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRated2023;
5445 : // TODO: Commercial and industrial unitary air-conditioning condensing units with a capacity greater than 135,000 Btu/h (39564.59445
5446 : // Watts) as defined in ANSI/AHRI Standard 365(I-P). | Scope 2.2.6 (ANSI/AHRI 340-360 2022)
5447 :
5448 36 : std::tie(NetCoolingCapRatedMaxSpeed, SEER_User, SEER_Standard, EER) = MultiSpeedDXCoolingCoilSEER(state,
5449 : nsp,
5450 : CapFFlowCurveIndex,
5451 : RatedTotalCapacity,
5452 : CapFTempCurveIndex,
5453 : FanPowerPerEvapAirFlowRateFromInput,
5454 : RatedAirVolFlowRate,
5455 : EIRFFlowCurveIndex,
5456 : RatedCOP,
5457 : EIRFTempCurveIndex,
5458 18 : PLFFPLRCurveIndex);
5459 :
5460 18 : if (CondenserType(1) == DataHeatBalance::RefrigCondenserType::Air) {
5461 : // SEER2 standard applies to factory-made Unitary Air-conditioners and Unitary Air-source Heat Pumps with
5462 : // capacities less than 65,000 Btu/h (19049.61955 Watts) | Section 2.1 (ANSI/AHRI 210-240 2023)
5463 : // Removal of water-cooled and evaporatively-cooled products from the scope | Foreword (ANSI/AHRI 210-240 2023)
5464 : //
5465 : // SEER2 Calculations ANSI/AHRI 210/240 Standard 2023
5466 18 : std::tie(NetCoolingCapRatedMaxSpeed2023, SEER2_User, SEER2_Standard, EER2) =
5467 36 : MultiSpeedDXCoolingCoilSEER2(state,
5468 : nsp,
5469 : CapFFlowCurveIndex,
5470 : RatedTotalCapacity,
5471 : CapFTempCurveIndex,
5472 : FanPowerPerEvapAirFlowRateFromInput_2023,
5473 : RatedAirVolFlowRate,
5474 : EIRFFlowCurveIndex,
5475 : RatedCOP,
5476 : EIRFTempCurveIndex,
5477 18 : PLFFPLRCurveIndex);
5478 54 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRatedMaxSpeed2023;
5479 : }
5480 : // Gross total cooling capacity is greater than 65,000 Btu/h (19049.61955 Watts)
5481 : // Section 2.1 (ANSI/AHRI 210-240 2023)
5482 18 : std::tie(IEER_2022, NetCoolingCapRated2023, EER_2022) = IEERCalculationMultiSpeed(state,
5483 : DXCoilType,
5484 : nsp,
5485 : CapFTempCurveIndex,
5486 : RatedTotalCapacity,
5487 : CapFFlowCurveIndex,
5488 : // TotCapFlowModFac, // calculate for each speed
5489 : FanPowerPerEvapAirFlowRateFromInput_2023,
5490 : RatedAirVolFlowRate,
5491 : EIRFTempCurveIndex,
5492 : RatedCOP,
5493 : EIRFFlowCurveIndex,
5494 : // EIRFlowModFac, // calculate for each speed
5495 18 : CondenserType);
5496 54 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRated2023;
5497 :
5498 : } else {
5499 0 : ShowSevereError(state,
5500 : "Standard Ratings: Coil:Cooling:DX:MultiSpeed has eiher zero rated total cooling capacity or zero rated air vol flow "
5501 : "rate. Standard ratings cannot be calculated.");
5502 : }
5503 :
5504 36 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed"] = NetCoolingCapRatedMaxSpeed;
5505 36 : StandardRatingsResult["SEER_User"] = SEER_User;
5506 36 : StandardRatingsResult["SEER_Standard"] = SEER_Standard;
5507 36 : StandardRatingsResult["EER"] = EER;
5508 :
5509 36 : StandardRatingsResult["SEER2_User"] = SEER2_User;
5510 36 : StandardRatingsResult["SEER2_Standard"] = SEER2_Standard;
5511 36 : StandardRatingsResult["EER2"] = EER2;
5512 :
5513 36 : StandardRatingsResult["IEER_2022"] = IEER_2022;
5514 36 : StandardRatingsResult["EER_2022"] = EER_2022;
5515 :
5516 36 : return StandardRatingsResult;
5517 0 : }
5518 :
5519 26 : std::map<std::string, Real64> VariableSpeedDXCoolingCoilStandardRatings(
5520 : EnergyPlusData &state,
5521 : std::string const &DXCoilType, // Type of DX coil for which HSPF is calculated
5522 : std::string const &DXCoilName, // Name of the DX Coil for which Standard Ratings are calculated.
5523 : Array1A_int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
5524 : Array1A_int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
5525 : Array1A_int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
5526 : Array1A_int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
5527 : int const PLFFPLRCurveIndex, // Index for the PLF vs part-load ratio curve
5528 : Array1A<Real64> const RatedTotalCapacity, // Reference capacity of DX coil [W]
5529 : Array1A<Real64> const RatedCOP, // Reference coefficient of performance [W/W]
5530 : Array1A<Real64> const RatedAirVolFlowRate, // Reference air flow rate of DX coil [m3/s]
5531 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput, // 2017 rated fan power per evap air flow rate [W/(m3/s)]
5532 : Array1A<Real64> const FanPowerPerEvapAirFlowRateFromInput_2023, // 2023 rated fan power per evap air flow rate [W/(m3/s)]
5533 : int const nsp, // Number of compressor speeds
5534 : DataHeatBalance::RefrigCondenserType const &CondenserType,
5535 : Real64 VSGrossRatedTotalCoolingCapacity,
5536 : Real64 VSRatedVolumetricAirFlowRate)
5537 : {
5538 : // Using/Aliasing
5539 : using Curve::CurveValue;
5540 :
5541 : // Argument array dimensioning
5542 26 : CapFTempCurveIndex.dim(nsp);
5543 26 : CapFFlowCurveIndex.dim(nsp);
5544 26 : EIRFTempCurveIndex.dim(nsp);
5545 26 : EIRFFlowCurveIndex.dim(nsp);
5546 : // PLFFPLRCurveIndex.dim(nsp);
5547 26 : RatedTotalCapacity.dim(nsp);
5548 26 : RatedCOP.dim(nsp);
5549 26 : RatedAirVolFlowRate.dim(nsp);
5550 26 : FanPowerPerEvapAirFlowRateFromInput.dim(nsp);
5551 :
5552 : // Ratings Based on ANSI/AHRI 210/140
5553 26 : Real64 NetCoolingCapRatedMaxSpeed2023(0.0); // net cooling capacity at maximum speed
5554 26 : Real64 SEER2_User(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil, from user-input PLF curve and C_D value
5555 26 : Real64 SEER2_Standard(0.0); // seasonal energy efficiency ratio of multi speed DX cooling coil, from AHRI Std 210/240-2008 default PLF
5556 : // curve and
5557 : // C_D value
5558 26 : Real64 EER2(0.0);
5559 :
5560 26 : Real64 IEER_2022(0.0);
5561 26 : Real64 NetCoolingCapRated2022(0.0); // ?? for which speed (NetCoolingCapRatedMaxSpeed2023)
5562 26 : Real64 EER_2022(0.0);
5563 :
5564 26 : std::map<std::string, Real64> StandardRatingsResult;
5565 :
5566 26 : Real64 GrossRatedTotalCoolingCapacityVS(0.0);
5567 26 : if (VSGrossRatedTotalCoolingCapacity < 0) {
5568 1 : GrossRatedTotalCoolingCapacityVS = RatedTotalCapacity(nsp);
5569 : } else {
5570 25 : GrossRatedTotalCoolingCapacityVS = VSGrossRatedTotalCoolingCapacity;
5571 : }
5572 26 : Real64 RatedVolumetricAirFlowRateVS(0.0);
5573 26 : if (VSRatedVolumetricAirFlowRate < 0) {
5574 1 : RatedVolumetricAirFlowRateVS = RatedAirVolFlowRate(nsp);
5575 : } else {
5576 25 : RatedVolumetricAirFlowRateVS = VSRatedVolumetricAirFlowRate;
5577 : }
5578 :
5579 26 : Real64 CapacityScaleFactor(0.0);
5580 26 : Real64 GrossRatedTotalCoolingCapacity(0.0);
5581 26 : Real64 ReferenceUnitCapacityAtNominalSpeedLevel(0.0);
5582 :
5583 26 : Array1D<Real64> GrossRatedCapacityAtSpeedLevel(nsp);
5584 26 : Array1D<Real64> ReferenceUnitCapacityAtSpeedLevel(nsp);
5585 :
5586 26 : Real64 AirFlowScaleFactor(0.0);
5587 26 : Real64 RatedVolumetricAirFlowRate(0.0);
5588 26 : Real64 ReferenceUnitVolAirFlowRateAtNominalSpeedLevel(0.0);
5589 :
5590 26 : Array1D<Real64> LoopVolumetricAirFlowRateAtSpeedLevel(nsp);
5591 26 : Array1D<Real64> ReferenceUnitVolAirFlowRateAtSpeedLevel(nsp);
5592 :
5593 26 : int NominalSpeedLevel = nsp;
5594 164 : for (int spnum = 1; spnum <= nsp; ++spnum) {
5595 138 : ReferenceUnitCapacityAtSpeedLevel(spnum) = RatedTotalCapacity(spnum);
5596 138 : ReferenceUnitVolAirFlowRateAtSpeedLevel(spnum) = RatedAirVolFlowRate(spnum);
5597 : }
5598 26 : GrossRatedTotalCoolingCapacity = GrossRatedTotalCoolingCapacityVS;
5599 26 : ReferenceUnitCapacityAtNominalSpeedLevel = ReferenceUnitCapacityAtSpeedLevel(NominalSpeedLevel);
5600 26 : CapacityScaleFactor =
5601 : GrossRatedTotalCoolingCapacity / ReferenceUnitCapacityAtNominalSpeedLevel; // Section 1.41.21.1.6 | Equation (1.160) | IO-Ref
5602 :
5603 26 : RatedVolumetricAirFlowRate = RatedVolumetricAirFlowRateVS;
5604 26 : ReferenceUnitVolAirFlowRateAtNominalSpeedLevel = ReferenceUnitVolAirFlowRateAtSpeedLevel(NominalSpeedLevel);
5605 26 : AirFlowScaleFactor = RatedVolumetricAirFlowRate / (ReferenceUnitVolAirFlowRateAtNominalSpeedLevel *
5606 : CapacityScaleFactor); // Section 1.41.21.1.7 | Equation (1.162) | IO-Ref
5607 :
5608 164 : for (int sp = 1; sp <= nsp; ++sp) {
5609 276 : GrossRatedCapacityAtSpeedLevel(sp) =
5610 138 : CapacityScaleFactor * ReferenceUnitCapacityAtSpeedLevel(sp); // Section 1.41.21.1.6 | Equation (1.161) | IO-Ref
5611 :
5612 138 : LoopVolumetricAirFlowRateAtSpeedLevel(sp) = AirFlowScaleFactor * ReferenceUnitVolAirFlowRateAtSpeedLevel(sp) *
5613 : CapacityScaleFactor; // Section 1.41.21.1.7 | Equation (1.163) | IO-Ref
5614 : }
5615 :
5616 26 : if (GrossRatedTotalCoolingCapacityVS > 0.0 && RatedVolumetricAirFlowRateVS > 0.0) {
5617 :
5618 26 : Real64 TotCapFlowModFac = Curve::CurveValue(state, CapFFlowCurveIndex(nsp), AirMassFlowRatioRated);
5619 : Real64 NetCoolingCapRated =
5620 26 : GrossRatedCapacityAtSpeedLevel(nsp) *
5621 26 : Curve::CurveValue(state, CapFTempCurveIndex(nsp), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
5622 : TotCapFlowModFac -
5623 26 : FanPowerPerEvapAirFlowRateFromInput(nsp) * LoopVolumetricAirFlowRateAtSpeedLevel(nsp);
5624 52 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed"] = NetCoolingCapRated;
5625 :
5626 26 : NetCoolingCapRatedMaxSpeed2023 =
5627 26 : GrossRatedCapacityAtSpeedLevel(nsp) *
5628 26 : Curve::CurveValue(state, CapFTempCurveIndex(nsp), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2) *
5629 26 : TotCapFlowModFac -
5630 26 : FanPowerPerEvapAirFlowRateFromInput_2023(nsp) * LoopVolumetricAirFlowRateAtSpeedLevel(nsp);
5631 52 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRatedMaxSpeed2023;
5632 : // TODO: Commercial and industrial unitary air-conditioning condensing units with a capacity greater than 135,000 Btu/h (39564.59445
5633 : // Watts) as defined in ANSI/AHRI Standard 365(I-P). | Scope 2.2.6 (ANSI/AHRI 340-360 2022)
5634 :
5635 26 : if (CondenserType == DataHeatBalance::RefrigCondenserType::Air) {
5636 : // SEER2 standard applies to factory-made Unitary Air-conditioners and Unitary Air-source Heat Pumps with
5637 : // capacities less than 65,000 Btu/h (19049.61955 Watts) | Section 2.1 (ANSI/AHRI 210-240 2023)
5638 : // Removal of water-cooled and evaporatively-cooled products from the scope | Foreword (ANSI/AHRI 210-240 2023)
5639 26 : Array1D<int> VSPLRFPLF;
5640 164 : for (int spnum = 1; spnum <= nsp; ++spnum) {
5641 138 : VSPLRFPLF.push_back(PLFFPLRCurveIndex);
5642 : }
5643 :
5644 : // SEER2 Calculations ANSI/AHRI 210/240 Standard 2023
5645 26 : std::tie(NetCoolingCapRatedMaxSpeed2023, SEER2_User, SEER2_Standard, EER2) =
5646 52 : VariableSpeedDXCoolingCoilSEER2(state,
5647 : nsp,
5648 : CapFFlowCurveIndex,
5649 : GrossRatedCapacityAtSpeedLevel, // RatedTotalCapacity,
5650 : CapFTempCurveIndex,
5651 : FanPowerPerEvapAirFlowRateFromInput_2023,
5652 : LoopVolumetricAirFlowRateAtSpeedLevel, // RatedAirVolFlowRate,
5653 : EIRFFlowCurveIndex,
5654 : RatedCOP,
5655 : EIRFTempCurveIndex,
5656 26 : VSPLRFPLF);
5657 52 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRatedMaxSpeed2023;
5658 26 : }
5659 : // IEER Calculation 2022
5660 26 : std::tie(IEER_2022, NetCoolingCapRatedMaxSpeed2023, EER_2022) =
5661 52 : IEERCalculationVariableSpeed(state,
5662 : DXCoilType,
5663 : nsp,
5664 : CapFTempCurveIndex,
5665 : GrossRatedCapacityAtSpeedLevel, // RatedTotalCapacity,
5666 : CapFFlowCurveIndex,
5667 : FanPowerPerEvapAirFlowRateFromInput_2023,
5668 : LoopVolumetricAirFlowRateAtSpeedLevel, // RatedAirVolFlowRate,
5669 : EIRFTempCurveIndex,
5670 : RatedCOP,
5671 : EIRFFlowCurveIndex,
5672 26 : CondenserType);
5673 52 : StandardRatingsResult["NetCoolingCapRatedMaxSpeed2023"] = NetCoolingCapRatedMaxSpeed2023;
5674 :
5675 26 : } else {
5676 0 : ShowSevereError(state,
5677 0 : "Standard Ratings: Coil:Cooling:DX " + DXCoilType + // TODO: Use dynamic COIL TYPE and COIL INSTANCE name later
5678 : " has zero rated total cooling capacity. Standard ratings cannot be calculated.");
5679 : }
5680 :
5681 : // From SEER2 implementation
5682 52 : StandardRatingsResult["SEER2_User"] = SEER2_User;
5683 52 : StandardRatingsResult["SEER2_Standard"] = SEER2_Standard;
5684 52 : StandardRatingsResult["EER2"] = EER2;
5685 :
5686 : // From IEER2 implementation
5687 52 : StandardRatingsResult["IEER_2022"] = IEER_2022;
5688 52 : StandardRatingsResult["EER_2022"] = EER_2022;
5689 :
5690 52 : return StandardRatingsResult;
5691 26 : }
5692 :
5693 8 : std::tuple<Real64, Real64, Real64> MultiSpeedDXHeatingCoilHSPF(
5694 : EnergyPlusData &state,
5695 : int const nsp, // Number of compressor speed
5696 : Array1A<Real64> const MSFanPowerPerEvapAirFlowRateInput, // 2017 rated fan power per evap air flow rate [W/(m3/s)]
5697 : Array1A_int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
5698 : Array1A_int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
5699 : Array1A<Real64> const RatedTotalCapacity, // Reference capacity of DX coil [W]
5700 : Array1A<Real64> const RatedAirVolFlowRate, // Reference air flow rate of DX coil [m3/s]
5701 : Array1A_int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
5702 : Array1A_int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
5703 : Array1A<Real64> const RatedCOP, // Reference coefficient of performance [W/W]
5704 : ObjexxFCL::Optional_int_const RegionNum, // Region number for calculating HSPF of single speed DX heating coil
5705 : ObjexxFCL::Optional<Real64 const> MinOATCompressor, // Minimum OAT for heat pump compressor operation [C]
5706 : ObjexxFCL::Optional<Real64 const> OATempCompressorOn, // The outdoor temperature when the compressor is automatically turned
5707 : ObjexxFCL::Optional_bool_const OATempCompressorOnOffBlank, // Flag used to determine low temperature cut out factor
5708 : ObjexxFCL::Optional<HPdefrostControl const> DefrostControl) // defrost control; 1=timed, 2=on-demand
5709 : {
5710 :
5711 : // Intermediate values calculated from the inputs in the idf file
5712 8 : Real64 HSPF(0.0);
5713 8 : Real64 NetHeatingCapRatedHighTemp(0.0);
5714 8 : Real64 NetHeatingCapRatedLowTemp(0.0);
5715 :
5716 8 : Array1D<Real64> FanPowerPerEvapAirFlowRate(nsp); // Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
5717 8 : Array1D<Real64> TotHeatCapTestH0(nsp); // Total cooling capacity at A2 test condition (High speed)
5718 8 : Array1D<Real64> TotHeatCapTestH1(nsp); // Total cooling capacity at B2 test condition (High speed)
5719 8 : Array1D<Real64> TotHeatCapTestH2(nsp); // Total cooling capacity at B1 test condition (Low speed)
5720 8 : Array1D<Real64> TotHeatCapTestH3(nsp); // Total cooling capacity at F1 test condition (Low speed)
5721 8 : Array1D<Real64> OutdoorUnitPowerTestH0(nsp); // Outdoor Unit electric power at A2 test condition (High speed)
5722 8 : Array1D<Real64> OutdoorUnitPowerTestH1(nsp); // Outdoor Unit electric power at B2 test condition (High speed)
5723 8 : Array1D<Real64> OutdoorUnitPowerTestH2(nsp); // Outdoor Unit electric power at B1 test condition (Low speed)
5724 8 : Array1D<Real64> OutdoorUnitPowerTestH3(nsp); // Outdoor Unit electric power at F1 test condition (Low speed)
5725 : Real64 HeatingCapacityLS; // cooling capacity of Mult-speed DX coil at lower speed, [W]
5726 : Real64 HeatingCapacityHS; // cooling capacity of Mult-speed DX coil at higher speed, [W]
5727 : Real64 HeatingElecPowerLS; // outdoor unit electric power input at low speed, [W]
5728 : Real64 HeatingElecPowerHS; // outdoor unit electric power input at high speed, [W]
5729 : Real64 HeatingCapacityMax; // cooling capacity of Mult-speed DX coil at max speed, [W]
5730 : Real64 HeatingElecPowerMax; // outdoor unit electric power input at Max speed, [W]
5731 8 : Array1D<Real64> TotHeatCapTestH1High(nsp); // net heating capacity high speed at H1 test conditon, [W]
5732 :
5733 : // Intermediate values calculated from the inputs in the idf file
5734 8 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
5735 8 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
5736 :
5737 8 : Real64 TotCapTempModFacH0(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H0 Test [-]
5738 8 : Real64 EIRTempModFacH0(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H0 Test[-]
5739 8 : Real64 TotCapTempModFacH1(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H1 Test [-]
5740 8 : Real64 EIRTempModFacH1(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H1 Test[-]
5741 8 : Real64 TotCapTempModFacH2(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H2 Test [-]
5742 8 : Real64 EIRTempModFacH2(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H2 Test[-]
5743 8 : Real64 TotCapTempModFacH3(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H3 Test [-]
5744 8 : Real64 EIRTempModFacH3(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H3 Test[-]
5745 :
5746 8 : Real64 OATempCompressorOff(0.0); // Minimum outdoor air temperature to turn the commpressor off
5747 8 : Real64 PartLoadRatio(0.0); // compressor cycling ratio between successive speeds, [-]
5748 8 : Real64 PartLoadFraction(0.0); // part-load fraction that account for the cyclic degradation, [-]
5749 :
5750 8 : Real64 NetHeatingCapWeighted(0.0); // net total heating cap weighted by the fraction of the binned cooling hours [W]
5751 8 : Real64 TotHeatingElecPowerWeighted(0.0); // net total heat pump and resistance heating electric Energy input weighted by
5752 : // the fraction of the binned cooling hours
5753 8 : Real64 BuildingHeatingLoad(0.0); // Building space heating load corresponding to an outdoor bin temperature [W]
5754 8 : Real64 NetTotHeatCapBinned(0.0); // Net tot heatinging cap corresponding to an outdoor bin temperature [W]
5755 8 : Real64 TotHeatElecPowerBinnedHP(0.0); // Total Heat Pump heating electric power consumption at outdoor bin temp [W]
5756 8 : Real64 TotHeatElecPowerBinnedRH(0.0); // Total Resistance heating electric power consumption at outdoor bin temp [W]
5757 :
5758 : Real64 LoadFactor; // Fractional "on" time for last stage at the desired reduced capacity, (dimensionless)
5759 8 : Real64 LowTempCutOutFactor(0.0); // Factor which corresponds to compressor operation depending on outdoor temperature
5760 :
5761 8 : Real64 FractionalBinHours(0.0); // Fractional bin hours for the heating season [-]
5762 8 : Real64 DemandDeforstCredit(1.0); // A factor to adjust HSPF if coil has demand defrost control [-]
5763 8 : Real64 DesignHeatingRequirement(0.0); // The amount of heating required to maintain a given indoor temperature
5764 : // at a particular outdoor design temperature. [W]
5765 8 : Real64 DesignHeatingRequirementMin(0.0); // minimum design heating requirement [W]
5766 8 : Real64 DesignHeatingRequirementMax(0.0); // maximum design heating requirement [W]
5767 :
5768 8 : NetHeatingCapWeighted = 0.0;
5769 8 : TotHeatingElecPowerWeighted = 0.0;
5770 :
5771 26 : for (int spnum = 1; spnum <= nsp; ++spnum) {
5772 18 : FanPowerPerEvapAirFlowRate(spnum) = 0.0;
5773 18 : if (MSFanPowerPerEvapAirFlowRateInput(spnum) <= 0.0) {
5774 2 : FanPowerPerEvapAirFlowRate(spnum) = DefaultFanPowerPerEvapAirFlowRate;
5775 : } else {
5776 16 : FanPowerPerEvapAirFlowRate(spnum) = MSFanPowerPerEvapAirFlowRateInput(spnum);
5777 : }
5778 : }
5779 :
5780 : // Proceed withe HSPF value calculation
5781 26 : for (int spnum = 1; spnum <= nsp; ++spnum) {
5782 18 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
5783 : {
5784 18 : if (state.dataCurveManager->curves(CapFTempCurveIndex(spnum))->numDims == 1) {
5785 0 : TotCapTempModFacH0 = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempH0Test);
5786 0 : TotCapTempModFacH1 = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempRated);
5787 0 : TotCapTempModFacH2 = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempH2Test);
5788 0 : TotCapTempModFacH3 = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempH3Test);
5789 : } else {
5790 36 : TotCapTempModFacH0 = Curve::CurveValue(
5791 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH0Test);
5792 36 : TotCapTempModFacH1 = Curve::CurveValue(
5793 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempRated);
5794 36 : TotCapTempModFacH2 = Curve::CurveValue(
5795 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH2Test);
5796 18 : TotCapTempModFacH3 = Curve::CurveValue(
5797 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH3Test);
5798 : }
5799 : }
5800 :
5801 18 : TotHeatCapTestH0(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH0 * TotCapFlowModFac(spnum) +
5802 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5803 18 : TotHeatCapTestH1(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH1 * TotCapFlowModFac(spnum) +
5804 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5805 18 : TotHeatCapTestH2(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH2 * TotCapFlowModFac(spnum) +
5806 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5807 18 : TotHeatCapTestH3(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH3 * TotCapFlowModFac(spnum) +
5808 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5809 :
5810 18 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
5811 :
5812 : {
5813 18 : if (state.dataCurveManager->curves(EIRFTempCurveIndex(spnum))->numDims == 1) {
5814 0 : EIRTempModFacH0 = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempH0Test);
5815 0 : EIRTempModFacH1 = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempRated);
5816 0 : EIRTempModFacH2 = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempH2Test);
5817 0 : EIRTempModFacH3 = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTempH3Test);
5818 : } else {
5819 36 : EIRTempModFacH0 = Curve::CurveValue(
5820 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH0Test);
5821 36 : EIRTempModFacH1 = Curve::CurveValue(
5822 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempRated);
5823 36 : EIRTempModFacH2 = Curve::CurveValue(
5824 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH2Test);
5825 18 : EIRTempModFacH3 = Curve::CurveValue(
5826 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTempRated, HeatingOutdoorCoilInletAirDBTempH3Test);
5827 : }
5828 : }
5829 18 : if (RatedCOP(spnum) > 0.0) {
5830 18 : OutdoorUnitPowerTestH0(spnum) = TotHeatCapTestH0(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH0 / RatedCOP(spnum) +
5831 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5832 18 : OutdoorUnitPowerTestH1(spnum) = TotHeatCapTestH1(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH1 / RatedCOP(spnum) +
5833 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5834 18 : OutdoorUnitPowerTestH2(spnum) = TotHeatCapTestH2(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH2 / RatedCOP(spnum) +
5835 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5836 36 : OutdoorUnitPowerTestH3(spnum) = TotHeatCapTestH3(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH3 / RatedCOP(spnum) +
5837 18 : FanPowerPerEvapAirFlowRate(spnum) * RatedAirVolFlowRate(spnum);
5838 : }
5839 : }
5840 :
5841 : // determine the HP capacity at the rated condition (AHRI H1 high speed test Condition); and determine the
5842 : // the building heat requirement for the user specified region
5843 8 : NetHeatingCapRatedHighTemp = TotHeatCapTestH1(nsp);
5844 8 : NetHeatingCapRatedLowTemp = TotHeatCapTestH3(nsp);
5845 :
5846 8 : if (RegionNum == 5) {
5847 0 : DesignHeatingRequirementMin = NetHeatingCapRatedHighTemp;
5848 0 : DesignHeatingRequirementMax = 2.20 * NetHeatingCapRatedHighTemp;
5849 : } else {
5850 8 : DesignHeatingRequirementMin = NetHeatingCapRatedHighTemp * (18.33 - OutdoorDesignTemperature[RegionNum - 1]) / (60.0 / 1.80);
5851 8 : DesignHeatingRequirementMax = 2.20 * DesignHeatingRequirementMin;
5852 : }
5853 : // Set the Design Heating Requirement to nearest standard value (From Table 18, AHRI/ANSI Std 210/240)
5854 128 : for (int StandardDHRNum = 0; StandardDHRNum < TotalNumOfStandardDHRs - 1; ++StandardDHRNum) {
5855 120 : if (DesignHeatingRequirementMin < StandardDesignHeatingRequirement[0]) {
5856 :
5857 15 : DesignHeatingRequirement = min(StandardDesignHeatingRequirement[0], DesignHeatingRequirementMax);
5858 :
5859 169 : } else if (DesignHeatingRequirementMin >= StandardDesignHeatingRequirement[StandardDHRNum] &&
5860 64 : DesignHeatingRequirementMin < StandardDesignHeatingRequirement[StandardDHRNum + 1]) {
5861 7 : if ((DesignHeatingRequirementMin - StandardDesignHeatingRequirement[StandardDHRNum]) >
5862 7 : (StandardDesignHeatingRequirement[StandardDHRNum + 1] - DesignHeatingRequirementMin)) {
5863 :
5864 0 : DesignHeatingRequirement = min(StandardDesignHeatingRequirement[StandardDHRNum + 1], DesignHeatingRequirementMax);
5865 : } else {
5866 7 : DesignHeatingRequirement = min(StandardDesignHeatingRequirement[StandardDHRNum], DesignHeatingRequirementMax);
5867 : }
5868 98 : } else if (DesignHeatingRequirementMin >= StandardDesignHeatingRequirement[TotalNumOfStandardDHRs - 1]) {
5869 0 : DesignHeatingRequirement = min(StandardDesignHeatingRequirement[StandardDHRNum], DesignHeatingRequirementMax);
5870 : }
5871 : }
5872 : // The minimum temperature below which the compressor is turned off
5873 8 : OATempCompressorOff = MinOATCompressor;
5874 :
5875 128 : for (int BinNum = 0; BinNum < TotalNumOfTemperatureBins[RegionNum - 1]; ++BinNum) { // NumOfOATempBins
5876 :
5877 120 : FractionalBinHours = FracBinHoursAtOutdoorBinTemp[RegionNum - 1][BinNum];
5878 :
5879 : // Calculate the building heating load
5880 120 : BuildingHeatingLoad = (18.33 - OutdoorBinTemperature[BinNum]) / (18.33 - OutdoorDesignTemperature[RegionNum - 1]) * CorrectionFactor *
5881 : DesignHeatingRequirement;
5882 :
5883 120 : if ((OutdoorBinTemperature[BinNum] <= -8.33) || (OutdoorBinTemperature[BinNum] >= 7.20)) {
5884 80 : HeatingCapacityMax = TotHeatCapTestH3(nsp) + ((TotHeatCapTestH1(nsp) - TotHeatCapTestH3(nsp)) *
5885 80 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5886 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test));
5887 80 : HeatingElecPowerMax =
5888 80 : OutdoorUnitPowerTestH3(nsp) + ((OutdoorUnitPowerTestH1(nsp) - OutdoorUnitPowerTestH3(nsp)) *
5889 80 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5890 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test));
5891 : } else {
5892 40 : HeatingCapacityMax = TotHeatCapTestH3(nsp) + ((TotHeatCapTestH2(nsp) - TotHeatCapTestH3(nsp)) *
5893 40 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5894 : (HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test));
5895 40 : HeatingElecPowerMax =
5896 40 : OutdoorUnitPowerTestH3(nsp) + ((OutdoorUnitPowerTestH2(nsp) - OutdoorUnitPowerTestH3(nsp)) *
5897 40 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5898 : (HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test));
5899 : }
5900 :
5901 : // determine the speed number
5902 126 : for (int spnum = 1; spnum <= nsp - 1; ++spnum) {
5903 : // Low Speed
5904 126 : if (OutdoorBinTemperature[BinNum] < -8.33) {
5905 40 : HeatingCapacityLS = TotHeatCapTestH3(spnum) + ((TotHeatCapTestH1(spnum) - TotHeatCapTestH3(spnum)) *
5906 40 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5907 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test));
5908 40 : HeatingElecPowerLS =
5909 40 : OutdoorUnitPowerTestH3(spnum) + ((OutdoorUnitPowerTestH1(spnum) - OutdoorUnitPowerTestH3(spnum)) *
5910 40 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5911 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test));
5912 :
5913 86 : } else if (OutdoorBinTemperature[BinNum] >= 4.44) {
5914 40 : HeatingCapacityLS = TotHeatCapTestH1(spnum) + ((TotHeatCapTestH0(spnum) - TotHeatCapTestH1(spnum)) *
5915 40 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempRated) /
5916 : (HeatingOutdoorCoilInletAirDBTempH0Test - HeatingOutdoorCoilInletAirDBTempRated));
5917 40 : HeatingElecPowerLS =
5918 40 : OutdoorUnitPowerTestH1(spnum) + ((OutdoorUnitPowerTestH0(spnum) - OutdoorUnitPowerTestH1(spnum)) *
5919 40 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempRated) /
5920 : (HeatingOutdoorCoilInletAirDBTempH0Test - HeatingOutdoorCoilInletAirDBTempRated));
5921 : } else {
5922 46 : HeatingCapacityLS = TotHeatCapTestH3(spnum) + ((TotHeatCapTestH2(spnum) - TotHeatCapTestH3(spnum)) *
5923 46 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5924 : (HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test));
5925 46 : HeatingElecPowerLS =
5926 46 : OutdoorUnitPowerTestH3(spnum) + ((OutdoorUnitPowerTestH2(spnum) - OutdoorUnitPowerTestH3(spnum)) *
5927 46 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5928 : (HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test));
5929 : }
5930 : // High Speed
5931 126 : if ((OutdoorBinTemperature[BinNum] <= -8.33) || (OutdoorBinTemperature[BinNum] >= 7.20)) {
5932 82 : HeatingCapacityHS =
5933 82 : TotHeatCapTestH3(spnum + 1) + ((TotHeatCapTestH1(spnum + 1) - TotHeatCapTestH3(spnum + 1)) *
5934 82 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5935 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test));
5936 82 : HeatingElecPowerHS =
5937 82 : OutdoorUnitPowerTestH3(spnum + 1) + ((OutdoorUnitPowerTestH1(spnum + 1) - OutdoorUnitPowerTestH3(spnum + 1)) *
5938 82 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5939 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test));
5940 : } else {
5941 44 : HeatingCapacityHS =
5942 44 : TotHeatCapTestH3(spnum + 1) + ((TotHeatCapTestH2(spnum + 1) - TotHeatCapTestH3(spnum + 1)) *
5943 44 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5944 : (HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test));
5945 44 : HeatingElecPowerHS =
5946 44 : OutdoorUnitPowerTestH3(spnum + 1) + ((OutdoorUnitPowerTestH2(spnum + 1) - OutdoorUnitPowerTestH3(spnum + 1)) *
5947 44 : (OutdoorBinTemperature[BinNum] - HeatingOutdoorCoilInletAirDBTempH3Test) /
5948 : (HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test));
5949 : }
5950 126 : LowTempCutOutFactor = 0.0;
5951 126 : if (!OATempCompressorOnOffBlank) {
5952 126 : if (OutdoorBinTemperature[BinNum] <= OATempCompressorOff) {
5953 33 : LowTempCutOutFactor = 0.0;
5954 93 : } else if (OutdoorBinTemperature[BinNum] <= OATempCompressorOn) {
5955 32 : LowTempCutOutFactor = 0.5;
5956 : } else {
5957 61 : LowTempCutOutFactor = 1.0;
5958 : }
5959 : } else {
5960 0 : LowTempCutOutFactor = 1.0;
5961 : }
5962 :
5963 126 : if (BuildingHeatingLoad <= HeatingCapacityLS) {
5964 55 : if (HeatingCapacityLS > 0.0) {
5965 55 : PartLoadRatio = min(1.0, BuildingHeatingLoad / HeatingCapacityLS);
5966 : }
5967 55 : NetTotHeatCapBinned = BuildingHeatingLoad;
5968 55 : PartLoadFraction = 1.0 - CyclicDegradationCoeff * (1.0 - PartLoadRatio);
5969 55 : TotHeatElecPowerBinnedHP = (PartLoadRatio / PartLoadFraction) * HeatingElecPowerLS * LowTempCutOutFactor;
5970 55 : TotHeatElecPowerBinnedRH = BuildingHeatingLoad * (1.0 - LowTempCutOutFactor);
5971 55 : goto HeatSpeedLoop_exit;
5972 :
5973 71 : } else if (BuildingHeatingLoad < HeatingCapacityHS) {
5974 : // cycle between speed "spnum" and "spnum + 1"
5975 25 : LoadFactor = min(1.0, (HeatingCapacityHS - BuildingHeatingLoad) / (HeatingCapacityHS - HeatingCapacityLS));
5976 25 : LoadFactor = max(0.0, LoadFactor);
5977 :
5978 25 : NetTotHeatCapBinned = BuildingHeatingLoad;
5979 25 : TotHeatElecPowerBinnedHP = LoadFactor * HeatingElecPowerLS + (1.0 - LoadFactor) * HeatingElecPowerHS;
5980 25 : TotHeatElecPowerBinnedHP *= LowTempCutOutFactor;
5981 25 : TotHeatElecPowerBinnedRH = BuildingHeatingLoad * (1.0 - LowTempCutOutFactor);
5982 25 : goto HeatSpeedLoop_exit;
5983 :
5984 46 : } else if (BuildingHeatingLoad >= HeatingCapacityMax) {
5985 40 : NetTotHeatCapBinned = BuildingHeatingLoad;
5986 40 : if (!OATempCompressorOnOffBlank && HeatingElecPowerMax > 0.0) {
5987 40 : if ((OutdoorBinTemperature[BinNum] <= OATempCompressorOff) || (HeatingCapacityMax / HeatingElecPowerMax < 1.0)) {
5988 28 : LowTempCutOutFactor = 0.0;
5989 12 : } else if ((OutdoorBinTemperature[BinNum] <= OATempCompressorOn) && (HeatingCapacityMax / HeatingElecPowerMax > 1.0)) {
5990 12 : LowTempCutOutFactor = 0.5;
5991 0 : } else if ((OutdoorBinTemperature[BinNum] > OATempCompressorOn) && (HeatingCapacityMax / HeatingElecPowerMax > 1.0)) {
5992 0 : LowTempCutOutFactor = 1.0;
5993 : }
5994 : } else {
5995 0 : LowTempCutOutFactor = 1.0;
5996 : }
5997 :
5998 40 : TotHeatElecPowerBinnedHP = HeatingElecPowerMax * LowTempCutOutFactor;
5999 40 : TotHeatElecPowerBinnedRH = BuildingHeatingLoad - HeatingCapacityMax * LowTempCutOutFactor;
6000 40 : goto HeatSpeedLoop_exit;
6001 : }
6002 : }
6003 0 : HeatSpeedLoop_exit:;
6004 :
6005 120 : NetHeatingCapWeighted += NetTotHeatCapBinned * FractionalBinHours;
6006 120 : TotHeatingElecPowerWeighted += (TotHeatElecPowerBinnedHP + TotHeatElecPowerBinnedRH) * FractionalBinHours;
6007 : }
6008 :
6009 8 : if (DefrostControl == HPdefrostControl::Timed) {
6010 1 : DemandDeforstCredit = 1.0; // Timed defrost control
6011 : } else {
6012 7 : DemandDeforstCredit = 1.03; // Demand defrost control
6013 : }
6014 :
6015 8 : if (TotHeatingElecPowerWeighted > 0.0) {
6016 8 : HSPF = NetHeatingCapWeighted * DemandDeforstCredit / TotHeatingElecPowerWeighted;
6017 : } else {
6018 0 : HSPF = 0.0;
6019 : }
6020 :
6021 16 : return std::make_tuple(NetHeatingCapRatedHighTemp, NetHeatingCapRatedLowTemp, HSPF);
6022 8 : }
6023 :
6024 8 : std::tuple<Real64, Real64, Real64> MultiSpeedDXHeatingCoilHSPF2(
6025 : EnergyPlusData &state,
6026 : int const nsp, // Number of compressor speed
6027 : Array1A<Real64> const MSFanPowerPerEvapAirFlowRateInput_2023, // 2023 rated fan power per evap air flow rate [W/(m3/s)]
6028 : Array1A_int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
6029 : Array1A_int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
6030 : Array1A<Real64> const RatedTotalCapacity, // Reference capacity of DX coil [W]
6031 : Array1A<Real64> const RatedAirVolFlowRate, // Reference air flow rate of DX coil [m3/s]
6032 : Array1A_int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
6033 : Array1A_int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
6034 : Array1A<Real64> const RatedCOP, // Reference coefficient of performance [W/W]
6035 : ObjexxFCL::Optional_int_const RegionNum, // Region number for calculating HSPF of single speed DX heating coil
6036 : ObjexxFCL::Optional<Real64 const> MinOATCompressor, // Minimum OAT for heat pump compressor operation [C]
6037 : ObjexxFCL::Optional<Real64 const> OATempCompressorOn, // The outdoor temperature when the compressor is automatically turned
6038 : ObjexxFCL::Optional_bool_const OATempCompressorOnOffBlank, // Flag used to determine low temperature cut out factor
6039 : ObjexxFCL::Optional<HPdefrostControl const> DefrostControl) // defrost control; 1=timed, 2=on-demand
6040 : {
6041 :
6042 : // Intermediate values calculated from the inputs in the idf file
6043 8 : Real64 HSPF2_2023(0.0);
6044 8 : Real64 NetHeatingCapRatedHighTemp_2023(0.0);
6045 8 : Real64 NetHeatingCapRatedLowTemp_2023(0.0);
6046 :
6047 : int BinNum2023; // bin number counter
6048 : int spnum; // compressor speed number
6049 :
6050 8 : Array1D<Real64> FanPowerPerEvapAirFlowRate_2023(nsp); // Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
6051 :
6052 : // Real64 HeatingCapacityLS; // cooling capacity of Mult-speed DX coil at lower speed, [W]
6053 : // Real64 HeatingCapacityHS; // cooling capacity of Mult-speed DX coil at higher speed, [W]
6054 : // Real64 HeatingElecPowerLS; // outdoor unit electric power input at low speed, [W]
6055 : // Real64 HeatingElecPowerHS; // outdoor unit electric power input at high speed, [W]
6056 : // Real64 HeatingCapacityMax; // cooling capacity of Mult-speed DX coil at max speed, [W]
6057 : // Real64 HeatingElecPowerMax; // outdoor unit electric power input at Max speed, [W]
6058 : // Array1D<Real64> TotHeatCapTestH1High(nsp); // net heating capacity high speed at H1 test conditon, [W]
6059 :
6060 : // Intermediate values calculated from the inputs in the idf file
6061 8 : Array1D<Real64> TotCapFlowModFac(nsp); // Total capacity modifier f(actual flow vs rated flow) for each speed [-]
6062 8 : Array1D<Real64> EIRFlowModFac(nsp); // EIR modifier f(actual supply air flow vs rated flow) for each speed [-]
6063 :
6064 8 : Real64 TotCapTempModFacH0Low(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H0 Low Test [-]
6065 8 : Real64 EIRTempModFacH0Low(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H0 Low Test[-]
6066 8 : Real64 TotCapTempModFacH1Low(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H1 Low Test [-]
6067 8 : Real64 EIRTempModFacH1Low(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H1 Low Test[-]
6068 8 : Real64 TotCapTempModFacH2Int(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H2 Int Test [-]
6069 8 : Real64 EIRTempModFacH2Int(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H2 Int Test[-]
6070 8 : Real64 TotCapTempModFacH1Full(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H1 Full Test [-]
6071 8 : Real64 EIRTempModFacH1Full(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H1 Full Test[-]
6072 8 : Real64 TotCapTempModFacH2Full(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H2 Full Test [-]
6073 8 : Real64 EIRTempModFacH2Full(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H2 Full Test[-]
6074 8 : Real64 TotCapTempModFacH3Full(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H3 Full Test [-]
6075 8 : Real64 EIRTempModFacH3Full(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H3 Full Test[-]
6076 8 : Real64 TotCapTempModFacH4Full(0.0); // Tot capacity modifier (function of entering wetbulb, outside drybulb) at H4 Full Test [-]
6077 8 : Real64 EIRTempModFacH4Full(0.0); // EIR modifier (function of entering wetbulb, outside drybulb) at H4 Full Test[-]
6078 :
6079 8 : Real64 OATempCompressorOff(0.0); // Minimum outdoor air temperature to turn the commpressor off
6080 :
6081 8 : Real64 NetHeatingCapWeighted(0.0); // net total heating cap weighted by the fraction of the binned cooling hours [W]
6082 8 : Real64 TotHeatingElecPowerWeighted(0.0); // net total heat pump and resistance heating electric Energy input weighted by
6083 : // the fraction of the binned cooling hours
6084 :
6085 8 : Real64 n(0.0); // Fractional bin hours for the heating season [-]
6086 8 : Real64 f_def(1.0); // Demand Defrost Credit, A factor to adjust HSPF if coil has demand defrost control [-]
6087 :
6088 8 : NetHeatingCapWeighted = 0.0;
6089 8 : TotHeatingElecPowerWeighted = 0.0;
6090 :
6091 26 : for (spnum = 1; spnum <= nsp; ++spnum) {
6092 18 : FanPowerPerEvapAirFlowRate_2023(spnum) = 0.0;
6093 18 : if (MSFanPowerPerEvapAirFlowRateInput_2023(spnum) <= 0.0) {
6094 2 : FanPowerPerEvapAirFlowRate_2023(spnum) = DefaultFanPowerPerEvapAirFlowRateSEER2;
6095 : } else {
6096 16 : FanPowerPerEvapAirFlowRate_2023(spnum) = MSFanPowerPerEvapAirFlowRateInput_2023(spnum);
6097 : }
6098 : }
6099 :
6100 8 : Real64 HeatingOutdoorCoilInletAirDBTemp_H0LowTest = 16.66; // Outdoor air dry-bulb temp in degrees 16.66 C (62 F)
6101 8 : Real64 HeatingIndoorCoilInletAirDBTemp_H0LowTest = 21.11; // Indoor air dry-bulb temp in degrees 21.11 C (70 F)
6102 :
6103 8 : Real64 HeatingOutdoorCoilInletAirDBTemp_H1LowTest = 8.33; // Outdoor air dry-bulb temp in degrees 8.33 C (47 F)
6104 8 : Real64 HeatingIndoorCoilInletAirDBTemp_H1LowTest = 21.11; // Indoor air dry-bulb temp in degrees 21.11 C (70 F)
6105 :
6106 8 : Real64 HeatingOutdoorCoilInletAirDBTemp_H2IntTest = 1.66; // Outdoor air dry-bulb temp in degrees 1.66 C (35 F)
6107 8 : Real64 HeatingIndoorCoilInletAirDBTemp_H2IntTest = 21.11; // Indoor air dry-bulb temp in degrees 21.11 C (70 F)
6108 :
6109 8 : Real64 HeatingOutdoorCoilInletAirDBTemp_H1FullTest = 8.33; // Outdoor air dry-bulb temp in degrees 8.33 C (47 F)
6110 8 : Real64 HeatingIndoorCoilInletAirDBTemp_H1FullTest = 21.11; // Indoor air dry-bulb temp in degrees 21.11 C (70 F)
6111 :
6112 8 : Real64 HeatingOutdoorCoilInletAirDBTemp_H2FullTest = 1.66; // Outdoor air dry-bulb temp in degrees C (35 F)
6113 8 : Real64 HeatingIndoorCoilInletAirDBTemp_H2FullTest = 21.11; // Indoor air dry-bulb temp in degrees 21.11 C (70 F)
6114 :
6115 8 : Real64 HeatingOutdoorCoilInletAirDBTemp_H3FullTest = -8.33; // Outdoor air dry-bulb temp in degrees C (17 F)
6116 8 : Real64 HeatingIndoorCoilInletAirDBTemp_H3FullTest = 21.11; // Indoor air dry-bulb temp in degrees 21.11 C (70 F)
6117 :
6118 8 : Real64 HeatingOutdoorCoilInletAirDBTemp_H4FullTest = -15; // Outdoor air dry-bulb temp in degrees C (5 F)
6119 8 : Real64 HeatingIndoorCoilInletAirDBTemp_H4FullTest = 21.11; // Indoor air dry-bulb temp in degrees 21.11 C (70 F)
6120 :
6121 8 : Array1D<Real64> Q_A_Full(nsp);
6122 :
6123 8 : Array1D<Real64> Q_H0_Low(nsp); // Total cooling capacity at H0 Low test condition (Low speed)
6124 8 : Array1D<Real64> Q_H1_Low(nsp); // Total cooling capacity at H1 Low test condition (Low speed)
6125 8 : Array1D<Real64> Q_H2_Int(nsp); // Total cooling capacity at H2 Int test condition
6126 8 : Array1D<Real64> Q_H1_Full(nsp); // Total cooling capacity at H1 Full test condition (High speed)
6127 8 : Array1D<Real64> Q_H2_Full(nsp); // Total cooling capacity at H2 Full test condition (High speed)
6128 8 : Array1D<Real64> Q_H3_Full(nsp); // Total cooling capacity at H3 Full test condition (High speed)
6129 8 : Array1D<Real64> Q_H4_Full(nsp); // Total cooling capacity at H4 Full test condition (High speed)
6130 :
6131 8 : Array1D<Real64> P_H0_Low(nsp); // Outdoor Unit electric power at H0 Low test condition (Low speed)
6132 8 : Array1D<Real64> P_H1_Low(nsp); // Outdoor Unit electric power at H1 Low test condition (Low speed)
6133 8 : Array1D<Real64> P_H2_Int(nsp); // Outdoor Unit electric power at H2 Int test condition
6134 8 : Array1D<Real64> P_H1_Full(nsp); // Outdoor Unit electric power at H1 Full test condition (Full speed)
6135 8 : Array1D<Real64> P_H2_Full(nsp); // Outdoor Unit electric power at H2 Full test condition (Full speed)
6136 8 : Array1D<Real64> P_H3_Full(nsp); // Outdoor Unit electric power at H3 Full test condition (Full speed)
6137 8 : Array1D<Real64> P_H4_Full(nsp); // Outdoor Unit electric power at H4 Full test condition (Full speed)
6138 :
6139 : // Proceed withe HSPF2 value calculation
6140 26 : for (spnum = 1; spnum <= nsp; ++spnum) {
6141 18 : TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
6142 :
6143 18 : if (state.dataCurveManager->curves(CapFTempCurveIndex(spnum))->numDims == 1) {
6144 :
6145 0 : TotCapTempModFacH0Low = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H0LowTest);
6146 0 : TotCapTempModFacH1Low = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H1LowTest);
6147 0 : TotCapTempModFacH2Int = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H2IntTest);
6148 0 : TotCapTempModFacH1Full = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H1FullTest);
6149 0 : TotCapTempModFacH2Full = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H2FullTest);
6150 0 : TotCapTempModFacH3Full = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H3FullTest);
6151 0 : TotCapTempModFacH4Full = Curve::CurveValue(state, CapFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H4FullTest);
6152 : } else {
6153 36 : TotCapTempModFacH0Low = Curve::CurveValue(
6154 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H0LowTest, HeatingOutdoorCoilInletAirDBTemp_H0LowTest);
6155 36 : TotCapTempModFacH1Low = Curve::CurveValue(
6156 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H1LowTest, HeatingOutdoorCoilInletAirDBTemp_H1LowTest);
6157 36 : TotCapTempModFacH2Int = Curve::CurveValue(
6158 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H2IntTest, HeatingOutdoorCoilInletAirDBTemp_H2IntTest);
6159 36 : TotCapTempModFacH1Full = Curve::CurveValue(
6160 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H1FullTest, HeatingOutdoorCoilInletAirDBTemp_H1FullTest);
6161 36 : TotCapTempModFacH2Full = Curve::CurveValue(
6162 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H2FullTest, HeatingOutdoorCoilInletAirDBTemp_H2FullTest);
6163 36 : TotCapTempModFacH3Full = Curve::CurveValue(
6164 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H3FullTest, HeatingOutdoorCoilInletAirDBTemp_H3FullTest);
6165 18 : TotCapTempModFacH4Full = Curve::CurveValue(
6166 18 : state, CapFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H4FullTest, HeatingOutdoorCoilInletAirDBTemp_H4FullTest);
6167 : }
6168 :
6169 : Real64 curveVal;
6170 18 : switch (state.dataCurveManager->curves(CapFTempCurveIndex(spnum))->numDims) {
6171 0 : case 1:
6172 0 : curveVal = Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated);
6173 0 : break;
6174 18 : case 2:
6175 : default: // this default allows the simulation to continue, but will issue a warning, should be removed eventually
6176 : curveVal =
6177 18 : Curve::CurveValue(state, CapFTempCurveIndex(spnum), IndoorCoilInletAirWetBulbTempRated, OutdoorCoilInletAirDryBulbTempTestA2);
6178 18 : break;
6179 : }
6180 36 : Q_A_Full(spnum) =
6181 18 : RatedTotalCapacity(spnum) * curveVal * TotCapFlowModFac(spnum) - FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6182 :
6183 18 : Q_H0_Low(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH0Low * TotCapFlowModFac(spnum) +
6184 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6185 18 : Q_H1_Low(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH1Low * TotCapFlowModFac(spnum) +
6186 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6187 18 : Q_H2_Int(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH2Int * TotCapFlowModFac(spnum) +
6188 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6189 18 : Q_H1_Full(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH1Full * TotCapFlowModFac(spnum) +
6190 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6191 18 : Q_H2_Full(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH2Full * TotCapFlowModFac(spnum) +
6192 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6193 18 : Q_H3_Full(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH3Full * TotCapFlowModFac(spnum) +
6194 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6195 18 : Q_H4_Full(spnum) = RatedTotalCapacity(spnum) * TotCapTempModFacH4Full * TotCapFlowModFac(spnum) +
6196 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6197 :
6198 18 : EIRFlowModFac(spnum) = Curve::CurveValue(state, EIRFFlowCurveIndex(spnum), AirMassFlowRatioRated);
6199 :
6200 18 : if (state.dataCurveManager->curves(EIRFTempCurveIndex(spnum))->numDims == 1) {
6201 :
6202 0 : EIRTempModFacH0Low = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H0LowTest);
6203 :
6204 0 : EIRTempModFacH1Low = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H1LowTest);
6205 0 : EIRTempModFacH2Int = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H2IntTest);
6206 0 : EIRTempModFacH1Full = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H1FullTest);
6207 0 : EIRTempModFacH2Full = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H2FullTest);
6208 0 : EIRTempModFacH3Full = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H3FullTest);
6209 0 : EIRTempModFacH4Full = Curve::CurveValue(state, EIRFTempCurveIndex(spnum), HeatingOutdoorCoilInletAirDBTemp_H4FullTest);
6210 :
6211 : } else {
6212 :
6213 36 : EIRTempModFacH0Low = Curve::CurveValue(
6214 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H0LowTest, HeatingOutdoorCoilInletAirDBTemp_H0LowTest);
6215 36 : EIRTempModFacH1Low = Curve::CurveValue(
6216 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H1LowTest, HeatingOutdoorCoilInletAirDBTemp_H1LowTest);
6217 36 : EIRTempModFacH2Int = Curve::CurveValue(
6218 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H2IntTest, HeatingOutdoorCoilInletAirDBTemp_H2IntTest);
6219 36 : EIRTempModFacH1Full = Curve::CurveValue(
6220 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H1FullTest, HeatingOutdoorCoilInletAirDBTemp_H1FullTest);
6221 36 : EIRTempModFacH2Full = Curve::CurveValue(
6222 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H2FullTest, HeatingOutdoorCoilInletAirDBTemp_H2FullTest);
6223 36 : EIRTempModFacH3Full = Curve::CurveValue(
6224 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H3FullTest, HeatingOutdoorCoilInletAirDBTemp_H3FullTest);
6225 18 : EIRTempModFacH4Full = Curve::CurveValue(
6226 18 : state, EIRFTempCurveIndex(spnum), HeatingIndoorCoilInletAirDBTemp_H4FullTest, HeatingOutdoorCoilInletAirDBTemp_H4FullTest);
6227 : }
6228 :
6229 18 : if (RatedCOP(spnum) > 0.0) {
6230 :
6231 18 : P_H0_Low(spnum) = Q_H0_Low(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH0Low / RatedCOP(spnum) +
6232 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6233 18 : P_H1_Low(spnum) = Q_H1_Low(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH1Low / RatedCOP(spnum) +
6234 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6235 18 : P_H2_Int(spnum) = Q_H2_Int(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH2Int / RatedCOP(spnum) +
6236 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6237 18 : P_H1_Full(spnum) = Q_H1_Full(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH1Full / RatedCOP(spnum) +
6238 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6239 18 : P_H2_Full(spnum) = Q_H2_Full(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH2Full / RatedCOP(spnum) +
6240 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6241 18 : P_H3_Full(spnum) = Q_H3_Full(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH3Full / RatedCOP(spnum) +
6242 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6243 36 : P_H4_Full(spnum) = Q_H4_Full(spnum) * EIRFlowModFac(spnum) * EIRTempModFacH4Full / RatedCOP(spnum) +
6244 18 : FanPowerPerEvapAirFlowRate_2023(spnum) * RatedAirVolFlowRate(spnum);
6245 : }
6246 : }
6247 :
6248 : // determine the HP capacity at the rated condition (AHRI H1 high speed test Condition); and determine the
6249 : // the building heat requirement for the user specified region
6250 8 : NetHeatingCapRatedHighTemp_2023 = Q_H1_Full(nsp);
6251 8 : NetHeatingCapRatedLowTemp_2023 = Q_H3_Full(nsp);
6252 :
6253 : // The minimum temperature below which the compressor is turned off
6254 8 : Real64 t_Off = MinOATCompressor; // Heating off | outdoor Minimum temperature below which the compressor ceases to operate
6255 : // The outdoor temperature when the compressor is automatically turned
6256 8 : Real64 t_On = OATempCompressorOn; // Heating On | outdoor temperature at which the compressor reinitiates operation
6257 :
6258 8 : Int64 RN = static_cast<int64_t>(RegionNum);
6259 :
6260 8 : Real64 q_sum(0.0);
6261 8 : Real64 e_sum(0.0);
6262 8 : Real64 rh_sum(0.0);
6263 :
6264 : // The minimum temperature below which the compressor is turned off
6265 8 : OATempCompressorOff = MinOATCompressor;
6266 :
6267 : // Equation 11.111 AHRI-2023
6268 8 : Real64 t_ob = 7.22; // temperature at which frosting influence on full stage performance begins 7.22 C (45 F)
6269 152 : for (BinNum2023 = 0; BinNum2023 < 18; ++BinNum2023) { // NumOfOATempBins
6270 :
6271 144 : Real64 t = OutdoorBinTemperature[BinNum2023];
6272 144 : n = FracBinHoursAtOutdoorBinTempHSPF2[RN - 1][BinNum2023];
6273 144 : if (n == 0.0) {
6274 : // we're skipping load calculations for any Temperature bin against which fractional hours are 0.0
6275 40 : continue;
6276 : }
6277 104 : Real64 t_zl = ZoneLoadTemperature[RN - 1];
6278 104 : Real64 t_od = OutdoorDesignTemperature[RN - 1];
6279 104 : Real64 c_x = VariableSpeedLoadFactor[RN - 1];
6280 :
6281 : // For ANSI/AHRI 210/240 Standard 2023 | Concept of DHRI min and max is removed
6282 : // Section 11.2.2.1 Equation 11.104 which suggests QAFull is used instead of DHRI min
6283 : // While Calculaiting the Building load For heating-only heat pump units, replace Q_A_Full with Q_H_Full
6284 : // Q_H_Full = the heating capacity at 47F determined from the H1N test for variable capacity systems and
6285 : // from the H1Full test for other systems, Btu/h.
6286 104 : Real64 bl = (t_zl - t) / (t_zl - t_od) * c_x * Q_H1_Full(nsp);
6287 :
6288 104 : Real64 q_full(0.0);
6289 104 : Real64 p_full(0.0);
6290 104 : Real64 cop_full(0.0);
6291 :
6292 104 : Real64 delta_full(0.0);
6293 104 : Real64 hlf_full(0.0);
6294 104 : Real64 e(0.0);
6295 104 : Real64 rh(0.0);
6296 :
6297 104 : if (t >= t_ob) {
6298 16 : q_full = Q_H3_Full(nsp) + (Q_H1_Full(nsp) - Q_H3_Full(nsp)) * ((t - (-8.33)) / (8.33 - (-8.33))); // Equation 11.112 AHRI-2023
6299 16 : p_full = P_H3_Full(nsp) + (P_H1_Full(nsp) - P_H3_Full(nsp)) * ((t - (-8.33)) / (8.33 - (-8.33))); // Equation 11.117 AHRI-2023
6300 88 : } else if (t >= (-8.33)) {
6301 48 : q_full = Q_H3_Full(nsp) + (Q_H2_Full(nsp) - Q_H3_Full(nsp)) * ((t - (-8.33)) / (1.66 - (-8.33))); // Equation 11.113 AHRI-2023
6302 48 : p_full = P_H3_Full(nsp) + (P_H2_Full(nsp) - P_H3_Full(nsp)) * ((t - (-8.33)) / (1.66 - (-8.33))); // Equation 11.118 AHRI-2023
6303 : } else {
6304 40 : q_full = Q_H4_Full(nsp) + (Q_H3_Full(nsp) - Q_H4_Full(nsp)) * ((t - (-8.33)) / ((-8.33) - (-15))); // Equation 11.114 AHRI-2023
6305 40 : p_full = P_H4_Full(nsp) + (P_H3_Full(nsp) - P_H4_Full(nsp)) * ((t - (-8.33)) / ((-8.33) - (-15))); // Equation 11.119 AHRI-2023
6306 : }
6307 :
6308 104 : cop_full = q_full / p_full;
6309 :
6310 104 : if (t <= t_Off || cop_full < 1.0) {
6311 31 : delta_full = 0.0; // #Equation 11.125 AHRI-2023
6312 73 : } else if (t > t_On) {
6313 43 : delta_full = 1.0; // Equation 11.127 AHRI-2023
6314 : } else {
6315 30 : delta_full = 0.5; // #Equation 11.126 AHRI-2023
6316 : }
6317 :
6318 104 : if (q_full > bl) {
6319 52 : hlf_full = bl / q_full; // Equation 11.107 AHRI-2023
6320 : } else {
6321 52 : hlf_full = 1.0; // Equation 11.108 AHRI-2023
6322 : }
6323 :
6324 110 : for (spnum = 1; spnum <= nsp - 1; ++spnum) {
6325 :
6326 : // Intermediate capacity
6327 109 : Real64 q_H0_low = Q_H0_Low(spnum);
6328 109 : Real64 q_H1_low = Q_H1_Low(spnum);
6329 109 : Real64 q_H2_int = Q_H2_Int(spnum);
6330 109 : Real64 q_H1_full = Q_H1_Full(spnum + 1);
6331 109 : Real64 q_H2_full = Q_H2_Full(spnum + 1);
6332 109 : Real64 q_H3_full = Q_H3_Full(spnum + 1);
6333 109 : Real64 q_H4_full = Q_H4_Full(spnum + 1);
6334 : // Equation 11.177 AHRI-2023
6335 : //?? (replaced 62 with 35) in Ratio expression // (t=>35-47/62-47)
6336 109 : Real64 q_35_low = // q_H1_low + (q_H0_low - q_H1_low) * ((t - (8.33)) / (1.66 - (8.33)));
6337 109 : q_H1_low + (q_H0_low - q_H1_low) * ((1.67 - (8.33)) / (16.67 - (8.33)));
6338 :
6339 : // Equation 11.191 AHRI-2023
6340 109 : Real64 N_Hq = (q_H2_full != q_35_low) ? min(1.0, (q_H2_int - q_35_low) / (q_H2_full - q_35_low)) : 0.0;
6341 109 : N_Hq = max(0.0, N_Hq);
6342 : // Equation 11.190 AHRI-2023
6343 109 : Real64 M_Hq = (q_H0_low - q_H1_low) / (16.66 - 8.33) * (1.0 - N_Hq) + (q_H2_full - q_H3_full) / (1.66 - (-8.33)) * N_Hq;
6344 :
6345 : // Intermediate Power
6346 109 : Real64 p_H0_low = P_H0_Low(spnum);
6347 109 : Real64 p_H1_low = P_H1_Low(spnum);
6348 109 : Real64 p_H2_int = P_H2_Int(spnum);
6349 109 : Real64 p_H1_full = P_H1_Full(spnum + 1);
6350 109 : Real64 p_H2_full = P_H2_Full(spnum + 1);
6351 109 : Real64 p_H3_full = P_H3_Full(spnum + 1);
6352 109 : Real64 p_H4_full = P_H4_Full(spnum + 1);
6353 : // Equation 11.178 AHRI - 2023
6354 : //?? (replaced 62 with 35) in Ratio expression (t=>35 F-47/35-47)
6355 109 : Real64 p_35_low = // p_H1_low + (p_H0_low - p_H1_low) * ((t - (8.33)) / (1.66 - (8.33)));
6356 109 : p_H1_low + (p_H0_low - p_H1_low) * ((1.67 - (8.33)) / (16.67 - (8.33)));
6357 :
6358 : // Equation 11.194 AHRI-2023
6359 109 : Real64 N_HE = (p_H2_full != p_35_low) ? min(1.0, (p_H2_int - p_35_low) / (p_H2_full - p_35_low)) : 0.0;
6360 109 : N_HE = max(0.0, N_HE);
6361 :
6362 : // Equation 11.193 AHRI-2023
6363 109 : Real64 M_HE = (p_H0_low - p_H1_low) / (16.66 - 8.33) * (1.0 - N_HE) + (p_H2_full - p_H3_full) / (1.66 - (-8.33)) * N_HE;
6364 :
6365 : // Note: this is strange that there is no defrost cut in the low speed and doesn't use H2 or H3 low
6366 : // Equation 11.177 AHRI-2023
6367 : Real64 q_low; // = q_H1_low + (q_H0_low - q_H1_low) * ((t - (8.33)) / (16.66 - (8.33)));
6368 : // Equation 11.178 AHRI-2023
6369 : Real64 p_low; // = p_H1_low + (p_H0_low - p_H1_low) * ((t - (8.33)) / (16.66 - (8.33)));
6370 109 : Real64 q_hs(0.0);
6371 109 : Real64 p_hs(0.0);
6372 : // Low Speed
6373 109 : if (t >= 8.33) {
6374 16 : Real64 ratio = // (t - 8.33) / (16.67 - 8.33)
6375 16 : (t - HeatingOutdoorCoilInletAirDBTempRated) /
6376 : (HeatingOutdoorCoilInletAirDBTempH0Test - HeatingOutdoorCoilInletAirDBTempRated);
6377 : // equation 11.179
6378 16 : q_low = Q_H1_Low(spnum) + ((Q_H1_Low(spnum) - Q_H3_Full(spnum)) * ratio);
6379 : // equation 11.182
6380 16 : p_low = P_H1_Low(spnum) + ((P_H1_Low(spnum) - P_H3_Full(spnum)) * ratio);
6381 93 : } else if (t >= 1.67 && t < 8.33) {
6382 16 : Real64 ratio = // (t - 1.67) / (8.33 - 1.67)
6383 16 : (t - HeatingOutdoorCoilInletAirDBTempH2Test) /
6384 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH2Test);
6385 : // equation 11.180
6386 16 : q_low = Q_H2_Int(spnum) + ((Q_H0_Low(spnum) - Q_H1_Low(spnum)) * ratio);
6387 : // equation 11.183
6388 16 : p_low = P_H2_Int(spnum) + ((P_H0_Low(spnum) - P_H1_Low(spnum)) * ratio);
6389 93 : } else if (t < 1.67) {
6390 : // for now Q_H2_Int is replaced with Q_H_Int, no equation for the later
6391 : // equation 11.181
6392 77 : q_low = Q_H2_Int(spnum);
6393 : // equation 11.184
6394 77 : p_low = P_H2_Int(spnum);
6395 : }
6396 :
6397 : // High Speed
6398 109 : if (t <= -15.0) {
6399 24 : Real64 ratio = // ((t - (-15.0)) / (8.33 - (-8.33)));
6400 24 : (t - HeatingOutdoorCoilInletAirDBTemp_H4FullTest) /
6401 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test);
6402 : // equation 11.205
6403 24 : q_hs = Q_H4_Full(spnum + 1) + ((Q_H1_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * ratio);
6404 : // equation 11.206
6405 24 : p_hs = P_H4_Full(spnum + 1) + ((P_H1_Full(spnum + 1) - P_H3_Full(spnum + 1)) * ratio);
6406 85 : } else if ((t > -15.0) && (t < -8.33)) {
6407 16 : Real64 ratio = // ((t - (-15.0)) / (-8.33 - (-15.0)));
6408 16 : (t - HeatingOutdoorCoilInletAirDBTemp_H4FullTest) /
6409 16 : (HeatingOutdoorCoilInletAirDBTempH3Test - HeatingOutdoorCoilInletAirDBTemp_H4FullTest);
6410 : // equation 11.203
6411 16 : q_hs = Q_H4_Full(spnum + 1) + ((Q_H3_Full(spnum + 1) - Q_H4_Full(spnum + 1)) * ratio);
6412 : // equation 11.204
6413 16 : p_hs = P_H4_Full(spnum + 1) + ((P_H3_Full(spnum + 1) - P_H4_Full(spnum + 1)) * ratio);
6414 85 : } else if ((t > -8.33) && (t < t_ob)) {
6415 45 : Real64 ratio = //((t - (-8.33)) / (1.67 - (-8.33)));
6416 45 : (t - HeatingOutdoorCoilInletAirDBTempH3Test) /
6417 : (HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test);
6418 : // equation 11.201
6419 45 : q_hs = Q_H3_Full(spnum + 1) + ((Q_H2_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * ratio);
6420 : // equation 11.202
6421 45 : p_hs = P_H3_Full(spnum + 1) + ((P_H2_Full(spnum + 1) - P_H3_Full(spnum + 1)) * ratio);
6422 69 : } else if ((t >= t_ob) && (t <= -8.33)) {
6423 0 : Real64 ratio = // ((t - (-8.33)) / (8.33 - (-8.33)));
6424 0 : (t - HeatingOutdoorCoilInletAirDBTempH3Test) /
6425 : (HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test);
6426 : // equation 11.199
6427 0 : q_hs = Q_H3_Full(spnum + 1) + ((Q_H1_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * ratio);
6428 : // equation 11.200
6429 0 : p_hs = P_H3_Full(spnum + 1) + ((P_H1_Full(spnum + 1) - P_H3_Full(spnum + 1)) * ratio);
6430 : }
6431 :
6432 109 : Real64 cop_low = q_low / p_low;
6433 :
6434 109 : Real64 q_int = q_H2_int + M_Hq * (t - (1.66));
6435 109 : Real64 p_int = p_H2_int + M_HE * (t - (1.66));
6436 109 : Real64 cop_int = q_int / p_int;
6437 :
6438 109 : Real64 delta_low(0.0);
6439 109 : if (bl <= q_low) {
6440 : // CASE 1 : Section 11.2.2.3.1 AHRI-2023
6441 : // Building Load is less than the capacity of the unit at the Low Compressor Speed (q_low >= bl)
6442 36 : if (t <= t_Off || cop_low < 1.0) {
6443 0 : delta_low = 0.0; // Equation 11.159 AHRI-2023
6444 36 : } else if (t > t_On) {
6445 31 : delta_low = 1.0; // Equation 11.160 AHRI-2023
6446 : } else {
6447 5 : delta_low = 0.5; // Equation 11.161 AHRI-2023
6448 : }
6449 :
6450 36 : Real64 hlf_low(0.0); // Par tLoad Ratio
6451 36 : if (q_low > 0.0) {
6452 36 : hlf_low = min(1.0, bl / q_low); // Equation 11.155 AHRI-2023
6453 : }
6454 : // Section 6.1.3.2.3 (AHRI-2023) For Variable Capacity Systems, if the optional H1CFull and H1CLow tests are not
6455 : // performed, a default value of 0.25 shall be used for the heating Degradation Coefficient
6456 36 : Real64 CyclicMSHeatingDegradationCoeffHSPF2 = 0.25;
6457 : // Part Load Fration
6458 36 : Real64 plf_low = 1.0 - CyclicMSHeatingDegradationCoeffHSPF2 * (1.0 - hlf_low); // Equation 11.156 AHRI-2023
6459 : // e = p_low * hlf_low * delta_low * n / plf_low; // Equation 11.153 AHRI-2023
6460 36 : e = (hlf_low / plf_low) * p_low * delta_low * n;
6461 36 : rh = bl * (1.0 - delta_low) * n; // Equation 11.154 AHRI-2023
6462 36 : goto HeatSpeedLoop4_exit;
6463 73 : } else if (bl < q_hs) { // bl > q_low
6464 : // (bl > q_low && bl < q_full) {
6465 : // CASE 2 : 11.2.2.3.2 AHRI-2023
6466 : // Building load can be matched by modulating the compressor speed between low speed and full speed, q_low < bl < q_full
6467 15 : Real64 cop_int_bin(0.0);
6468 15 : Real64 delta_int_bin(0.0);
6469 15 : if (bl <= q_int) {
6470 0 : cop_int_bin = cop_low + ((cop_int - cop_low) / (q_int - q_low)) * (bl - q_low); // Equation 11.187 AHRI-2023
6471 : } else { // if bl > q_int
6472 15 : cop_int_bin = cop_int + ((cop_full - cop_int) / (q_full - q_int)) * (bl - q_int); // Equation 11.188 AHRI-2023
6473 : }
6474 :
6475 15 : delta_int_bin = 0.0;
6476 15 : if (!OATempCompressorOnOffBlank) {
6477 15 : if (t <= t_Off) {
6478 0 : delta_int_bin = 0.0;
6479 15 : } else if (t <= t_On) { // t > t_Off
6480 6 : delta_int_bin = 0.5;
6481 : } else {
6482 9 : delta_int_bin = 1.0;
6483 : }
6484 : } else {
6485 0 : delta_int_bin = 1.0;
6486 : }
6487 :
6488 15 : rh = bl * (1.0 - delta_int_bin) * n;
6489 15 : Real64 q = bl * n; // Equation 11.185 AHRI-2023
6490 15 : e = q / cop_int_bin * delta_int_bin; // Equaiton 11.186 AHRI-2023
6491 15 : goto HeatSpeedLoop4_exit;
6492 58 : } else if (bl >= q_full) {
6493 : // CASE 3 : 11.2.2.3.3 AHRI-2023
6494 : // Building Load is greater than the capacity of the unit at the Full Compressor Speed, q_full <= bl or (bl >= q_full:)
6495 52 : if (t <= -15.0) {
6496 24 : Real64 t_ratio = (t - (-15.0)) / ((8.33) - (-8.33));
6497 : // Equation 11.205 AHRI-2023
6498 24 : q_full = q_H4_full + (q_H1_full - q_H3_full) * t_ratio;
6499 : // Equation 11.206 AHRI-2023
6500 24 : p_full = p_H4_full + (p_H1_full - p_H3_full) * t_ratio;
6501 28 : } else if (t > (-15.0) && t < (-8.33)) {
6502 15 : Real64 t_ratio = (t - (-15.0)) / (-8.33 - (-15.0));
6503 : // Equation 11.203 AHRI-2023
6504 15 : q_full = q_H4_full + (q_H3_full - q_H4_full) * t_ratio;
6505 : // Equation 11.204 AHRI-2023
6506 15 : p_full = p_H4_full + (p_H3_full - p_H4_full) * t_ratio;
6507 28 : } else if (t > (-8.33) && t < t_ob) {
6508 6 : Real64 t_ratio = (t - (-8.33)) / (1.67 - (-8.33));
6509 : // Equation 11.201 AHRI-2023
6510 6 : q_full = q_H3_full + (q_H2_full - q_H3_full) * t_ratio;
6511 : // Equation 11.202 AHRI-2023
6512 6 : p_full = p_H3_full + (p_H2_full - p_H3_full) * t_ratio;
6513 13 : } else if (t >= t_ob || t == (-8.33)) {
6514 7 : Real64 t_ratio = (t - (-8.33)) / (8.33 - (-8.33));
6515 : // Equation 11.199 AHRI-2023
6516 7 : q_full = q_H3_full + (q_H1_full - q_H3_full) * t_ratio;
6517 : // Equation 11.200 AHRI-2023
6518 7 : p_full = p_H3_full + (p_H1_full - p_H3_full) * t_ratio;
6519 : }
6520 :
6521 : // if not conducting H4 Test then use this block
6522 : // if (t >= t_ob || t <= (-8.33)) {
6523 : // Real64 t_ratio = (t - (-8.33)) / ((8.33) - (-8.33));
6524 : // // Equation 11.199 AHRI-2023
6525 : // q_full = q_H3_full + (q_H1_full - q_H3_full) * t_ratio;
6526 : // // Equation 11.200 AHRI-2023
6527 : // p_full = p_H3_full + (p_H1_full - p_H3_full) * t_ratio;
6528 : // } else if ((-8.33) < t && t < t_ob) {
6529 : // Real64 t_ratio = (t - (-8.33)) / (1.66 - (-8.33));
6530 : // // Equation 11.201 AHRI-2023
6531 : // q_full = q_H3_full + (q_H2_full - q_H3_full) * t_ratio;
6532 : // // Equation 11.202 AHRI-2023
6533 : // p_full = p_H3_full + (p_H2_full - p_H3_full) * t_ratio;
6534 : // }
6535 :
6536 52 : if (!OATempCompressorOnOffBlank && p_full > 0.0) {
6537 52 : if ((t <= OATempCompressorOff) || (q_full / p_full < 1.0)) {
6538 31 : delta_full = 0.0;
6539 21 : } else if ((t <= OATempCompressorOn) && (q_full / p_full > 1.0)) { // t > OATempCompressorOff
6540 18 : delta_full = 0.5;
6541 3 : } else if ((t > OATempCompressorOn) && (q_full / p_full > 1.0)) {
6542 3 : delta_full = 1.0;
6543 : }
6544 : } else {
6545 0 : delta_full = 1.0;
6546 : }
6547 :
6548 52 : hlf_full = 1.0; // Equation 11.170 AHRI-2023
6549 :
6550 : // Equaiton 11.168 AHRI-2023
6551 52 : e = p_full * hlf_full * delta_full * n;
6552 : // Equation 11.169 AHRI - 2023
6553 52 : rh = (bl - q_full * hlf_full * delta_full) * n;
6554 52 : goto HeatSpeedLoop4_exit;
6555 : }
6556 : }
6557 :
6558 1 : HeatSpeedLoop4_exit:;
6559 104 : q_sum += n * bl;
6560 104 : e_sum += e;
6561 104 : rh_sum += rh;
6562 : }
6563 :
6564 8 : Real64 defrost_period = 90; // Time between defrost terminations (for testing) in minutes
6565 8 : Real64 defrost_MaxTime = 720; // Maximum time between defrosts allowed by controls in minutes
6566 8 : Real64 t_Test_90 = max(defrost_period, 90.00);
6567 8 : Real64 t_Max_90 = min(defrost_MaxTime, 720.00);
6568 : // default t_Test_90/t_Max_90 = 0.125
6569 8 : if (DefrostControl == HPdefrostControl::Timed) {
6570 : // Equation 11.106 AHRI-2023
6571 1 : f_def = 1.0; // Timed defrost control
6572 : } else {
6573 : // Equation 11.105 AHRI-2023
6574 7 : f_def = 1 + 0.03 * (1 - (t_Test_90 / t_Max_90)); // Demand defrost control
6575 : // f_def = 1.03;
6576 : }
6577 :
6578 8 : if (e_sum > 0.0) {
6579 8 : HSPF2_2023 = (q_sum / (e_sum + rh_sum)) * f_def; // Equation 11.103
6580 : } else {
6581 0 : HSPF2_2023 = 0.0;
6582 : }
6583 :
6584 16 : return std::make_tuple(NetHeatingCapRatedHighTemp_2023, NetHeatingCapRatedLowTemp_2023, HSPF2_2023);
6585 8 : }
6586 :
6587 8 : std::map<std::string, Real64> MultiSpeedDXHeatingCoilStandardRatings(
6588 : EnergyPlusData &state,
6589 : [[maybe_unused]] std::string const &DXCoilName, // Name of DX coil for which HSPF is calculated
6590 : [[maybe_unused]] std::string const &DXCoilType, // Type of DX coil for which HSPF is calculated
6591 : Array1A_int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
6592 : Array1A_int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
6593 : Array1A_int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
6594 : Array1A_int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
6595 : Array1A_int const PLFFPLRCurveIndex, // Index for the PLF vs part-load ratio curve
6596 : Array1A<Real64> const RatedTotalCapacity, // Reference capacity of DX coil [W]
6597 : Array1A<Real64> const RatedCOP, // Reference coefficient of performance [W/W]
6598 : Array1A<Real64> const RatedAirVolFlowRate, // Reference air flow rate of DX coil [m3/s]
6599 : Array1A<Real64> const MSFanPowerPerEvapAirFlowRateInput, // 2017 rated fan power per evap air flow rate [W/(m3/s)]
6600 : Array1A<Real64> const MSFanPowerPerEvapAirFlowRateInput_2023, // 2023 rated fan power per evap air flow rate [W/(m3/s)]
6601 : int const nsp, // Number of compressor speeds
6602 : ObjexxFCL::Optional_int_const RegionNum, // Region number for calculating HSPF of single speed DX heating coil
6603 : ObjexxFCL::Optional<Real64 const> MinOATCompressor, // Minimum OAT for heat pump compressor operation [C]
6604 : ObjexxFCL::Optional<Real64 const> OATempCompressorOn, // The outdoor temperature when the compressor is automatically turned
6605 : ObjexxFCL::Optional_bool_const OATempCompressorOnOffBlank, // Flag used to determine low temperature cut out factor
6606 : ObjexxFCL::Optional<HPdefrostControl const> DefrostControl // defrost control; 1=timed, 2=on-demand
6607 : )
6608 : {
6609 :
6610 : // SUBROUTINE INFORMATION:
6611 : // AUTHOR B. Nigusse, FSEC
6612 : // DATE WRITTEN December 2012
6613 : // MODIFIED
6614 : // RE-ENGINEERED na
6615 :
6616 : // PURPOSE OF THIS SUBROUTINE:
6617 : // Calculates the standard ratings net heating capacity and HSPF values for multi speed DX heating coils
6618 : // at the AHRI standard test condition(s).
6619 :
6620 : // METHODOLOGY EMPLOYED:
6621 : // na
6622 :
6623 : // REFERENCES:
6624 : // na
6625 :
6626 : // Using/Aliasing
6627 : using Curve::CurveValue;
6628 :
6629 : // Argument array dimensioning
6630 8 : CapFTempCurveIndex.dim(nsp);
6631 8 : CapFFlowCurveIndex.dim(nsp);
6632 8 : EIRFTempCurveIndex.dim(nsp);
6633 8 : EIRFFlowCurveIndex.dim(nsp);
6634 8 : PLFFPLRCurveIndex.dim(nsp);
6635 8 : RatedTotalCapacity.dim(nsp);
6636 8 : RatedCOP.dim(nsp);
6637 8 : RatedAirVolFlowRate.dim(nsp);
6638 8 : MSFanPowerPerEvapAirFlowRateInput.dim(nsp);
6639 8 : MSFanPowerPerEvapAirFlowRateInput_2023.dim(nsp);
6640 :
6641 : // Locals
6642 : // SUBROUTINE ARGUMENT DEFINITIONS:
6643 :
6644 : // back on, if applicable, following automatic shut off. This field is
6645 : // used only for HSPF calculation. [C]
6646 :
6647 : // SUBROUTINE PARAMETER DEFINITIONS:
6648 : // CHARACTER(len=*), PARAMETER :: RoutineName='MultiSpeedDXHeatingCoilStandardRatings: ' ! Include trailing blank space
6649 :
6650 : // INTERFACE BLOCK SPECIFICATIONS
6651 : // na
6652 :
6653 : // DERIVED TYPE DEFINITIONS
6654 : // na
6655 :
6656 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
6657 :
6658 8 : Real64 NetHeatingCapRatedHighTemp = 0.0; // net heating capacity at maximum speed and High Temp
6659 8 : Real64 NetHeatingCapRatedLowTemp = 0.0; // net heating capacity at maximum speed and low Temp
6660 8 : Real64 HSPF = 0.0; // seasonale energy efficiency ratio of multi speed DX cooling coil
6661 :
6662 8 : Real64 NetHeatingCapRatedHighTemp_2023 = 0.0; // net heating capacity at maximum speed and High Temp
6663 8 : Real64 NetHeatingCapRatedLowTemp_2023 = 0.0; // net heating capacity at maximum speed and low Temp
6664 8 : Real64 HSPF2_2023 = 0.0; // seasonale energy efficiency ratio of multi speed DX cooling coil
6665 :
6666 8 : std::map<std::string, Real64> StandardRatingsResult;
6667 : // StandardRatingsResult["NetHeatingCapRatedHighTemp"] = NetHeatingCapRatedHighTemp;
6668 : // StandardRatingsResult["NetHeatingCapRatedLowTemp"] = NetHeatingCapRatedLowTemp;
6669 : // StandardRatingsResult["HSPF"] = HSPF;
6670 : // StandardRatingsResult["NetHeatingCapRatedHighTemp_2023"] = NetHeatingCapRatedHighTemp_2023;
6671 : // StandardRatingsResult["NetHeatingCapRatedLowTemp_2023"] = NetHeatingCapRatedLowTemp_2023;
6672 : // StandardRatingsResult["HSPF2_2023"] = HSPF2_2023;
6673 :
6674 : // HSPF Calculation | AHRI 2017 Std.
6675 16 : std::tie(NetHeatingCapRatedHighTemp, NetHeatingCapRatedLowTemp, HSPF) = MultiSpeedDXHeatingCoilHSPF(state,
6676 : nsp,
6677 : MSFanPowerPerEvapAirFlowRateInput,
6678 : CapFTempCurveIndex,
6679 : CapFFlowCurveIndex,
6680 : RatedTotalCapacity,
6681 : RatedAirVolFlowRate,
6682 : EIRFFlowCurveIndex,
6683 : EIRFTempCurveIndex,
6684 : RatedCOP,
6685 : RegionNum,
6686 : MinOATCompressor,
6687 : OATempCompressorOn,
6688 : OATempCompressorOnOffBlank,
6689 8 : DefrostControl);
6690 :
6691 16 : StandardRatingsResult["NetHeatingCapRatedHighTemp"] = NetHeatingCapRatedHighTemp;
6692 16 : StandardRatingsResult["NetHeatingCapRatedLowTemp"] = NetHeatingCapRatedLowTemp;
6693 16 : StandardRatingsResult["HSPF"] = HSPF;
6694 :
6695 : // HSPF2 Calculation | AHRI 2023 Std.
6696 8 : std::tie(NetHeatingCapRatedHighTemp_2023, NetHeatingCapRatedLowTemp_2023, HSPF2_2023) =
6697 16 : MultiSpeedDXHeatingCoilHSPF2(state,
6698 : nsp,
6699 : MSFanPowerPerEvapAirFlowRateInput_2023,
6700 : CapFTempCurveIndex,
6701 : CapFFlowCurveIndex,
6702 : RatedTotalCapacity,
6703 : RatedAirVolFlowRate,
6704 : EIRFFlowCurveIndex,
6705 : EIRFTempCurveIndex,
6706 : RatedCOP,
6707 : RegionNum,
6708 : MinOATCompressor,
6709 : OATempCompressorOn,
6710 : OATempCompressorOnOffBlank,
6711 8 : DefrostControl);
6712 :
6713 16 : StandardRatingsResult["NetHeatingCapRatedHighTemp_2023"] = NetHeatingCapRatedHighTemp_2023;
6714 16 : StandardRatingsResult["NetHeatingCapRatedLowTemp_2023"] = NetHeatingCapRatedLowTemp_2023;
6715 16 : StandardRatingsResult["HSPF2_2023"] = HSPF2_2023;
6716 :
6717 16 : return StandardRatingsResult;
6718 0 : }
6719 :
6720 130 : void ReportDXCoilRating(EnergyPlusData &state,
6721 : std::string const &CompType, // Type of component
6722 : std::string_view CompName, // Name of component
6723 : int const CompTypeNum, // TypeNum of component
6724 : Real64 const CoolCapVal, // Standard total (net) cooling capacity for AHRI Std. 210/240 {W}
6725 : Real64 const SEERUserIP, // SEER value in IP units from user PLR curve {Btu/W-h}
6726 : Real64 const SEERStandardIP, // SEER value in IP units from AHRI Std 210/240-2008 default PLF curve and C_D {Btu/W-h}
6727 : Real64 const EERValueSI, // EER value in SI units {W/W}
6728 : Real64 const EERValueIP, // EER value in IP units {Btu/W-h}
6729 : Real64 const IEERValueIP, // IEER value in IP units {Btu/W-h}
6730 : Real64 const HighHeatingCapVal, // High Temperature Heating Standard (Net) Rating Capacity
6731 : Real64 const LowHeatingCapVal, // Low Temperature Heating Standard (Net) Rating Capacity
6732 : Real64 const HSPFValueIP, // IEER value in IP units {Btu/W-h}
6733 : int const RegionNum, // Region Number for which HSPF is calculated
6734 : bool const AHRI2023StandardRatings) // True if required AHRI/ANSI 210/240 Std. 2023 SEER2,HSPF2 Ratings.
6735 : {
6736 :
6737 : // SUBROUTINE INFORMATION:
6738 : // AUTHOR Bereket Nigusse, Chandan Sharma
6739 : // DATE WRITTEN February 2010
6740 : // MODIFIED May 2010 (Added EER and IEER entries)
6741 : // March 2012 (Added HSPF and High/Low Heating Capacity entries)
6742 : // RE-ENGINEERED na
6743 :
6744 : // PURPOSE OF THIS SUBROUTINE:
6745 : // This subroutine writes the standard rating (net) cooling capacity, SEER, EER and IEER values to
6746 : // the "eio" and tabular output files for Single Speed compressor DX Cooling Coils.
6747 :
6748 : // METHODOLOGY EMPLOYED:
6749 : // na
6750 :
6751 : // REFERENCES:
6752 : // na
6753 :
6754 : // Using/Aliasing
6755 :
6756 : using namespace OutputReportPredefined;
6757 : using HVAC::Coil_CoolingAirToAirVariableSpeed;
6758 : using HVAC::CoilDX_CoolingSingleSpeed;
6759 : using HVAC::CoilDX_CoolingTwoSpeed;
6760 : using HVAC::CoilDX_HeatingEmpirical;
6761 : using HVAC::CoilDX_MultiSpeedCooling;
6762 : using HVAC::CoilDX_MultiSpeedHeating;
6763 :
6764 : // Locals
6765 : // SUBROUTINE ARGUMENT DEFINITIONS:
6766 : // or ANSI/AHRI Std. 340/360 {W}
6767 :
6768 : // for AHRI Std. 210/240 {W}
6769 : // for AHRI Std. 210/240 {W}
6770 :
6771 : // SUBROUTINE PARAMETER DEFINITIONS:
6772 :
6773 : // INTERFACE BLOCK SPECIFICATIONS
6774 : // na
6775 :
6776 : // DERIVED TYPE DEFINITIONS
6777 : // na
6778 :
6779 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
6780 :
6781 130 : switch (CompTypeNum) {
6782 :
6783 72 : case CoilDX_CoolingSingleSpeed: {
6784 72 : if (!AHRI2023StandardRatings) {
6785 36 : if (state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag) {
6786 : static constexpr std::string_view Format_994(
6787 : "! <DX Cooling Coil Standard Rating Information>, Component Type, Component Name, Standard Rating (Net) "
6788 : "Cooling Capacity {W}, Standard Rating Net COP {W/W}, EER {Btu/W-h}, SEER User {Btu/W-h}, SEER Standard {Btu/W-h}, "
6789 : "IEER "
6790 : "{Btu/W-h}");
6791 26 : print(state.files.eio, "{}\n", Format_994);
6792 26 : state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag = false;
6793 : }
6794 :
6795 : static constexpr std::string_view Format_991(
6796 : " DX Cooling Coil Standard Rating Information, {}, {}, {:.1R}, {:.2R}, {:.2R}, {:.2R}, {:.2R}, {:.1R}\n");
6797 36 : print(state.files.eio, Format_991, CompType, CompName, CoolCapVal, EERValueSI, EERValueIP, SEERUserIP, SEERStandardIP, IEERValueIP);
6798 :
6799 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilType, CompName, CompType);
6800 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSI, CompName, CoolCapVal, 1);
6801 : // W/W is the same as Btuh/Btuh so that's fine too
6802 36 : if (EERValueSI > 0.0) {
6803 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP, CompName, EERValueSI, 2);
6804 : } else {
6805 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP, CompName, "N/A");
6806 : }
6807 : // Btu/W-h will convert to itself
6808 36 : if (EERValueIP > 0.0) {
6809 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP, CompName, EERValueIP, 2);
6810 : } else {
6811 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP, CompName, "N/A");
6812 : }
6813 36 : if (SEERUserIP > 0.0) {
6814 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERUserIP, CompName, SEERUserIP, 2);
6815 : } else {
6816 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERUserIP, CompName, "N/A");
6817 : }
6818 36 : if (SEERStandardIP > 0.0) {
6819 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERStandardIP, CompName, SEERStandardIP, 2);
6820 : } else {
6821 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERStandardIP, CompName, "N/A");
6822 : }
6823 36 : if (IEERValueIP > 0.0) {
6824 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP, CompName, IEERValueIP, 1);
6825 : } else {
6826 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP, CompName, "N/A");
6827 : }
6828 36 : addFootNoteSubTable(state, state.dataOutRptPredefined->pdstDXCoolCoil, StandardRatings::AHRI2017FOOTNOTE);
6829 : } else {
6830 : // ANSI/AHRI 210/240 Standard 2023 Ratings | SEER2
6831 36 : if (state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag2) {
6832 : static constexpr std::string_view Format_991_(
6833 : "! <DX Cooling Coil AHRI 2023 Standard Rating Information>, Component Type, Component Name, Standard Rating (Net) "
6834 : "Cooling Capacity {W}, Standard Rating Net COP2 {W/W}, EER2 {Btu/W-h}, SEER2 User {Btu/W-h}, SEER2 Standard "
6835 : "{Btu/W-h}, "
6836 : "IEER 2022 "
6837 : "{Btu/W-h}");
6838 26 : print(state.files.eio, "{}\n", Format_991_);
6839 26 : state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag2 = false;
6840 : }
6841 :
6842 : static constexpr std::string_view Format_991_(
6843 : " DX Cooling Coil AHRI 2023 Standard Rating Information, {}, {}, {:.1R}, {:.2R}, {:.2R}, {:.2R}, {:.2R}, {:.1R}\n");
6844 36 : print(state.files.eio, Format_991_, CompType, CompName, CoolCapVal, EERValueSI, EERValueIP, SEERUserIP, SEERStandardIP, IEERValueIP);
6845 :
6846 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilType_2023, CompName, CompType);
6847 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSI_2023, CompName, CoolCapVal, 1);
6848 : // W/W is the same as Btuh/Btuh so that's fine too
6849 36 : if (EERValueSI > 0.0) {
6850 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP_2023, CompName, EERValueSI, 2);
6851 : } else {
6852 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP_2023, CompName, "N/A");
6853 : }
6854 : // Btu/W-h will convert to itself
6855 36 : if (EERValueIP > 0.0) {
6856 36 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP_2023, CompName, EERValueIP, 2);
6857 : } else {
6858 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP_2023, CompName, "N/A");
6859 : }
6860 36 : if (SEERUserIP > 0.0) {
6861 25 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2UserIP_2023, CompName, SEERUserIP, 2);
6862 : } else {
6863 11 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2UserIP_2023, CompName, "N/A");
6864 : }
6865 36 : if (SEERStandardIP > 0.0) {
6866 25 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2StandardIP_2023, CompName, SEERStandardIP, 2);
6867 : } else {
6868 11 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2StandardIP_2023, CompName, "N/A");
6869 : }
6870 36 : if (IEERValueIP > 0.0) {
6871 32 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP_2023, CompName, IEERValueIP, 1);
6872 : } else {
6873 4 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP_2023, CompName, "N/A");
6874 : }
6875 36 : addFootNoteSubTable(state, state.dataOutRptPredefined->pdstDXCoolCoil_2023, StandardRatings::AHRI2023FOOTNOTE);
6876 : }
6877 72 : break;
6878 : }
6879 24 : case CoilDX_HeatingEmpirical:
6880 : case CoilDX_MultiSpeedHeating: {
6881 24 : if (!AHRI2023StandardRatings) {
6882 12 : if (state.dataHVACGlobal->StandardRatingsMyHeatOneTimeFlag) {
6883 : static constexpr std::string_view Format_992(
6884 : "! <DX Heating Coil Standard Rating Information>, Component Type, Component Name, High Temperature Heating "
6885 : "(net) Rating Capacity {W}, Low Temperature Heating (net) Rating Capacity {W}, HSPF {Btu/W-h}, Region "
6886 : "Number\n");
6887 12 : print(state.files.eio, "{}", Format_992);
6888 12 : state.dataHVACGlobal->StandardRatingsMyHeatOneTimeFlag = false;
6889 : }
6890 :
6891 : static constexpr std::string_view Format_993(" DX Heating Coil Standard Rating Information, {}, {}, {:.1R}, {:.1R}, {:.2R}, {}\n");
6892 12 : print(state.files.eio, Format_993, CompType, CompName, HighHeatingCapVal, LowHeatingCapVal, HSPFValueIP, RegionNum);
6893 :
6894 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilType, CompName, CompType);
6895 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilHighCap, CompName, HighHeatingCapVal, 1);
6896 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilLowCap, CompName, LowHeatingCapVal, 1);
6897 : // Btu/W-h will convert to itself
6898 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilHSPFIP, CompName, HSPFValueIP, 2);
6899 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilRegionNum, CompName, RegionNum);
6900 24 : addFootNoteSubTable(
6901 12 : state, state.dataOutRptPredefined->pdstDXHeatCoil, "ANSI/AHRI ratings account for supply air fan heat and electric power.");
6902 : } else {
6903 : // ANSI/AHRI 210/240 Standard 2023 Ratings | HSPF2
6904 12 : if (state.dataHVACGlobal->StandardRatingsMyHeatOneTimeFlag2) {
6905 : static constexpr std::string_view Format_992_(
6906 : "! <DX Heating Coil AHRI 2023 Standard Rating Information>, Component Type, Component Name, High Temperature Heating "
6907 : "(net) Rating Capacity {W}, Low Temperature Heating (net) Rating Capacity {W}, HSPF2 {Btu/W-h}, Region "
6908 : "Number\n");
6909 12 : print(state.files.eio, "{}", Format_992_);
6910 12 : state.dataHVACGlobal->StandardRatingsMyHeatOneTimeFlag2 = false;
6911 : }
6912 :
6913 : static constexpr std::string_view Format_993_(
6914 : " DX Heating Coil AHRI 2023 Standard Rating Information, {}, {}, {:.1R}, {:.1R}, {:.2R}, {}\n");
6915 12 : print(state.files.eio, Format_993_, CompType, CompName, HighHeatingCapVal, LowHeatingCapVal, HSPFValueIP, RegionNum);
6916 :
6917 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilType_2023, CompName, CompType);
6918 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilHighCap_2023, CompName, HighHeatingCapVal, 1);
6919 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilLowCap_2023, CompName, LowHeatingCapVal, 1);
6920 : // Btu/W-h will convert to itself
6921 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilHSPF2IP_2023, CompName, HSPFValueIP, 2);
6922 12 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXHeatCoilRegionNum_2023, CompName, RegionNum);
6923 24 : addFootNoteSubTable(state,
6924 12 : state.dataOutRptPredefined->pdstDXHeatCoil_2023,
6925 : "ANSI/AHRI 2023 (HSPF2) ratings account for supply air fan heat and electric power.");
6926 : }
6927 24 : break;
6928 : }
6929 34 : case CoilDX_CoolingTwoSpeed:
6930 : case Coil_CoolingAirToAirVariableSpeed:
6931 : case CoilDX_MultiSpeedCooling: {
6932 34 : if (!AHRI2023StandardRatings) {
6933 10 : if (state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag) {
6934 : static constexpr std::string_view Format_994(
6935 : "! <DX Cooling Coil Standard Rating Information>, Component Type, Component Name, Standard Rating (Net) "
6936 : "Cooling Capacity {W}, Standard Rating Net COP {W/W}, EER {Btu/W-h}, SEER User {Btu/W-h}, SEER Standard {Btu/W-h}, "
6937 : "IEER "
6938 : "{Btu/W-h}");
6939 9 : print(state.files.eio, "{}\n", Format_994);
6940 9 : state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag = false;
6941 : }
6942 :
6943 : static constexpr std::string_view Format_995(
6944 : " DX Cooling Coil Standard Rating Information, {}, {}, {:.1R}, {:.2R}, {:.2R}, {:.2R}, {:.2R}, {}\n");
6945 10 : print(state.files.eio, Format_995, CompType, CompName, CoolCapVal, EERValueSI, EERValueIP, SEERUserIP, SEERStandardIP, IEERValueIP);
6946 :
6947 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilType, CompName, CompType);
6948 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSI, CompName, CoolCapVal, 1);
6949 10 : if (EERValueSI > 0.0) {
6950 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP, CompName, EERValueSI, 2);
6951 : } else {
6952 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP, CompName, "N/A");
6953 : }
6954 10 : if (EERValueIP > 0.0) {
6955 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP, CompName, EERValueIP, 2);
6956 : } else {
6957 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP, CompName, "N/A");
6958 : }
6959 10 : if (SEERUserIP > 0.0) {
6960 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERUserIP, CompName, SEERUserIP, 2);
6961 : } else {
6962 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERUserIP, CompName, "N/A");
6963 : }
6964 10 : if (SEERStandardIP > 0.0) {
6965 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERStandardIP, CompName, SEERStandardIP, 2);
6966 : } else {
6967 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEERStandardIP, CompName, "N/A");
6968 : }
6969 10 : if (IEERValueIP > 0.0) {
6970 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP, CompName, IEERValueIP, 1);
6971 : } else {
6972 10 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP, CompName, "N/A");
6973 : }
6974 10 : addFootNoteSubTable(state, state.dataOutRptPredefined->pdstDXCoolCoil, StandardRatings::AHRI2017FOOTNOTE);
6975 : } else {
6976 : // ANSI/AHRI 210/240 Standard 2023 Ratings | SEER2
6977 24 : if (state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag2) {
6978 : static constexpr std::string_view Format_991_(
6979 : "! <DX Cooling Coil AHRI 2023 Standard Rating Information>, Component Type, Component Name, Standard Rating (Net) "
6980 : "Cooling Capacity {W}, Standard Rating Net COP2 {W/W}, EER2 {Btu/W-h}, SEER2 User {Btu/W-h}, SEER2 Standard "
6981 : "{Btu/W-h}, "
6982 : "IEER 2022 "
6983 : "{Btu/W-h}");
6984 23 : print(state.files.eio, "{}\n", Format_991_);
6985 23 : state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag2 = false;
6986 : }
6987 :
6988 : static constexpr std::string_view Format_995_(
6989 : " DX Cooling Coil AHRI 2023 Standard Rating Information, {}, {}, {:.1R}, {:.2R}, {:.2R}, {:.2R}, {:.2R}, {:.1R}\n");
6990 24 : print(state.files.eio, Format_995_, CompType, CompName, CoolCapVal, EERValueSI, EERValueIP, SEERUserIP, SEERStandardIP, IEERValueIP);
6991 24 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilType_2023, CompName, CompType);
6992 24 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSI_2023, CompName, CoolCapVal, 1);
6993 : // W/W is the same as Btuh/Btuh so that's fine too
6994 24 : if (EERValueSI > 0.0) {
6995 24 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP_2023, CompName, EERValueSI, 2);
6996 : } else {
6997 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilCOP_2023, CompName, "N/A");
6998 : }
6999 : // Btu/W-h will convert to itself
7000 24 : if (EERValueIP > 0.0) {
7001 24 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP_2023, CompName, EERValueIP, 2);
7002 : } else {
7003 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilEERIP_2023, CompName, "N/A");
7004 : }
7005 24 : if (SEERUserIP > 0.0) {
7006 22 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2UserIP_2023, CompName, SEERUserIP, 2);
7007 : } else {
7008 2 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2UserIP_2023, CompName, "N/A");
7009 : }
7010 24 : if (SEERStandardIP > 0.0) {
7011 22 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2StandardIP_2023, CompName, SEERStandardIP, 2);
7012 : } else {
7013 2 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilSEER2StandardIP_2023, CompName, "N/A");
7014 : }
7015 24 : if (IEERValueIP > 0.0) {
7016 24 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP_2023, CompName, IEERValueIP, 1);
7017 : } else {
7018 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilIEERIP_2023, CompName, "N/A");
7019 : }
7020 24 : addFootNoteSubTable(state, state.dataOutRptPredefined->pdstDXCoolCoil_2023, StandardRatings::AHRI2023FOOTNOTE);
7021 : }
7022 :
7023 34 : break;
7024 : }
7025 0 : default:
7026 0 : break;
7027 : }
7028 130 : }
7029 :
7030 0 : void ReportDXCoolCoilDataCenterApplication(EnergyPlusData &state,
7031 : std::string const &CompType, // Type of component
7032 : std::string_view CompName, // Name of component
7033 : int const CompTypeNum, // TypeNum of component
7034 : Array1D<Real64> &NetCoolingCapRated, // net cooling capacity of single speed DX cooling coil
7035 : Array1D<Real64> &TotElectricPowerRated // total electric power including supply fan
7036 : )
7037 : {
7038 :
7039 : // SUBROUTINE INFORMATION:
7040 : // AUTHOR Bereket Nigusse
7041 : // DATE WRITTEN October 2014
7042 : // MODIFIED na
7043 : //
7044 : // RE-ENGINEERED na
7045 :
7046 : // PURPOSE OF THIS SUBROUTINE:
7047 : // This subroutine writes the standard rating (net) cooling capacity and Electric Power for
7048 : // for room unitary air conditioners single speed DX cooling coils to the "eio" and tabular
7049 : // output files.
7050 :
7051 : // METHODOLOGY EMPLOYED:
7052 : // na
7053 :
7054 : // REFERENCES:
7055 : // ANSI/ASHRAE Standard 127-2012 - Method of Testing for Rating Computer and Data Processing
7056 : // Room Unitary Air Conditioners
7057 :
7058 : // Using/Aliasing
7059 :
7060 : using namespace OutputReportPredefined;
7061 : using HVAC::CoilDX_CoolingSingleSpeed;
7062 :
7063 0 : if (CompTypeNum == CoilDX_CoolingSingleSpeed) {
7064 0 : if (state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag3) {
7065 : static constexpr std::string_view Format_101(
7066 : "! <DX Cooling Coil ASHRAE 127 Standard Ratings Information>, Component Type, Component Name, Standard 127 "
7067 : "Classification, Rated Net Cooling Capacity Test A {W}, Rated Total Electric Power Test A {W}, Rated Net "
7068 : "Cooling Capacity Test B {W}, Rated Total Electric Power Test B {W}, Rated Net Cooling Capacity Test C {W}, "
7069 : "Rated Total Electric Power Test C {W}, Rated Net Cooling Capacity Test D {W}, Rated Total Electric "
7070 : "Power Test D {W} \n");
7071 0 : print(state.files.eio, "{}", Format_101);
7072 0 : state.dataHVACGlobal->StandardRatingsMyCoolOneTimeFlag3 = false;
7073 : }
7074 0 : for (int ClassNum = 1; ClassNum <= 4; ++ClassNum) {
7075 0 : int Num = (ClassNum - 1) * 4;
7076 0 : std::string ClassName = format("Class {}", ClassNum);
7077 0 : std::string CompNameNew = fmt::format("{}({})", CompName, ClassName);
7078 : static constexpr std::string_view Format_102(
7079 : " DX Cooling Coil ASHRAE 127 Standard Ratings Information, {}, {}, {}, {:.1R}, {:.1R}, {:.1R}, "
7080 : "{:.1R}, {:.1R}, {:.1R}, {:.1R}, {:.1R}\n");
7081 0 : print(state.files.eio,
7082 : Format_102,
7083 : CompType,
7084 : CompName,
7085 : ClassName,
7086 : NetCoolingCapRated(Num + 1),
7087 : TotElectricPowerRated(Num + 1),
7088 : NetCoolingCapRated(Num + 2),
7089 : TotElectricPowerRated(Num + 2),
7090 : NetCoolingCapRated(Num + 3),
7091 : TotElectricPowerRated(Num + 3),
7092 : NetCoolingCapRated(Num + 4),
7093 : TotElectricPowerRated(Num + 4));
7094 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilType2, CompNameNew, CompType);
7095 : // Note: If you call format("{:.1R}", NetCoolingCapRated(Num + 1)),
7096 : // Then it's not the OutputReportPredefined::PreDefTableEntry prototype with Real64 that is called.
7097 : // As a result, the entry isn't marked as being Real (origEntryIsReal) and unit conversion does not occur
7098 : // Bad: PreDefTableEntry(state, pdchDXCoolCoilNetCapSIA, CompNameNew, format("{:.1R}", NetCoolingCapRated(Num + 1)));
7099 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSIA, CompNameNew, NetCoolingCapRated(Num + 1), 1);
7100 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSIB, CompNameNew, NetCoolingCapRated(Num + 2), 1);
7101 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSIC, CompNameNew, NetCoolingCapRated(Num + 3), 1);
7102 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilNetCapSID, CompNameNew, NetCoolingCapRated(Num + 4), 1);
7103 :
7104 : // These will stay in W, so it doesn't matter as much, but let's be consistent
7105 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilElecPowerA, CompNameNew, TotElectricPowerRated(Num + 1), 1);
7106 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilElecPowerB, CompNameNew, TotElectricPowerRated(Num + 2), 1);
7107 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilElecPowerC, CompNameNew, TotElectricPowerRated(Num + 3), 1);
7108 0 : PreDefTableEntry(state, state.dataOutRptPredefined->pdchDXCoolCoilElecPowerD, CompNameNew, TotElectricPowerRated(Num + 4), 1);
7109 :
7110 0 : addFootNoteSubTable(state,
7111 0 : state.dataOutRptPredefined->pdstDXCoolCoil2,
7112 : "ANSI/ASHRAE Standard 127 includes supply fan heat effect and electric power.");
7113 0 : }
7114 : }
7115 0 : }
7116 :
7117 145 : void CheckCurveLimitsForStandardRatings(EnergyPlusData &state,
7118 : std::string const &DXCoilName, // Name of DX coil for which HSPF is calculated
7119 : std::string const &DXCoilType, // Type of DX coil - heating or cooling
7120 : int const DXCoilTypeNum, // Integer type of DX coil - heating or cooling
7121 : int const CapFTempCurveIndex, // Index for the capacity as a function of temperature modifier curve
7122 : int const CapFFlowCurveIndex, // Index for the capacity as a function of flow fraction modifier curve
7123 : int const EIRFTempCurveIndex, // Index for the EIR as a function of temperature modifier curve
7124 : int const EIRFFlowCurveIndex, // Index for the EIR as a function of flow fraction modifier curve
7125 : int const PLFFPLRCurveIndex // Index for the EIR vs part-load ratio curve
7126 : )
7127 : {
7128 :
7129 : // SUBROUTINE INFORMATION:
7130 : // AUTHOR D. Shirey/B. Nigusse, FSEC
7131 : // DATE WRITTEN May 2010
7132 : // MODIFIED Chandan Sharma, March 2012
7133 : // RE-ENGINEERED na
7134 :
7135 : // PURPOSE OF THIS SUBROUTINE:
7136 : // Checks the limits of the various curves used in DXCoil and returns .FALSE. if the limits do not include
7137 : // the standard test condition(s).
7138 :
7139 : // METHODOLOGY EMPLOYED:
7140 : // na
7141 :
7142 : // REFERENCES:
7143 : // na
7144 :
7145 : // Using/Aliasing
7146 : using Curve::CurveValue;
7147 : using Curve::GetCurveIndex;
7148 : using Curve::GetCurveMinMaxValues;
7149 : using Curve::GetCurveName;
7150 : using HVAC::CoilDX_CoolingSingleSpeed;
7151 : using HVAC::CoilDX_HeatingEmpirical;
7152 : using HVAC::CoilDX_MultiSpeedCooling;
7153 : using HVAC::CoilDX_MultiSpeedHeating;
7154 :
7155 : // Locals
7156 : // SUBROUTINE ARGUMENT DEFINITIONS:
7157 :
7158 : // SUBROUTINE PARAMETER DEFINITIONS:
7159 :
7160 : static constexpr std::string_view RoutineName("CheckCurveLimitsForStandardRatings: "); // Include trailing blank space
7161 :
7162 : // INTERFACE BLOCK SPECIFICATIONS
7163 : // na
7164 :
7165 : // DERIVED TYPE DEFINITIONS
7166 : // na
7167 :
7168 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
7169 :
7170 : // Minimum and Maximum independent variable limits from Total Cooling Capacity Function of Temperature Curve
7171 145 : Real64 CapacityWBTempMin(0.0); // Capacity modifier Min value (wet bulb temperature), from the Curve:BiQuadratic object
7172 145 : Real64 CapacityWBTempMax(0.0); // Capacity modifier Max value (wet bulb temperature), from the Curve:BiQuadratic object
7173 145 : Real64 CapacityDBTempMin(0.0); // Capacity modifier Min value (dry bulb temperature), from the Curve:BiQuadratic object
7174 145 : Real64 CapacityDBTempMax(0.0); // Capacity modifier Max value (dry bulb temperature), from the Curve:BiQuadratic object
7175 :
7176 : // Minimum and Maximum independent variable limits from Energy Input Ratio (EIR) Function of Temperature Curve
7177 145 : Real64 EIRWBTempMin(0.0); // EIR modifier Min value (wet bulb temperature), from the Curve:BiQuadratic object
7178 145 : Real64 EIRWBTempMax(0.0); // EIR modifier Max value (wet bulb temperature), from the Curve:BiQuadratic object
7179 145 : Real64 EIRDBTempMin(0.0); // EIR modifier Min value (dry bulb temperature), from the Curve:BiQuadratic object
7180 145 : Real64 EIRDBTempMax(0.0); // EIR modifier Max value (dry bulb temperature), from the Curve:BiQuadratic object
7181 :
7182 : // Minimum and Maximum independent variable limits from Part Load Fraction Correlation Curve
7183 145 : Real64 PLFFPLRMin(0.0); // Maximum value for Part Load Ratio, from the corresponding curve object
7184 145 : Real64 PLFFPLRMax(0.0); // Minimum value for Part Load Ratio, from the corresponding curve object
7185 :
7186 : // Minimum and Maximum independent variable limits from Total Cooling Capacity Function of Flow Fraction Curve
7187 145 : Real64 CapacityFlowRatioMin(0.0); // Minimum value for flow fraction, from the corresponding curve object
7188 145 : Real64 CapacityFlowRatioMax(0.0); // Maximum value for flow fraction, from the corresponding curve object
7189 :
7190 : // Minimum and Maximum independent variable limits from Energy Input Ratio Function of Flow Fraction Curve
7191 145 : Real64 EIRFlowRatioMin(0.0); // Minimum value for flow fraction, from the corresponding curve object
7192 145 : Real64 EIRFlowRatioMax(0.0); // Maximum value for flow fraction, from the corresponding curve object
7193 :
7194 : // Minimum and Maximum independent variable limits from Total Cooling Capacity Function of Temperature Curve
7195 145 : Real64 HeatingCapODBTempMin(0.0); // Capacity modifier Min value (outdoor dry bulb temperature)
7196 145 : Real64 HeatingCapODBTempMax(0.0); // Capacity modifier Max value (outdoor dry bulb temperature)
7197 145 : Real64 HeatingCapIDBTempMin(0.0); // Capacity modifier Min value (indoor dry bulb temperature)
7198 145 : Real64 HeatingCapIDBTempMax(0.0); // Capacity modifier Max value (indoor dry bulb temperature)
7199 :
7200 : // Minimum and Maximum independent variable limits from Energy Input Ratio (EIR) Function of Temperature Curve
7201 145 : Real64 HeatingEIRODBTempMin(0.0); // EIR modifier Min value (outdoor dry bulb temperature)
7202 145 : Real64 HeatingEIRODBTempMax(0.0); // EIR modifier Max value (outdoor dry bulb temperature)
7203 145 : Real64 HeatingEIRIDBTempMin(0.0); // EIR modifier Min value (indoor dry bulb temperature)
7204 145 : Real64 HeatingEIRIDBTempMax(0.0); // EIR modifier Max value (indoor dry bulb temperature)
7205 :
7206 145 : bool CapCurveHighOATLimitsExceeded(false); // Logical for capacity curve temperature limits being exceeded (high temp)
7207 145 : bool CapCurveFlowLimitsExceeded(false); // Logical for capacity curve flow fraction limits being exceeded
7208 145 : bool EIRCurveHighOATLimitsExceeded(false); // Logical for EIR curve temperature limits being exceeded (high temp)
7209 145 : bool EIRCurveFlowLimitsExceeded(false); // Logical for EIR curve flow fraction limits being exceeded
7210 :
7211 145 : bool HeatingCapCurveHSPFLimitsExceeded(false); // Logical for capacity curve temperature limits being exceeded
7212 : // (HSPF calcs)
7213 145 : bool HeatingEIRCurveHSPFLimitsExceeded(false); // Logical for EIR curve temperature limits being exceeded
7214 : // (HSPF calcs)
7215 :
7216 145 : switch (DXCoilTypeNum) {
7217 :
7218 36 : case CoilDX_CoolingSingleSpeed: {
7219 36 : bool CapCurveMidOATLimitsExceeded = false; // Logical for capacity curve temperature limits being exceeded (mid temp)
7220 36 : bool EIRCurveMidOATLimitsExceeded = false; // Logical for EIR curve temperature limits being exceeded (mid temp)
7221 36 : bool PLFfPLRforSEERLimitsExceeded = false; // Logical for PLF function of PLR limits being exceeded
7222 36 : bool CapCurveIEERLimitsExceeded = false; // Logical for capacity curve temperature limits being exceeded (IEER calcs)
7223 36 : bool EIRCurveIEERLimitsExceeded = false; // Logical for EIR temperature limits being exceeded (IEER calcs)
7224 :
7225 36 : GetCurveMinMaxValues(state, CapFTempCurveIndex, CapacityWBTempMin, CapacityWBTempMax, CapacityDBTempMin, CapacityDBTempMax);
7226 36 : GetCurveMinMaxValues(state, EIRFTempCurveIndex, EIRWBTempMin, EIRWBTempMax, EIRDBTempMin, EIRDBTempMax);
7227 36 : GetCurveMinMaxValues(state, CapFFlowCurveIndex, CapacityFlowRatioMin, CapacityFlowRatioMax);
7228 36 : GetCurveMinMaxValues(state, EIRFFlowCurveIndex, EIRFlowRatioMin, EIRFlowRatioMax);
7229 36 : GetCurveMinMaxValues(state, PLFFPLRCurveIndex, PLFFPLRMin, PLFFPLRMax);
7230 :
7231 : // Checking the limits of capacity modifying curve for temperatures
7232 36 : if (CapacityDBTempMax < OutdoorCoilInletAirDryBulbTempRated || CapacityDBTempMin > OutdoorCoilInletAirDryBulbTempRated ||
7233 28 : CapacityWBTempMax < CoolingCoilInletAirWetBulbTempRated || CapacityWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7234 8 : CapCurveHighOATLimitsExceeded = true;
7235 : }
7236 : // Checking the limits of capacity modifying curve for flow fraction
7237 36 : if (CapacityFlowRatioMax < AirMassFlowRatioRated || CapacityFlowRatioMin > AirMassFlowRatioRated) {
7238 14 : CapCurveFlowLimitsExceeded = true;
7239 : }
7240 : // Checking the limits of EIR modifying curve for temperatures
7241 36 : if (EIRDBTempMax < OutdoorCoilInletAirDryBulbTempRated || EIRDBTempMin > OutdoorCoilInletAirDryBulbTempRated ||
7242 28 : EIRWBTempMax < CoolingCoilInletAirWetBulbTempRated || EIRWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7243 8 : EIRCurveHighOATLimitsExceeded = true;
7244 : }
7245 : // Checking the limits of EIR modifying curve for flow fraction
7246 36 : if (EIRFlowRatioMax < AirMassFlowRatioRated || EIRFlowRatioMin > AirMassFlowRatioRated) {
7247 14 : EIRCurveFlowLimitsExceeded = true;
7248 : }
7249 : // Checking the limits of capacity modifying curve for temperatures (SEER calculation)
7250 36 : if (CapacityDBTempMax < OutdoorCoilInletAirDryBulbTempTestB2 || CapacityDBTempMin > OutdoorCoilInletAirDryBulbTempTestB2 ||
7251 32 : CapacityWBTempMax < CoolingCoilInletAirWetBulbTempRated || CapacityWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7252 4 : CapCurveMidOATLimitsExceeded = true;
7253 : }
7254 : // Checking the limits of EIR modifying curve for temperatures (SEER calculation)
7255 36 : if (EIRDBTempMax < OutdoorCoilInletAirDryBulbTempTestB2 || EIRDBTempMin > OutdoorCoilInletAirDryBulbTempTestB2 ||
7256 32 : EIRWBTempMax < CoolingCoilInletAirWetBulbTempRated || EIRWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7257 4 : EIRCurveMidOATLimitsExceeded = true;
7258 : }
7259 : // Checking the limits of Part Load Fraction for PLR (SEER calculation)
7260 36 : if (PLFFPLRMax < PLRforSEER || PLFFPLRMin > PLRforSEER) {
7261 15 : PLFfPLRforSEERLimitsExceeded = true;
7262 : }
7263 : // Checking the limits of capacity modifying curve for temperatures (IEER high and low test conditions)
7264 36 : if (CapacityDBTempMax < OutdoorCoilInletAirDryBulbTempRated || CapacityDBTempMin > OADBTempLowReducedCapacityTest ||
7265 27 : CapacityWBTempMax < CoolingCoilInletAirWetBulbTempRated || CapacityWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7266 9 : CapCurveIEERLimitsExceeded = true;
7267 : }
7268 : // Checking the limits of EIR modifying curve for temperatures (IEER high and low test conditions)
7269 36 : if (EIRDBTempMax < OutdoorCoilInletAirDryBulbTempRated || EIRDBTempMin > OADBTempLowReducedCapacityTest ||
7270 27 : EIRWBTempMax < CoolingCoilInletAirWetBulbTempRated || EIRWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7271 9 : EIRCurveIEERLimitsExceeded = true;
7272 : }
7273 :
7274 36 : if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveHighOATLimitsExceeded || EIRCurveFlowLimitsExceeded ||
7275 22 : CapCurveMidOATLimitsExceeded || EIRCurveMidOATLimitsExceeded || PLFfPLRforSEERLimitsExceeded || CapCurveIEERLimitsExceeded ||
7276 : EIRCurveIEERLimitsExceeded) {
7277 :
7278 32 : ShowWarningError(
7279 : state,
7280 32 : format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.",
7281 : DXCoilType,
7282 : DXCoilName));
7283 32 : ShowContinueError(state,
7284 : " Review the Standard Ratings calculations in the Engineering Reference for this coil type. Also, use "
7285 : "Output:Diagnostics, DisplayExtraWarnings for further guidance.");
7286 :
7287 16 : if (state.dataGlobal->DisplayExtraWarnings) {
7288 10 : ShowContinueError(state, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName));
7289 30 : ShowContinueError(state,
7290 : " do not include the AHRI test conditions required to calculate one or more of the Standard Rating values.");
7291 : }
7292 :
7293 : // For Standard Rating Cooling Capacity:
7294 16 : if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded) {
7295 14 : if (state.dataGlobal->DisplayExtraWarnings) {
7296 20 : ShowContinueError(
7297 : state,
7298 20 : format("{}={}: Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", DXCoilType, DXCoilName));
7299 10 : if (CapCurveHighOATLimitsExceeded) {
7300 8 : ShowContinueError(
7301 : state,
7302 8 : format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7303 4 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7304 8 : GetCurveName(state, CapFTempCurveIndex)));
7305 : }
7306 10 : if (CapCurveFlowLimitsExceeded) {
7307 20 : ShowContinueError(
7308 : state,
7309 20 : format(" Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7310 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)],
7311 20 : GetCurveName(state, CapFFlowCurveIndex)));
7312 : }
7313 : }
7314 : }
7315 :
7316 : // For EER:
7317 16 : if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveHighOATLimitsExceeded || EIRCurveFlowLimitsExceeded) {
7318 14 : if (state.dataGlobal->DisplayExtraWarnings) {
7319 20 : ShowContinueError(
7320 : state,
7321 20 : format("{}={}: Energy Efficiency Ratio (EER) calculated is not at the AHRI test condition.", DXCoilType, DXCoilName));
7322 10 : if (CapCurveHighOATLimitsExceeded) {
7323 8 : ShowContinueError(
7324 : state,
7325 8 : format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7326 4 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7327 8 : GetCurveName(state, CapFTempCurveIndex)));
7328 : }
7329 10 : if (CapCurveFlowLimitsExceeded) {
7330 20 : ShowContinueError(
7331 : state,
7332 20 : format(" Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7333 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)],
7334 20 : GetCurveName(state, CapFFlowCurveIndex)));
7335 : }
7336 10 : if (EIRCurveHighOATLimitsExceeded) {
7337 8 : ShowContinueError(
7338 : state,
7339 8 : format(" Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7340 4 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
7341 8 : GetCurveName(state, EIRFTempCurveIndex)));
7342 : }
7343 10 : if (EIRCurveFlowLimitsExceeded) {
7344 20 : ShowContinueError(
7345 : state,
7346 20 : format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7347 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)],
7348 20 : GetCurveName(state, EIRFFlowCurveIndex)));
7349 : }
7350 : }
7351 : }
7352 :
7353 : // For SEER:
7354 16 : if (CapCurveMidOATLimitsExceeded || EIRCurveMidOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveFlowLimitsExceeded ||
7355 : PLFfPLRforSEERLimitsExceeded) {
7356 15 : if (state.dataGlobal->DisplayExtraWarnings) {
7357 20 : ShowContinueError(state,
7358 20 : format("{}={}: Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.",
7359 : DXCoilType,
7360 : DXCoilName));
7361 10 : if (CapCurveMidOATLimitsExceeded) {
7362 0 : ShowContinueError(
7363 : state,
7364 0 : format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7365 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7366 0 : GetCurveName(state, CapFTempCurveIndex)));
7367 : }
7368 10 : if (CapCurveFlowLimitsExceeded) {
7369 20 : ShowContinueError(
7370 : state,
7371 20 : format(" Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7372 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)],
7373 20 : GetCurveName(state, CapFFlowCurveIndex)));
7374 : }
7375 10 : if (EIRCurveMidOATLimitsExceeded) {
7376 0 : ShowContinueError(
7377 : state,
7378 0 : format(" Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7379 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
7380 0 : GetCurveName(state, EIRFTempCurveIndex)));
7381 : }
7382 10 : if (EIRCurveFlowLimitsExceeded) {
7383 20 : ShowContinueError(
7384 : state,
7385 20 : format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7386 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)],
7387 20 : GetCurveName(state, EIRFFlowCurveIndex)));
7388 : }
7389 10 : if (PLFfPLRforSEERLimitsExceeded) {
7390 20 : ShowContinueError(
7391 : state,
7392 20 : format(" Check limits in Part Load Fraction Correlation Curve, Curve Type = {}, Curve Name = {}",
7393 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(PLFFPLRCurveIndex)->curveType)],
7394 20 : GetCurveName(state, PLFFPLRCurveIndex)));
7395 : }
7396 : }
7397 : }
7398 :
7399 : // For IEER:
7400 16 : if (CapCurveIEERLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveIEERLimitsExceeded || EIRCurveFlowLimitsExceeded) {
7401 15 : if (state.dataGlobal->DisplayExtraWarnings) {
7402 20 : ShowContinueError(state,
7403 20 : format("{}={}: Integrated Energy Efficiency Ratio (IEER) calculated is not at the AHRI test condition.",
7404 : DXCoilType,
7405 : DXCoilName));
7406 10 : if (CapCurveIEERLimitsExceeded) {
7407 8 : ShowContinueError(
7408 : state,
7409 8 : format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7410 4 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7411 8 : GetCurveName(state, CapFTempCurveIndex)));
7412 : }
7413 10 : if (CapCurveFlowLimitsExceeded) {
7414 20 : ShowContinueError(
7415 : state,
7416 20 : format(" Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7417 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)],
7418 20 : GetCurveName(state, CapFFlowCurveIndex)));
7419 : }
7420 10 : if (EIRCurveIEERLimitsExceeded) {
7421 8 : ShowContinueError(
7422 : state,
7423 8 : format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7424 4 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
7425 8 : GetCurveName(state, EIRFTempCurveIndex)));
7426 : }
7427 10 : if (EIRCurveFlowLimitsExceeded) {
7428 20 : ShowContinueError(
7429 : state,
7430 20 : format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7431 10 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)],
7432 20 : GetCurveName(state, EIRFFlowCurveIndex)));
7433 : }
7434 : }
7435 : }
7436 :
7437 : } // End of curve error messages
7438 36 : break;
7439 : }
7440 5 : case CoilDX_HeatingEmpirical: {
7441 : {
7442 5 : if (state.dataCurveManager->curves(CapFTempCurveIndex)->numDims == 1) {
7443 2 : GetCurveMinMaxValues(state, CapFTempCurveIndex, HeatingCapODBTempMin, HeatingCapODBTempMax);
7444 :
7445 : // Checking the limits of capacity modifying curve for temperatures (IEER high and low test conditions)
7446 2 : if (HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7447 2 : HeatingCapODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test) {
7448 0 : HeatingCapCurveHSPFLimitsExceeded = true;
7449 : }
7450 : } else {
7451 3 : GetCurveMinMaxValues(
7452 : state, CapFTempCurveIndex, HeatingCapIDBTempMin, HeatingCapIDBTempMax, HeatingCapODBTempMin, HeatingCapODBTempMax);
7453 :
7454 : // Checking the limits of capacity modifying curve for temperatures (IEER high and low test conditions)
7455 3 : if (HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7456 1 : HeatingCapODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test ||
7457 0 : HeatingCapIDBTempMax < HeatingIndoorCoilInletAirDBTempRated || HeatingCapIDBTempMin > HeatingIndoorCoilInletAirDBTempRated) {
7458 3 : HeatingCapCurveHSPFLimitsExceeded = true;
7459 : }
7460 : }
7461 : }
7462 : {
7463 5 : if (state.dataCurveManager->curves(EIRFTempCurveIndex)->numDims == 1) {
7464 2 : GetCurveMinMaxValues(state, EIRFTempCurveIndex, HeatingEIRODBTempMin, HeatingEIRODBTempMax);
7465 :
7466 : // Checking the limits of EIR modifying curve for temperatures (HSPF high and low test conditions)
7467 2 : if (HeatingEIRODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7468 2 : HeatingEIRODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test) {
7469 0 : HeatingEIRCurveHSPFLimitsExceeded = true;
7470 : }
7471 : } else {
7472 3 : GetCurveMinMaxValues(
7473 : state, EIRFTempCurveIndex, HeatingEIRIDBTempMin, HeatingEIRIDBTempMax, HeatingEIRODBTempMin, HeatingEIRODBTempMax);
7474 :
7475 : // Checking the limits of EIR modifying curve for temperatures (HSPF high and low test conditions)
7476 3 : if (HeatingEIRODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7477 1 : HeatingEIRODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test ||
7478 0 : HeatingEIRIDBTempMax < HeatingIndoorCoilInletAirDBTempRated || HeatingEIRIDBTempMin > HeatingIndoorCoilInletAirDBTempRated) {
7479 3 : HeatingEIRCurveHSPFLimitsExceeded = true;
7480 : }
7481 : }
7482 : }
7483 5 : if (HeatingCapCurveHSPFLimitsExceeded || HeatingEIRCurveHSPFLimitsExceeded) {
7484 6 : ShowWarningError(
7485 : state,
7486 6 : format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.",
7487 : DXCoilType,
7488 : DXCoilName));
7489 6 : ShowContinueError(state,
7490 : " Review the Standard Ratings calculations in the Engineering Reference for this coil type. Also, use "
7491 : "Output:Diagnostics, DisplayExtraWarnings for further guidance.");
7492 3 : if (state.dataGlobal->DisplayExtraWarnings) {
7493 1 : ShowContinueError(state, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName));
7494 3 : ShowContinueError(state,
7495 : " do not include the AHRI test conditions required to calculate one or more of the Standard Rating values.");
7496 : }
7497 3 : if (state.dataGlobal->DisplayExtraWarnings) {
7498 2 : ShowWarningError(
7499 : state,
7500 2 : format("{}={}: Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", DXCoilType, DXCoilName));
7501 2 : ShowContinueError(state, " Review the Standard Ratings calculations in the Engineering Reference for this coil type.");
7502 1 : if (HeatingCapCurveHSPFLimitsExceeded) {
7503 2 : ShowContinueError(
7504 : state,
7505 2 : format(" Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7506 1 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7507 2 : GetCurveName(state, CapFTempCurveIndex)));
7508 : }
7509 1 : if (HeatingEIRCurveHSPFLimitsExceeded) {
7510 2 : ShowContinueError(state,
7511 2 : format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7512 1 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
7513 2 : GetCurveName(state, EIRFTempCurveIndex)));
7514 : }
7515 : }
7516 : }
7517 :
7518 : // MultiSpeed DX Coil Net Cooling Capacity and SEER:
7519 5 : break;
7520 : }
7521 21 : case CoilDX_MultiSpeedCooling: {
7522 21 : bool CapCurveLowOATLimitsExceeded = false; // Logical for capacity curve temperature limits being exceeded (low temp)
7523 21 : bool EIRCurveLowOATLimitsExceeded = false; // Logical for EIR curve temperature limits being exceeded (Low temp)
7524 :
7525 21 : GetCurveMinMaxValues(state, CapFTempCurveIndex, CapacityWBTempMin, CapacityWBTempMax, CapacityDBTempMin, CapacityDBTempMax);
7526 21 : GetCurveMinMaxValues(state, EIRFTempCurveIndex, EIRWBTempMin, EIRWBTempMax, EIRDBTempMin, EIRDBTempMax);
7527 21 : GetCurveMinMaxValues(state, CapFFlowCurveIndex, CapacityFlowRatioMin, CapacityFlowRatioMax);
7528 21 : GetCurveMinMaxValues(state, EIRFFlowCurveIndex, EIRFlowRatioMin, EIRFlowRatioMax);
7529 :
7530 : // Checking the limits of capacity modifying curve for temperatures
7531 21 : if (CapacityDBTempMax < OutdoorCoilInletAirDryBulbTempRated || CapacityDBTempMin > OutdoorCoilInletAirDryBulbTempRated ||
7532 21 : CapacityWBTempMax < CoolingCoilInletAirWetBulbTempRated || CapacityWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7533 0 : CapCurveHighOATLimitsExceeded = true;
7534 : }
7535 : // Checking the limits of capacity modifying curve for flow fraction
7536 21 : if (CapacityFlowRatioMax < AirMassFlowRatioRated || CapacityFlowRatioMin > AirMassFlowRatioRated) {
7537 0 : CapCurveFlowLimitsExceeded = true;
7538 : }
7539 : // Checking the limits of EIR modifying curve for temperatures
7540 21 : if (EIRDBTempMax < OutdoorCoilInletAirDryBulbTempRated || EIRDBTempMin > OutdoorCoilInletAirDryBulbTempRated ||
7541 21 : EIRWBTempMax < CoolingCoilInletAirWetBulbTempRated || EIRWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7542 0 : EIRCurveHighOATLimitsExceeded = true;
7543 : }
7544 : // Checking the limits of EIR modifying curve for flow fraction
7545 21 : if (EIRFlowRatioMax < AirMassFlowRatioRated || EIRFlowRatioMin > AirMassFlowRatioRated) {
7546 0 : EIRCurveFlowLimitsExceeded = true;
7547 : }
7548 : // Checking the limits of capacity modifying curve for temperatures (SEER calculation)
7549 21 : if (CapacityDBTempMax < OutdoorCoilInletAirDryBulbTempTestF1 || CapacityDBTempMin > OutdoorCoilInletAirDryBulbTempTestF1 ||
7550 21 : CapacityWBTempMax < CoolingCoilInletAirWetBulbTempRated || CapacityWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7551 0 : CapCurveLowOATLimitsExceeded = true;
7552 : }
7553 : // Checking the limits of EIR modifying curve for temperatures (SEER calculation)
7554 21 : if (EIRDBTempMax < OutdoorCoilInletAirDryBulbTempTestF1 || EIRDBTempMin > OutdoorCoilInletAirDryBulbTempTestF1 ||
7555 21 : EIRWBTempMax < CoolingCoilInletAirWetBulbTempRated || EIRWBTempMin > CoolingCoilInletAirWetBulbTempRated) {
7556 0 : EIRCurveLowOATLimitsExceeded = true;
7557 : }
7558 :
7559 21 : if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveHighOATLimitsExceeded || EIRCurveFlowLimitsExceeded ||
7560 21 : CapCurveLowOATLimitsExceeded || EIRCurveLowOATLimitsExceeded) {
7561 :
7562 0 : ShowWarningError(
7563 : state,
7564 0 : format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.",
7565 : DXCoilType,
7566 : DXCoilName));
7567 0 : ShowContinueError(state,
7568 : " Review the Standard Ratings calculations in the Engineering Reference for this coil type. Also, use "
7569 : "Output:Diagnostics, DisplayExtraWarnings for further guidance.");
7570 :
7571 0 : if (state.dataGlobal->DisplayExtraWarnings) {
7572 0 : ShowContinueError(state, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName));
7573 0 : ShowContinueError(state,
7574 : " do not include the AHRI test conditions required to calculate one or more of the Standard Rating values.");
7575 : }
7576 :
7577 : // For Standard Rating Cooling Capacity:
7578 0 : if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded) {
7579 0 : if (state.dataGlobal->DisplayExtraWarnings) {
7580 0 : ShowContinueError(state,
7581 0 : format("{}={}: The Standard Rating Cooling Capacity calculated is not at the AHRI test condition.",
7582 : DXCoilType,
7583 : DXCoilName));
7584 0 : if (CapCurveHighOATLimitsExceeded) {
7585 0 : ShowContinueError(
7586 : state,
7587 0 : format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7588 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7589 0 : GetCurveName(state, CapFTempCurveIndex)));
7590 : }
7591 0 : if (CapCurveFlowLimitsExceeded) {
7592 0 : ShowContinueError(
7593 : state,
7594 0 : format(" Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7595 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)],
7596 0 : GetCurveName(state, CapFFlowCurveIndex)));
7597 : }
7598 : }
7599 : }
7600 :
7601 : // For MultiSpeed DX Coil SEER:
7602 :
7603 0 : if (CapCurveLowOATLimitsExceeded || EIRCurveLowOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveFlowLimitsExceeded) {
7604 0 : if (state.dataGlobal->DisplayExtraWarnings) {
7605 0 : ShowContinueError(state,
7606 0 : format("{}={}: The Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.",
7607 : DXCoilType,
7608 : DXCoilName));
7609 0 : if (CapCurveLowOATLimitsExceeded) {
7610 0 : ShowContinueError(
7611 : state,
7612 0 : format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7613 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7614 0 : GetCurveName(state, CapFTempCurveIndex)));
7615 : }
7616 0 : if (CapCurveFlowLimitsExceeded) {
7617 0 : ShowContinueError(
7618 : state,
7619 0 : format(" Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7620 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)],
7621 0 : GetCurveName(state, CapFFlowCurveIndex)));
7622 : }
7623 0 : if (EIRCurveLowOATLimitsExceeded) {
7624 0 : ShowContinueError(
7625 : state,
7626 0 : format(" Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7627 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
7628 0 : GetCurveName(state, EIRFTempCurveIndex)));
7629 : }
7630 0 : if (EIRCurveFlowLimitsExceeded) {
7631 0 : ShowContinueError(
7632 : state,
7633 0 : format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}",
7634 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)],
7635 0 : GetCurveName(state, EIRFFlowCurveIndex)));
7636 : }
7637 : }
7638 : }
7639 :
7640 : } // End of curve error messages
7641 :
7642 21 : break;
7643 : }
7644 16 : case CoilDX_MultiSpeedHeating: {
7645 :
7646 16 : bool CapCurveOATLimitsExceeded = false; // Logical for capacity curve OD temp. limits being exceeded (low and High)
7647 : {
7648 16 : if (state.dataCurveManager->curves(CapFTempCurveIndex)->numDims == 1) {
7649 0 : GetCurveMinMaxValues(state, CapFTempCurveIndex, HeatingCapODBTempMin, HeatingCapODBTempMax);
7650 :
7651 0 : if (HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7652 0 : HeatingCapODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test) {
7653 0 : CapCurveOATLimitsExceeded = true;
7654 : }
7655 : // Checking the limits of capacity modifying curve for temperatures (HSPF high and low test conditions)
7656 0 : if (HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7657 0 : HeatingCapODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test ||
7658 0 : HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempH0Test) {
7659 0 : HeatingCapCurveHSPFLimitsExceeded = true;
7660 : }
7661 :
7662 : } else {
7663 16 : GetCurveMinMaxValues(
7664 : state, CapFTempCurveIndex, HeatingCapIDBTempMin, HeatingCapIDBTempMax, HeatingCapODBTempMin, HeatingCapODBTempMax);
7665 :
7666 : // Checking the limits of capacity modifying curve for temperatures (HSPF high and low test conditions)
7667 16 : if (HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7668 14 : HeatingCapODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test ||
7669 14 : HeatingCapIDBTempMax < HeatingIndoorCoilInletAirDBTempRated || HeatingCapIDBTempMin > HeatingIndoorCoilInletAirDBTempRated ||
7670 14 : HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempH0Test) {
7671 2 : HeatingCapCurveHSPFLimitsExceeded = true;
7672 : }
7673 : }
7674 : }
7675 :
7676 : {
7677 16 : if (state.dataCurveManager->curves(EIRFTempCurveIndex)->numDims == 1) {
7678 0 : GetCurveMinMaxValues(state, EIRFTempCurveIndex, HeatingEIRODBTempMin, HeatingEIRODBTempMax);
7679 : // Checking the limits of EIR modifying curve for temperatures (HSPF high and low test conditions)
7680 0 : if (HeatingEIRODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7681 0 : HeatingEIRODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test ||
7682 0 : HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempH0Test) {
7683 0 : HeatingEIRCurveHSPFLimitsExceeded = true;
7684 : }
7685 : } else {
7686 16 : GetCurveMinMaxValues(
7687 : state, EIRFTempCurveIndex, HeatingEIRIDBTempMin, HeatingEIRIDBTempMax, HeatingEIRODBTempMin, HeatingEIRODBTempMax);
7688 :
7689 : // Checking the limits of EIR modifying curve for temperatures (HSPF high and low test conditions)
7690 16 : if (HeatingEIRODBTempMax < HeatingOutdoorCoilInletAirDBTempRated ||
7691 16 : HeatingEIRODBTempMin > HeatingOutdoorCoilInletAirDBTempH3Test ||
7692 16 : HeatingEIRIDBTempMax < HeatingIndoorCoilInletAirDBTempRated || HeatingEIRIDBTempMin > HeatingIndoorCoilInletAirDBTempRated ||
7693 16 : HeatingCapODBTempMax < HeatingOutdoorCoilInletAirDBTempH0Test) {
7694 2 : HeatingEIRCurveHSPFLimitsExceeded = true;
7695 : }
7696 : }
7697 : }
7698 16 : if (HeatingCapCurveHSPFLimitsExceeded || HeatingEIRCurveHSPFLimitsExceeded || CapCurveOATLimitsExceeded) {
7699 :
7700 4 : ShowWarningError(
7701 : state,
7702 4 : format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.",
7703 : DXCoilType,
7704 : DXCoilName));
7705 4 : ShowContinueError(state,
7706 : " Review the Standard Ratings calculations in the Engineering Reference for this coil type. Also, use "
7707 : "Output:Diagnostics, DisplayExtraWarnings for further guidance.");
7708 :
7709 2 : if (state.dataGlobal->DisplayExtraWarnings) {
7710 0 : ShowContinueError(state, format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName));
7711 0 : ShowContinueError(state,
7712 : " do not include the AHRI test conditions required to calculate one or more of the Standard Rating values.");
7713 : }
7714 : }
7715 16 : if (CapCurveOATLimitsExceeded) {
7716 0 : if (state.dataGlobal->DisplayExtraWarnings) {
7717 0 : ShowWarningError(
7718 0 : state, format("{}={}: The Net Heating Capacity Calculated is not at the AHRI test condition.", DXCoilType, DXCoilName));
7719 0 : ShowContinueError(
7720 : state,
7721 0 : format(" Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7722 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7723 0 : GetCurveName(state, CapFTempCurveIndex)));
7724 : }
7725 : }
7726 :
7727 16 : if (HeatingCapCurveHSPFLimitsExceeded || HeatingEIRCurveHSPFLimitsExceeded) {
7728 2 : if (state.dataGlobal->DisplayExtraWarnings) {
7729 0 : ShowWarningError(state,
7730 0 : format("{}={}: The Heating Seasonal Performance Factor calculated is not at the AHRI test condition.",
7731 : DXCoilType,
7732 : DXCoilName));
7733 0 : if (HeatingCapCurveHSPFLimitsExceeded) {
7734 0 : ShowContinueError(
7735 : state,
7736 0 : format(" Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7737 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)],
7738 0 : GetCurveName(state, CapFTempCurveIndex)));
7739 : }
7740 0 : if (HeatingEIRCurveHSPFLimitsExceeded) {
7741 0 : ShowContinueError(state,
7742 0 : format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}",
7743 0 : Curve::objectNames[static_cast<int>(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)],
7744 0 : GetCurveName(state, EIRFTempCurveIndex)));
7745 : }
7746 : }
7747 : }
7748 16 : break;
7749 : }
7750 : // case CoilDX_CoolingTwoSpeed: {
7751 : // GetCurveMinMaxValues(state, CapFTempCurveIndex, CapacityWBTempMin, CapacityWBTempMax, CapacityDBTempMin, CapacityDBTempMax);
7752 : // GetCurveMinMaxValues(state, EIRFTempCurveIndex, EIRWBTempMin, EIRWBTempMax, EIRDBTempMin, EIRDBTempMax);
7753 : // GetCurveMinMaxValues(state, CapFFlowCurveIndex, CapacityFlowRatioMin, CapacityFlowRatioMax);
7754 : // GetCurveMinMaxValues(state, EIRFFlowCurveIndex, EIRFlowRatioMin, EIRFlowRatioMax);
7755 : // GetCurveMinMaxValues(state, PLFFPLRCurveIndex, PLFFPLRMin, PLFFPLRMax);
7756 : // break;
7757 : // }
7758 67 : default:
7759 67 : break;
7760 : }
7761 145 : }
7762 :
7763 104 : Real64 CondenserEnteringFluidTemperature(DataPlant::CondenserType const CondenserType,
7764 : StandardRatings::AhriChillerStd const ChillerStd,
7765 : Real64 LoadRatio)
7766 : {
7767 104 : Real64 CondenserEnteringFluidTemp = 0.0;
7768 104 : if (ChillerStd == StandardRatings::AhriChillerStd::AHRI550_590) {
7769 :
7770 52 : if (CondenserType == DataPlant::CondenserType::WaterCooled) {
7771 : // get the condenser entering water temperature for a given load ratio in deg C
7772 28 : Real64 enteringWaterTemp = 18.33;
7773 28 : if (LoadRatio > 0.50) {
7774 14 : enteringWaterTemp = 7.22 + 22.22 * LoadRatio;
7775 : }
7776 28 : CondenserEnteringFluidTemp = enteringWaterTemp;
7777 24 : } else if (CondenserType == DataPlant::CondenserType::AirCooled) {
7778 : // get the outdoor air dry bulb temperature for a given load ratio in deg C
7779 16 : Real64 enteringAirDBTemp = 12.78;
7780 16 : if (LoadRatio > 0.33) {
7781 12 : enteringAirDBTemp = 1.67 + 33.33 * LoadRatio;
7782 : }
7783 16 : CondenserEnteringFluidTemp = enteringAirDBTemp;
7784 : } else { // EvaporativelyCooled Condenser
7785 : // get the outdoor air wet bulb temperature for a given load ratio in deg C
7786 8 : Real64 enteringAirWBTemp = 10.0 + 13.89 * LoadRatio;
7787 8 : CondenserEnteringFluidTemp = enteringAirWBTemp;
7788 : }
7789 :
7790 52 : } else if (ChillerStd == StandardRatings::AhriChillerStd::AHRI551_591) {
7791 :
7792 52 : if (CondenserType == DataPlant::CondenserType::WaterCooled) {
7793 : // get the condenser entering water temperature for a given load ratio in deg C
7794 28 : Real64 enteringWaterTemp = 19.0;
7795 28 : if (LoadRatio > 0.50) {
7796 14 : enteringWaterTemp = 8.0 + 22.0 * LoadRatio;
7797 : }
7798 28 : CondenserEnteringFluidTemp = enteringWaterTemp;
7799 24 : } else if (CondenserType == DataPlant::CondenserType::AirCooled) {
7800 : // get the outdoor air dry bulb temperature for a given load ratio in deg C
7801 16 : Real64 enteringAirDBTemp = 13.0;
7802 16 : if (LoadRatio > 0.3125) {
7803 12 : enteringAirDBTemp = 3.0 + 32.0 * LoadRatio;
7804 : }
7805 16 : CondenserEnteringFluidTemp = enteringAirDBTemp;
7806 : } else { // EvaporativelyCooled Condenser
7807 : // get the outdoor air wet bulb temperature for a given load ratio in deg C
7808 8 : Real64 enteringAirWBTemp = 10.0 + 14.0 * LoadRatio;
7809 8 : CondenserEnteringFluidTemp = enteringAirWBTemp;
7810 : }
7811 : }
7812 104 : return CondenserEnteringFluidTemp;
7813 : }
7814 :
7815 : } // namespace StandardRatings
7816 :
7817 : } // namespace EnergyPlus
|