-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address HSPF2 calculation problems for multispeed DX system #10618
Changes from 7 commits
f593a1e
1a05580
534aa06
0e01ee0
32ea83a
6b77db2
dc265ec
a0ac2ca
aae4cf0
205c9f4
0008719
2c5368c
684d997
28523db
5c0d897
fb48a9d
2700cd9
9300aed
45de236
d668241
d64ee5e
1dcf13d
5bb53ea
2ab3b16
e3173bb
fb754c2
33dd354
9bffafb
dcdd63e
a27f27e
d1ee969
30f0c2a
bc96248
aeb119b
f3bc8c2
cdd868a
a42a007
3bebc2a
ae5b2fc
9306262
40588fd
a9bdf5f
52e2e04
6b007dc
02f3d78
bbd2548
fee5f3d
a4f51c8
503dfc9
ecf6f25
d9cbb6e
c3e934e
2d893b3
7e3c58c
1496a40
43c4f26
bd8aa28
86a5e4f
720876f
0008f35
214f506
7c04080
b488eb7
3c815fc
d97e816
e7496bc
434fb4d
0ff630f
3db0398
7a61d25
fb1836f
4a209f3
83ee80d
02103c1
d430408
5f80fee
ba9916b
28d2670
7776a27
b215745
1f534f6
c5ab674
8188981
377d13c
bc268f1
bd1f439
b1bc6a1
6cc0e93
a920919
4f7dcdf
1406ed3
8efbfe2
403aa90
0178e13
ab7b55d
0ca14c2
d24af9b
0323b65
01fbca9
f3bd842
235e935
eadb38a
e5bc7f3
5291385
a1477e9
5fad3ea
04c152b
864c386
f3d5028
4956d7b
8952aa8
bc25f03
13c296b
8704f04
81c66a7
59f7c9d
c37a243
dd8d453
3e19dc9
4436bf4
7833ec8
812ac1a
31353eb
f3abcc6
9e81d19
6b3c9cc
8f2a750
ae2ee8f
ffaa60e
52b2ae2
4648781
eb003d1
2ae2538
a0a1be5
7755930
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6332,17 +6332,17 @@ namespace StandardRatings { | |
Real64 q_H0_low = Q_H0_Low(spnum); | ||
Real64 q_H1_low = Q_H1_Low(spnum); | ||
Real64 q_H2_int = Q_H2_Int(spnum); | ||
Real64 q_H1_full = Q_H1_Full(spnum); | ||
Real64 q_H2_full = Q_H2_Full(spnum); | ||
Real64 q_H3_full = Q_H3_Full(spnum); | ||
Real64 q_H4_full = Q_H4_Full(spnum); | ||
Real64 q_H1_full = Q_H1_Full(spnum + 1); | ||
Real64 q_H2_full = Q_H2_Full(spnum + 1); | ||
Real64 q_H3_full = Q_H3_Full(spnum + 1); | ||
Real64 q_H4_full = Q_H4_Full(spnum + 1); | ||
// Equation 11.177 AHRI-2023 | ||
//?? (replaced 62 with 35) in Ratio expression // (t=>35-47/62-47) | ||
Real64 q_35_low = // q_H1_low + (q_H0_low - q_H1_low) * ((t - (8.33)) / (1.66 - (8.33))); | ||
q_H1_low + (q_H0_low - q_H1_low) * ((1.67 - (8.33)) / (16.67 - (8.33))); | ||
|
||
// Equation 11.191 AHRI-2023 | ||
Real64 N_Hq = min(1.0, (q_H2_int - q_35_low) / (q_H2_full - q_35_low)); | ||
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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modified to allow evaluation of the HSPF2 with flat heating capacity modifier curves function of temperature. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes #10651 FWIW, and this looks like undefined behavior, but I was finding that in a release build with no floating point exceptions enabled, when you had the same Cap FT / Fflow curves, N_Hq was 0 but N_HE was 1. |
||
N_Hq = max(0.0, N_Hq); | ||
// Equation 11.190 AHRI-2023 | ||
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; | ||
|
@@ -6351,17 +6351,17 @@ namespace StandardRatings { | |
Real64 p_H0_low = P_H0_Low(spnum); | ||
Real64 p_H1_low = P_H1_Low(spnum); | ||
Real64 p_H2_int = P_H2_Int(spnum); | ||
Real64 p_H1_full = P_H1_Full(spnum); | ||
Real64 p_H2_full = P_H2_Full(spnum); | ||
Real64 p_H3_full = P_H3_Full(spnum); | ||
Real64 p_H4_full = P_H4_Full(spnum); | ||
Real64 p_H1_full = P_H1_Full(spnum + 1); | ||
Real64 p_H2_full = P_H2_Full(spnum + 1); | ||
Real64 p_H3_full = P_H3_Full(spnum + 1); | ||
Real64 p_H4_full = P_H4_Full(spnum + 1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The full electric power input must be evaluated at the next available speed, not at the current speed. It should be different from the low speed. |
||
// Equation 11.178 AHRI - 2023 | ||
//?? (replaced 62 with 35) in Ratio expression (t=>35 F-47/35-47) | ||
Real64 p_35_low = // p_H1_low + (p_H0_low - p_H1_low) * ((t - (8.33)) / (1.66 - (8.33))); | ||
p_H1_low + (p_H0_low - p_H1_low) * ((1.67 - (8.33)) / (16.67 - (8.33))); | ||
|
||
// Equation 11.194 AHRI-2023 | ||
Real64 N_HE = min(1.0, (p_H2_int - p_35_low) / (p_H2_full - p_35_low)); | ||
Real64 N_HE = (p_H2_int != p_35_low) ? min(1.0, (p_H2_int - p_35_low) / (p_H2_full - p_35_low)) : 0.0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was modified to allow the evaluation of the HSPF2 with flat heating capacity modifier curves function of temperature. |
||
N_HE = max(0.0, N_HE); | ||
|
||
// Equation 11.193 AHRI-2023 | ||
|
@@ -6375,35 +6375,63 @@ namespace StandardRatings { | |
Real64 q_hs(0.0); | ||
Real64 p_hs(0.0); | ||
// Low Speed | ||
if (t < -8.33) { | ||
q_low = Q_H3_Full(spnum) + ((Q_H1_Low(spnum) - Q_H3_Full(spnum)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
|
||
p_low = P_H3_Full(spnum) + ((P_H1_Low(spnum) - P_H3_Full(spnum)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
} else if (t >= 4.44) { | ||
q_low = Q_H1_Low(spnum) + ((Q_H0_Low(spnum) - Q_H1_Low(spnum)) * (t - HeatingOutdoorCoilInletAirDBTempRated) / | ||
(HeatingOutdoorCoilInletAirDBTempH0Test - HeatingOutdoorCoilInletAirDBTempRated)); | ||
p_low = P_H1_Low(spnum) + ((P_H0_Low(spnum) - P_H1_Low(spnum)) * (t - HeatingOutdoorCoilInletAirDBTempRated) / | ||
(HeatingOutdoorCoilInletAirDBTempH0Test - HeatingOutdoorCoilInletAirDBTempRated)); | ||
} else { | ||
q_low = Q_H3_Full(spnum) + ((Q_H2_Full(spnum) - Q_H3_Full(spnum)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
p_low = P_H3_Full(spnum) + ((P_H2_Full(spnum) - P_H3_Full(spnum)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
if (t >= 8.33) { | ||
Real64 ratio = // (t - 8.33) / (16.67 - 8.33) | ||
(t - HeatingOutdoorCoilInletAirDBTempRated) / | ||
(HeatingOutdoorCoilInletAirDBTempH0Test - HeatingOutdoorCoilInletAirDBTempRated); | ||
// equation 11.179 | ||
q_low = Q_H1_Low(spnum) + ((Q_H1_Low(spnum) - Q_H3_Full(spnum)) * ratio); | ||
// equation 11.182 | ||
p_low = P_H1_Low(spnum) + ((P_H1_Low(spnum) - P_H3_Full(spnum)) * ratio); | ||
} else if (t >= 1.67 && t < 8.33) { | ||
Real64 ratio = // (t - 1.67) / (8.33 - 1.67) | ||
(t - HeatingOutdoorCoilInletAirDBTempH2Test) / | ||
(HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH2Test); | ||
// equation 11.180 | ||
q_low = Q_H2_Int(spnum) + ((Q_H0_Low(spnum) - Q_H1_Low(spnum)) * ratio); | ||
// equation 11.183 | ||
p_low = P_H2_Int(spnum) + ((P_H0_Low(spnum) - P_H1_Low(spnum)) * ratio); | ||
} else if (t < 1.67) { | ||
// for now Q_H2_Int is replaced with Q_H_Int, no equation for the later | ||
// equation 11.181 | ||
q_low = Q_H2_Int(spnum); | ||
// equation 11.184 | ||
p_low = P_H2_Int(spnum); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was modified the equations used to calculate delivered heat and energy input at the |
||
} | ||
|
||
// High Speed | ||
if ((t <= -8.33) || (t >= 7.20)) { | ||
q_hs = Q_H3_Full(spnum + 1) + ((Q_H1_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
p_hs = P_H3_Full(spnum + 1) + ((P_H1_Full(spnum + 1) - P_H3_Full(spnum + 1)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
} else { | ||
q_hs = Q_H3_Full(spnum + 1) + ((Q_H2_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
p_hs = P_H3_Full(spnum + 1) + ((P_H2_Full(spnum + 1) - P_H3_Full(spnum + 1)) * (t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test)); | ||
if (t <= -15.0) { | ||
Real64 ratio = // ((t - (-15.0)) / (8.33 - (-8.33))); | ||
(t - HeatingOutdoorCoilInletAirDBTemp_H4FullTest) / | ||
(HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test); | ||
// equation 11.205 | ||
q_hs = Q_H4_Full(spnum + 1) + ((Q_H1_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * ratio); | ||
// equation 11.206 | ||
p_hs = P_H4_Full(spnum + 1) + ((P_H1_Full(spnum + 1) - P_H3_Full(spnum + 1)) * ratio); | ||
} else if ((t > -15.0) && (t < -8.33)) { | ||
Real64 ratio = // ((t - (-15.0)) / (-8.33 - (-15.0))); | ||
(t - HeatingOutdoorCoilInletAirDBTemp_H4FullTest) / | ||
(HeatingOutdoorCoilInletAirDBTempH3Test - HeatingOutdoorCoilInletAirDBTemp_H4FullTest); | ||
// equation 11.203 | ||
q_hs = Q_H4_Full(spnum + 1) + ((Q_H3_Full(spnum + 1) - Q_H4_Full(spnum + 1)) * ratio); | ||
// equation 11.204 | ||
p_hs = P_H4_Full(spnum + 1) + ((P_H3_Full(spnum + 1) - P_H4_Full(spnum + 1)) * ratio); | ||
} else if ((t > -8.33) && (t < t_ob)) { | ||
Real64 ratio = //((t - (-8.33)) / (1.67 - (-8.33))); | ||
(t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempH2Test - HeatingOutdoorCoilInletAirDBTempH3Test); | ||
// equation 11.201 | ||
q_hs = Q_H3_Full(spnum + 1) + ((Q_H2_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * ratio); | ||
// equation 11.202 | ||
p_hs = P_H3_Full(spnum + 1) + ((P_H2_Full(spnum + 1) - P_H3_Full(spnum + 1)) * ratio); | ||
} else if ((t >= t_ob) && (t <= -8.33)) { | ||
Real64 ratio = // ((t - (-8.33)) / (8.33 - (-8.33))); | ||
(t - HeatingOutdoorCoilInletAirDBTempH3Test) / | ||
(HeatingOutdoorCoilInletAirDBTempRated - HeatingOutdoorCoilInletAirDBTempH3Test); | ||
// equation 11.199 | ||
q_hs = Q_H3_Full(spnum + 1) + ((Q_H1_Full(spnum + 1) - Q_H3_Full(spnum + 1)) * ratio); | ||
// equation 11.200 | ||
p_hs = P_H3_Full(spnum + 1) + ((P_H1_Full(spnum + 1) - P_H3_Full(spnum + 1)) * ratio); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modified the equations used to calculate delivered heat and energy input at the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, so here I see the equations. I still don't know if Q_H1_Full should be the "full" capacity at the speed being evaluated or the full capacity at the next highest speed. What in the standard prompted this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding is that the next higher speed level should be used to get the full speed capacity that bounds the current There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But if PLR at speed x is < 1 then the full capacity at that same speed would bound the current building load. So where in the standard does it say to use the next highest speed level? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the standard, different sections may apply to this code: one for a two-speed (two-capacity) machine and another one for a variable-speed machine. They are not an exact match for a discrete-speed machine with more than the two-speed. The HSPF2 calculation is based on the variable speed section of the standard, and it requires some interpretation to fit the discrete multispeed DX heating coil model we have in EnergyPlus. It requires some judgment on how to account for the difference between the EnergyPlus model and the variable speed machine procedure in the AHRI standard. Simply, it needs interpretation of the procedure for implementation in EnergyPlus. In a variable-speed machine, you have just one full speed, like the two-speed DX cooling coil model in EnergyPlus. In the multispeed DX heating coil, your full speed is a moving target, and depending on your load, it is the next available higher-speed capacity. Let's say a given load is bound between two-speed levels; the full load should point to the higher speed level, not the lower speed. This is my interpretation of how it should be. The current full capacity assignment was to the current speed, so I changed it to the next higher-speed capacity. |
||
|
||
Real64 cop_low = q_low / p_low; | ||
|
@@ -6469,18 +6497,30 @@ namespace StandardRatings { | |
} else if (bl >= q_full) { | ||
// CASE 3 : 11.2.2.3.3 AHRI-2023 | ||
// Building Load is greater than the capacity of the unit at the Full Compressor Speed, q_full <= bl or (bl >= q_full:) | ||
if (t > (-15) || t <= (-8.33)) { | ||
Real64 t_ratio = (t - (-15)) / ((-8.33) - (-15)); | ||
// Equation 11.203 AHRI-2023 | ||
q_full = q_H4_full + (q_H3_full - q_H4_full) * t_ratio; | ||
// Equation 11.204 AHRI-2023 | ||
p_full = p_H4_full + (p_H3_full - p_H4_full) * t_ratio; | ||
} else if (t < (-15)) { | ||
Real64 t_ratio = (t - (-15)) / (8.33 - (-8.33)); | ||
if (t <= -15.0) { | ||
Real64 t_ratio = (t - (-15.0)) / ((8.33) - (-8.33)); | ||
// Equation 11.205 AHRI-2023 | ||
q_full = q_H4_full + (q_H1_full - q_H3_full) * t_ratio; | ||
// Equation 11.206 AHRI-2023 | ||
p_full = p_H4_full + (p_H1_full - p_H3_full) * t_ratio; | ||
} else if (t > (-15.0) && t < (-8.33)) { | ||
Real64 t_ratio = (t - (-15.0)) / (-8.33 - (-15.0)); | ||
// Equation 11.203 AHRI-2023 | ||
q_full = q_H4_full + (q_H3_full - q_H4_full) * t_ratio; | ||
// Equation 11.204 AHRI-2023 | ||
p_full = p_H4_full + (p_H3_full - p_H4_full) * t_ratio; | ||
} else if (t > (-8.33) && t < t_ob) { | ||
Real64 t_ratio = (t - (-8.33)) / (1.67 - (-8.33)); | ||
// Equation 11.201 AHRI-2023 | ||
q_full = q_H3_full + (q_H2_full - q_H3_full) * t_ratio; | ||
// Equation 11.202 AHRI-2023 | ||
p_full = p_H3_full + (p_H2_full - p_H3_full) * t_ratio; | ||
} else if (t >= t_ob || t == (-8.33)) { | ||
Real64 t_ratio = (t - (-8.33)) / (8.33 - (-8.33)); | ||
// Equation 11.199 AHRI-2023 | ||
q_full = q_H3_full + (q_H1_full - q_H3_full) * t_ratio; | ||
// Equation 11.200 AHRI-2023 | ||
p_full = p_H3_full + (p_H1_full - p_H3_full) * t_ratio; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current code for Case III looks incorrect based on the review of the AHRI 2023 (2020) Standard for Performance Rating of Unitary Air-conditioning & Air-source Heat Pump Equipment. This code change matches the AHRI standard and corrects the logic flaws. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @Nigusse |
||
|
||
// if not conducting H4 Test then use this block | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The full heating capacity must be evaluated at the next available speed, not at the current speed. It should be different from the low speed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense, and I believe you, but it would be great to get a second opinion on it. Anyone have thoughts on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the standard but what will these values be used for? i.e., these would be used in some equation, so show the equation to support this change. For example, q_H1_full looks to be the capacity at speed 1 so why would we use speed 2 capacity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These capacities (H1, 2, 3, 4) are used to estimate the full capacity at a specified outdoor a condition through interpolation. The full capacity is then used to bracket the
building load
to get a speed level of the machine that matches thebuilding load
.