Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
Browse files Browse the repository at this point in the history
…o whole_building_common_spaces
  • Loading branch information
yzhou601 committed Oct 24, 2024
2 parents 6c065d6 + 9e0f85f commit 6cad724
Show file tree
Hide file tree
Showing 20 changed files with 1,385 additions and 114 deletions.
6 changes: 4 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ __New Features__
- Updates relationship between number of bedrooms and number of occupants to use RECS 2020 instead of RECS 2015.
- Allows optional `HeatingCapacity` and `BackupHeatingCapacity` inputs for heat pump water heaters (HPWHs).
- Central Fan Integrated Supply (CFIS) mechanical ventilation enhancements:
- CFIS systems without automatic flow control of outdoor air (`CFISControls/HasOutdoorAirControl=false`).
- CFIS systems with no strategy to meet remainder of ventilation target (`CFISControls/AdditionalRuntimeOperatingMode="none"`).
- Allows CFIS systems without automatic flow control of outdoor air (`CFISControls/HasOutdoorAirControl=false`).
- Allows CFIS systems with no strategy to meet remainder of ventilation target (`CFISControls/AdditionalRuntimeOperatingMode="none"`).
- Allows CFIS systems with supplemental fans that run simultaneously with the air handler (`CFISControls/extension/SupplementalFanRunsWithAirHandlerFan=true`).
- Allows CFIS systems with timer control, in which ventilation operation occurs at a fixed interval (`CFISControls/extension/ControlType="timer"`).
- HVAC Manual J design load and sizing calculations:
- Adds optional `DistributionSystemType/AirDistribution/extension/ManualJInputs/BlowerFanHeatBtuh` input.
- Adds optional `DistributionSystemType/HydronicDistribution/extension/ManualJInputs/HotWaterPipingBtuh` input.
Expand Down
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>330ddc2b-0773-44f2-b488-c7f387956956</version_id>
<version_modified>2024-10-24T02:50: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 @@ -189,7 +189,7 @@
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>D2A99996</checksum>
<checksum>F2AD4FE1</checksum>
</file>
<file>
<filename>battery.rb</filename>
Expand Down Expand Up @@ -327,7 +327,7 @@
<filename>defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>E91CA811</checksum>
<checksum>77A2949D</checksum>
</file>
<file>
<filename>energyplus.rb</filename>
Expand Down Expand Up @@ -357,7 +357,7 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>3A4E58D1</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>F6518099</checksum>
<checksum>94902574</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand Down Expand Up @@ -651,7 +651,7 @@
<filename>test_airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>D1425F08</checksum>
<checksum>D4E42045</checksum>
</file>
<file>
<filename>test_battery.rb</filename>
Expand All @@ -663,7 +663,7 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>9D489184</checksum>
<checksum>1531AC7C</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
Expand Down Expand Up @@ -735,7 +735,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>B725AA13</checksum>
<checksum>AB713A99</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand Down
141 changes: 85 additions & 56 deletions HPXMLtoOpenStudio/resources/airflow.rb

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions HPXMLtoOpenStudio/resources/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,14 @@ def self.apply_ventilation_fans(hpxml_bldg, weather, eri_version)
vent_fan.cfis_vent_mode_airflow_fraction = 1.0
vent_fan.cfis_vent_mode_airflow_fraction_isdefaulted = true
end
if vent_fan.cfis_supplemental_fan_runs_with_air_handler_fan.nil? && (vent_fan.cfis_addtl_runtime_operating_mode == HPXML::CFISModeSupplementalFan)
vent_fan.cfis_supplemental_fan_runs_with_air_handler_fan = false
vent_fan.cfis_supplemental_fan_runs_with_air_handler_fan_isdefaulted = true
end
if vent_fan.cfis_control_type.nil?
vent_fan.cfis_control_type = HPXML::CFISControlTypeOptimized
vent_fan.cfis_control_type_isdefaulted = true
end
end

# Default kitchen fan
Expand Down
80 changes: 44 additions & 36 deletions HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class HPXML < Object
CertificationEnergyStar = 'Energy Star'
ClothesDryerControlTypeMoisture = 'moisture'
ClothesDryerControlTypeTimer = 'timer'
CFISControlTypeOptimized = 'optimized'
CFISControlTypeTimer = 'timer'
CFISModeAirHandler = 'air handler fan'
CFISModeNone = 'none'
CFISModeSupplementalFan = 'supplemental fan'
Expand Down Expand Up @@ -8049,41 +8051,43 @@ def from_doc(building)

