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

Electric panel #1319

Draft
wants to merge 66 commits into
base: latest-os-hpxml
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
d8c3c8d
initial commit
lixiliu Oct 15, 2024
3a000e5
revise ResStockArguments
lixiliu Oct 22, 2024
7aaf613
specify exclude in constants.rb
lixiliu Oct 22, 2024
4a7e68e
update electrical_panels.rb + add data files
lixiliu Oct 22, 2024
78f401d
update electrical_panel.rb + name change
lixiliu Oct 24, 2024
23fee18
made sampling work
lixiliu Oct 25, 2024
e2eef6b
Organize things and add some comments.
joseph-robertson Oct 25, 2024
c710d4a
minor cleanup
lixiliu Oct 25, 2024
85d948c
first commit
Oct 28, 2024
1860f90
breaker spaces headroom
Oct 29, 2024
676e2e5
revision on breaker_spaces_headroom_prob_map
Nov 1, 2024
aab29e7
update testing baseline yml
Nov 1, 2024
41f250d
revision
Nov 4, 2024
868e9de
format revision
Nov 5, 2024
d608113
Merge pull request #1317 from NREL/ll/test_breaker_space
yingli-NREL Nov 5, 2024
c980e3e
consolidation
lixiliu Nov 5, 2024
6ce60a6
Merge branch 'develop' into ll/test_panel_cap
joseph-robertson Nov 5, 2024
466c713
Merge branch 'latest-os-hpxml' into ll/test_panel_cap
joseph-robertson Nov 5, 2024
f1fdf13
Merge commit 'a8cb22e532bbbf1ed2862de88c4d396c68f1346b' into ll/test_…
joseph-robertson Nov 5, 2024
a8cb22e
Squashed 'resources/hpxml-measures/' changes from 2f7c47554c5d..216b7…
joseph-robertson Nov 5, 2024
e75f52b
Make the connection to electric_panel.
joseph-robertson Nov 5, 2024
e21b9ec
Squashed 'resources/hpxml-measures/' changes from 216b76014e07..6f158…
joseph-robertson Nov 5, 2024
cb4206b
Merge commit 'e21b9ec4a78c4be15a3a8966abc9bdf994490cca' into ll/test_…
joseph-robertson Nov 5, 2024
025ae3b
Update resstockarguments readme and measure xml.
joseph-robertson Nov 5, 2024
488dc25
Stub logic in applyupgrades for detecting system additions.
joseph-robertson Nov 5, 2024
47266b5
Merge commit '81fcd8d04208040290b156aea9f03b217f37f55c' into ll/test_…
joseph-robertson Nov 5, 2024
81fcd8d
Squashed 'resources/hpxml-measures/' changes from 6f158035d603..8d415…
joseph-robertson Nov 5, 2024
b9a1b91
Remove duplicate in system addition logic.
joseph-robertson Nov 5, 2024
1bf9698
Update data dictionary inputs and outputs csv files.
joseph-robertson Nov 6, 2024
4196f75
Update logic in applyupgrades for detecting system additions.
joseph-robertson Nov 6, 2024
63d7357
Add electric_panel category to comparison plots.
joseph-robertson Nov 6, 2024
59b7635
Latest results.
Nov 6, 2024
80bfd72
Avoid changing the service rating in the ugpraded building.
joseph-robertson Nov 6, 2024
c3184b9
Squashed 'resources/hpxml-measures/' changes from 8d415f655daa..21617…
joseph-robertson Nov 6, 2024
282e497
Merge commit 'c3184b9239484e872bbb9c96e50dce0e64785c0e' into ll/test_…
joseph-robertson Nov 6, 2024
2c31f00
Latest results.
Nov 7, 2024
b72f5bf
Merge commit '6c7beee3af8511c26c2072112d95a85705660f8d' into ll/test_…
joseph-robertson Nov 7, 2024
6c7beee
Squashed 'resources/hpxml-measures/' changes from 21617c659c46..4ea60…
joseph-robertson Nov 7, 2024
db77049
Stub assignment of other power in resstockarguments.
joseph-robertson Nov 7, 2024
708b394
Squashed 'resources/hpxml-measures/' changes from 4ea6002cc0a6..eae39…
joseph-robertson Nov 7, 2024
fe58d8a
Merge commit '708b394caf0da70e4ced22b71ba6e6aa6bfb9154' into ll/test_…
joseph-robertson Nov 7, 2024
a1aace1
Latest results.
Nov 7, 2024
fa5b7ae
Merge branch 'develop' into ll/test_panel_cap
joseph-robertson Nov 19, 2024
85d1a96
Latest results.
Nov 19, 2024
e13ed1f
Add mel load sampling
lixiliu Nov 18, 2024
1cbe4a5
fix bug
lixiliu Nov 19, 2024
9d7639c
Latest results.
Nov 19, 2024
7d0b6ee
Merge branch 'll/test_panel_cap' into ll/mel_loads
lixiliu Nov 20, 2024
95d4103
Latest results.
Nov 20, 2024
f6b8def
Squashed 'resources/hpxml-measures/' changes from 5bad046428ef..b0462…
joseph-robertson Nov 25, 2024
1935639
Merge commit 'f6b8defe345a0cb70f0dc8402aa0a2420fc6b31d' into ll/test_…
joseph-robertson Nov 25, 2024
4dab1f8
Stub assigning power by option in the lookup.
joseph-robertson Nov 25, 2024
4d17bb4
use bedroom count as input
lixiliu Dec 3, 2024
a985e00
Latest results.
Dec 3, 2024
645e9ed
Merge pull request #1323 from NREL/ll/mel_loads
lixiliu Dec 3, 2024
f907016
Merge branch 'latest-os-hpxml' into ll/test_panel_cap
joseph-robertson Dec 4, 2024
26eeeae
Squashed 'resources/hpxml-measures/' changes from 09fb00ce9e02..5ad97…
joseph-robertson Dec 4, 2024
b4e9b56
Merge commit '26eeeae85427d7b98f8fb4249411b5e06d72b478' into ll/test_…
joseph-robertson Dec 4, 2024
26f25d9
Fix merge conflicts.
joseph-robertson Dec 4, 2024
731723a
More merge conflicts.
joseph-robertson Dec 4, 2024
7c74e3d
Merge branch 'latest-os-hpxml' into ll/test_panel_cap
joseph-robertson Dec 4, 2024
9783fb2
Switch to new panel property name.
joseph-robertson Dec 5, 2024
197b29d
Fix and updates outputs data dictionary.
joseph-robertson Dec 5, 2024
7967fe7
Fix the outputs data dictionary.
joseph-robertson Dec 5, 2024
6f23f66
Latest results.
Dec 5, 2024
7e1c2ee
rename subfolder
lixiliu Dec 20, 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
13 changes: 13 additions & 0 deletions docs/read_the_docs/source/workflow_inputs/characteristics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5406,6 +5406,12 @@ Arguments
- Type
- Choices
- Description
* - ``electric_panel_load_cooking_range_power``
- false
- W
- Double
- auto
- Specifies the panel load cooking range/oven power. If not provided, the OS-HPXML default (see `Panel Loads <https://openstudio-hpxml.readthedocs.io/en/v1.10.0/workflow_inputs.html#panel-loads>`_) is used.
* - ``cooking_range_oven_present``
- true
-
Expand Down Expand Up @@ -5449,6 +5455,7 @@ From ``project_national`` the list of options, option stock sturation, and optio

