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
Add unmet water heater loads EMS program #1502
base: master
Are you sure you want to change the base?
Conversation
…d on some discussions with Joe. Still need to connect the EMS sensor for WH outlet temperature.
Right now, this method calculates:
Unmet shower energy I feel is the most complete metric, since it accounts for how far off from the desired temperature you are. However, no one really has a sense for if say 2 kWh of unmet showers is too many, so this way you can calculate the % of shower time where loads are unmet. We could also add metrics related to ALL hot water usage, or all fixtures. We'd want to account for the different desired delivered temperature for appliances, but it wouldn't be hard to add metrics like Unmet Energy for all fixtures. |
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.
Some comments while I think of it. Addressing these comments will make it easier to pull in the master branch.
HPXMLtoOpenStudio/measure.rb
Outdated
@@ -1317,6 +1319,8 @@ def self.add_hot_water_and_appliances(runner, model, weather, spaces) | |||
|
|||
# Add combi-system EMS program with water use equipment information | |||
Waterheater.apply_combi_system_EMS(model, @hpxml.water_heating_systems, plantloop_map) | |||
|
|||
return plantloop_map[sys_id] |
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.
This currently just returns the last plant loop, which isn't what you want when there are multiple water heaters in a dwelling unit.
nbeds = hpxml.building_construction.additional_properties.adjusted_number_of_bedrooms | ||
|
||
# Process fixtures | ||
fixtures_usage_multiplier = hpxml.water_heating.water_fixtures_usage_multiplier | ||
fixtures_all_low_flow = true | ||
hpxml.water_fixtures.each do |water_fixture| | ||
next unless [HPXML::WaterFixtureTypeShowerhead, HPXML::WaterFixtureTypeFaucet].include? water_fixture.water_fixture_type | ||
|
||
fixtures_all_low_flow = false if not water_fixture.low_flow | ||
end | ||
|
||
# Get distribution system | ||
if hpxml.water_heating_systems.size > 0 | ||
hot_water_distribution = hpxml.hot_water_distributions[0] | ||
end | ||
|
||
# Calculate mixed water fractions | ||
t_mix = 105.0 # F, Temperature of mixed water at fixtures | ||
avg_setpoint_temp = 0.0 # WH Setpoint: Weighted average by fraction DHW load served | ||
hpxml.water_heating_systems.each do |water_heating_system| | ||
wh_setpoint = water_heating_system.temperature | ||
wh_setpoint = Waterheater.get_default_hot_water_temperature(eri_version) if wh_setpoint.nil? # using detailed schedules | ||
avg_setpoint_temp += wh_setpoint * water_heating_system.fraction_dhw_load_served | ||
end | ||
daily_wh_inlet_temperatures = calc_water_heater_daily_inlet_temperatures(weather, nbeds, hot_water_distribution, fixtures_all_low_flow, hpxml.header.sim_calendar_year) | ||
daily_mw_fractions = calc_mixed_water_daily_fractions(daily_wh_inlet_temperatures, avg_setpoint_temp, t_mix) |
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.
This is all duplicated code from elsewhere. We should rework this code so that the new calculation & EMS program is simply created in the existing code as we process each water heater (rather than trying to do this all at the end of the measure).
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.
yeah, at one point I did have most of this integrated in with the fixtures, but I was having trouble figuring out to structure things. Let me take another shot at that and then if I get stuck I'll ask you or Joe for some help.
@shorowit: I just did a major refactor of this, no more duplicate code. Thanks for the suggestions. It'd be good to know if you think this is a decent way to organize things at a minimum if/when you have a chance to take a look, we're looking to use this with the 120 V HPWH relatively soon. |
…o unmet_wh_loads
…o unmet_wh_loads. Attempt #1 at fixing all the conflicts
…o unmet_wh_loads
…d unmet shower energy
Pull Request Description
Add an EMS program for calculating unmet water heating loads. Focus is on unmet showers, but we can also calculate this for each end use if we wanted to. Addresses #1170.
Checklist
PR Author: Check these when they're done. Not all may apply.
strikethroughand check any that do not apply.PR Reviewer: Verify each has been completed.
EPvalidator.xml
) has been updatedtasks.rb
)HPXMLtoOpenStudio/tests
and/orworkflow/tests/hpxml_translator_test.rb
)openstudio tasks.rb update_measures
has been run