Skip to content

Commit

Permalink
Merge commit 'd777d99687929b31acc42bf1ab0365e4fdea426f' into ansi_301…
Browse files Browse the repository at this point in the history
…_2022_airflow
  • Loading branch information
shorowit committed Jan 11, 2024
2 parents 85e9288 + d777d99 commit 3f5a4c0
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 46 deletions.
10 changes: 5 additions & 5 deletions hpxml-measures/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>84752f39-818c-42fa-a75c-239e9ae36e16</version_id>
<version_modified>2024-01-10T20:32:20Z</version_modified>
<version_id>56c9a811-7c64-4a38-8872-30c4ed5f687f</version_id>
<version_modified>2024-01-11T16:45:08Z</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>44987E3C</checksum>
<checksum>3B46EAA2</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>348C4650</checksum>
<checksum>55F50B58</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand All @@ -328,7 +328,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>07465552</checksum>
<checksum>C02EF09F</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand Down
2 changes: 1 addition & 1 deletion hpxml-measures/HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ def to_doc(building)
fail "Unhandled attic type '#{@attic_type}'."
end
end
XMLHelper.add_element(attic, 'WithinInfiltrationVolume', within_infiltration_volume, :boolean) unless @within_infiltration_volume.nil?
XMLHelper.add_element(attic, 'WithinInfiltrationVolume', @within_infiltration_volume, :boolean, @within_infiltration_volume_isdefaulted) unless @within_infiltration_volume.nil?
if not @attached_to_roof_idrefs.nil?
@attached_to_roof_idrefs.each do |roof|
roof_attached = XMLHelper.add_element(attic, 'AttachedToRoof')
Expand Down
55 changes: 37 additions & 18 deletions hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def self.apply(runner, hpxml, hpxml_bldg, eri_version, weather, epw_file: nil, s
apply_building_occupancy(hpxml_bldg, schedules_file)
apply_building_construction(hpxml_bldg, cfa, nbeds, infil_measurement)
apply_climate_and_risk_zones(hpxml_bldg, epw_file)
apply_infiltration(hpxml_bldg, infil_measurement)
apply_attics(hpxml_bldg)
apply_foundations(hpxml_bldg)
apply_infiltration(hpxml_bldg, infil_measurement)
apply_roofs(hpxml_bldg)
apply_rim_joists(hpxml_bldg)
apply_walls(hpxml_bldg)
Expand Down Expand Up @@ -646,26 +646,16 @@ def self.apply_climate_and_risk_zones(hpxml_bldg, epw_file)
end
end

def self.apply_infiltration(hpxml_bldg, infil_measurement)
if infil_measurement.infiltration_volume.nil?
infil_measurement.infiltration_volume = hpxml_bldg.building_construction.conditioned_building_volume
infil_measurement.infiltration_volume_isdefaulted = true
end
if infil_measurement.infiltration_height.nil?
infil_measurement.infiltration_height = hpxml_bldg.inferred_infiltration_height(infil_measurement.infiltration_volume)
infil_measurement.infiltration_height_isdefaulted = true
end
if infil_measurement.a_ext.nil?
if (infil_measurement.infiltration_type == HPXML::InfiltrationTypeUnitTotal) &&
[HPXML::ResidentialTypeApartment, HPXML::ResidentialTypeSFA].include?(hpxml_bldg.building_construction.residential_facility_type)
tot_cb_area, ext_cb_area = hpxml_bldg.compartmentalization_boundary_areas()
infil_measurement.a_ext = (ext_cb_area / tot_cb_area).round(5)
infil_measurement.a_ext_isdefaulted = true
def self.apply_attics(hpxml_bldg)
hpxml_bldg.attics.each do |attic|
next unless attic.within_infiltration_volume.nil?

if [HPXML::AtticTypeUnvented].include? attic.attic_type
attic.within_infiltration_volume = false
attic.within_infiltration_volume_isdefaulted = true
end
end
end

def self.apply_attics(hpxml_bldg)
return unless hpxml_bldg.has_location(HPXML::LocationAtticVented)

vented_attics = hpxml_bldg.attics.select { |a| a.attic_type == HPXML::AtticTypeVented }
Expand All @@ -684,6 +674,16 @@ def self.apply_attics(hpxml_bldg)
end

def self.apply_foundations(hpxml_bldg)
hpxml_bldg.foundations.each do |foundation|
next unless foundation.within_infiltration_volume.nil?

next unless [HPXML::FoundationTypeBasementUnconditioned,
HPXML::FoundationTypeCrawlspaceUnvented].include? foundation.foundation_type

foundation.within_infiltration_volume = false
foundation.within_infiltration_volume_isdefaulted = true
end

if hpxml_bldg.has_location(HPXML::LocationCrawlspaceVented)
vented_crawls = hpxml_bldg.foundations.select { |f| f.foundation_type == HPXML::FoundationTypeCrawlspaceVented }
if vented_crawls.empty?
Expand Down Expand Up @@ -717,6 +717,25 @@ def self.apply_foundations(hpxml_bldg)
end
end

def self.apply_infiltration(hpxml_bldg, infil_measurement)
if infil_measurement.infiltration_volume.nil?
infil_measurement.infiltration_volume = hpxml_bldg.building_construction.conditioned_building_volume
infil_measurement.infiltration_volume_isdefaulted = true
end
if infil_measurement.infiltration_height.nil?
infil_measurement.infiltration_height = hpxml_bldg.inferred_infiltration_height(infil_measurement.infiltration_volume)
infil_measurement.infiltration_height_isdefaulted = true
end
if infil_measurement.a_ext.nil?
if (infil_measurement.infiltration_type == HPXML::InfiltrationTypeUnitTotal) &&
[HPXML::ResidentialTypeApartment, HPXML::ResidentialTypeSFA].include?(hpxml_bldg.building_construction.residential_facility_type)
tot_cb_area, ext_cb_area = hpxml_bldg.compartmentalization_boundary_areas()
infil_measurement.a_ext = (ext_cb_area / tot_cb_area).round(5)
infil_measurement.a_ext_isdefaulted = true
end
end
end

def self.apply_roofs(hpxml_bldg)
hpxml_bldg.roofs.each do |roof|
if roof.azimuth.nil?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
<sch:pattern>
<sch:title>[Roof]</sch:title>
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Enclosure/h:Roofs/h:Roof'>
<sch:assert role='ERROR' test='count(h:InteriorAdjacentTo) = 1'>Expected 1 element(s) for xpath: InteriorAdjacentTo</sch:assert> <!-- See [RoofType=AdjacentToVentedAttic] -->
<sch:assert role='ERROR' test='count(h:InteriorAdjacentTo) = 1'>Expected 1 element(s) for xpath: InteriorAdjacentTo</sch:assert> <!-- See [RoofType=AdjacentToVentedAttic] or [RoofType=AdjacentToUnventedAttic] -->
<sch:assert role='ERROR' test='h:InteriorAdjacentTo[text()="attic - vented" or text()="attic - unvented" or text()="conditioned space" or text()="garage"] or not(h:InteriorAdjacentTo)'>Expected InteriorAdjacentTo to be 'attic - vented' or 'attic - unvented' or 'conditioned space' or 'garage'</sch:assert>
<sch:assert role='ERROR' test='count(h:Area) = 1'>Expected 1 element(s) for xpath: Area</sch:assert>
<sch:assert role='ERROR' test='count(h:Azimuth) + count(h:Orientation) &gt;= 0'>Expected 0 or more element(s) for xpath: Azimuth | Orientation</sch:assert>
Expand All @@ -472,7 +472,14 @@
<sch:assert role='ERROR' test='count(../../h:Attics/h:Attic[h:AtticType/h:Attic[h:Vented="true"]]/h:VentilationRate[h:UnitofMeasure="SLA" or h:UnitofMeasure="ACHnatural"]/h:Value) &lt;= 1'>Expected 0 or 1 element(s) for xpath: ../../Attics/Attic[AtticType/Attic[Vented="true"]]/VentilationRate[UnitofMeasure="SLA" or UnitofMeasure="ACHnatural"]/Value</sch:assert>
</sch:rule>
</sch:pattern>


<sch:pattern>
<sch:title>[RoofType=AdjacentToUnventedAttic]</sch:title>
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Enclosure/h:Roofs/h:Roof[h:InteriorAdjacentTo="attic - unvented"]'>
<sch:assert role='ERROR' test='count(../../h:Attics/h:Attic[h:AtticType/h:Attic[h:Vented="false"]]/h:WithinInfiltrationVolume) &lt;= 1'>Expected 0 or 1 element(s) for xpath: ../../Attics/Attic[AtticType/Attic[Vented="false"]]/WithinInfiltrationVolume</sch:assert>
</sch:rule>
</sch:pattern>

<sch:pattern>
<sch:title>[Roof_RadiantBarrier]</sch:title>
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Enclosure/h:Roofs/h:Roof[h:RadiantBarrier="true"]'>
Expand Down Expand Up @@ -531,7 +538,7 @@
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Enclosure/h:FoundationWalls/h:FoundationWall'>
<sch:assert role='ERROR' test='count(h:ExteriorAdjacentTo) = 1'>Expected 1 element(s) for xpath: ExteriorAdjacentTo</sch:assert>
<sch:assert role='ERROR' test='h:ExteriorAdjacentTo[text()="ground" or text()="basement - conditioned" or text()="basement - unconditioned" or text()="crawlspace - vented" or text()="crawlspace - unvented" or text()="crawlspace - conditioned" or text()="garage" or text()="other housing unit" or text()="other heated space" or text()="other multifamily buffer space" or text()="other non-freezing space"] or not(h:ExteriorAdjacentTo)'>Expected ExteriorAdjacentTo to be 'ground' or 'basement - conditioned' or 'basement - unconditioned' or 'crawlspace - vented' or 'crawlspace - unvented' or 'crawlspace - conditioned' or 'garage' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space'</sch:assert>
<sch:assert role='ERROR' test='count(h:InteriorAdjacentTo) = 1'>Expected 1 element(s) for xpath: InteriorAdjacentTo</sch:assert> <!-- [FoundationWallType=AdjacentToVentedCrawl] -->
<sch:assert role='ERROR' test='count(h:InteriorAdjacentTo) = 1'>Expected 1 element(s) for xpath: InteriorAdjacentTo</sch:assert> <!-- [FoundationWallType=AdjacentToVentedCrawl] or [FoundationWallType=AdjacentToUnventedCrawl] or [FoundationWallType=AdjacentToUncondBasement] -->
<sch:assert role='ERROR' test='h:InteriorAdjacentTo[text()="basement - conditioned" or text()="basement - unconditioned" or text()="crawlspace - vented" or text()="crawlspace - unvented" or text()="crawlspace - conditioned" or text()="garage"] or not(h:InteriorAdjacentTo)'>Expected InteriorAdjacentTo to be 'basement - conditioned' or 'basement - unconditioned' or 'crawlspace - vented' or 'crawlspace - unvented' or 'crawlspace - conditioned' or 'garage'</sch:assert>
<sch:assert role='ERROR' test='count(h:Type) &lt;= 1'>Expected 0 or 1 element(s) for xpath: Type</sch:assert>
<sch:assert role='ERROR' test='h:Type[text()="solid concrete" or text()="concrete block" or text()="concrete block foam core" or text()="concrete block vermiculite core" or text()="concrete block perlite core" or text()="concrete block solid core" or text()="double brick" or text()="wood"] or not(h:Type)'>Expected Type to be 'solid concrete' or 'concrete block' or 'concrete block foam core' or 'concrete block vermiculite core' or 'concrete block perlite core' or 'concrete block solid core' or 'double brick' or 'wood'</sch:assert>
Expand Down Expand Up @@ -561,6 +568,20 @@
</sch:rule>
</sch:pattern>

<sch:pattern>
<sch:title>[FoundationWallType=AdjacentToUnventedCrawl]</sch:title>
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Enclosure/h:FoundationWalls/h:FoundationWall[h:InteriorAdjacentTo="crawlspace - unvented"]'>
<sch:assert role='ERROR' test='count(../../h:Foundations/h:Foundation[h:FoundationType/h:Crawlspace[h:Vented="false"]]/h:WithinInfiltrationVolume) &lt;= 1'>Expected 0 or 1 element(s) for xpath: ../../Foundations/Foundation[FoundationType/Crawlspace[Vented="false"]]/WithinInfiltrationVolume</sch:assert>
</sch:rule>
</sch:pattern>

<sch:pattern>
<sch:title>[FoundationWallType=AdjacentToUncondBasement]</sch:title>
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Enclosure/h:FoundationWalls/h:FoundationWall[h:InteriorAdjacentTo="basement - unconditioned"]'>
<sch:assert role='ERROR' test='count(../../h:Foundations/h:Foundation[h:FoundationType/h:Basement[h:Conditioned="false"]]/h:WithinInfiltrationVolume) &lt;= 1'>Expected 0 or 1 element(s) for xpath: ../../Foundations/Foundation[FoundationType/Basement[Conditioned="false"]]/WithinInfiltrationVolume</sch:assert>
</sch:rule>
</sch:pattern>

<sch:pattern>
<sch:title>[FoundationWallInsulationLayer]</sch:title>
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Enclosure/h:FoundationWalls/h:FoundationWall/h:Insulation/h:Layer[h:InstallationType="continuous - exterior" or h:InstallationType="continuous - interior"]'>
Expand Down
66 changes: 47 additions & 19 deletions hpxml-measures/docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -887,38 +887,66 @@ The presence of a flue or chimney with combustion air from conditioned space can
HPXML Attics
************

If the dwelling unit has a vented attic, attic ventilation information can be optionally entered in ``/HPXML/Building/BuildingDetails/Enclosure/Attics/Attic[AtticType/Attic[Vented="true"]]/VentilationRate``.
If the dwelling unit has an unvented attic, additional information is entered in ``/HPXML/Building/BuildingDetails/Enclosure/Attics/Attic[AtticType/Attic[Vented="false"]]``.

================= ====== ===== =========== ======== ========== ==========================
Element Type Units Constraints Required Default Notes
================= ====== ===== =========== ======== ========== ==========================
``UnitofMeasure`` string See [#]_ No SLA Units for ventilation rate
``Value`` double > 0 No 1/300 [#]_ Value for ventilation rate
================= ====== ===== =========== ======== ========== ==========================
============================ ======= ===== =========== ======== ======= ===============================================
Element Type Units Constraints Required Default Notes
============================ ======= ===== =========== ======== ======= ===============================================
``WithinInfiltrationVolume`` boolean No false Included in the air infiltration measurement?
============================ ======= ===== =========== ======== ======= ===============================================

If the dwelling unit has a vented attic, additional information is entered in ``/HPXML/Building/BuildingDetails/Enclosure/Attics/Attic[AtticType/Attic[Vented="true"]]``.

================================= ====== ===== =========== ======== ========== ==========================
Element Type Units Constraints Required Default Notes
================================= ====== ===== =========== ======== ========== ==========================
``VentilationRate/UnitofMeasure`` string See [#]_ No SLA Units for ventilation rate
``VentilationRate/Value`` double > 0 No 1/300 [#]_ Value for ventilation rate
================================= ====== ===== =========== ======== ========== ==========================

.. [#] UnitofMeasure choices are "SLA" (specific leakage area) or "ACHnatural" (natural air changes per hour).
.. [#] Value default based on `ANSI/RESNET/ICC 301-2019 <https://codes.iccsafe.org/content/RESNET3012019P1>`_.
HPXML Foundations
*****************

If the dwelling unit has a vented crawlspace, crawlspace ventilation information can be optionally entered in ``/HPXML/Building/BuildingDetails/Enclosure/Foundations/Foundation[FoundationType/Crawlspace[Vented="true"]]/VentilationRate``.
If the dwelling unit has an unconditioned basement, additional information is entered in ``/HPXML/Building/BuildingDetails/Enclosure/Foundations/Foundation[FoundationType/Basement[Conditioned='false']]``.

================= ====== ===== =========== ======== ========== ==========================
Element Type Units Constraints Required Default Notes
================= ====== ===== =========== ======== ========== ==========================
``UnitofMeasure`` string See [#]_ No SLA Units for ventilation rate
``Value`` double > 0 No 1/150 [#]_ Value for ventilation rate
================= ====== ===== =========== ======== ========== ==========================
============================ ======= ===== =========== ======== ======= ===============================================
Element Type Units Constraints Required Default Notes
============================ ======= ===== =========== ======== ======= ===============================================
``WithinInfiltrationVolume`` boolean No false Included in the air infiltration measurement?
============================ ======= ===== =========== ======== ======= ===============================================

If the dwelling unit has an unvented crawlspace, additional information is entered in ``/HPXML/Building/BuildingDetails/Enclosure/Foundations/Foundation[FoundationType/Crawlspace[Vented='false']]``.

============================ ======= ===== =========== ======== ======= ===============================================
Element Type Units Constraints Required Default Notes
============================ ======= ===== =========== ======== ======= ===============================================
``WithinInfiltrationVolume`` boolean No false Included in the air infiltration measurement?
============================ ======= ===== =========== ======== ======= ===============================================

If the dwelling unit has a vented crawlspace, additional information is entered in ``/HPXML/Building/BuildingDetails/Enclosure/Foundations/Foundation[FoundationType/Crawlspace[Vented="true"]]``.

================================= ======= ===== =========== ======== ========== ==========================
Element Type Units Constraints Required Default Notes
================================= ======= ===== =========== ======== ========== ==========================
``VentilationRate/UnitofMeasure`` string See [#]_ No SLA Units for ventilation rate
``VentilationRate/Value`` double > 0 No 1/150 [#]_ Value for ventilation rate
================================= ======= ===== =========== ======== ========== ==========================

.. [#] UnitofMeasure only choice is "SLA" (specific leakage area).
.. [#] Value default based on `ANSI/RESNET/ICC 301-2019 <https://codes.iccsafe.org/content/RESNET3012019P1>`_.
If the dwelling has a manufactured home belly-and-wing foundation, whether a
skirt is present can be optionally entered in
``/HPXML/Building/BuildingDetails/Enclosure/Foundations/Foundation/FoundationType/BellyAndWing/SkirtPresent``.
The default, if that value is missing, is to assume there is a skirt present and
the floors above that foundation do not have exposure to the wind.
If the dwelling has a manufactured home belly-and-wing foundation, additional information is entered in ``/HPXML/Building/BuildingDetails/Enclosure/Foundations/Foundation/FoundationType/BellyAndWing``.

================================= ======= ===== =========== ======== ========== ==========================
Element Type Units Constraints Required Default Notes
================================= ======= ===== =========== ======== ========== ==========================
``SkirtPresent`` boolean No true Presence of foundation skirt [#]_
================================= ======= ===== =========== ======== ========== ==========================

.. [#] When a skirt is present, the floors above that foundation are modeled without exposure to wind.
HPXML Roofs
***********
Expand Down

0 comments on commit 3f5a4c0

Please sign in to comment.