# Object for /HPXML/Building/BuildingDetails/Systems/MechanicalVentilation/VentilationFans/VentilationFan.
class VentilationFan < BaseElement
ATTRS = [:id, # [String] SystemIdentifier/@id
:count, # [Integer] Count
:fan_type, # [String] FanType (HPXML::MechVentTypeXXX)
:cfis_has_outdoor_air_control, # [Boolean] CFISControls/HasOutdoorAirControl
:cfis_addtl_runtime_operating_mode, # [String] CFISControls/AdditionalRuntimeOperatingMode (HPXML::CFISModeXXX)
:cfis_supplemental_fan_idref, # [String] CFISControls/SupplementalFan/@idref
:rated_flow_rate, # [Double] RatedFlowRate (cfm)
:calculated_flow_rate, # [Double] CalculatedFlowRate (cfm)
:tested_flow_rate, # [Double] TestedFlowRate (cfm)
:hours_in_operation, # [Double] HoursInOperation (hrs/day)
:delivered_ventilation, # [Double] DeliveredVentilation (cfm)
:fan_location, # [String] FanLocation (HPXML::LocationXXX)
:used_for_local_ventilation, # [Boolean] UsedForLocalVentilation
:used_for_whole_building_ventilation, # [Boolean] UsedForWholeBuildingVentilation
:used_for_seasonal_cooling_load_reduction, # [Boolean] UsedForSeasonalCoolingLoadReduction
:used_for_garage_ventilation, # [Boolean] UsedForGarageVentilation
:is_shared_system, # [Boolean] IsSharedSystem
:fraction_recirculation, # [Double] FractionRecirculation (frac)
:total_recovery_efficiency, # [Double] TotalRecoveryEfficiency (frac)
:sensible_recovery_efficiency, # [Double] SensibleRecoveryEfficiency (frac)
:total_recovery_efficiency_adjusted, # [Double] AdjustedTotalRecoveryEfficiency (frac)
:sensible_recovery_efficiency_adjusted, # [Double] AdjustedSensibleRecoveryEfficiency (frac)
:fan_power, # [Double] FanPower (W)
:distribution_system_idref, # [String] AttachedToHVACDistributionSystem/@idref
:start_hour, # [Integer] extension/StartHour
:in_unit_flow_rate, # [Double] extension/InUnitFlowRate (cfm)
:preheating_fuel, # [String] extension/PreHeating/Fuel (HPXML::FuelTypeXXX)
:preheating_efficiency_cop, # [Double] extension/PreHeating/AnnualHeatingEfficiency[Units="COP"]/Value (W/W)
:preheating_fraction_load_served, # [Double] extension/PreHeating/FractionVentilationHeatLoadServed (frac)
:precooling_fuel, # [String] extension/PreCooling/Fuel (HPXML::FuelTypeXXX)
:precooling_efficiency_cop, # [Double] extension/PreCooling/AnnualCoolingEfficiency[Units="COP"]/Value (W/W)
:precooling_fraction_load_served, # [Double] extension/PreCooling/FractionVentilationCoolLoadServed (frac)
:flow_rate_not_tested, # [Boolean] extension/FlowRateNotTested
:fan_power_defaulted, # [Boolean] extension/FanPowerDefaulted
:cfis_vent_mode_airflow_fraction] # [Double] extension/VentilationOnlyModeAirflowFraction (frac)
ATTRS = [:id, # [String] SystemIdentifier/@id
:count, # [Integer] Count
:fan_type, # [String] FanType (HPXML::MechVentTypeXXX)
:cfis_has_outdoor_air_control, # [Boolean] CFISControls/HasOutdoorAirControl
:cfis_addtl_runtime_operating_mode, # [String] CFISControls/AdditionalRuntimeOperatingMode (HPXML::CFISModeXXX)
:cfis_supplemental_fan_idref, # [String] CFISControls/SupplementalFan/@idref
:cfis_control_type, # [String] CFISControls/extension/ControlType (HPXML::CFISControlTypeXXX)
:cfis_supplemental_fan_runs_with_air_handler_fan, # [Boolean] CFISControls/extension/SupplementalFanRunsWithAirHandlerFan
:rated_flow_rate, # [Double] RatedFlowRate (cfm)
:calculated_flow_rate, # [Double] CalculatedFlowRate (cfm)
:tested_flow_rate, # [Double] TestedFlowRate (cfm)
:hours_in_operation, # [Double] HoursInOperation (hrs/day)
:delivered_ventilation, # [Double] DeliveredVentilation (cfm)
:fan_location, # [String] FanLocation (HPXML::LocationXXX)
:used_for_local_ventilation, # [Boolean] UsedForLocalVentilation
:used_for_whole_building_ventilation, # [Boolean] UsedForWholeBuildingVentilation
:used_for_seasonal_cooling_load_reduction, # [Boolean] UsedForSeasonalCoolingLoadReduction
:used_for_garage_ventilation, # [Boolean] UsedForGarageVentilation
:is_shared_system, # [Boolean] IsSharedSystem
:fraction_recirculation, # [Double] FractionRecirculation (frac)
:total_recovery_efficiency, # [Double] TotalRecoveryEfficiency (frac)
:sensible_recovery_efficiency, # [Double] SensibleRecoveryEfficiency (frac)
:total_recovery_efficiency_adjusted, # [Double] AdjustedTotalRecoveryEfficiency (frac)
:sensible_recovery_efficiency_adjusted, # [Double] AdjustedSensibleRecoveryEfficiency (frac)
:fan_power, # [Double] FanPower (W)
:distribution_system_idref, # [String] AttachedToHVACDistributionSystem/@idref
:start_hour, # [Integer] extension/StartHour
:in_unit_flow_rate, # [Double] extension/InUnitFlowRate (cfm)
:preheating_fuel, # [String] extension/PreHeating/Fuel (HPXML::FuelTypeXXX)
:preheating_efficiency_cop, # [Double] extension/PreHeating/AnnualHeatingEfficiency[Units="COP"]/Value (W/W)
:preheating_fraction_load_served, # [Double] extension/PreHeating/FractionVentilationHeatLoadServed (frac)
:precooling_fuel, # [String] extension/PreCooling/Fuel (HPXML::FuelTypeXXX)
:precooling_efficiency_cop, # [Double] extension/PreCooling/AnnualCoolingEfficiency[Units="COP"]/Value (W/W)
:precooling_fraction_load_served, # [Double] extension/PreCooling/FractionVentilationCoolLoadServed (frac)
:flow_rate_not_tested, # [Boolean] extension/FlowRateNotTested
:fan_power_defaulted, # [Boolean] extension/FanPowerDefaulted
:cfis_vent_mode_airflow_fraction] # [Double] extension/VentilationOnlyModeAirflowFraction (frac)
attr_accessor(*ATTRS)

