Skip to content

Commit

Permalink
Merge pull request #1041 from NREL/cfis-airflow-fraction
Browse files Browse the repository at this point in the history
New CFIS `VentilationOnlyModeAirflowFraction` input
  • Loading branch information
shorowit authored Apr 19, 2022
2 parents 62f3722 + 80af636 commit 5c9b501
Show file tree
Hide file tree
Showing 13 changed files with 660 additions and 45 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ __New Features__
- Allows specifying a `StormWindow` element for windows/skylights; U-factors and SHGCs are automatically adjusted.
- Allows an optional `AirInfiltrationMeasurement/InfiltrationHeight` input.
- Allows an optional `Battery/UsableCapacity` input; now defaults to 0.9 x NominalCapacity (previously 0.8).
- For CFIS systems, allows an optional `extension/VentilationOnlyModeAirflowFraction` input to address duct losses during ventilation only mode.
- Adds support for shared hot water recirculation systems controlled by temperature.
- The `WaterFixturesUsageMultiplier` input now also applies to general water use internal gains and recirculation pump energy (for some control types).
- Relaxes requirement for `ConditionedFloorAreaServed` for air distribution systems; now only needed if duct surface areas not provided.
Expand Down
64 changes: 32 additions & 32 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.0</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>2a19d7d9-f4a4-4b5b-b8db-ba93dcdaa3d3</version_id>
<version_modified>20220415T140250Z</version_modified>
<version_id>01aaadd5-0fae-4ec3-b903-f4253a8a70a2</version_id>
<version_modified>20220418T214931Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -409,18 +409,6 @@
<usage_type>test</usage_type>
<checksum>2CB59B38</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>46EF98A6</checksum>
</file>
<file>
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>E1E3069B</checksum>
</file>
<file>
<filename>hpxml_schematron/HPXMLvalidator.xml</filename>
<filetype>xml</filetype>
Expand All @@ -439,24 +427,6 @@
<usage_type>test</usage_type>
<checksum>E276D4D3</checksum>
</file>
<file>
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>B291B794</checksum>
</file>
<file>
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>68EC4628</checksum>
</file>
<file>
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F45F8526</checksum>
</file>
<file>
<filename>version.rb</filename>
<filetype>rb</filetype>
Expand Down Expand Up @@ -528,5 +498,35 @@
<usage_type>resource</usage_type>
<checksum>3B95C662</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>22C49391</checksum>
</file>
<file>
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>23AC8D71</checksum>
</file>
<file>
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>7C662926</checksum>
</file>
<file>
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>7B807A24</checksum>
</file>
<file>
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>9CC1B4EF</checksum>
</file>
</files>
</measure>
9 changes: 5 additions & 4 deletions HPXMLtoOpenStudio/resources/airflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def self.apply(model, runner, weather, spaces, hpxml, cfa, nbeds,
# Apply ducts

duct_systems.each do |ducts, object|
apply_ducts(model, ducts, object)
apply_ducts(model, ducts, object, vent_fans_mech)
end

# Apply infiltration/ventilation
Expand Down Expand Up @@ -597,7 +597,7 @@ def self.initialize_fan_objects(model, osm_object)
end
end

def self.apply_ducts(model, ducts, object)
def self.apply_ducts(model, ducts, object, vent_fans_mech)
ducts.each do |duct|
duct.rvalue = get_duct_insulation_rvalue(duct.rvalue, duct.side) # Convert from nominal to actual R-value
if not duct.loc_schedule.nil?
Expand Down Expand Up @@ -1062,10 +1062,11 @@ def self.apply_ducts(model, ducts, object)

if @cfis_airloop.values.include? object

# Calculate CFIS duct losses
# Calculate additional CFIS duct losses during fan-only mode
cfis_id = @cfis_airloop.key(object)
vent_mech = vent_fans_mech.select { |vfm| vfm.id == cfis_id }[0]
duct_program.addLine("If #{@cfis_f_damper_extra_open_var[cfis_id].name} > 0")
duct_program.addLine(" Set cfis_m3s = (#{@fan_mfr_max_var[object].name} / 1.16097654)") # Density of 1.16097654 was back calculated using E+ results
duct_program.addLine(" Set cfis_m3s = (#{@fan_mfr_max_var[object].name} * #{vent_mech.cfis_vent_mode_airflow_fraction} / 1.16097654)") # Density of 1.16097654 was back calculated using E+ results
duct_program.addLine(" Set #{@fan_rtf_var[object].name} = #{@cfis_f_damper_extra_open_var[cfis_id].name}") # Need to use global vars to sync duct_program and infiltration program of different calling points
duct_program.addLine(" Set #{ah_vfr_var.name} = #{@fan_rtf_var[object].name}*cfis_m3s")
duct_program.addLine(" Set rho_in = (@RhoAirFnPbTdbW #{@pbar_sensor.name} #{@tin_sensor.name} #{@win_sensor.name})")
Expand Down
4 changes: 3 additions & 1 deletion HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4208,7 +4208,7 @@ class VentilationFan < BaseElement
:is_shared_system, :in_unit_flow_rate, :fraction_recirculation, :used_for_garage_ventilation,
:preheating_fuel, :preheating_efficiency_cop, :preheating_fraction_load_served, :precooling_fuel,
:precooling_efficiency_cop, :precooling_fraction_load_served, :calculated_flow_rate,
:delivered_ventilation]
:delivered_ventilation, :cfis_vent_mode_airflow_fraction]
attr_accessor(*ATTRS)

