Skip to content

Commit

Permalink
Merge branch 'misc_mj8' of https://github.com/NREL/OpenStudio-HPXML i…
Browse files Browse the repository at this point in the history
…nto room-by-room-sizing
  • Loading branch information
yzhou601 committed Jan 3, 2024
2 parents 29e3aae + 74afa67 commit 1e27eff
Show file tree
Hide file tree
Showing 26 changed files with 11,765 additions and 1,224 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@
/weather/USA_OK_Lawton.Muni.AP.723575_TMY3.epw
/weather/USA_OK_McAlester.Rgnl.AP.723566_TMY3.epw
/weather/USA_OK_Oklahoma.City-Tinker.AFB.723540_TMY3.epw
/weather/USA_OK_Oklahoma.City-Wiley.Post.Field.723544_TMY3.epw
/weather/USA_OK_Oklahoma.City-Will.Rogers.World.AP.723530_TMY3.epw
/weather/USA_OK_Ponca.City.Muni.AP.723546_TMY3.epw
/weather/USA_OK_Stillwater.Rgnl.AP.723545_TMY3.epw
Expand Down
22 changes: 11 additions & 11 deletions HPXMLtoOpenStudio/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>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>81b09143-5ac0-4e39-bfd2-05fccb547269</version_id>
<version_modified>2023-12-21T22:12:43Z</version_modified>
<version_id>0046e785-7c56-4c04-8246-dac55e869ce2</version_id>
<version_modified>2024-01-02T20:27:22Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -304,13 +304,13 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>B5FC674F</checksum>
<checksum>826F3585</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>916525C3</checksum>
<checksum>6E437CC2</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand Down Expand Up @@ -346,7 +346,7 @@
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>94E05F98</checksum>
<checksum>6207C7C7</checksum>
</file>
<file>
<filename>lighting.rb</filename>
Expand Down Expand Up @@ -376,7 +376,7 @@
<filename>minitest_helper.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>CDB0A906</checksum>
<checksum>923B05E5</checksum>
</file>
<file>
<filename>misc_loads.rb</filename>
Expand Down Expand Up @@ -532,7 +532,7 @@
<filename>unit_conversions.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>7954C9BD</checksum>
<checksum>61BEEB21</checksum>
</file>
<file>
<filename>util.rb</filename>
Expand Down Expand Up @@ -592,7 +592,7 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>9C29D61E</checksum>
<checksum>EF0F0416</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
Expand All @@ -616,13 +616,13 @@
<filename>test_hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>5567231B</checksum>
<checksum>B582B9C9</checksum>
</file>
<file>
<filename>test_hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>EC19A8C1</checksum>
<checksum>DC7F2E0F</checksum>
</file>
<file>
<filename>test_lighting.rb</filename>
Expand Down Expand Up @@ -664,7 +664,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>3DA658D5</checksum>
<checksum>5E426D14</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand Down
11 changes: 10 additions & 1 deletion HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ class HPXML < Object
DuctTypeSupply = 'supply'
DWHRFacilitiesConnectedAll = 'all'
DWHRFacilitiesConnectedOne = 'one'
ElectricResistanceDistributionRadiantCeiling = 'radiant ceiling'
ElectricResistanceDistributionRadiantFloor = 'radiant floor'
ElectricResistanceDistributionBaseboard = 'baseboard'
ExteriorShadingTypeSolarScreens = 'solar screens'
FoundationTypeAboveApartment = 'AboveApartment'
FoundationTypeAmbient = 'Ambient'
Expand Down Expand Up @@ -4053,7 +4056,7 @@ def initialize(hpxml_object, *args)
:third_party_certification, :htg_seed_id, :is_shared_system, :number_of_units_served,
:shared_loop_watts, :shared_loop_motor_efficiency, :fan_coil_watts, :fan_watts_per_cfm,
:airflow_defect_ratio, :fan_watts, :heating_airflow_cfm, :location, :primary_system,
:pilot_light, :pilot_light_btuh]
:pilot_light, :pilot_light_btuh, :electric_resistance_distribution]
attr_accessor(*ATTRS)
attr_reader(:heating_detailed_performance_data)

Expand Down Expand Up @@ -4152,6 +4155,9 @@ def to_doc(building)
XMLHelper.add_extension(type_el, 'PilotLightBtuh', @pilot_light_btuh, :float, @pilot_light_btuh_isdefaulted) unless @pilot_light_btuh.nil?
end
end
if @heating_system_type == HPXML::HVACTypeElectricResistance
XMLHelper.add_element(type_el, 'ElectricDistribution', @electric_resistance_distribution, :string, @electric_resistance_distribution_isdefaulted) unless @electric_resistance_distribution.nil?
end
end
XMLHelper.add_element(heating_system, 'HeatingSystemFuel', @heating_system_fuel, :string) unless @heating_system_fuel.nil?
XMLHelper.add_element(heating_system, 'HeatingCapacity', @heating_capacity, :float, @heating_capacity_isdefaulted) unless @heating_capacity.nil?
Expand Down Expand Up @@ -4198,6 +4204,9 @@ def from_doc(heating_system)
if @pilot_light
@pilot_light_btuh = XMLHelper.get_value(heating_system, "HeatingSystemType/#{@heating_system_type}/extension/PilotLightBtuh", :float)
end
if @heating_system_type == HPXML::HVACTypeElectricResistance
@electric_resistance_distribution = XMLHelper.get_value(heating_system, "HeatingSystemType/#{@heating_system_type}/ElectricDistribution", :string)
end
@heating_capacity = XMLHelper.get_value(heating_system, 'HeatingCapacity', :float)
@heating_efficiency_afue = XMLHelper.get_value(heating_system, "AnnualHeatingEfficiency[Units='#{UnitsAFUE}']/Value", :float)
@heating_efficiency_percent = XMLHelper.get_value(heating_system, "AnnualHeatingEfficiency[Units='Percent']/Value", :float)
Expand Down
9 changes: 9 additions & 0 deletions HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,15 @@ def self.apply_hvac(runner, hpxml, hpxml_bldg, weather, convert_shared_systems)
heat_pump.backup_heating_lockout_temp_isdefaulted = true
end

# Default electric resistance distribution
hpxml_bldg.heating_systems.each do |heating_system|
next unless heating_system.heating_system_type == HPXML::HVACTypeElectricResistance
next unless heating_system.electric_resistance_distribution.nil?

heating_system.electric_resistance_distribution = HPXML::ElectricResistanceDistributionBaseboard
heating_system.electric_resistance_distribution_isdefaulted = true
end

# Default boiler EAE
hpxml_bldg.heating_systems.each do |heating_system|
next unless heating_system.electric_auxiliary_energy.nil?
Expand Down

0 comments on commit 1e27eff

Please sign in to comment.