Skip to content

Commit

Permalink
Squashed 'resources/hpxml-measures/' changes from dffe8f6ef..fb589646a
Browse files Browse the repository at this point in the history
fb589646a Merge branch 'master' into build-res-hpxml
4f2c56a34 Few updates to resource files.
a8b37258f Merge pull request #323 from NREL/check_for_errors
ddfb6b677 Skip schema validation for invalid files.
a953c5ff7 Adds error checking into HPXML class. Adds a couple more invalid tests. Some misc code cleanup.
d06474307 Merge pull request #322 from NREL/partition_surfaces
e2570124a Additional delete methods.
ef4bb5b28 Automatically remove partition surfaces (defined as interior_adjacent_to == exterior_adjacent_to) during creation of the HPXML object, unless disabled. Also adds delete() methods for all surfaces, which includes automatic deleting of subsurfaces.

git-subtree-dir: resources/hpxml-measures
git-subtree-split: fb589646a36cab76e54d9009cf405d073f5054a8
  • Loading branch information
joseph-robertson committed Mar 21, 2020
1 parent 60c64d8 commit 7b316f1
Show file tree
Hide file tree
Showing 190 changed files with 8,975 additions and 7,522 deletions.
49 changes: 28 additions & 21 deletions BuildResidentialHPXML/measure.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0"?>
<measure>
<schema_version>3.0</schema_version>
<name>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>dec870c1-a37d-4299-8a46-8e054d74b981</version_id>
<version_modified>20200319T193507Z</version_modified>
<version_id>3da624db-2404-44b7-8810-ba9d7012c9e7</version_id>
<version_modified>20200321T025927Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -3595,8 +3596,8 @@
<default_value>1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248</default_value>
</argument>
</arguments>
<outputs/>
<provenances/>
<outputs />
<provenances />
<tags>
<tag>Whole Building.Space Types</tag>
</tags>
Expand All @@ -3608,12 +3609,6 @@
</attribute>
</attributes>
<files>
<file>
<filename>constants.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>182539AB</checksum>
</file>
<file>
<filename>location.rb</filename>
<filetype>rb</filetype>
Expand All @@ -3626,12 +3621,6 @@
<usage_type>resource</usage_type>
<checksum>D72E55C5</checksum>
</file>
<file>
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0A0E0C8E</checksum>
</file>
<file>
<filename>geometry.rb</filename>
<filetype>rb</filetype>
Expand Down Expand Up @@ -4580,6 +4569,24 @@
<usage_type>test</usage_type>
<checksum>F2A3D970</checksum>
</file>
<file>
<filename>base-misc-timestep-10-mins.osw</filename>
<filetype>osw</filetype>
<usage_type>test</usage_type>
<checksum>6A6CDFBB</checksum>
</file>
<file>
<filename>constants.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>34BF9075</checksum>
</file>
<file>
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>EA7C041A</checksum>
</file>
<file>
<version>
<software_program>OpenStudio</software_program>
Expand All @@ -4589,13 +4596,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>D7EB5061</checksum>
<checksum>3612DA93</checksum>
</file>
<file>
<filename>base-misc-timestep-10-mins.osw</filename>
<filetype>osw</filetype>
<usage_type>test</usage_type>
<checksum>6A6CDFBB</checksum>
<filename>simulation.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>4BA3939B</checksum>
</file>
</files>
</measure>
26 changes: 26 additions & 0 deletions BuildResidentialHPXML/resources/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@ def self.SizingAuto
return 'autosize'
end

def self.FuelTypeElectric
return 'electric'
end

def self.FuelTypeGas
return 'gas'
end

def self.FuelTypePropane
return 'propane'
end

def self.FuelTypeOil
return 'oil'
end

def self.FuelTypeWood
return 'wood'
end

# Numbers --------------------

def self.MaxNumPhotovoltaics
Expand All @@ -20,4 +40,10 @@ def self.MaxNumPhotovoltaics
def self.MaxNumPlugLoads
return 2
end

def self.NumDaysInMonths(is_leap_year = false)
num_days_in_months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
num_days_in_months[1] += 1 if is_leap_year
return num_days_in_months
end
end
38 changes: 38 additions & 0 deletions BuildResidentialHPXML/resources/simulation.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
class Simulation
def self.apply(model, runner, timesteps_per_hr = 1, min_system_timestep_mins = nil, begin_month = 1, begin_day_of_month = 1, end_month = 12, end_day_of_month = 31, calendar_year = 2007)
sim = model.getSimulationControl
sim.setRunSimulationforSizingPeriods(false)

tstep = model.getTimestep
tstep.setNumberOfTimestepsPerHour(timesteps_per_hr) # Timesteps/hour

shad = model.getShadowCalculation
shad.setShadingCalculationUpdateFrequency(20)
shad.setMaximumFiguresInShadowOverlapCalculations(200)

outsurf = model.getOutsideSurfaceConvectionAlgorithm
outsurf.setAlgorithm('DOE-2')

insurf = model.getInsideSurfaceConvectionAlgorithm
insurf.setAlgorithm('TARP')

