Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into ev_batteries
Browse files Browse the repository at this point in the history
  • Loading branch information
aspeake committed Aug 30, 2024
2 parents 14f026e + c2cec15 commit ed8cc5b
Show file tree
Hide file tree
Showing 27 changed files with 927 additions and 128 deletions.
39 changes: 39 additions & 0 deletions BuildResidentialHPXML/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,45 @@ Depth from grade to bottom of vertical slab perimeter insulation. Applies to sla

<br/>

**Slab: Exterior Horizontal Insulation Nominal R-value**

Nominal R-value of the slab exterior horizontal insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.

- **Name:** ``slab_exterior_horizontal_insulation_r``
- **Type:** ``Double``

- **Units:** ``h-ft^2-R/Btu``

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

<br/>

**Slab: Exterior Horizontal Insulation Width**

Width of the slab exterior horizontal insulation measured from the exterior surface of the vertical slab perimeter insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.

- **Name:** ``slab_exterior_horizontal_insulation_width``
- **Type:** ``Double``

- **Units:** ``ft``

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

<br/>

**Slab: Exterior Horizontal Insulation Depth Below Grade**

Depth of the slab exterior horizontal insulation measured from the top surface of the slab exterior horizontal insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.

- **Name:** ``slab_exterior_horizontal_insulation_depth_below_grade``
- **Type:** ``Double``

- **Units:** ``ft``

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

<br/>

**Slab: Under Slab Insulation Nominal R-value**