# Returns the HVAC distribution system for the ventilation fan.
Expand Down Expand Up @@ -8300,14 +8304,16 @@ def to_doc(building)
XMLHelper.add_attribute(sys_id, 'id', @id)
XMLHelper.add_element(ventilation_fan, 'Count', @count, :integer, @count_isdefaulted) unless @count.nil?
XMLHelper.add_element(ventilation_fan, 'FanType', @fan_type, :string) unless @fan_type.nil?
if (not @cfis_addtl_runtime_operating_mode.nil?) || (not @cfis_supplemental_fan_idref.nil?) || (not @cfis_has_outdoor_air_control.nil?)
if (not @cfis_addtl_runtime_operating_mode.nil?) || (not @cfis_supplemental_fan_idref.nil?) || (not @cfis_has_outdoor_air_control.nil?) || (not @cfis_control_type.nil?) || (not @cfis_supplemental_fan_runs_with_air_handler_fan.nil?)
cfis_controls = XMLHelper.add_element(ventilation_fan, 'CFISControls')
XMLHelper.add_element(cfis_controls, 'HasOutdoorAirControl', @cfis_has_outdoor_air_control, :boolean, @cfis_has_outdoor_air_control_isdefaulted) unless @cfis_has_outdoor_air_control.nil?
XMLHelper.add_element(cfis_controls, 'AdditionalRuntimeOperatingMode', @cfis_addtl_runtime_operating_mode, :string, @cfis_addtl_runtime_operating_mode_isdefaulted) unless @cfis_addtl_runtime_operating_mode.nil?
if not @cfis_supplemental_fan_idref.nil?
supplemental_fan = XMLHelper.add_element(cfis_controls, 'SupplementalFan')
XMLHelper.add_attribute(supplemental_fan, 'idref', @cfis_supplemental_fan_idref)
end
XMLHelper.add_extension(cfis_controls, 'ControlType', @cfis_control_type, :string, @cfis_control_type_isdefaulted) unless @cfis_control_type.nil?
XMLHelper.add_extension(cfis_controls, 'SupplementalFanRunsWithAirHandlerFan', @cfis_supplemental_fan_runs_with_air_handler_fan, :boolean, @cfis_supplemental_fan_runs_with_air_handler_fan_isdefaulted) unless @cfis_supplemental_fan_runs_with_air_handler_fan.nil?
end
XMLHelper.add_element(ventilation_fan, 'RatedFlowRate', @rated_flow_rate, :float, @rated_flow_rate_isdefaulted) unless @rated_flow_rate.nil?
XMLHelper.add_element(ventilation_fan, 'CalculatedFlowRate', @calculated_flow_rate, :float, @calculated_flow_rate_isdefaulted) unless @calculated_flow_rate.nil?
Expand Down Expand Up @@ -8366,6 +8372,8 @@ def from_doc(ventilation_fan)
@cfis_has_outdoor_air_control = XMLHelper.get_value(ventilation_fan, 'CFISControls/HasOutdoorAirControl', :boolean)
@cfis_addtl_runtime_operating_mode = XMLHelper.get_value(ventilation_fan, 'CFISControls/AdditionalRuntimeOperatingMode', :string)
@cfis_supplemental_fan_idref = HPXML::get_idref(XMLHelper.get_element(ventilation_fan, 'CFISControls/SupplementalFan'))
@cfis_control_type = XMLHelper.get_value(ventilation_fan, 'CFISControls/extension/ControlType', :string)
@cfis_supplemental_fan_runs_with_air_handler_fan = XMLHelper.get_value(ventilation_fan, 'CFISControls/extension/SupplementalFanRunsWithAirHandlerFan', :boolean)
@rated_flow_rate = XMLHelper.get_value(ventilation_fan, 'RatedFlowRate', :float)
@calculated_flow_rate = XMLHelper.get_value(ventilation_fan, 'CalculatedFlowRate', :float)
@tested_flow_rate = XMLHelper.get_value(ventilation_fan, 'TestedFlowRate', :float)
Expand Down
Loading

0 comments on commit 6cad724

Please sign in to comment.