* - Option name
- Stock saturation
- ``electric_panel_load_cooking_range_power``
- ``cooking_range_oven_present``
- ``cooking_range_oven_location``
- ``cooking_range_oven_fuel_type``
Expand All @@ -5457,34 +5464,39 @@ From ``project_national`` the list of options, option stock sturation, and optio

* - Electric Induction
- 2.8%
- 10000
- true
- auto
- electricity
- true
- auto
* - Electric Resistance
- 60%
- 12000
- true
- auto
- electricity
- false
- auto
* - Gas
- 33%
- 0
- true
- auto
- natural gas
- false
- auto
* - None
- 0.096%
- 0
- false
- auto
- natural gas
- false
- auto
* - Propane
- 4.9%
- 0
- true
- auto
- propane
Expand All @@ -5497,6 +5509,7 @@ From ``project_national`` the list of options, option stock sturation, and optio
-
-
-
-

.. _cooking_range_usage_level:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ build_existing_model.weather_file_latitude,Latitude from the EPW weather file.
build_existing_model.weather_file_longitude,Longitude from the EPW weather file.
build_existing_model.heating_unavailable_period,Heating unavailable period.
build_existing_model.cooling_unavailable_period,Cooling unavailable period.
build_existing_model.electric_panel_service_rating,TODO
build_existing_model.electric_panel_service_rating_bin,TODO
build_existing_model.unit_height_above_grade,Height of the lowest conditioned floor above grade for the unit.
apply_upgrade.applicable,The measure was applied to the workflow.
apply_upgrade.upgrade_name,User-specificed name that describes the upgrade.
Expand All @@ -71,6 +73,7 @@ report_simulation_output.include_annual_peak_loads,Generates annual peak loads f
report_simulation_output.include_annual_component_loads,Generates annual heating and cooling loads disaggregated by component type.
report_simulation_output.include_annual_hot_water_uses,Generates annual hot water usages for each end use.
report_simulation_output.include_annual_hvac_summary,"Generates HVAC capacities, design temperatures, and design loads."
report_simulation_output.include_annual_panel_summary,"Generates electric panel loads, capacities, and breaker spaces."
report_simulation_output.include_annual_resilience,Generates annual resilience outputs.
report_simulation_output.include_timeseries_total_consumptions,Generates timeseries energy consumptions for the total building.
report_simulation_output.include_timeseries_fuel_consumptions,Generates timeseries energy consumptions for each fuel type.
Expand Down
63 changes: 63 additions & 0 deletions measures/ApplyUpgrade/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,22 @@ def run(model, runner, user_arguments)
measures['BuildResidentialHPXML'][0]['utility_bill_pv_monthly_grid_connection_fee_units'] = values['utility_bill_pv_monthly_grid_connection_fee_units']
measures['BuildResidentialHPXML'][0]['utility_bill_pv_monthly_grid_connection_fees'] = values['utility_bill_pv_monthly_grid_connection_fees']

