Skip to content

Commit

Permalink
Merge commit 'aaf1a634d60b29f0fcff2360d6901c56f243067d' into ansi_301…
Browse files Browse the repository at this point in the history
…_2022_airflow

# Conflicts:
#	hpxml-measures/HPXMLtoOpenStudio/measure.xml
#	hpxml-measures/HPXMLtoOpenStudio/resources/airflow.rb
#	hpxml-measures/workflow/tests/base_results/results_sizing.csv
#	hpxml-measures/workflow/tests/base_results/results_workflow_simulations1.csv
#	hpxml-measures/workflow/tests/base_results/results_workflow_simulations1_bills.csv
#	hpxml-measures/workflow/tests/base_results/results_workflow_simulations2.csv
#	hpxml-measures/workflow/tests/base_results/results_workflow_simulations2_bills.csv
  • Loading branch information
shorowit committed Mar 6, 2024
2 parents 4f69f5c + aaf1a63 commit 47267f4
Show file tree
Hide file tree
Showing 7 changed files with 709 additions and 698 deletions.
38 changes: 19 additions & 19 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>5f3c2332-9957-4548-ae77-3b19a379346f</version_id>
<version_modified>2024-02-23T16:42:12Z</version_modified>
<version_id>73a60fd3-fafd-41d8-a5eb-f95cb12f6cfe</version_id>
<version_modified>2024-03-06T01:32:05Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -142,13 +142,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>3913AEF2</checksum>
<checksum>ECAF5AA7</checksum>
</file>
<file>
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F698708D</checksum>
<checksum>FEDFA435</checksum>
</file>
<file>
<filename>battery.rb</filename>
Expand Down Expand Up @@ -304,19 +304,19 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>C903F7AF</checksum>
<checksum>758D1948</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>C0AC6507</checksum>
<checksum>F5FE95AC</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
<filetype>xsd</filetype>
<usage_type>resource</usage_type>
<checksum>CAF0E2AF</checksum>
<checksum>5F5A5A0A</checksum>
</file>
<file>
<filename>hpxml_schema/README.md</filename>
Expand All @@ -328,7 +328,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>F1449F2F</checksum>
<checksum>1407BC14</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand All @@ -340,13 +340,13 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>BE071714</checksum>
<checksum>3C0DF198</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>222F3FD7</checksum>
<checksum>903730A2</checksum>
</file>
<file>
<filename>lighting.rb</filename>
Expand All @@ -358,7 +358,7 @@
<filename>location.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>03FF5192</checksum>
<checksum>AC8FD8C6</checksum>
</file>
<file>
<filename>materials.rb</filename>
Expand Down Expand Up @@ -394,7 +394,7 @@
<filename>psychrometrics.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>203B4A64</checksum>
<checksum>B81E536D</checksum>
</file>
<file>
<filename>pv.rb</filename>
Expand Down Expand Up @@ -556,13 +556,13 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>2A86DD12</checksum>
<checksum>70589E67</checksum>
</file>
<file>
<filename>weather.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>6A61B98A</checksum>
<checksum>EA6C1204</checksum>
</file>
<file>
<filename>xmlhelper.rb</filename>
Expand All @@ -580,7 +580,7 @@
<filename>in.schedules.csv</filename>
<filetype>csv</filetype>
<usage_type>test</usage_type>
<checksum>615A7F1F</checksum>
<checksum>6244F711</checksum>
</file>
<file>
<filename>test_airflow.rb</filename>
Expand All @@ -598,7 +598,7 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>F30127CB</checksum>
<checksum>C0F759DF</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
Expand Down Expand Up @@ -628,7 +628,7 @@
<filename>test_hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>EC5BC51B</checksum>
<checksum>CBBF7A06</checksum>
</file>
<file>
<filename>test_lighting.rb</filename>
Expand Down Expand Up @@ -670,7 +670,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>DE60C819</checksum>
<checksum>9B783726</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand All @@ -682,7 +682,7 @@
<filename>test_weather.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>8CA4439B</checksum>
<checksum>156AAC98</checksum>
</file>
<file>
<filename>util.rb</filename>
Expand Down
15 changes: 8 additions & 7 deletions hpxml-measures/HPXMLtoOpenStudio/resources/airflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def self.apply(model, runner, weather, spaces, hpxml_header, hpxml_bldg, cfa, nb
infil_values[:volume], infil_values[:height], unavailable_periods)
apply_infiltration_and_ventilation_fans(model, weather, hpxml_bldg.site, vent_fans_mech, vent_fans_kitchen, vent_fans_bath, vented_dryers,
has_flue_chimney_in_cond_space, conditioned_ach50, conditioned_const_ach, infil_values[:volume], infil_values[:height],
vented_attic, vented_crawl, clg_ssn_sensor, schedules_file, vent_fans_cfis_suppl, unavailable_periods)
vented_attic, vented_crawl, clg_ssn_sensor, schedules_file, vent_fans_cfis_suppl, unavailable_periods, hpxml_bldg.elevation)
end

