Skip to content

Commit

Permalink
Merge pull request #1807 from NREL/bobross_del3
Browse files Browse the repository at this point in the history
Bob Ross sensitivity runs
  • Loading branch information
shorowit authored Aug 28, 2024
2 parents 3c53615 + 8f78e86 commit 53efebb
Show file tree
Hide file tree
Showing 27 changed files with 18,422 additions and 78 deletions.
6 changes: 4 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ __New Features__
- Central Fan Integrated Supply (CFIS) mechanical ventilation enhancements:
- CFIS systems with no strategy to meet remainder of ventilation target (`CFISControls/AdditionalRuntimeOperatingMode="none"`).
- HVAC Manual J design load and sizing calculations:
- Adds optional inputs and outputs for blower fan heat and piping load.
- Adds optional `HVACSizingControl/ManualJInputs/InfiltrationMethod` input to specify which infiltration method to use for design load calculations.
- Adds optional `DistributionSystemType/AirDistribution/extension/ManualJInputs/BlowerFanHeatBtuh` input.
- Adds optional `DistributionSystemType/HydronicDistribution/extension/ManualJInputs/HotWaterPipingBtuh` input.
- Adds optional `HVACSizingControl/ManualJInputs/InfiltrationShieldingClass` input to specify wind shielding class for infiltration design load calculations.
- Adds optional `HVACSizingControl/ManualJInputs/InfiltrationMethod` input to specify which method to use for infiltration design load calculations.
- Updates heat pump HERS sizing methodology to better prevent unmet hours in warmer climates.
- Misc Manual J design load calculation improvements.
- Advanced research features:
Expand Down
4 changes: 2 additions & 2 deletions HPXMLtoOpenStudio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The file format of the HVAC design load details output.

**Annual Output File Name**

The name of the file w/ HVAC design loads and capacities. If not provided, defaults to 'results_annual.csv' (or 'results_annual.json' or 'results_annual.msgpack').
The name of the file w/ HVAC design loads and capacities. If not provided, defaults to 'results_annual.csv' (or '.json' or '.msgpack').

- **Name:** ``annual_output_file_name``
- **Type:** ``String``
Expand All @@ -59,7 +59,7 @@ The name of the file w/ HVAC design loads and capacities. If not provided, defau

**Design Load Details Output File Name**

The name of the file w/ additional HVAC design load details. If not provided, defaults to 'results_design_load_details.csv' (or 'results_design_load_details.json' or 'results_design_load_details.msgpack').
The name of the file w/ additional HVAC design load details. If not provided, defaults to 'results_design_load_details.csv' (or '.json' or '.msgpack').

- **Name:** ``design_load_details_output_file_name``
- **Type:** ``String``
Expand Down
4 changes: 2 additions & 2 deletions HPXMLtoOpenStudio/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument

arg = OpenStudio::Measure::OSArgument::makeStringArgument('annual_output_file_name', false)
arg.setDisplayName('Annual Output File Name')
arg.setDescription("The name of the file w/ HVAC design loads and capacities. If not provided, defaults to 'results_annual.csv' (or 'results_annual.json' or 'results_annual.msgpack').")
arg.setDescription("The name of the file w/ HVAC design loads and capacities. If not provided, defaults to 'results_annual.csv' (or '.json' or '.msgpack').")
arg.setDefaultValue('results_annual')
args << arg

arg = OpenStudio::Measure::OSArgument::makeStringArgument('design_load_details_output_file_name', false)
arg.setDisplayName('Design Load Details Output File Name')
arg.setDescription("The name of the file w/ additional HVAC design load details. If not provided, defaults to 'results_design_load_details.csv' (or 'results_design_load_details.json' or 'results_design_load_details.msgpack').")
arg.setDescription("The name of the file w/ additional HVAC design load details. If not provided, defaults to 'results_design_load_details.csv' (or '.json' or '.msgpack').")
arg.setDefaultValue('results_design_load_details')
args << arg