# Electric Panel
measures['BuildResidentialHPXML'][0]['electric_panel_service_rating'] = hpxml_bldg.electric_panels[0].max_current_rating
measures['BuildResidentialHPXML'][0]['electric_panel_breaker_spaces_type'] = 'total'
measures['BuildResidentialHPXML'][0]['electric_panel_breaker_spaces'] = hpxml_bldg.electric_panels[0].breaker_spaces_total

panel_system_additions = {}
options.each do |_option_num, option|
parameter_name, option_name = option.split('|')

options_measure_args, _errors = get_measure_args_from_option_names(lookup_csv_data, [option_name], parameter_name, lookup_file, runner)
options_measure_args[option_name].each do |_measure_subdir, args_hash|
panel_system_additions = get_panel_system_additions(panel_system_additions, args_hash)
end
end
measures['BuildResidentialHPXML'][0].update(panel_system_additions)

# Specify measures to run
measures['BuildResidentialHPXML'][0]['apply_defaults'] = true
measures['BuildResidentialHPXML'][0]['apply_validation'] = true
Expand Down Expand Up @@ -707,6 +723,53 @@ def get_hvac_system_values(hpxml_bldg, hvac_system_upgrades)

return capacities, autosizing_factors, defect_ratios
end

def get_panel_system_additions(panel_system_additions, args_hash)
args_hash.each do |arg_name, _value|
if arg_name.start_with?('heating_system_') && (not arg_name.start_with?('heating_system_2_'))
panel_system_additions['electric_panel_load_heating_system_addition'] = true
elsif arg_name.start_with?('cooling_system_')
panel_system_additions['electric_panel_load_cooling_system_addition'] = true
elsif arg_name.start_with?('heat_pump_')
panel_system_additions['electric_panel_load_heat_pump_addition'] = true
elsif arg_name.start_with?('heating_system_2_')
panel_system_additions['electric_panel_load_heating_system_2_addition'] = true
elsif arg_name.start_with?('mech_vent_') && (not arg_name.start_with?('mech_vent_2_'))
panel_system_additions['electric_panel_load_mech_vent_fan_addition'] = true
elsif arg_name.start_with?('mech_vent_2_')
panel_system_additions['electric_panel_load_mech_vent_2_addition'] = true
elsif arg_name.start_with?('whole_house_fan_')
panel_system_additions['electric_panel_load_whole_house_fan_addition'] = true
elsif arg_name.start_with?('kitchen_fans_')
panel_system_additions['electric_panel_load_kitchen_fans_addition'] = true
elsif arg_name.start_with?('bathroom_fans_')
panel_system_additions['electric_panel_load_bathroom_fans_addition'] = true
elsif arg_name.start_with?('water_heater_')
panel_system_additions['electric_panel_load_water_heater_addition'] = true
elsif arg_name.start_with?('clothes_dryer_')
panel_system_additions['electric_panel_load_clothes_dryer_addition'] = true
elsif arg_name.start_with?('dishwasher_')
panel_system_additions['electric_panel_load_dishwasher_addition'] = true
elsif arg_name.start_with?('cooking_range_oven_')
panel_system_additions['electric_panel_load_cooking_range_addition'] = true
elsif arg_name.start_with?('misc_plug_loads_well_pump_')
panel_system_additions['electric_panel_load_misc_plug_loads_well_pump_addition'] = true
elsif arg_name.start_with?('misc_plug_loads_vehicle_')
panel_system_additions['electric_panel_load_misc_plug_loads_vehicle_addition'] = true
elsif arg_name.start_with?('pool_pump_')
panel_system_additions['electric_panel_load_pool_pump_addition'] = true
elsif arg_name.start_with?('pool_heater_')
panel_system_additions['electric_panel_load_pool_heater_addition'] = true
elsif arg_name.start_with?('permanent_spa_pump_')
panel_system_additions['electric_panel_load_permanent_spa_pump_addition'] = true
elsif arg_name.start_with?('permanent_spa_heater_')
panel_system_additions['electric_panel_load_permanent_spa_heater_addition'] = true
# else
# panel_system_additions['electric_panel_load_other_addition'] = true
end
end
return panel_system_additions
end
end