def self.get_default_fraction_of_windows_operable()
Expand Down Expand Up @@ -1775,7 +1775,7 @@ def self.calculate_precond_loads(model, infil_program, vent_mech_preheat, vent_m

def self.apply_infiltration_ventilation_to_conditioned(model, site, vent_fans_mech, conditioned_ach50, conditioned_const_ach, infil_volume, infil_height, weather,
vent_fans_kitchen, vent_fans_bath, vented_dryers, has_flue_chimney_in_cond_space, clg_ssn_sensor, schedules_file,
vent_fans_cfis_suppl, unavailable_periods)
vent_fans_cfis_suppl, unavailable_periods, elevation)
# Categorize fans into different types
vent_mech_preheat = vent_fans_mech.select { |vent_mech| (not vent_mech.preheating_efficiency_cop.nil?) }
vent_mech_precool = vent_fans_mech.select { |vent_mech| (not vent_mech.precooling_efficiency_cop.nil?) }
Expand Down Expand Up @@ -1821,7 +1821,7 @@ def self.apply_infiltration_ventilation_to_conditioned(model, site, vent_fans_me
infil_program.setName(Constants.ObjectNameInfiltration + ' program')

# Calculate infiltration without adjustment by ventilation
apply_infiltration_to_conditioned(site, conditioned_ach50, conditioned_const_ach, infil_program, weather, has_flue_chimney_in_cond_space, infil_volume, infil_height)
apply_infiltration_to_conditioned(site, conditioned_ach50, conditioned_const_ach, infil_program, weather, has_flue_chimney_in_cond_space, infil_volume, infil_height, elevation)

# Common variable and load actuators across multiple mech vent calculations, create only once
fan_sens_load_actuator, fan_lat_load_actuator = setup_mech_vent_vars_actuators(model: model, program: infil_program)
Expand Down Expand Up @@ -1859,7 +1859,7 @@ def self.apply_infiltration_ventilation_to_conditioned(model, site, vent_fans_me

def self.apply_infiltration_and_ventilation_fans(model, weather, site, vent_fans_mech, vent_fans_kitchen, vent_fans_bath, vented_dryers,
has_flue_chimney_in_cond_space, conditioned_ach50, conditioned_const_ach, infil_volume, infil_height, vented_attic,
vented_crawl, clg_ssn_sensor, schedules_file, vent_fans_cfis_suppl, unavailable_periods)
vented_crawl, clg_ssn_sensor, schedules_file, vent_fans_cfis_suppl, unavailable_periods, elevation)

# Infiltration for unconditioned spaces
apply_infiltration_to_garage(model, site, conditioned_ach50)
Expand All @@ -1872,17 +1872,18 @@ def self.apply_infiltration_and_ventilation_fans(model, weather, site, vent_fans
# Infiltration/ventilation for conditioned space
apply_infiltration_ventilation_to_conditioned(model, site, vent_fans_mech, conditioned_ach50, conditioned_const_ach, infil_volume, infil_height, weather,
vent_fans_kitchen, vent_fans_bath, vented_dryers, has_flue_chimney_in_cond_space, clg_ssn_sensor, schedules_file,
vent_fans_cfis_suppl, unavailable_periods)
vent_fans_cfis_suppl, unavailable_periods, elevation)
end

def self.apply_infiltration_to_conditioned(site, conditioned_ach50, conditioned_const_ach, infil_program, weather, has_flue_chimney_in_cond_space, infil_volume, infil_height)
def self.apply_infiltration_to_conditioned(site, conditioned_ach50, conditioned_const_ach, infil_program, weather, has_flue_chimney_in_cond_space, infil_volume, infil_height, elevation)
site_ap = site.additional_properties

if conditioned_ach50.to_f > 0
# Based on "Field Validation of Algebraic Equations for Stack and
# Wind Driven Air Infiltration Calculations" by Walker and Wilson (1998)

outside_air_density = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * UnitConversions.convert(weather.data.AnnualAvgDrybulb, 'F', 'R'))
p_atm = UnitConversions.convert(Psychrometrics.Pstd_fZ(elevation), 'psi', 'atm')
outside_air_density = UnitConversions.convert(p_atm, 'atm', 'Btu/ft^3') / (Gas.Air.r * UnitConversions.convert(weather.data.AnnualAvgDrybulb, 'F', 'R'))

n_i = InfilPressureExponent
conditioned_sla = get_infiltration_SLA_from_ACH50(conditioned_ach50, n_i, @cfa, infil_volume) # Calculate SLA
Expand Down
Loading

0 comments on commit 47267f4

Please sign in to comment.