-
Notifications
You must be signed in to change notification settings - Fork 58
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 Water Heater Data Update #1680
Conversation
All the non-NECB tests should now pass. The DOE prototype performance tests and regression models had to be regenerated for the following reasons:
|
hrly_loss_pct = hr_loss_base + (hr_loss_allow / volume_gal) / 100.0 | ||
hrly_loss_pct = hr_loss_base + hr_loss_allow / volume_gal | ||
# Convert to Btu/hr, assuming: | ||
# Water at 120F, density = 8.25 lb/gal | ||
# 1 Btu to raise 1 lb of water 1 F | ||
# Therefore 8.25 Btu / gal of water * deg F | ||
# 70F delta-T between water and zone | ||
hrly_loss_btu_per_hr = hrly_loss_pct * volume_gal * 8.25 * 70 | ||
hrly_loss_btu_per_hr = (hrly_loss_pct / 100) * volume_gal * 8.25 * 70 |
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 / 100
should be applied to hrly_loss_pct
, not just to hr_loss_allow
, otherwise hr_loss_base
gets ignored and hrly_loss_btu_per_hr
are overestimated.
@@ -2423,6 +2426,48 @@ def model_find_objects(hash_of_objects, search_criteria, capacity = nil, date = | |||
end | |||
end | |||
|
|||
# If volume was specified, narrow down the matching objects | |||
unless volume.nil? |
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.
Consider storage volume as a lookup key.
end | ||
|
||
# If capacity_per_volume was specified, narrow down the matching objects | ||
unless capacity_per_volume.nil? |
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.
Consider the ratio of capacity per volume as a lookup key.
if wh_props_capacity.size == 1 | ||
wh_props = wh_props_capacity[0] | ||
elsif wh_props_capacity_and_volume.size == 1 | ||
wh_props = wh_props_capacity_and_volume[0] | ||
elsif wh_props_capacity_and_capacity_btu_per_hr == 1 | ||
wh_props = wh_props_capacity_and_capacity_btu_per_hr[0] | ||
elsif wh_props_capacity_and_volume_and_capacity_per_volume == 1 | ||
wh_props = wh_props_capacity_and_volume_and_capacity_per_volume[0] | ||
else | ||
# Search again with additional criteria | ||
search_criteria = water_heater_mixed_additional_search_criteria(water_heater_mixed, search_criteria) | ||
wh_props_capacity = model_find_objects(standards_data['water_heaters'], search_criteria, capacity_btu_per_hr) | ||
wh_props_capacity_and_volume = model_find_objects(standards_data['water_heaters'], search_criteria, capacity_btu_per_hr, nil, nil, nil, nil, volume_gal.round(0)) | ||
wh_props_capacity_and_capacity_btu_per_hr = model_find_objects(standards_data['water_heaters'], search_criteria, capacity_btu_per_hr, nil, nil, nil, nil, nil, capacity_btu_per_hr) | ||
wh_props_capacity_and_volume_and_capacity_per_volume = model_find_objects(standards_data['water_heaters'], search_criteria, capacity_btu_per_hr, nil, nil, nil, nil, volume_gal, capacity_btu_per_hr / volume_gal) | ||
if wh_props_capacity.size == 1 | ||
wh_props = wh_props_capacity[0] | ||
elsif wh_props_capacity_and_volume.size == 1 | ||
wh_props = wh_props_capacity_and_volume[0] | ||
elsif wh_props_capacity_and_capacity_btu_per_hr == 1 | ||
wh_props = wh_props_capacity_and_capacity_btu_per_hr[0] | ||
elsif wh_props_capacity_and_volume_and_capacity_per_volume == 1 | ||
wh_props = wh_props_capacity_and_volume_and_capacity_per_volume[0] | ||
else | ||
return {} | ||
end | ||
end |
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.
Use a "stepped" approach to identify what the applicable requirement should be.
require_relative '../helpers/minitest_helper' | ||
|
||
class TestSpaceType < Minitest::Test | ||
def test_water_heater_efficiency_lookup |
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.
Add basic efficiency lookup test for water heater.
Updates have been made to the Building Energy Standards Data repository, see here. This pull request was automatically generated.