# register the measure to be used by the application
Expand Down
6 changes: 3 additions & 3 deletions measures/ApplyUpgrade/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>apply_upgrade</name>
<uid>33f1654c-f734-43d1-b35d-9d2856e41b5a</uid>
<version_id>bdafc4c0-e705-4aec-bcd1-4e662b31f968</version_id>
<version_modified>2024-10-04T15:40:22Z</version_modified>
<version_id>df138392-2e02-42d1-b692-546b0d63b28f</version_id>
<version_modified>2024-12-05T00:07:21Z</version_modified>
<xml_checksum>9339BE01</xml_checksum>
<class_name>ApplyUpgrade</class_name>
<display_name>Apply Upgrade</display_name>
Expand Down Expand Up @@ -6342,7 +6342,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>F73DDD7C</checksum>
<checksum>D982A17C</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand Down
11 changes: 11 additions & 0 deletions measures/ResStockArguments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3795,6 +3795,17 @@ Maximum power output of the second PV system. For a shared system, this is the t

<br/>

**Electric Panel: Cooking Range/Oven Power**

Specifies the panel load cooking range/oven power. If not provided, the OS-HPXML default (see <a href='https://openstudio-hpxml.readthedocs.io/en/v1.10.0/workflow_inputs.html#panel-loads'>Panel Loads</a>) is used.

- **Name:** ``electric_panel_load_cooking_range_power``
- **Type:** ``String``

- **Required:** ``false``

<br/>

**Battery: Present**

Whether there is a lithium ion battery present.
Expand Down
55 changes: 55 additions & 0 deletions measures/ResStockArguments/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

require 'openstudio'
require_relative 'resources/constants'
require_relative 'resources/electrical_panel'
require_relative '../../resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure'

# start the measure
Expand Down Expand Up @@ -848,6 +849,60 @@ def run(model, runner, user_arguments)
end
args[:rim_joist_assembly_r] = rim_joist_assembly_r

# Electric Panel
args[:electric_panel_load_calculation_types] = "#{HPXML::ElectricPanelLoadCalculationType2023LoadBased}, #{HPXML::ElectricPanelLoadCalculationType2023MeterBased}"

panel_sampler = ElectricalPanelSampler.new(runner: runner, **args)
cap_bin, cap_val = panel_sampler.assign_rated_capacity(args: args)

args[:electric_panel_service_rating_bin] = cap_bin
args[:electric_panel_service_rating] = cap_val

breaker_spaces_headroom = panel_sampler.assign_breaker_space_headroom(args: args)
args[:electric_panel_breaker_spaces_type] = 'headroom'
args[:electric_panel_breaker_spaces] = breaker_spaces_headroom

# Assign miscellaneous permanently connected appliance loads
if args[:electric_panel_load_other_power].nil?
args[:electric_panel_load_other_power] = 0
end
# Assume all homes have a microwave
if args[:geometry_unit_num_bedrooms] <= 2
microwave_power = 900 # W, small, <= 0.9 cu ft, 1-2 ppl
elsif args[:geometry_unit_num_bedrooms] <= 4
microwave_power = 1100 # W, medium, <= 1.6 cu ft, 3-4 ppl
else
microwave_power = 1250 # W, large, 1.7-2.2 cu ft, 5+ ppl
end