zonecap = model.getZoneCapacitanceMultiplierResearchSpecial
zonecap.setHumidityCapacityMultiplier(15)

if not min_system_timestep_mins.nil?
convlim = model.getConvergenceLimits
convlim.setMinimumSystemTimestep(min_system_timestep_mins) # Minutes
end

run_period = model.getRunPeriod
run_period.setBeginMonth(begin_month)
run_period.setBeginDayOfMonth(begin_day_of_month)
run_period.setEndMonth(end_month)
run_period.setEndDayOfMonth(end_day_of_month)

year_description = model.getYearDescription
year_description.setCalendarYear(calendar_year)

return true
end
end
6 changes: 3 additions & 3 deletions BuildResidentialHPXML/resources/waterheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def self.calc_nom_tankvol(vol, fuel, num_beds, num_baths)
# Calculates the volume of a water heater
if vol == Constants.Auto
# Based on the BA HSP
if fuel == Constants.FuelTypeElectricity
if fuel == Constants.FuelTypeElectric
# Source: Table 5 HUD-FHA Minimum Water Heater Capacities for One- and
# Two-Family Living Units (ASHRAE HVAC Applications 2007)
if num_baths < 2
Expand Down Expand Up @@ -60,9 +60,9 @@ def self.calc_nom_tankvol(vol, fuel, num_beds, num_baths)
def self.calc_ef(ef, vol, fuel)
# Calculate the energy factor as a function of the tank volume and fuel type
if ef == Constants.Auto
if (fuel == Constants.FuelTypePropane) || (fuel == Constants.FuelTypeNaturalGas)
if (fuel == Constants.FuelTypePropane) || (fuel == Constants.FuelTypeGas)
return 0.67 - (0.0019 * vol)
elsif fuel == Constants.FuelTypeElectricity
elsif fuel == Constants.FuelTypeElectric
return 0.97 - (0.00132 * vol)
else
return 0.59 - (0.0019 * vol)
Expand Down
82 changes: 41 additions & 41 deletions BuildResidentialHPXML/tests/base-appliances-gas.osw
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,65 @@
"attic_floor_unconditioned_r": 2.1,
"attic_type": "UnventedAttic",
"back_skylight_area": 0,
"back_window_area": 108,
"back_window_area": 108.0,
"back_wwr": 0,
"balcony_depth": 0,
"carpet_fraction": 0,
"carpet_r_value": 0,
"balcony_depth": 0.0,
"carpet_fraction": 0.0,
"carpet_r_value": 0.0,
"ceiling_fan_cooling_setpoint_temp_offset": 0,
"ceiling_fan_efficiency": 100,
"ceiling_fan_quantity": 0,
"cfa": 2700,
"cfa": 2700.0,
"clothes_dryer_control_type": "moisture",
"clothes_dryer_efficiency": 2.67,
"clothes_dryer_efficiency_type": "EnergyFactor",
"clothes_dryer_fuel_type": "natural gas",
"clothes_dryer_location": "living space",
"clothes_washer_capacity": 3,
"clothes_washer_capacity": 3.0,
"clothes_washer_efficiency": 0.8,
"clothes_washer_efficiency_type": "ModifiedEnergyFactor",
"clothes_washer_label_annual_gas_cost": 25,
"clothes_washer_label_annual_gas_cost": 25.0,
"clothes_washer_label_electric_rate": 0.1,
"clothes_washer_label_gas_rate": 0.6,
"clothes_washer_location": "living space",
"clothes_washer_rated_annual_kwh": 700,
"clothes_washer_rated_annual_kwh": 700.0,
"cooking_range_fuel_type": "natural gas",
"cooking_range_is_induction": false,
"cooling_setpoint_temp": 78,
"cooling_setup_hours_per_week": 0,
"cooling_setup_start_hour": 0,
"cooling_setup_temp": 78,
"cooling_system_cooling_capacity": 48000,
"cooling_system_cooling_efficiency": 13,
"cooling_system_cooling_capacity": 48000.0,
"cooling_system_cooling_efficiency": 13.0,
"cooling_system_fraction_cool_load_served": 1,
"cooling_system_fuel": "electricity",
"cooling_system_type": "central air conditioner",
"corridor_position": "Double-Loaded Interior",
"corridor_width": 10,
"dishwasher_efficiency": 450,
"corridor_width": 10.0,
"dishwasher_efficiency": 450.0,
"dishwasher_efficiency_type": "RatedAnnualkWh",
"dishwasher_place_setting_capacity": 12,
"door_area": 40,
"door_area": 40.0,
"door_rvalue": 4.4,
"dwhr_efficiency": 0.55,
"dwhr_equal_flow": true,
"dwhr_facilities_connected": "none",
"eaves_depth": 0,
"evap_cooler_is_ducted": false,
"foundation_ceiling_r": 0,
"foundation_height": 8,
"foundation_height": 8.0,
"foundation_type": "ConditionedBasement",
"foundation_wall_depth_below_grade": 7,
"foundation_wall_distance_to_bottom": 8,
"foundation_wall_distance_to_top": 0,
"foundation_wall_depth_below_grade": 7.0,
"foundation_wall_distance_to_bottom": 8.0,
"foundation_wall_distance_to_top": 0.0,
"foundation_wall_r": 8.9,
"front_skylight_area": 0,
"front_window_area": 108,
"front_window_area": 108.0,
"front_wwr": 0,
"garage_depth": 20,
"garage_depth": 20.0,
"garage_position": "Right",
"garage_protrusion": 0,
"garage_width": 0,
"garage_protrusion": 0.0,
"garage_width": 0.0,
"has_clothes_dryer": true,
"has_clothes_washer": true,
"has_cooking_range": true,
Expand All @@ -79,14 +79,14 @@
"has_refrigerator": true,
"has_whole_house_fan": false,
"heat_pump_backup_fuel": "none",
"heat_pump_backup_heating_capacity": 34121,
"heat_pump_backup_heating_capacity": 34121.0,
"heat_pump_backup_heating_efficiency": 1,
"heat_pump_cooling_capacity": 48000,
"heat_pump_cooling_efficiency": 13,
"heat_pump_cooling_capacity": 48000.0,
"heat_pump_cooling_efficiency": 13.0,
"heat_pump_fraction_cool_load_served": 1,
"heat_pump_fraction_heat_load_served": 1,
"heat_pump_fuel": "electricity",
"heat_pump_heating_capacity": 64000,
"heat_pump_heating_capacity": 64000.0,
"heat_pump_heating_efficiency": 7.7,
"heat_pump_type": "none",
"heating_setback_hours_per_week": 0,
Expand All @@ -96,18 +96,18 @@
"heating_system_electric_auxiliary_energy": 0,
"heating_system_fraction_heat_load_served": 1,
"heating_system_fuel": "natural gas",
"heating_system_heating_capacity": 64000,
"heating_system_heating_capacity": 64000.0,
"heating_system_heating_efficiency": 0.92,
"heating_system_type": "Furnace",
"horizontal_location": "Left",
"hot_water_distribution_pipe_r_value": 0,
"hot_water_distribution_pipe_r_value": 0.0,
"hot_water_distribution_system_type": "Standard",
"hpxml_path": "../BuildResidentialHPXML/tests/built_residential_hpxml/base-appliances-gas.xml",
"inset_depth": 0,
"inset_depth": 0.0,
"inset_position": "Right",
"inset_width": 0,
"inset_width": 0.0,
"left_skylight_area": 0,
"left_window_area": 72,
"left_window_area": 72.0,
"left_wwr": 0,
"level": "Bottom",
"living_air_leakage_units": "ACH50",
Expand All @@ -134,7 +134,7 @@
"num_floors": 1,
"num_occupants": "auto",
"num_units": 1,
"orientation": 180,
"orientation": 180.0,
"oven_is_convection": false,
"overhangs_back_depth": 0,
"overhangs_back_distance_to_top_of_window": 0,
Expand Down Expand Up @@ -178,14 +178,14 @@
"recirculation_pump_power": 50,
"refrigerator_adjusted_annual_kwh": 0,
"refrigerator_location": "auto",
"refrigerator_rated_annual_kwh": 650,
"return_duct_insulation_r_value": 0,
"refrigerator_rated_annual_kwh": 650.0,
"return_duct_insulation_r_value": 0.0,
"return_duct_leakage_units": "CFM25",
"return_duct_leakage_value": 25,
"return_duct_leakage_value": 25.0,
"return_duct_location": "auto",
"return_duct_surface_area": 50,
"return_duct_surface_area": 50.0,
"right_skylight_area": 0,
"right_window_area": 72,
"right_window_area": 72.0,
"right_wwr": 0,
"roof_ceiling_r": 2.3,
"roof_emittance": 0.92,
Expand All @@ -205,7 +205,7 @@
"slab_perimeter_r": 0,
"slab_under_r": 0,
"slab_under_width": 0,
"solar_thermal_collector_area": 40,
"solar_thermal_collector_area": 40.0,
"solar_thermal_collector_azimuth": 180,
"solar_thermal_collector_loop_type": "liquid direct",
"solar_thermal_collector_rated_optical_efficiency": 0.5,
Expand All @@ -220,17 +220,17 @@
"summer_shading_coefficient_front_facade": 0,
"summer_shading_coefficient_left_facade": 0,
"summer_shading_coefficient_right_facade": 0,
"supply_duct_insulation_r_value": 4,
"supply_duct_insulation_r_value": 4.0,
"supply_duct_leakage_units": "CFM25",
"supply_duct_leakage_value": 75,
"supply_duct_leakage_value": 75.0,
"supply_duct_location": "auto",
"supply_duct_surface_area": 150,
"supply_duct_surface_area": 150.0,
"unit_multiplier": 1,
"unit_type": "single-family detached",
"vented_crawlspace_sla": 0.00667,
"wall_conditioned_r": 23,
"wall_emittance": 0.92,
"wall_height": 8,
"wall_height": 8.0,
"wall_solar_absorptance": 0.7,
"wall_type": "WoodStud",
"wall_unconditioned_r": 4,
Expand Down
Loading

0 comments on commit 7b316f1

Please sign in to comment.