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

Building Energy Standards Chiller Data Update #1676

Merged
merged 18 commits into from
Feb 16, 2024
Merged

Conversation

leijerry888
Copy link
Collaborator

Updates have been made to the Building Energy Standards Data repository, see here. This pull request was automatically generated.

@lymereJ lymereJ changed the title Building Energy Standards Data Update Building Energy Standards Chiller Data Update Jan 24, 2024
@@ -343,13 +343,13 @@ def hspf_to_cop_heating_with_fan(hspf)
# @param eer [Double] Energy Efficiency Ratio (EER)
# @param capacity_w [Double] the heating capacity at AHRI rating conditions, in W
# @return [Double] Coefficient of Performance (COP)
def eer_to_cop(eer, capacity_w = nil)
def eer_to_cop_no_fan(eer, capacity_w = nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

These functions were mislabeled. They did not correspond to a straight EER to COP conversion but rather excluded the effect of the fan when doing the conversion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@khaddad, @ckirney - as per our discussion/email, see the changes in lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks

if capacity_w.nil?
# The PNNL Method.
# r is the ratio of supply fan power to total equipment power at the rating condition,
# assumed to be 0.12 for the reference buildings per PNNL.
r = 0.12
cop = (eer / 3.413 + r) / (1 - r)
cop = (eer / OpenStudio.convert(1.0, 'W', 'Btu/h').get + r) / (1 - r)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the convert function of OS to get additional precision.

#
# @param cop [Double] Energy Efficiency Ratio (EER)
# @return [Double] Coefficient of Performance (COP)
def eer_to_cop(eer)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add new function to do a straight EER to COP conversion.

@@ -1138,6 +1138,7 @@ def model_set_central_preheat_coil_spm(model, thermal_zones, coil)
setpoint_sch = tstat.heatingSetpointTemperatureSchedule
setpoint_c = OpenstudioStandards::Schedules.schedule_get_design_day_min_max(setpoint_sch.get, 'winter')['max']
next if setpoint_c.nil?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Rubocop formatting.

@mdahlhausen
Copy link
Collaborator

Several tests are failing because the kw_per_ton variable is undefined in this line.

@lymereJ
Copy link
Collaborator

lymereJ commented Jan 25, 2024

Thanks, I'll take a look. I should have set the status to draft, it was not yet ready for review. Sorry.

@lymereJ lymereJ marked this pull request as draft January 29, 2024 21:57
@lymereJ lymereJ marked this pull request as ready for review February 14, 2024 18:18
elsif cap_tons > 300 && cap_tons < 600
num_chillers = 2
chiller_cooling_type = 'WaterCooled'
chiller_compressor_type = 'Rotary Screw and Scroll'
chiller_compressor_type = 'Rotary Screw'
Copy link
Collaborator

Choose a reason for hiding this comment

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

@weilixu - There are a few PRM related changes.

@lymereJ
Copy link
Collaborator

lymereJ commented Feb 14, 2024

@mdahlhausen - I think this is finally ready for review. The tests for the penultimate commit passed, the tests for the last one should pass as well (seem to pass locally).

@@ -14,16 +14,17 @@ def chiller_electric_eir_apply_efficiency_and_curves(chiller_electric_eir)

# Set the efficiency value
cop = chiller_electric_eir_standard_minimum_full_load_efficiency(chiller_electric_eir)
kw_per_ton = cop_to_kw_per_ton(cop)
if cop.nil?
Copy link
Collaborator

@mdahlhausen mdahlhausen Feb 14, 2024

Choose a reason for hiding this comment

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

rubocop is suggesting guard clause format here:

unless cop
  # log stuff
  return false
end

Copy link
Collaborator

@mdahlhausen mdahlhausen left a comment

Choose a reason for hiding this comment

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

Thanks for the refactor of the chiller data. Two comments:

  • Please update from the master branch. You will need to generate the regression models again, as those changed with recent updates to master.

  • I understand the need to remove curves from the data .jsons and put them behind methods in standards instead. That may end up being the best approach, but I'm curious what other options you considered. In general, it'd be nice to have data elements in data files (perhaps a separate, static, chiller_curves.json), but could be (easily) convinced of your approach.

@lymereJ
Copy link
Collaborator

lymereJ commented Feb 16, 2024

@mdahlhausen - Thanks for the review!

  • I updated the branch from master and added the guard clause
  • I started looking into how the curves are handled a while back and quickly noticed that this aspect of openstudio-standards is probably due for a clean-up/refactor (for instance, we have some curves that hard-coded and not included in data files, and some that are in the data file that are somehow prototype specific), so I was hoping to handle it like this for now and once we've completed the code expansion of the database that we could perhaps dig into that and develop something better

Looks like the tests are passing!

@mdahlhausen mdahlhausen merged commit f7d95c1 into master Feb 16, 2024
1 of 2 checks passed
@mdahlhausen mdahlhausen deleted the data_update_4b6a008 branch February 16, 2024 16:15
@lymereJ lymereJ mentioned this pull request Mar 1, 2024
7 tasks
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