Nominal R-value of the horizontal under slab insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.
Expand Down
32 changes: 28 additions & 4 deletions BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,24 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
arg.setDefaultValue(0)
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('slab_exterior_horizontal_insulation_r', false)
arg.setDisplayName('Slab: Exterior Horizontal Insulation Nominal R-value')
arg.setUnits('h-ft^2-R/Btu')
arg.setDescription('Nominal R-value of the slab exterior horizontal insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('slab_exterior_horizontal_insulation_width', false)
arg.setDisplayName('Slab: Exterior Horizontal Insulation Width')
arg.setUnits('ft')
arg.setDescription('Width of the slab exterior horizontal insulation measured from the exterior surface of the vertical slab perimeter insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('slab_exterior_horizontal_insulation_depth_below_grade', false)
arg.setDisplayName('Slab: Exterior Horizontal Insulation Depth Below Grade')
arg.setUnits('ft')
arg.setDescription('Depth of the slab exterior horizontal insulation measured from the top surface of the slab exterior horizontal insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('slab_under_insulation_r', true)
arg.setDisplayName('Slab: Under Slab Insulation Nominal R-value')
arg.setUnits('h-ft^2-R/Btu')
Expand Down Expand Up @@ -5232,9 +5250,12 @@ def self.set_slabs(hpxml_bldg, model, args, sorted_surfaces)
area: UnitConversions.convert(surface.grossArea, 'm^2', 'ft^2'),
thickness: args[:slab_thickness],
exposed_perimeter: exposed_perimeter,
perimeter_insulation_r_value: args[:slab_perimeter_insulation_r],
perimeter_insulation_depth: args[:slab_perimeter_insulation_depth],
exterior_horizontal_insulation_r_value: args[:slab_exterior_horizontal_insulation_r],
exterior_horizontal_insulation_width: args[:slab_exterior_horizontal_insulation_width],
exterior_horizontal_insulation_depth_below_grade: args[:slab_exterior_horizontal_insulation_depth_below_grade],
under_slab_insulation_width: under_slab_insulation_width,
perimeter_insulation_r_value: args[:slab_perimeter_insulation_r],
under_slab_insulation_r_value: args[:slab_under_insulation_r],
under_slab_insulation_spans_entire_slab: under_slab_insulation_spans_entire_slab,
carpet_fraction: args[:slab_carpet_fraction],
Expand Down Expand Up @@ -7431,13 +7452,16 @@ def self.renumber_hpxml_ids(hpxml_bldg)
end
end
surf.id = "#{surf_name}#{indexes[surf_name]}"
if surf.respond_to? :insulation_id
if surf.respond_to?(:insulation_id) && (not surf.insulation_id.nil?)
surf.insulation_id = "#{surf_name}#{indexes[surf_name]}Insulation"
end
if surf.respond_to? :perimeter_insulation_id
if surf.respond_to?(:perimeter_insulation_id) && (not surf.perimeter_insulation_id.nil?)
surf.perimeter_insulation_id = "#{surf_name}#{indexes[surf_name]}PerimeterInsulation"
end
if surf.respond_to? :under_slab_insulation_id
if surf.respond_to?(:exterior_horizontal_insulation_id) && (not surf.exterior_horizontal_insulation_id.nil?)
surf.exterior_horizontal_insulation_id = "#{surf_name}#{indexes[surf_name]}ExteriorHorizontalInsulation"
end
if surf.respond_to?(:under_slab_insulation_id) && (not surf.under_slab_insulation_id.nil?)
surf.under_slab_insulation_id = "#{surf_name}#{indexes[surf_name]}UnderSlabInsulation"
end
end
Expand Down
37 changes: 32 additions & 5 deletions BuildResidentialHPXML/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>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>2231919e-4ec3-4dfd-96d1-33f287c2a124</version_id>
<version_modified>2024-08-30T13:48:47Z</version_modified>
<version_id>449e3a1f-a772-48cf-9e79-a3336064575d</version_id>
<version_modified>2024-08-30T17:09:59Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -1412,6 +1412,33 @@
<model_dependent>false</model_dependent>
<default_value>0</default_value>
</argument>
<argument>
<name>slab_exterior_horizontal_insulation_r</name>
<display_name>Slab: Exterior Horizontal Insulation Nominal R-value</display_name>
<description>Nominal R-value of the slab exterior horizontal insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.</description>
<type>Double</type>
<units>h-ft^2-R/Btu</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>slab_exterior_horizontal_insulation_width</name>
<display_name>Slab: Exterior Horizontal Insulation Width</display_name>
<description>Width of the slab exterior horizontal insulation measured from the exterior surface of the vertical slab perimeter insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.</description>
<type>Double</type>
<units>ft</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>slab_exterior_horizontal_insulation_depth_below_grade</name>
<display_name>Slab: Exterior Horizontal Insulation Depth Below Grade</display_name>
<description>Depth of the slab exterior horizontal insulation measured from the top surface of the slab exterior horizontal insulation. Applies to slab-on-grade foundations and basement/crawlspace floors.</description>
<type>Double</type>
<units>ft</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>slab_under_insulation_r</name>
<display_name>Slab: Under Slab Insulation Nominal R-value</display_name>
Expand Down Expand Up @@ -7516,7 +7543,7 @@
<filename>README.md</filename>
<filetype>md</filetype>
<usage_type>readme</usage_type>
<checksum>EAB15880</checksum>
<checksum>63F441E3</checksum>
</file>
<file>
<filename>README.md.erb</filename>
Expand All @@ -7533,7 +7560,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>49EB36F2</checksum>
<checksum>1A369C97</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand Down Expand Up @@ -9573,7 +9600,7 @@
<filename>test_build_residential_hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>17C2A23D</checksum>
<checksum>28EF393B</checksum>
</file>
</files>
</measure>
3 changes: 3 additions & 0 deletions BuildResidentialHPXML/tests/test_build_residential_hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ def _set_measure_argument_values(hpxml_file, args)
args['slab_perimeter_insulation_depth'] = 0
args['slab_under_insulation_r'] = 0
args['slab_under_insulation_width'] = 0
args['slab_exterior_horizontal_insulation_r'] = 0
args['slab_exterior_horizontal_insulation_width'] = 0
args['slab_exterior_horizontal_insulation_depth_below_grade'] = 0
args['slab_thickness'] = 4.0
args['slab_carpet_fraction'] = 0.0
args['slab_carpet_r'] = 0.0
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
__New Features__
- Updates to HPXML v4.0 final release.
- Adds inputs for modeling skylight curbs and/or shafts.
- Allows modeling exterior horizontal insulation for a slab-on-grade foundation (or basement/crawlspace floor).
- Allows alternative infiltration input `AirInfiltrationMeasurement/LeakinessDescription`, in which the infiltration level is estimated using age of home, climate zone, foundation type, etc.
- Updates hot water end uses for operational calculations (i.e., when `NumberofResidents` provided) based on FSEC study.
- Central Fan Integrated Supply (CFIS) mechanical ventilation enhancements:
Expand Down
6 changes: 5 additions & 1 deletion HPXMLtoOpenStudio/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1322,10 +1322,14 @@ def add_foundation_slab(model, weather, spaces, slab, z_origin, exposed_length,
end
soil_k_in = UnitConversions.convert(@hpxml_bldg.site.ground_conductivity, 'ft', 'in')

ext_horiz_r = slab.exterior_horizontal_insulation_r_value
ext_horiz_width = slab.exterior_horizontal_insulation_width
ext_horiz_depth = slab.exterior_horizontal_insulation_depth_below_grade

Constructions.apply_foundation_slab(model, surface, "#{slab.id} construction",
slab_under_r, slab_under_width, slab_gap_r, slab_perim_r,
slab_perim_depth, slab_whole_r, slab.thickness,
exposed_length, mat_carpet, soil_k_in, kiva_foundation)
exposed_length, mat_carpet, soil_k_in, kiva_foundation, ext_horiz_r, ext_horiz_width, ext_horiz_depth)

kiva_foundation = surface.adjacentFoundation.get

Expand Down
26 changes: 13 additions & 13 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>57c80cbd-d678-4af1-894a-c571c81f6ac8</version_id>
<version_modified>2024-08-30T17:02:45Z</version_modified>
<version_id>2e4759a4-488d-436c-be8f-26c8c0bffb6c</version_id>
<version_modified>2024-08-30T17:10:03Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -183,7 +183,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>EE95A395</checksum>
<checksum>A3FC2A06</checksum>
</file>
<file>
<filename>airflow.rb</filename>
Expand Down Expand Up @@ -213,7 +213,7 @@
<filename>constructions.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>7C326501</checksum>
<checksum>F2B9F3E6</checksum>
</file>
<file>
<filename>data/Xing_okstate_0664D_13659_Table_A-3.csv</filename>
Expand Down Expand Up @@ -363,19 +363,19 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>B88961D2</checksum>
<checksum>BB2C7C42</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>5E0C0612</checksum>
<checksum>91776407</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
<filetype>xsd</filetype>
<usage_type>resource</usage_type>
<checksum>A8801C6F</checksum>
<checksum>080319A9</checksum>
</file>
<file>
<filename>hpxml_schema/README.md</filename>
Expand All @@ -387,7 +387,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>380C4263</checksum>
<checksum>7B692A45</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand All @@ -405,7 +405,7 @@
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>4205705D</checksum>
<checksum>A15272FB</checksum>
</file>
<file>
<filename>lighting.rb</filename>
Expand Down Expand Up @@ -681,13 +681,13 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>CBD787A1</checksum>
<checksum>C12A1863</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>45F2A863</checksum>
<checksum>D4340A44</checksum>
</file>
<file>
<filename>test_ev.rb</filename>
Expand Down Expand Up @@ -717,7 +717,7 @@
<filename>test_hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>487BF287</checksum>
<checksum>3BA204D7</checksum>
</file>
<file>
<filename>test_lighting.rb</filename>
Expand Down Expand Up @@ -759,7 +759,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>6EDC8C3A</checksum>
<checksum>ABE770EA</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand Down
17 changes: 14 additions & 3 deletions HPXMLtoOpenStudio/resources/constructions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1503,15 +1503,15 @@ def self.apply_foundation_slab(model, surface, constr_name,
under_r, under_width, gap_r,
perimeter_r, perimeter_depth,
whole_r, concrete_thick_in, exposed_perimeter,
mat_carpet, soil_k_in, foundation)
mat_carpet, soil_k_in, foundation, ext_horiz_r, ext_horiz_width, ext_horiz_depth)

return if surface.nil?

if foundation.nil?
# Create Kiva foundation for slab
foundation = create_kiva_slab_foundation(model, under_r, under_width,
gap_r, perimeter_r, perimeter_depth,
concrete_thick_in, soil_k_in)
concrete_thick_in, soil_k_in, ext_horiz_r, ext_horiz_width, ext_horiz_depth)
else
# Kiva foundation (for crawlspace/basement) exists
if (under_r > 0) && (under_width > 0)
Expand Down Expand Up @@ -2003,9 +2003,12 @@ def self.get_gap_factor(install_grade, framing_factor, cavity_r)
# @param ext_vert_depth [TODO] TODO
# @param concrete_thick_in [TODO] TODO
# @param soil_k_in [TODO] TODO
# @param ext_horiz_r [TODO] TODO
# @param ext_horiz_width [TODO] TODO
# @param ext_horiz_depth [TODO] TODO
# @return [TODO] TODO
def self.create_kiva_slab_foundation(model, int_horiz_r, int_horiz_width, int_vert_r,
ext_vert_r, ext_vert_depth, concrete_thick_in, soil_k_in)
ext_vert_r, ext_vert_depth, concrete_thick_in, soil_k_in, ext_horiz_r, ext_horiz_width, ext_horiz_depth)

# Create the Foundation:Kiva object for slab foundations
foundation = OpenStudio::Model::FoundationKiva.new(model)
Expand All @@ -2032,6 +2035,14 @@ def self.create_kiva_slab_foundation(model, int_horiz_r, int_horiz_width, int_ve
foundation.setExteriorVerticalInsulationDepth(UnitConversions.convert(ext_vert_depth, 'ft', 'm'))
end

# Exterior horizontal insulation
if (ext_horiz_r > 0) && (ext_horiz_width > 0)
ext_horiz_mat = create_insulation_material(model, 'exterior horizontal ins', ext_horiz_r)
foundation.setExteriorHorizontalInsulationMaterial(ext_horiz_mat)
foundation.setExteriorHorizontalInsulationDepth(UnitConversions.convert(ext_horiz_depth, 'ft', 'm'))
foundation.setExteriorHorizontalInsulationWidth(UnitConversions.convert(ext_horiz_width, 'ft', 'm'))
end

foundation.setWallHeightAboveGrade(UnitConversions.convert(concrete_thick_in, 'in', 'm'))
foundation.setWallDepthBelowSlab(UnitConversions.convert(8.0, 'in', 'm'))

Expand Down
Loading

0 comments on commit ed8cc5b

Please sign in to comment.