def distribution_system
Expand Down Expand Up @@ -4386,6 +4386,7 @@ def to_oga(doc)
end
XMLHelper.add_extension(ventilation_fan, 'FlowRateNotTested', @flow_rate_not_tested, :boolean) unless @flow_rate_not_tested.nil?
XMLHelper.add_extension(ventilation_fan, 'FanPowerDefaulted', @fan_power_defaulted, :boolean) unless @fan_power_defaulted.nil?
XMLHelper.add_extension(ventilation_fan, 'VentilationOnlyModeAirflowFraction', @cfis_vent_mode_airflow_fraction, :float, @cfis_vent_mode_airflow_fraction_isdefaulted) unless @cfis_vent_mode_airflow_fraction.nil?
end

def from_oga(ventilation_fan)
Expand Down Expand Up @@ -4422,6 +4423,7 @@ def from_oga(ventilation_fan)
@precooling_fraction_load_served = XMLHelper.get_value(ventilation_fan, 'extension/PreCooling/FractionVentilationCoolLoadServed', :float)
@flow_rate_not_tested = XMLHelper.get_value(ventilation_fan, 'extension/FlowRateNotTested', :boolean)
@fan_power_defaulted = XMLHelper.get_value(ventilation_fan, 'extension/FanPowerDefaulted', :boolean)
@cfis_vent_mode_airflow_fraction = XMLHelper.get_value(ventilation_fan, 'extension/VentilationOnlyModeAirflowFraction', :float)
end
end

Expand Down
4 changes: 4 additions & 0 deletions HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,10 @@ def self.apply_ventilation_fans(hpxml, infil_measurements, weather, cfa, nbeds)
vent_fan.fan_power = (vent_fan.flow_rate * Airflow.get_default_mech_vent_fan_power(vent_fan)).round(1)
vent_fan.fan_power_isdefaulted = true
end
if vent_fan.cfis_vent_mode_airflow_fraction.nil? && (vent_fan.fan_type == HPXML::MechVentTypeCFIS)
vent_fan.cfis_vent_mode_airflow_fraction = 1.0
vent_fan.cfis_vent_mode_airflow_fraction_isdefaulted = true
end
end

# Default kitchen fan
Expand Down
3 changes: 3 additions & 0 deletions HPXMLtoOpenStudio/resources/hpxml_schematron/EPvalidator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,9 @@
<sch:rule context='/h:HPXML/h:Building/h:BuildingDetails/h:Systems/h:MechanicalVentilation/h:VentilationFans/h:VentilationFan[h:UsedForWholeBuildingVentilation="true" and h:FanType="central fan integrated supply"]'>
<sch:assert role='ERROR' test='count(h:AttachedToHVACDistributionSystem) = 1'>Expected 1 element(s) for xpath: AttachedToHVACDistributionSystem</sch:assert>
<sch:assert role='ERROR' test='count(h:IsSharedSystem[text()="true"]) = 0'>Expected 0 element(s) for xpath: IsSharedSystem[text()="true"]</sch:assert>
<sch:assert role='ERROR' test='count(h:extension/h:VentilationOnlyModeAirflowFraction) &lt;= 1'>Expected 0 or 1 element(s) for xpath: extension/VentilationOnlyModeAirflowFraction</sch:assert>
<sch:assert role='ERROR' test='number(h:extension/h:VentilationOnlyModeAirflowFraction) &gt;= 0 or not(h:extension/h:VentilationOnlyModeAirflowFraction)'>Expected extension/VentilationOnlyModeAirflowFraction to be greater than or equal to 0</sch:assert>
<sch:assert role='ERROR' test='number(h:extension/h:VentilationOnlyModeAirflowFraction) &lt;= 1 or not(h:extension/h:VentilationOnlyModeAirflowFraction)'>Expected extension/VentilationOnlyModeAirflowFraction to be less than or equal to 1</sch:assert>
</sch:rule>
</sch:pattern>

Expand Down
14 changes: 11 additions & 3 deletions HPXMLtoOpenStudio/tests/test_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1788,17 +1788,19 @@ def test_mech_ventilation_fans
vent_fan.is_shared_system = false
vent_fan.hours_in_operation = 12.0
vent_fan.fan_power = 12.5
vent_fan.cfis_vent_mode_airflow_fraction = 0.5
XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
hpxml_default = _test_measure()
_test_default_mech_vent_values(hpxml_default, false, 12.0, 12.5, 330)
_test_default_mech_vent_values(hpxml_default, false, 12.0, 12.5, 330, 0.5)

