Skip to content
Draft
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
57e268c
same as adjacency first cut
yzhou601 Oct 4, 2024
8edc860
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Oct 4, 2024
37aac01
update measures
yzhou601 Oct 4, 2024
db9794d
simplify implementation with additional properties
yzhou601 Oct 4, 2024
4ea65c6
oops
yzhou601 Oct 4, 2024
e0979da
skipped creating duplicate surfaces, addressed default and hvac sizing
yzhou601 Oct 11, 2024
5ee2c83
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Oct 11, 2024
c96242e
bugfix, name change
yzhou601 Oct 12, 2024
edd9aee
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Oct 21, 2024
ad4c8a0
change to only use sameas in one element instead of both elements
yzhou601 Oct 22, 2024
c31f15d
bugfix and some cleanups
yzhou601 Oct 22, 2024
bb5e641
simplify EPvalidator.xml
yzhou601 Oct 22, 2024
c1f0dd3
update measures
yzhou601 Oct 22, 2024
11f013f
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Oct 22, 2024
a1126ef
simplified the approach further more: store adjacent surface id in sp…
yzhou601 Oct 23, 2024
6c065d6
Add test file to include unconditioned common spaces and shared surfaces
yzhou601 Oct 24, 2024
6cad724
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Oct 24, 2024
4f0e0dd
Oops, forgot to add the generated test file
yzhou601 Oct 24, 2024
774b737
more fix
yzhou601 Oct 24, 2024
a8a6c50
test validations
yzhou601 Oct 24, 2024
388025e
fixed util.rb, relax the unused schedule check for common spaces(may …
yzhou601 Oct 24, 2024
60feccc
Latest results.
Oct 24, 2024
45a9415
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Nov 15, 2024
0e2fe3d
fix foundation wall attachment, reconfigure test files to include attics
yzhou601 Nov 19, 2024
cf686cc
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Nov 19, 2024
c250a6a
Merge branch 'whole_building_common_spaces' of https://github.com/NRE…
yzhou601 Nov 19, 2024
5d6080a
fix ci
yzhou601 Nov 19, 2024
0872523
change the approach to create surfaces at unit models to avoid compon…
yzhou601 Nov 21, 2024
136c569
Latest results.
Nov 21, 2024
faf101c
fix typos
yzhou601 Nov 21, 2024
97682d9
Merge branch 'whole_building_common_spaces' of https://github.com/NRE…
yzhou601 Nov 21, 2024
19ecece
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Nov 27, 2024
944bd45
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Dec 16, 2024
3f6a380
Merge branch 'whole-mf-bldg-zero-occupants' of https://github.com/NRE…
shorowit Dec 17, 2024
c995c2e
Latest results.
Dec 17, 2024
57e65fe
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Dec 27, 2024
9373f61
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Jan 17, 2025
98d4b67
add reverse surface description test file
yzhou601 Jan 23, 2025
fc65762
Latest results.
Jan 23, 2025
6a0e79c
add EPvalidator check for wholebuildingsimulation
yzhou601 Jan 23, 2025
8b631ae
Merge branch 'whole_building_common_spaces' of https://github.com/NRE…
yzhou601 Jan 23, 2025
2517ffb
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Feb 18, 2025
c466bf0
Update new code merged in.
shorowit Feb 18, 2025
2dc8a4b
Latest results.
Feb 18, 2025
0b4c0fe
Merge branch 'fix_default_solar_screens_films' of https://github.com/…
shorowit Mar 13, 2025
ebf8f18
Latest results.
Mar 13, 2025
71e0e0d
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Mar 18, 2025
e6930f0
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Jun 3, 2025
c820ed5
Latest results.
Jun 3, 2025
1931e00
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Jun 20, 2025
5cf23c1
Latest results.
Jun 20, 2025
1ab8b75
Merge branch 'storm_window_limit' of https://github.com/NREL/OpenStud…
shorowit Oct 10, 2025
a7f09ad
Update HPXMLs.
shorowit Oct 10, 2025
51ca338
Update log message check
shorowit Oct 10, 2025
3fb9730
Latest results.
Oct 10, 2025
7f95a40
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Oct 14, 2025
b45c1aa
Reduce scope of changes
shorowit Oct 15, 2025
f1eb1e5
Improve IDs for multi-unit HPXMLs.
shorowit Oct 16, 2025
2a41960
Latest results.
Oct 16, 2025
645c8ce
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Oct 21, 2025
3a58bdc
Rename sample file.
shorowit Oct 21, 2025
107ecde
Update documentation/changelog. Revert sample file name change.
shorowit Oct 21, 2025
4073886
Fix HPXML references in docs. [ci skip]
shorowit Oct 23, 2025
053ccee
reconfigure test files
yzhou601 Oct 29, 2025
644d256
Merge branch 'master', test file configuration
yzhou601 Oct 30, 2025
8d416d2
update measures, one more sameas wall in the inter-unit-heat-transfer…
yzhou601 Oct 30, 2025
285997f
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Nov 3, 2025
37a8258
Fix CI
shorowit Nov 3, 2025
269b899
Improve the docs a bit [ci skip]
shorowit Nov 3, 2025
97a18c4
Latest results.
Nov 4, 2025
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
18 changes: 9 additions & 9 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>a34fa4e4-deee-4e59-8f0b-8c1a2c574cdc</version_id>
<version_modified>2024-10-23T18:46:26Z</version_modified>
<version_id>5b258b6c-0bac-4b63-8535-04f8ee2debc2</version_id>
<version_modified>2024-10-24T02:53:39Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -327,7 +327,7 @@
<filename>defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0329B068</checksum>
<checksum>77A2949D</checksum>
</file>
<file>
<filename>energyplus.rb</filename>
Expand All @@ -345,7 +345,7 @@
<filename>geometry.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>6C147EFE</checksum>
<checksum>3CFFBB4C</checksum>
</file>
<file>
<filename>hotwater_appliances.rb</filename>
Expand All @@ -357,7 +357,7 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>E00013AE</checksum>
<checksum>552E74B6</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand All @@ -375,7 +375,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>AC4BF61E</checksum>
<checksum>94902574</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand All @@ -393,7 +393,7 @@
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>CD77F9C7</checksum>
<checksum>5E038E75</checksum>
</file>
<file>
<filename>internal_gains.rb</filename>
Expand Down Expand Up @@ -447,7 +447,7 @@
<filename>model.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>A578B92B</checksum>
<checksum>ECCE7792</checksum>
</file>
<file>
<filename>output.rb</filename>
Expand Down Expand Up @@ -735,7 +735,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>20E56F9D</checksum>
<checksum>AB713A99</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand Down
6 changes: 6 additions & 0 deletions HPXMLtoOpenStudio/resources/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,8 @@ def self.apply_rim_joists(hpxml_bldg)
# @return [nil]
def self.apply_walls(hpxml_bldg)
hpxml_bldg.walls.each do |wall|
next if wall.sameas_id

if wall.azimuth.nil?
wall.azimuth = get_azimuth_from_orientation(wall.orientation)
wall.azimuth_isdefaulted = true
Expand Down Expand Up @@ -1342,6 +1344,8 @@ def self.apply_walls(hpxml_bldg)
# @return [nil]
def self.apply_foundation_walls(hpxml_bldg)
hpxml_bldg.foundation_walls.each do |foundation_wall|
next if foundation_wall.sameas_id

if foundation_wall.type.nil?
foundation_wall.type = HPXML::FoundationWallTypeSolidConcrete
foundation_wall.type_isdefaulted = true
Expand Down Expand Up @@ -1402,6 +1406,8 @@ def self.apply_foundation_walls(hpxml_bldg)
# @return [nil]
def self.apply_floors(runner, hpxml_bldg)
hpxml_bldg.floors.each do |floor|
next if floor.sameas_id

if floor.floor_or_ceiling.nil?
if floor.is_ceiling
floor.floor_or_ceiling = HPXML::FloorOrCeilingCeiling
Expand Down
52 changes: 49 additions & 3 deletions HPXMLtoOpenStudio/resources/geometry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ def self.apply_walls(runner, model, spaces, hpxml_bldg, hpxml_header)
_walls_top, foundation_top = get_foundation_and_walls_top(hpxml_bldg)

hpxml_bldg.walls.each do |wall|
store_adjacent_surface_ids_to_space(get_interior_space(model, spaces, HPXML::LocationConditionedSpace, hpxml_bldg), wall)
next if wall.sameas_id
next if wall.net_area < 1.0 # skip modeling net surface area for surfaces comprised entirely of subsurface area

if wall.azimuth.nil?
Expand Down Expand Up @@ -176,6 +178,7 @@ def self.apply_walls(runner, model, spaces, hpxml_bldg, hpxml_header)
surface.setSunExposure(EPlus::SurfaceSunExposureNo)
surface.setWindExposure(EPlus::SurfaceWindExposureNo)
end
surface.additionalProperties.setFeature('hpxmlID', wall.id)
end

next if surfaces.empty?
Expand Down Expand Up @@ -220,6 +223,9 @@ def self.apply_rim_joists(runner, model, spaces, hpxml_bldg)
_walls_top, foundation_top = get_foundation_and_walls_top(hpxml_bldg)

hpxml_bldg.rim_joists.each do |rim_joist|
store_adjacent_surface_ids_to_space(get_interior_space(model, spaces, HPXML::LocationConditionedSpace, hpxml_bldg), rim_joist)
next if rim_joist.sameas_id

if rim_joist.azimuth.nil?
if rim_joist.is_exterior
azimuths = default_azimuths # Model as four directions for average exterior incident solar
Expand Down Expand Up @@ -256,6 +262,7 @@ def self.apply_rim_joists(runner, model, spaces, hpxml_bldg)
surface.setSunExposure(EPlus::SurfaceSunExposureNo)
surface.setWindExposure(EPlus::SurfaceWindExposureNo)
end
surface.additionalProperties.setFeature('hpxmlID', rim_joist.id)
end

# Apply construction
Expand Down Expand Up @@ -303,6 +310,8 @@ def self.apply_floors(runner, model, spaces, hpxml_bldg, hpxml_header)
walls_top, foundation_top = get_foundation_and_walls_top(hpxml_bldg)

hpxml_bldg.floors.each do |floor|
store_adjacent_surface_ids_to_space(get_interior_space(model, spaces, HPXML::LocationConditionedSpace, hpxml_bldg), floor)
next if floor.sameas_id
next if floor.net_area < 1.0 # skip modeling net surface area for surfaces comprised entirely of subsurface area

area = floor.net_area
Expand Down Expand Up @@ -339,6 +348,7 @@ def self.apply_floors(runner, model, spaces, hpxml_bldg, hpxml_header)
end
end
end
surface.additionalProperties.setFeature('hpxmlID', floor.id)

# Apply construction

Expand Down Expand Up @@ -449,6 +459,9 @@ def self.apply_foundation_walls_slabs(runner, model, spaces, weather, hpxml_bldg
int_fnd_walls.each do |fnd_wall|
next unless fnd_wall.is_interior

store_adjacent_surface_ids_to_space(get_interior_space(model, spaces, HPXML::LocationConditionedSpace, hpxml_bldg), fnd_wall)
next if fnd_wall.sameas_id

ag_height = fnd_wall.height - fnd_wall.depth_below_grade
ag_net_area = fnd_wall.net_area * ag_height / fnd_wall.height
next if ag_net_area < 1.0
Expand All @@ -473,6 +486,7 @@ def self.apply_foundation_walls_slabs(runner, model, spaces, weather, hpxml_bldg
set_surface_exterior(model, spaces, surface, fnd_wall, hpxml_bldg)
surface.setSunExposure(EPlus::SurfaceSunExposureNo)
surface.setWindExposure(EPlus::SurfaceWindExposureNo)
surface.additionalProperties.setFeature('hpxmlID', fnd_wall.id)

# Apply construction

Expand Down Expand Up @@ -971,6 +985,7 @@ def self.apply_conditioned_floor_area(model, spaces, hpxml_bldg)
sum_cfa = 0.0
hpxml_bldg.floors.each do |floor|
next unless floor.is_floor
# FIXME: If the hpxml Building that represents an unconditioned space (without HVACPlant), does the hpxml_bldg.building_construction.conditioned_floor_area accounts to the total cfa? Is E+ reporting the correct total cfa? (Need to double-check)
next unless [HPXML::LocationConditionedSpace, HPXML::LocationBasementConditioned].include?(floor.interior_adjacent_to) ||
[HPXML::LocationConditionedSpace, HPXML::LocationBasementConditioned].include?(floor.exterior_adjacent_to)

Expand Down Expand Up @@ -1051,6 +1066,7 @@ def self.apply_thermal_mass(model, spaces, hpxml_bldg, hpxml_header)
def self.get_foundation_and_walls_top(hpxml_bldg)
foundation_top = [hpxml_bldg.building_construction.unit_height_above_grade, 0].max
hpxml_bldg.foundation_walls.each do |foundation_wall|
foundation_wall = foundation_wall.sameas if foundation_wall.sameas_id
top = -1 * foundation_wall.depth_below_grade + foundation_wall.height
foundation_top = top if top > foundation_top
end
Expand Down Expand Up @@ -1127,6 +1143,24 @@ def self.get_occupancy_default_num(nbeds:)
return Float(nbeds) # Per ANSI 301 for an asset calculation
end

# Store the adjacent surface ID in Space additional properties, to process after merging unit models
#
# @param space [OpenStudio::Model::Space] the OpenStudio::Model::Space object of the dwelling unit
# @param hpxml_surface [HPXML::Wall or HPXML::Floor or HPXML::RimJoist or HPXML::FoundationWall] any HPXML surface
# @return [nil]
def self.store_adjacent_surface_ids_to_space(space, hpxml_surface)
return if hpxml_surface.sameas_id.nil?

# Store adjacent surface id in the space to process later
adjacent_surface_ids = space.additionalProperties.getFeatureAsString('adjacentSurfaceIDs')
if adjacent_surface_ids.is_initialized
adjacent_surface_ids_new = [adjacent_surface_ids, hpxml_surface.sameas_id].join(', ')
space.additionalProperties.setFeature('adjacentSurfaceIDs', adjacent_surface_ids_new)
else
space.additionalProperties.setFeature('adjacentSurfaceIDs', hpxml_surface.sameas_id)
end
end

# Creates a space and zone based on contents of spaces and value of location.
# Sets a "dwelling unit multiplier" equal to the number of similar units represented.
#
Expand Down Expand Up @@ -1701,13 +1735,24 @@ def self.get_temperature_scheduled_space_values(location)
# @param spaces [Hash] Map of HPXML locations => OpenStudio Space objects
# @param surface [OpenStudio::Model::Surface] an OpenStudio::Model::Surface object
# @param hpxml_surface [HPXML::Wall or HPXML::Roof or HPXML::RimJoist or HPXML::FoundationWall or HPXML::Slab] any HPXML surface
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @return [nil]
def self.set_surface_interior(model, spaces, surface, hpxml_surface, hpxml_bldg)
interior_adjacent_to = hpxml_surface.interior_adjacent_to
surface.setSpace(get_interior_space(model, spaces, hpxml_surface.interior_adjacent_to, hpxml_bldg))
end

# Return the OpenStudio Space based on the adjacent interior location of an HPXML Surface.
#
# @param model [OpenStudio::Model::Model] OpenStudio Model object
# @param spaces [Hash] Map of HPXML locations => OpenStudio Space objects
# @param interior_adjacent_to [String] HPXML interior location
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @return [OpenStudio::Model::Space] the OpenStudio::Model::Space object based on the interior location
def self.get_interior_space(model, spaces, interior_adjacent_to, hpxml_bldg)
if HPXML::conditioned_below_grade_locations.include? interior_adjacent_to
surface.setSpace(create_or_get_space(model, spaces, HPXML::LocationConditionedSpace, hpxml_bldg))
return create_or_get_space(model, spaces, HPXML::LocationConditionedSpace, hpxml_bldg)
else
surface.setSpace(create_or_get_space(model, spaces, interior_adjacent_to, hpxml_bldg))
return create_or_get_space(model, spaces, interior_adjacent_to, hpxml_bldg)
end
end

Expand All @@ -1717,6 +1762,7 @@ def self.set_surface_interior(model, spaces, surface, hpxml_surface, hpxml_bldg)
# @param spaces [Hash] Map of HPXML locations => OpenStudio Space objects
# @param surface [OpenStudio::Model::Surface] an OpenStudio::Model::Surface object
# @param hpxml_surface [HPXML::Wall or HPXML::Roof or HPXML::RimJoist or HPXML::FoundationWall or HPXML::Slab] any HPXML surface
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @return [nil]
def self.set_surface_exterior(model, spaces, surface, hpxml_surface, hpxml_bldg)
exterior_adjacent_to = hpxml_surface.exterior_adjacent_to
Expand Down
Loading
Loading