Skip to content
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

Merged
merged 135 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
f593a1e
Modified HSPF2 calculation
Nigusse Jul 22, 2024
1a05580
Modified a fail unit test
Nigusse Jul 22, 2024
534aa06
Added new unit tests
Nigusse Jul 22, 2024
0e01ee0
Set the full capacity and energy at the next higher speed level
Nigusse Jul 24, 2024
32ea83a
Modified the equations for capacity and energy at low speed
Nigusse Jul 24, 2024
6b77db2
Modified the equations for capacity and energy at high speed
Nigusse Jul 24, 2024
dc265ec
allow HSPF2 calculation with flat curve
Nigusse Jul 24, 2024
a0ac2ca
Corrected equation re-write mistake
Nigusse Jul 25, 2024
aae4cf0
Merge branch 'develop' into Issue9909_multispeed_DX_Htg_Coil_HSPF2
Nigusse Jul 25, 2024
205c9f4
Merge branch 'develop' into Issue9909_multispeed_DX_Htg_Coil_HSPF2
Nigusse Aug 2, 2024
0008719
Updated the new unit tests due to change in develop
Nigusse Aug 2, 2024
2c5368c
Merge remote-tracking branch 'origin/develop' into Issue9909_multispe…
Myoldmopar Aug 16, 2024
684d997
Merge develop, cleanup unused vars
Myoldmopar Aug 16, 2024
28523db
10634 Fix of Condenser Operation Issue
RKStrand Aug 9, 2024
5c0d897
10634 Address Custom Check Error
RKStrand Aug 9, 2024
fb48a9d
10634 Addition of Unit Test
RKStrand Aug 9, 2024
2700cd9
10634 Mass Flow to Zero
RKStrand Aug 9, 2024
9300aed
10634 Addresses Review Comments
RKStrand Aug 13, 2024
45de236
add SafeCopyPlantNode() to cooling towers
EnergyArchmage Aug 14, 2024
d668241
fixed field index
Nigusse Aug 16, 2024
d64ee5e
Modified the failed unit tests by adding sizing parameters
Nigusse Aug 16, 2024
1dcf13d
Format cleanup
Nigusse Aug 16, 2024
5bb53ea
Merge branch 'develop' into Issue9909_multispeed_DX_Htg_Coil_HSPF2
Nigusse Aug 17, 2024
2ab3b16
Merge remote-tracking branch 'origin/develop' into Issue9909_multispe…
Myoldmopar Aug 21, 2024
e3173bb
Reduce scope
rraustad Aug 21, 2024
fb754c2
Shadow variable
rraustad Aug 21, 2024
33dd354
Unused var
rraustad Aug 21, 2024
9bffafb
Unused and const
rraustad Aug 21, 2024
dcdd63e
Unused and reduce scope
rraustad Aug 21, 2024
a27f27e
Reassigned OK to remove?
rraustad Aug 21, 2024
d1ee969
Unused/reduce
rraustad Aug 21, 2024
30f0c2a
Unused and reduce scope
rraustad Aug 21, 2024
bc96248
Assigned value before used
rraustad Aug 21, 2024
aeb119b
REduce scope HR
rraustad Aug 21, 2024
f3bc8c2
Reduce scope and shadow
rraustad Aug 21, 2024
cdd868a
Reduce scope
rraustad Aug 21, 2024
a42a007
Reduce scope
rraustad Aug 21, 2024
3bebc2a
Reduce scope
rraustad Aug 21, 2024
ae5b2fc
Reduce scope
rraustad Aug 21, 2024
9306262
First few logic fixes
rraustad Aug 22, 2024
40588fd
AFN fixes
rraustad Aug 22, 2024
a9bdf5f
BranchInputManager
rraustad Aug 22, 2024
52e2e04
Chillers
rraustad Aug 22, 2024
6b007dc
const refs
rraustad Aug 22, 2024
02f3d78
Shadow vars
rraustad Aug 22, 2024
bbd2548
Const vars
rraustad Aug 22, 2024
fee5f3d
Unused var
rraustad Aug 22, 2024
a4f51c8
Const and shadow vars
rraustad Aug 22, 2024
503dfc9
eoh shadow
rraustad Aug 22, 2024
ecf6f25
Shadow var Ctd
rraustad Aug 22, 2024
d9cbb6e
unused and unused outer shadow
rraustad Aug 22, 2024
c3e934e
Shadow var and unused
rraustad Aug 22, 2024
2d893b3
const vars
rraustad Aug 22, 2024
7e3c58c
Const and shadow
rraustad Aug 22, 2024
1496a40
all scope vars
rraustad Aug 22, 2024
43c4f26
Clean up some array references
rraustad Aug 23, 2024
bd8aa28
Don't catch std::exception in Debug mode so we can catch array bounds…
jmarrec Aug 21, 2024
86a5e4f
Bug fix + Output Variable Reference
LipingWang Aug 21, 2024
720876f
Bug fix
LipingWang Aug 21, 2024
0008f35
Update IO reference.
LipingWang Aug 22, 2024
214f506
format update
LipingWang Aug 22, 2024
7c04080
output variable name
LipingWang Aug 22, 2024
b488eb7
update the csv & remove meters output
LipingWang Aug 22, 2024
3c815fc
Output variable transition and warning cleanup
mjwitte Aug 22, 2024
d97e816
Clang format
rraustad Aug 24, 2024
e7496bc
conditionals and scope
rraustad Aug 24, 2024
434fb4d
scope
rraustad Aug 24, 2024
0ff630f
conditionals and scope
rraustad Aug 24, 2024
3db0398
unused, constexpr and scope
rraustad Aug 24, 2024
7a61d25
Value never used
rraustad Aug 23, 2024
fb1836f
scope
rraustad Aug 23, 2024
4a209f3
reduce scope
rraustad Aug 23, 2024
83ee80d
Scope reduction
rraustad Aug 23, 2024
02103c1
Scope reduction
rraustad Aug 23, 2024
d430408
const
rraustad Aug 23, 2024
5f80fee
scope
rraustad Aug 23, 2024
ba9916b
unused string
rraustad Aug 23, 2024
28d2670
Run Windows CI again
rraustad Aug 24, 2024
7776a27
scope
rraustad Aug 24, 2024
b215745
scope
rraustad Aug 24, 2024
1f534f6
Run linux debug CI
rraustad Aug 24, 2024
c5ab674
const, scope
rraustad Aug 24, 2024
8188981
scope
rraustad Aug 24, 2024
377d13c
reduce
rraustad Aug 24, 2024
bc268f1
reduce scope
rraustad Aug 24, 2024
bd1f439
scope
rraustad Aug 24, 2024
b1bc6a1
scope
rraustad Aug 24, 2024
6cc0e93
reduce
rraustad Aug 24, 2024
a920919
backup correct build error
rraustad Aug 24, 2024
4f7dcdf
scope
rraustad Aug 24, 2024
1406ed3
reduce
rraustad Aug 24, 2024
8efbfe2
scope
rraustad Aug 24, 2024
403aa90
reference
rraustad Aug 24, 2024
0178e13
scope
rraustad Aug 24, 2024
ab7b55d
scope
rraustad Aug 24, 2024
0ca14c2
scope and duplicate conditional
rraustad Aug 24, 2024
d24af9b
const and unused var
rraustad Aug 24, 2024
0323b65
const
rraustad Aug 24, 2024
01fbca9
scope
rraustad Aug 24, 2024
f3bd842
Shadow var
rraustad Aug 24, 2024
235e935
scope
rraustad Aug 24, 2024
eadb38a
unused and shadow var
rraustad Aug 24, 2024
e5bc7f3
scope
rraustad Aug 24, 2024
5291385
scope
rraustad Aug 24, 2024
a1477e9
Shadow var and scope
rraustad Aug 24, 2024
5fad3ea
scope
rraustad Aug 24, 2024
04c152b
Value never used
rraustad Aug 24, 2024
864c386
scope
rraustad Aug 24, 2024
f3d5028
scope
rraustad Aug 24, 2024
4956d7b
scope
rraustad Aug 25, 2024
8952aa8
scope
rraustad Aug 25, 2024
bc25f03
scope
rraustad Aug 25, 2024
13c296b
scope
rraustad Aug 25, 2024
8704f04
scope
rraustad Aug 25, 2024
81c66a7
scope
rraustad Aug 25, 2024
59f7c9d
scope
rraustad Aug 25, 2024
c37a243
scope
rraustad Aug 25, 2024
dd8d453
scope
rraustad Aug 25, 2024
3e19dc9
scope
rraustad Aug 25, 2024
4436bf4
scope
rraustad Aug 25, 2024
7833ec8
scope
rraustad Aug 25, 2024
812ac1a
clang fornat
rraustad Aug 25, 2024
31353eb
redundant logic
rraustad Aug 25, 2024
f3abcc6
const and reduce
rraustad Aug 25, 2024
9e81d19
const and unused
rraustad Aug 25, 2024
6b3c9cc
const, scope and shadow outer function
rraustad Aug 25, 2024
8f2a750
scope
rraustad Aug 25, 2024
ae2ee8f
scope
rraustad Aug 25, 2024
ffaa60e
scope and const
rraustad Aug 25, 2024
52b2ae2
const
rraustad Aug 25, 2024
4648781
Move to match previous code
rraustad Aug 25, 2024
eb003d1
Remove third party nested gtest folder
Myoldmopar Aug 28, 2024
2ae2538
Code changed missed during resolving merge conflict
Nigusse Aug 29, 2024
a0a1be5
Merge branch 'develop' into Issue9909_multispeed_DX_Htg_Coil_HSPF2
Nigusse Aug 29, 2024
7755930
Merge remote-tracking branch 'remotes/origin/develop' into Issue9909_…
mjwitte Sep 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 84 additions & 44 deletions src/EnergyPlus/StandardRatings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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 the building load.

// 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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Contributor

Choose a reason for hiding this comment

The 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;
Expand All @@ -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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
Expand All @@ -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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 Low Speed to match the 2023 AHRI Standard 210/240.

}

// 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);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 High Speed to match the 2023 AHRI Standard 210/240.

Copy link
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 building load.

Copy link
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

@Nigusse Nigusse Aug 20, 2024

Choose a reason for hiding this comment

The 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;
Expand Down Expand Up @@ -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;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Nigusse


// if not conducting H4 Test then use this block
Expand Down
Loading
Loading