# Test defaults w/ CFIS
vent_fan.is_shared_system = nil
vent_fan.hours_in_operation = nil
vent_fan.fan_power = nil
vent_fan.cfis_vent_mode_airflow_fraction = nil
XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
hpxml_default = _test_measure()
_test_default_mech_vent_values(hpxml_default, false, 8.0, 165.0, 330)
_test_default_mech_vent_values(hpxml_default, false, 8.0, 165.0, 330, 1.0)

# Test inputs not overridden by defaults w/ ERV
hpxml = _create_hpxml('base-mechvent-erv.xml')
Expand Down Expand Up @@ -3649,13 +3651,19 @@ def _test_default_duct_values(hpxml, supply_locations, return_locations, supply_
end
end

def _test_default_mech_vent_values(hpxml, is_shared_system, hours_in_operation, fan_power, flow_rate)
def _test_default_mech_vent_values(hpxml, is_shared_system, hours_in_operation, fan_power, flow_rate,
cfis_vent_mode_airflow_fraction = nil)
vent_fan = hpxml.ventilation_fans.select { |f| f.used_for_whole_building_ventilation }[0]

assert_equal(is_shared_system, vent_fan.is_shared_system)
assert_equal(hours_in_operation, vent_fan.hours_in_operation)
assert_in_epsilon(fan_power, vent_fan.fan_power, 0.01)
assert_in_epsilon(flow_rate, vent_fan.rated_flow_rate.to_f + vent_fan.calculated_flow_rate.to_f + vent_fan.tested_flow_rate.to_f + vent_fan.delivered_ventilation.to_f, 0.01)
if cfis_vent_mode_airflow_fraction.nil?
assert_nil(vent_fan.cfis_vent_mode_airflow_fraction)
else
assert_equal(cfis_vent_mode_airflow_fraction, vent_fan.cfis_vent_mode_airflow_fraction)
end
end

def _test_default_kitchen_fan_values(hpxml, quantity, flow_rate, hours_in_operation, fan_power, start_hour)
Expand Down
15 changes: 10 additions & 5 deletions docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1854,13 +1854,18 @@ If an energy recovery ventilator system is specified, additional information is

If a central fan integrated supply system is specified, additional information is entered in ``VentilationFan``.

==================================== ====== ===== =========== ======== ======= ==================================
Element Type Units Constraints Required Default Notes
==================================== ====== ===== =========== ======== ======= ==================================
``AttachedToHVACDistributionSystem`` idref See [#]_ Yes ID of attached distribution system
==================================== ====== ===== =========== ======== ======= ==================================
================================================ ====== ===== =========== ======== ======= ==================================
Element Type Units Constraints Required Default Notes
================================================ ====== ===== =========== ======== ======= ==================================
``AttachedToHVACDistributionSystem`` idref See [#]_ Yes ID of attached distribution system
``extension/VentilationOnlyModeAirflowFraction`` double 0 - 1 No 1.0 Blower airflow rate fraction during ventilation only mode [#]_
================================================ ====== ===== =========== ======== ======= ==================================

.. [#] HVACDistribution type cannot be HydronicDistribution.
.. [#] Blower airflow rate when operating in ventilation only mode (i.e., not heating or cooling mode), as a fraction of the maximum blower airflow rate.
This value will depend on whether the blower fan can operate at reduced airflow rates during ventilation only operation.
It is used to determine how much conditioned air is recirculated through ducts during ventilation only operation, resulting in additional duct losses.
A value of zero will result in no conditioned air recirculation, and thus no additional duct losses.
**Shared System**

Expand Down
3 changes: 3 additions & 0 deletions tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def create_hpxmls
'base-mechvent-balanced.xml' => 'base.xml',
'base-mechvent-bath-kitchen-fans.xml' => 'base.xml',
'base-mechvent-cfis.xml' => 'base.xml',
'base-mechvent-cfis-airflow-fraction-zero.xml' => 'base-mechvent-cfis.xml',
'base-mechvent-cfis-dse.xml' => 'base-hvac-dse.xml',
'base-mechvent-cfis-evap-cooler-only-ducted.xml' => 'base-hvac-evap-cooler-only-ducted.xml',
'base-mechvent-erv.xml' => 'base.xml',
Expand Down Expand Up @@ -4303,6 +4304,8 @@ def apply_hpxml_modification(hpxml_file, hpxml)
sensible_recovery_efficiency: 0.72,
fan_power: 7.5,
used_for_whole_building_ventilation: true)
elsif ['base-mechvent-cfis-airflow-fraction-zero.xml'].include? hpxml_file
hpxml.ventilation_fans[0].cfis_vent_mode_airflow_fraction = 0.0
end

# ---------------- #
Expand Down
Loading

0 comments on commit 5c9b501

Please sign in to comment.