Expand Down
24 changes: 12 additions & 12 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>7321ba66-676f-4f45-9829-5507f160b9be</version_id>
<version_modified>2024-08-21T22:48:41Z</version_modified>
<version_id>6f1b71cd-073a-4b20-bbc1-1e4d5ce1a151</version_id>
<version_modified>2024-08-28T20:08:55Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -53,7 +53,7 @@
<argument>
<name>annual_output_file_name</name>
<display_name>Annual Output File Name</display_name>
<description>The name of the file w/ HVAC design loads and capacities. If not provided, defaults to 'results_annual.csv' (or 'results_annual.json' or 'results_annual.msgpack').</description>
<description>The name of the file w/ HVAC design loads and capacities. If not provided, defaults to 'results_annual.csv' (or '.json' or '.msgpack').</description>
<type>String</type>
<required>false</required>
<model_dependent>false</model_dependent>
Expand All @@ -62,7 +62,7 @@
<argument>
<name>design_load_details_output_file_name</name>
<display_name>Design Load Details Output File Name</display_name>
<description>The name of the file w/ additional HVAC design load details. If not provided, defaults to 'results_design_load_details.csv' (or 'results_design_load_details.json' or 'results_design_load_details.msgpack').</description>
<description>The name of the file w/ additional HVAC design load details. If not provided, defaults to 'results_design_load_details.csv' (or '.json' or '.msgpack').</description>
<type>String</type>
<required>false</required>
<model_dependent>false</model_dependent>
Expand Down Expand Up @@ -166,7 +166,7 @@
<filename>README.md</filename>
<filetype>md</filetype>
<usage_type>readme</usage_type>
<checksum>394CB1D5</checksum>
<checksum>F05E039B</checksum>
</file>
<file>
<filename>README.md.erb</filename>
Expand All @@ -183,7 +183,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>38982B5D</checksum>
<checksum>6064F61F</checksum>
</file>
<file>
<filename>airflow.rb</filename>
Expand Down Expand Up @@ -357,13 +357,13 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>84AE64ED</checksum>
<checksum>9222D4D6</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>9F57A47A</checksum>
<checksum>6EC55ED7</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand All @@ -381,7 +381,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>B74AF2B5</checksum>
<checksum>AE956548</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand All @@ -399,7 +399,7 @@
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>35FCD771</checksum>
<checksum>4205705D</checksum>
</file>
<file>
<filename>lighting.rb</filename>
Expand Down Expand Up @@ -657,7 +657,7 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>029FF7CE</checksum>
<checksum>CBD787A1</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
Expand Down Expand Up @@ -687,7 +687,7 @@
<filename>test_hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>16805567</checksum>
<checksum>487BF287</checksum>
</file>
<file>
<filename>test_lighting.rb</filename>
Expand Down
47 changes: 25 additions & 22 deletions HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2526,27 +2526,28 @@ def from_doc(building)

# Object for high-level Building-specific information in /HPXML/Building/BuildingDetails/BuildingSummary/extension.
class BuildingHeader < BaseElement
ATTRS = [:heat_pump_sizing_methodology, # [String] HVACSizingControl/HeatPumpSizingMethodology (HPXML::HeatPumpSizingXXX)
:heat_pump_backup_sizing_methodology, # [String] HVACSizingControl/HeatPumpBackupSizingMethodology (HPXML::HeatPumpBackupSizingXXX)
:allow_increased_fixed_capacities, # [Boolean] HVACSizingControl/AllowIncreasedFixedCapacities
:manualj_heating_design_temp, # [Double] HVACSizingControl/ManualJInputs/HeatingDesignTemperature (F)
:manualj_cooling_design_temp, # [Double] HVACSizingControl/ManualJInputs/CoolingDesignTemperature (F)
:manualj_daily_temp_range, # [String] HVACSizingControl/ManualJInputs/DailyTemperatureRange (HPXML::ManualJDailyTempRangeXXX)
:manualj_heating_setpoint, # [Double] HVACSizingControl/ManualJInputs/HeatingSetpoint (F)
:manualj_cooling_setpoint, # [Double] HVACSizingControl/ManualJInputs/CoolingSetpoint (F)
:manualj_humidity_setpoint, # [Double] HVACSizingControl/ManualJInputs/HumiditySetpoint (frac)
:manualj_humidity_difference, # [Double] HVACSizingControl/ManualJInputs/HumidityDifference (grains)
:manualj_internal_loads_sensible, # [Double] HVACSizingControl/ManualJInputs/InternalLoadsSensible (Btu/hr)
:manualj_internal_loads_latent, # [Double] HVACSizingControl/ManualJInputs/InternalLoadsLatent (Btu/hr)
:manualj_num_occupants, # [Integer] HVACSizingControl/ManualJInputs/NumberofOccupants
:manualj_infiltration_method, # [String] HVACSizingControl/ManualJInputs/InfiltrationMethod (HPXML::ManualJInfiltrationMethodXXX)
:natvent_days_per_week, # [Integer] NaturalVentilationAvailabilityDaysperWeek
:schedules_filepaths, # [Array<String>] SchedulesFilePath
:shading_summer_begin_month, # [Integer] ShadingControl/SummerBeginMonth
:shading_summer_begin_day, # [Integer] ShadingControl/SummerBeginDayOfMonth
:shading_summer_end_month, # [Integer] ShadingControl/SummerEndMonth
:shading_summer_end_day, # [Integer] ShadingControl/SummerEndDayOfMonth
:extension_properties] # [Hash] AdditionalProperties
ATTRS = [:heat_pump_sizing_methodology, # [String] HVACSizingControl/HeatPumpSizingMethodology (HPXML::HeatPumpSizingXXX)
:heat_pump_backup_sizing_methodology, # [String] HVACSizingControl/HeatPumpBackupSizingMethodology (HPXML::HeatPumpBackupSizingXXX)
:allow_increased_fixed_capacities, # [Boolean] HVACSizingControl/AllowIncreasedFixedCapacities
:manualj_heating_design_temp, # [Double] HVACSizingControl/ManualJInputs/HeatingDesignTemperature (F)
:manualj_cooling_design_temp, # [Double] HVACSizingControl/ManualJInputs/CoolingDesignTemperature (F)
:manualj_daily_temp_range, # [String] HVACSizingControl/ManualJInputs/DailyTemperatureRange (HPXML::ManualJDailyTempRangeXXX)
:manualj_heating_setpoint, # [Double] HVACSizingControl/ManualJInputs/HeatingSetpoint (F)
:manualj_cooling_setpoint, # [Double] HVACSizingControl/ManualJInputs/CoolingSetpoint (F)
:manualj_humidity_setpoint, # [Double] HVACSizingControl/ManualJInputs/HumiditySetpoint (frac)
:manualj_humidity_difference, # [Double] HVACSizingControl/ManualJInputs/HumidityDifference (grains)
:manualj_internal_loads_sensible, # [Double] HVACSizingControl/ManualJInputs/InternalLoadsSensible (Btu/hr)
:manualj_internal_loads_latent, # [Double] HVACSizingControl/ManualJInputs/InternalLoadsLatent (Btu/hr)
:manualj_num_occupants, # [Integer] HVACSizingControl/ManualJInputs/NumberofOccupants
:manualj_infiltration_shielding_class, # [Integer] HVACSizingControl/ManualJInputs/InfiltrationShieldingClass (1-5)
:manualj_infiltration_method, # [String] HVACSizingControl/ManualJInputs/InfiltrationMethod (HPXML::ManualJInfiltrationMethodXXX)
:natvent_days_per_week, # [Integer] NaturalVentilationAvailabilityDaysperWeek
:schedules_filepaths, # [Array<String>] SchedulesFilePath
:shading_summer_begin_month, # [Integer] ShadingControl/SummerBeginMonth
:shading_summer_begin_day, # [Integer] ShadingControl/SummerBeginDayOfMonth
:shading_summer_end_month, # [Integer] ShadingControl/SummerEndMonth
:shading_summer_end_day, # [Integer] ShadingControl/SummerEndDayOfMonth
:extension_properties] # [Hash] AdditionalProperties
attr_accessor(*ATTRS)

# Additional error-checking beyond what's checked in Schema/Schematron validators.
Expand All @@ -2572,7 +2573,7 @@ def to_doc(building)
XMLHelper.add_element(hvac_sizing_control, 'HeatPumpBackupSizingMethodology', @heat_pump_backup_sizing_methodology, :string, @heat_pump_backup_sizing_methodology_isdefaulted) unless @heat_pump_backup_sizing_methodology.nil?
XMLHelper.add_element(hvac_sizing_control, 'AllowIncreasedFixedCapacities', @allow_increased_fixed_capacities, :boolean, @allow_increased_fixed_capacities_isdefaulted) unless @allow_increased_fixed_capacities.nil?
end
if (not @manualj_heating_design_temp.nil?) || (not @manualj_cooling_design_temp.nil?) || (not @manualj_daily_temp_range.nil?) || (not @manualj_humidity_difference.nil?) || (not @manualj_heating_setpoint.nil?) || (not @manualj_cooling_setpoint.nil?) || (not @manualj_humidity_setpoint.nil?) || (not @manualj_internal_loads_sensible.nil?) || (not @manualj_internal_loads_latent.nil?) || (not @manualj_num_occupants.nil?) || (not @manualj_infiltration_method.nil?)
if (not @manualj_heating_design_temp.nil?) || (not @manualj_cooling_design_temp.nil?) || (not @manualj_daily_temp_range.nil?) || (not @manualj_humidity_difference.nil?) || (not @manualj_heating_setpoint.nil?) || (not @manualj_cooling_setpoint.nil?) || (not @manualj_humidity_setpoint.nil?) || (not @manualj_internal_loads_sensible.nil?) || (not @manualj_internal_loads_latent.nil?) || (not @manualj_num_occupants.nil?) || (not @manualj_infiltration_shielding_class.nil?) || (not @manualj_infiltration_method.nil?)
manualj_sizing_inputs = XMLHelper.create_elements_as_needed(building_summary, ['extension', 'HVACSizingControl', 'ManualJInputs'])
XMLHelper.add_element(manualj_sizing_inputs, 'HeatingDesignTemperature', @manualj_heating_design_temp, :float, @manualj_heating_design_temp_isdefaulted) unless @manualj_heating_design_temp.nil?
XMLHelper.add_element(manualj_sizing_inputs, 'CoolingDesignTemperature', @manualj_cooling_design_temp, :float, @manualj_cooling_design_temp_isdefaulted) unless @manualj_cooling_design_temp.nil?
Expand All @@ -2584,6 +2585,7 @@ def to_doc(building)
XMLHelper.add_element(manualj_sizing_inputs, 'InternalLoadsSensible', @manualj_internal_loads_sensible, :float, @manualj_internal_loads_sensible_isdefaulted) unless @manualj_internal_loads_sensible.nil?
XMLHelper.add_element(manualj_sizing_inputs, 'InternalLoadsLatent', @manualj_internal_loads_latent, :float, @manualj_internal_loads_latent_isdefaulted) unless @manualj_internal_loads_latent.nil?
XMLHelper.add_element(manualj_sizing_inputs, 'NumberofOccupants', @manualj_num_occupants, :integer, @manualj_num_occupants_isdefaulted) unless @manualj_num_occupants.nil?
XMLHelper.add_element(manualj_sizing_inputs, 'InfiltrationShieldingClass', @manualj_infiltration_shielding_class, :integer, @manualj_infiltration_shielding_class_isdefaulted) unless @manualj_infiltration_shielding_class.nil?
XMLHelper.add_element(manualj_sizing_inputs, 'InfiltrationMethod', @manualj_infiltration_method, :string, @manualj_infiltration_method_isdefaulted) unless @manualj_infiltration_method.nil?
end
XMLHelper.add_extension(building_summary, 'NaturalVentilationAvailabilityDaysperWeek', @natvent_days_per_week, :integer, @natvent_days_per_week_isdefaulted) unless @natvent_days_per_week.nil?
Expand Down Expand Up @@ -2636,6 +2638,7 @@ def from_doc(building)
@manualj_internal_loads_sensible = XMLHelper.get_value(building_summary, 'extension/HVACSizingControl/ManualJInputs/InternalLoadsSensible', :float)
@manualj_internal_loads_latent = XMLHelper.get_value(building_summary, 'extension/HVACSizingControl/ManualJInputs/InternalLoadsLatent', :float)
@manualj_num_occupants = XMLHelper.get_value(building_summary, 'extension/HVACSizingControl/ManualJInputs/NumberofOccupants', :integer)
@manualj_infiltration_shielding_class = XMLHelper.get_value(building_summary, 'extension/HVACSizingControl/ManualJInputs/InfiltrationShieldingClass', :integer)
@manualj_infiltration_method = XMLHelper.get_value(building_summary, 'extension/HVACSizingControl/ManualJInputs/InfiltrationMethod', :string)
@extension_properties = {}
XMLHelper.get_elements(building_summary, 'extension/AdditionalProperties').each do |property|
Expand Down
29 changes: 28 additions & 1 deletion HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def self.apply(runner, hpxml, hpxml_bldg, eri_version, weather, schedules_file:
apply_emissions_scenarios(hpxml.header, has_fuel)
apply_utility_bill_scenarios(runner, hpxml.header, hpxml_bldg, has_fuel)
apply_building_header(hpxml.header, hpxml_bldg, weather)
apply_building_header_sizing(runner, hpxml_bldg, weather, nbeds)
apply_site(hpxml_bldg)
apply_building_header_sizing(runner, hpxml_bldg, weather, nbeds)
apply_neighbor_buildings(hpxml_bldg)
apply_building_occupancy(hpxml_bldg, schedules_file)
apply_building_construction(hpxml_bldg, cfa, nbeds)
Expand Down Expand Up @@ -235,6 +235,8 @@ def self.apply_header(hpxml_header, hpxml_bldg, weather)
# Assigns default values for omitted optional inputs in the HPXML::BuildingHeader object
# specific to HVAC equipment sizing
#
# # Note: This needs to be called after we have applied defaults for the site.
#
# @param runner [OpenStudio::Measure::OSRunner] Object typically used to display warnings
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @param weather [WeatherFile] Weather object containing EPW information
Expand Down Expand Up @@ -342,6 +344,31 @@ def self.apply_building_header_sizing(runner, hpxml_bldg, weather, nbeds)
runner.registerWarning("ManualJInputs/NumberofOccupants (#{hpxml_bldg.header.manualj_num_occupants}) does not match sum of conditioned spaces (#{sum_space_manualj_num_occupants}).")
end

if hpxml_bldg.header.manualj_infiltration_shielding_class.nil?
hpxml_bldg.header.manualj_infiltration_shielding_class = 4
if hpxml_bldg.site.shielding_of_home.nil?
fail 'Unexpected error.' # Shouldn't happen, it should already be defaulted
elsif hpxml_bldg.site.shielding_of_home == HPXML::ShieldingWellShielded
hpxml_bldg.header.manualj_infiltration_shielding_class += 1
elsif hpxml_bldg.site.shielding_of_home == HPXML::ShieldingExposed
hpxml_bldg.header.manualj_infiltration_shielding_class -= 1
end
if hpxml_bldg.site.site_type.nil?
fail 'Unexpected error.' # Shouldn't happen, it should already be defaulted
elsif hpxml_bldg.site.site_type == HPXML::SiteTypeUrban
hpxml_bldg.header.manualj_infiltration_shielding_class += 1
elsif hpxml_bldg.site.site_type == HPXML::SiteTypeRural
hpxml_bldg.header.manualj_infiltration_shielding_class -= 1
end

if hpxml_bldg.header.manualj_infiltration_shielding_class < 1
hpxml_bldg.header.manualj_infiltration_shielding_class = 1
elsif hpxml_bldg.header.manualj_infiltration_shielding_class > 5
hpxml_bldg.header.manualj_infiltration_shielding_class = 5
end
hpxml_bldg.header.manualj_infiltration_shielding_class_isdefaulted = true
end

if hpxml_bldg.header.manualj_infiltration_method.nil?
infil_measurement = Airflow.get_infiltration_measurement_of_interest(hpxml_bldg)
if (not infil_measurement.air_leakage.nil?) || (not infil_measurement.effective_leakage_area.nil?)
Expand Down
Loading

0 comments on commit 53efebb

Please sign in to comment.