garbage_disposal_ownership = 0.52 # AHS 2013
if Random.new(args[:building_id]).rand > garbage_disposal_ownership
garbage_disposal_power = 0
else
# Power estimated from avg load amp not HP rating, from InSinkErators
if args[:geometry_unit_num_bedrooms] <= 1
garbage_disposal_power = 672 # W, 1/3 HP, avg load 5.6A, 1-2 ppl
elsif args[:geometry_unit_num_bedrooms] <= 3
garbage_disposal_power = 756 # W, 1/2 HP, avg load 6.3A, 2-4 ppl
elsif args[:geometry_unit_num_bedrooms] <= 4
garbage_disposal_power = 1140 # W, 3/4 HP, avg load 9.5A, 3-5 ppl
else
garbage_disposal_power = 1224 # W, 1 HP, avg load 10.2A, 4+ ppl
end
end

if args[:geometry_garage_width] == 0
garage_door_power = 0
else
# Assume one automatic door opener if has garage, regardless of no. garages
garage_door_power = 373 # W, 1/2 HP (1 mech HP = 745.7 W)
end

args[:electric_panel_load_other_power] += microwave_power
args[:electric_panel_load_other_power] += garbage_disposal_power
args[:electric_panel_load_other_power] += garage_door_power

# Register values to runner
args.each do |arg_name, arg_value|
if args_to_delete.include?(arg_name) || (arg_value == Constants::Auto)
arg_value = '' # don't assign these to BuildResidentialHPXML or BuildResidentialScheduleFile
Expand Down
43 changes: 38 additions & 5 deletions measures/ResStockArguments/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>res_stock_arguments</name>
<uid>c984bb9e-4ac4-4930-a399-9d23f8f6936a</uid>
<version_id>efbceea8-4232-46e9-89ab-d72a5efe020e</version_id>
<version_modified>2024-12-03T03:31:19Z</version_modified>
<version_id>02145022-2148-4f02-a2e2-f4307f0dfc71</version_id>
<version_modified>2024-12-04T19:27:20Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>ResStockArguments</class_name>
<display_name>ResStock Arguments</display_name>
Expand Down Expand Up @@ -5293,6 +5293,15 @@
<model_dependent>false</model_dependent>
<default_value>4000</default_value>
</argument>
<argument>
<name>electric_panel_load_cooking_range_power</name>
<display_name>Electric Panel: Cooking Range/Oven Power</display_name>
<description>Specifies the panel load cooking range/oven power. If not provided, the OS-HPXML default (see &lt;a href='https://openstudio-hpxml.readthedocs.io/en/v1.10.0/workflow_inputs.html#panel-loads'&gt;Panel Loads&lt;/a&gt;) is used.</description>
<type>String</type>
<units>W</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>battery_present</name>
<display_name>Battery: Present</display_name>
Expand Down Expand Up @@ -7684,7 +7693,7 @@
<filename>README.md</filename>
<filetype>md</filetype>
<usage_type>readme</usage_type>
<checksum>AB96C457</checksum>
<checksum>88A13ADB</checksum>
</file>
<file>
<filename>README.md.erb</filename>
Expand All @@ -7701,13 +7710,37 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>C85AA9D8</checksum>
<checksum>78F14364</checksum>
</file>
<file>
<filename>constants.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>67C6AB5F</checksum>
<checksum>E4976995</checksum>
</file>
<file>
<filename>electrical_panel.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F8555523</checksum>
</file>
<file>
<filename>electrical_panel_resources/electrical_panel_breaker_space.csv</filename>
<filetype>csv</filetype>
<usage_type>resource</usage_type>
<checksum>DF922E1E</checksum>
</file>
<file>
<filename>electrical_panel_resources/electrical_panel_rated_capacity__electric_heating.csv</filename>
<filetype>csv</filetype>
<usage_type>resource</usage_type>
<checksum>E977F59E</checksum>
</file>
<file>
<filename>electrical_panel_resources/electrical_panel_rated_capacity__nonelectric_heating.csv</filename>
<filetype>csv</filetype>
<usage_type>resource</usage_type>
<checksum>FBEBCE30</checksum>
</file>
<file>
<filename>resstock_arguments_test.rb</filename>
Expand Down
Loading