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 test failures on master #1700

Merged
merged 10 commits into from
Mar 15, 2024
Merged

Address test failures on master #1700

merged 10 commits into from
Mar 15, 2024

Conversation

lymereJ
Copy link
Collaborator

@lymereJ lymereJ commented Mar 1, 2024

Pull request overview

Address test failures on master.

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a code review on GitHub
  • All related changes have been implemented: method additions, changes, tests
  • Check rubocop errors
  • Check yard doc errors
  • If fixing a defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If a new feature, test the new feature and try creative ways to break it
  • CI status: all green or justified

@lymereJ lymereJ marked this pull request as draft March 1, 2024 19:27
eer = -0.0182 * seer * seer + 1.1088 * seer
cop = (eer / OpenStudio.convert(1.0, 'W', 'Btu/h').get + 0.12) / (1 - 0.12)
cop = eer_to_cop(eer)
Copy link
Collaborator Author

@lymereJ lymereJ Mar 1, 2024

Choose a reason for hiding this comment

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

Changing to straight EER to COP conversion, don't remove fan impact from metric since we don't to calculate a "cop no fan".

@@ -172,7 +172,7 @@ def coil_cooling_dx_multi_speed_apply_efficiency_and_curves(coil_cooling_dx_mult
# If specified as SEER
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_cooling(min_seer)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the _with_fan suffix throughout to be consistent with other methods.

delta = 0.3796**2 - 4.0 * 0.0076 * cop
seer = (-delta**0.5 + 0.3796) / (2.0 * 0.0076)

return seer
end

# Convert from SEER to COP (with fan) for cooling coils
# per the method specified in 90.1-2013 Appendix G
# per the method specified in Thornton et al. 2011
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Incorrect reference.

@mdahlhausen
Copy link
Collaborator

@khaddad and @ckirney to review

@mdahlhausen mdahlhausen requested review from khaddad and ckirney March 6, 2024 21:14
@lymereJ
Copy link
Collaborator Author

lymereJ commented Mar 8, 2024

@khaddad @ckirney @mdahlhausen - For some reason, the CI is not showing on GitHub that the build has finished but Jenkins shows that it has, with four failures:

image

All failures are the same:

Failure:
test_NECB2017_SecondarySchool_regression_Electricity(Minitest::Result) [/srv/data/jenkins/git/openstudio-standards/PR-1700/9/test/necb/building_regression_tests/tests/test_necb_bldg_SecondarySchool_NECB2017_Electricity.rb:21]:
{"diffs-errors"=>["For OS:Coil:Cooling:DX:SingleSpeed called 'CoilCoolingDXSingleSpeed_dx 13 36kBtu/hr 14.0SEER' field 'Rated COP': before model = 4.11713, after model = 3.8248"]}
Failure:
test_NECB2017_SecondarySchool_regression_NaturalGas(Minitest::Result) [/srv/data/jenkins/git/openstudio-standards/PR-1700/9/test/necb/building_regression_tests/tests/test_necb_bldg_SecondarySchool_NECB2017_NaturalGas.rb:21]:
{"diffs-errors"=>["For OS:Coil:Cooling:DX:SingleSpeed called 'CoilCoolingDXSingleSpeed_dx 13 36kBtu/hr 14.0SEER' field 'Rated COP': before model = 4.11713, after model = 3.8248"]}

I believe that these failures are expected:

  • Before, the NECB code was using the SEER to COP "with fan" method which actually was a "no fan" conversion from Thornton et al. 2011.: eer = -0.0182 * seer * seer + 1.1088 * seer and cop = (eer / 3.413 + 0.12) / (1 - 0.12) which for this case give us -0.0182*14**2+1.1088*14=11.956 and (11.956/3.413+0.12)/(1-0.12)=4.11713
  • This PR changes the SEER to COP input to be "no fan" using the 90.1-Appendix G/ECB method: -0.0076*SEER**2+0.3796*SEER which for this case give us -0.0076*14**2+0.3796*14 = 3.8248

Please, let me know if I missed anything, otherwise I think this is good to go. I'll updated this branch from master now.

@lymereJ lymereJ marked this pull request as ready for review March 8, 2024 17:37
@mdahlhausen
Copy link
Collaborator

Thanks @lymereJ. The CI machine was full. @wenyikuang cleared it up today. Should be working now.

Those changes are fine with me - I'll wait for @ckirney to approve and update the NECB regression models.

All Other,0,65000,14.0,
All Other,65001,249999,,9.7
All Other,250000,759999,,8.21
All Other,760000,9999999999,,7.94
Copy link
Collaborator

Choose a reason for hiding this comment

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

@lymereJ The input NECB reference values are entered in a json file. In this case these values are in file './necb/NECB2011/data/unitary.json'. If possible we want to keep the same values here in the test expected results file as the ones in the json file on the input side. When we convert the input SEER values in standards we use the method that accounts for the effect of the fan ('seer_to_cop' now called). When we are checking an osm file for the correct values of COP, we need to convert this back to SEER. At this stage the COP does not include the effect of the fan anymore. In the test it seems we want to use the method 'cop_to_seer_no_fan' so we can keep the original values of SEER values in the expected results file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The input NECB reference values are entered in a json file. In this case these values are in file './necb/NECB2011/data/unitary.json'. If possible we want to keep the same values here in the test expected results file as the ones in the json file on the input side.

As it stands, this PR doesn't touch the efficiency JSON files, or the expected results. The change you commented on is "outdated" (as per GitHub), I think it comes from a previous commit.

When we convert the input SEER values in standards we use the method that accounts for the effect of the fan ('seer_to_cop' now called). When we are checking an osm file for the correct values of COP, we need to convert this back to SEER. At this stage the COP does not include the effect of the fan anymore. In the test it seems we want to use the method 'cop_to_seer_no_fan' so we can keep the original values of SEER values in the expected results file?

I'm not sure I understand. As it stands, this PR takes the requirements and convert them for input to an OpenStudio model as gross COP values (impact of the fan on the efficiency rating has been removed) which I believe is what EnergyPlus expects. The only changes that were made to the NECB tests is to convert the gross COP values ("no fan") from the test models to either EER (cop_no_fan_to_eer) or SEER (cop_no_fan_to_seer) and compare them to the expected results which match what's in ./necb/NECB2011/data/unitary.json`. Does that match your expectations?

In the US, as per AHRI testing standards, rated SEER and EER are always "net" efficiencies, not "gross", meaning that they always include the impact of fan power.

Copy link
Collaborator

@khaddad khaddad Mar 15, 2024

Choose a reason for hiding this comment

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

@lymereJ I must not have looked at the latest code. Yes it all is good then. It makes it easier when the inputs to the jsons match the test expected values. Thanks

@mdahlhausen mdahlhausen merged commit f1c7d87 into master Mar 15, 2024
0 of 2 checks passed
@mdahlhausen mdahlhausen deleted the failed_tests branch March 15, 2024 14:15
@mdahlhausen mdahlhausen restored the failed_tests branch March 18, 2024 15:20
@mdahlhausen
Copy link
Collaborator

@ckirney or @khaddad can you regenerate the NECB regression tests with the new COPs as noted in the conversation above?

@mdahlhausen mdahlhausen deleted the failed_tests branch September 3, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants