Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Water Heater=Other Fuel to map to no water heater #375

Merged
merged 17 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Features
Fixes
- Exclude net site energy consumption from annual and timeseries simulation output ("total" now reflects net of pv); change `include_enduse_subcategories` argument default to "true"; report either total interior equipment OR each of its components ([#405](https://github.com/NREL/OpenStudio-BuildStock/pull/405))
- Refactor the tsv maker classes to accommodate more data sources ([#392](https://github.com/NREL/OpenStudio-BuildStock/pull/392))
- Allow a building to be simulated with no water heater; map the "Other Fuel" option from the Water Heater tsv to no water heater ([#375](https://github.com/NREL/OpenStudio-BuildStock/pull/375))
- Revert plug load schedule to RBSA for the National Average option ([#355](https://github.com/NREL/OpenStudio-BuildStock/pull/355))
- Removed the "Geometry Unit Stories SF" and "Geometry Unit Stories MF" housing characteristics. Unit stories are instead represented by the "Geometry Stories" housing characteristic ([#416](https://github.com/NREL/OpenStudio-BuildStock/pull/416)).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Dependency=Heating Fuel Dependency=Location Region Option=Electric Standard Option=Electric Premium Option=Electric Tankless Option=Gas Standard Option=Gas Premium Option=Gas Tankless Option=Oil Standard Option=Oil Premium Option=FIXME Oil Indirect Option=Propane Standard Option=Propane Premium Option=Propane Tankless Option=FIXME Other Fuel
Dependency=Heating Fuel Dependency=Location Region Option=Electric Standard Option=Electric Premium Option=Electric Tankless Option=Gas Standard Option=Gas Premium Option=Gas Tankless Option=Oil Standard Option=Oil Premium Option=FIXME Oil Indirect Option=Propane Standard Option=Propane Premium Option=Propane Tankless Option=Other Fuel
Electricity CR02 0.780000 0.000000 0.000000 0.150000 0.000000 0.000000 0.000000 0.000000 0.000000 0.060000 0.000000 0.010000 0.000000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joseph-robertson Why does every line show up as changed? New lines? I thought Tony's script was specifically to address this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok for singlefamilydetached Water Heater...

Electricity CR03 0.790000 0.000000 0.040000 0.130000 0.000000 0.040000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Electricity CR04 0.910000 0.000000 0.000000 0.080000 0.000000 0.000000 0.000000 0.000000 0.000000 0.010000 0.000000 0.000000 0.000000
Expand Down
4 changes: 2 additions & 2 deletions project_testing/housing_characteristics/Water Heater.tsv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Option=Electric Benchmark Option=Electric Standard Option=Electric Premium Option=Electric Tankless Option=Gas Benchmark Option=Gas Standard Option=Gas Premium Option=Gas Premium, Condensing Option=Gas Tankless Option=Gas Tankless, Condensing Option=Oil Standard Option=Oil Premium Option=Propane Standard Option=Propane Premium Option=Propane Premium, Condensing Option=Propane Tankless Option=Electric Heat Pump, 50 gal Option=Electric Heat Pump, 50 gal, 140F Option=Electric Heat Pump, 50 gal, In Confined Space Option=Electric Heat Pump, 80 gal
0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.057500 0.020000 0.020000 0.020000 0.020000
Option=Electric Benchmark Option=Electric Standard Option=Electric Premium Option=Electric Tankless Option=Gas Benchmark Option=Gas Standard Option=Gas Premium "Option=Gas Premium, Condensing" Option=Gas Tankless "Option=Gas Tankless, Condensing" Option=Oil Standard Option=Oil Premium Option=FIXME Oil Indirect Option=Propane Standard Option=Propane Premium "Option=Propane Premium, Condensing" Option=Propane Tankless "Option=Electric Heat Pump, 50 gal" "Option=Electric Heat Pump, 50 gal, 140F" "Option=Electric Heat Pump, 50 gal, In Confined Space" "Option=Electric Heat Pump, 80 gal" Option=Other Fuel
0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455 0.045455
22 changes: 11 additions & 11 deletions resources/measures/HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>hpxml_translator</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>636bc950-d7fa-4f71-8722-515d653a5df1</version_id>
<version_modified>20200226T182121Z</version_modified>
<version_id>44082789-79ff-4e40-b4be-d59c4293ef47</version_id>
<version_modified>20200309T154535Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLTranslator</class_name>
<display_name>HPXML Translator</display_name>
Expand Down Expand Up @@ -423,12 +423,6 @@
<usage_type>resource</usage_type>
<checksum>63542680</checksum>
</file>
<file>
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>2B6C5352</checksum>
</file>
<file>
<filename>unit_conversions.rb</filename>
<filetype>rb</filetype>
Expand Down Expand Up @@ -465,23 +459,29 @@
<usage_type>resource</usage_type>
<checksum>4847BCB0</checksum>
</file>
<file>
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F0B6E4F4</checksum>
</file>
<file>
<filename>misc_loads.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>393F8A1C</checksum>
<checksum>D6E66863</checksum>
</file>
<file>
<filename>appliances.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>3D7F70DF</checksum>
<checksum>3F459318</checksum>
</file>
<file>
<filename>geometry.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>49875910</checksum>
<checksum>790E6D63</checksum>
</file>
</files>
</measure>
15 changes: 13 additions & 2 deletions resources/measures/HPXMLtoOpenStudio/resources/appliances.rb
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def self.apply(model, unit, runner, imef, rated_annual_energy, annual_cost,
cd_space = cd.space.get
ClothesDryer.remove(runner, cd_space, cd_unit_obj_name, false)
success, cd_ann_e, cd_ann_f, cd_sch = ClothesDryer.apply(model, unit, runner, cd_sch, cd_cef, cd_mult,
cd_space, cd_fuel_type, cd_fuel_split, cw)
cd_space, cd_fuel_type, cd_fuel_split)

if not success
return false
Expand Down Expand Up @@ -568,7 +568,7 @@ def self.remove(runner, space, obj_name)
end

class ClothesDryer
def self.apply(model, unit, runner, sch, cef, mult, space, fuel_type, fuel_split, cw)
def self.apply(model, unit, runner, sch, cef, mult, space, fuel_type, fuel_split)
# Check for valid inputs
if cef <= 0
runner.registerError("Combined energy factor must be greater than 0.0.")
Expand All @@ -595,6 +595,17 @@ def self.apply(model, unit, runner, sch, cef, mult, space, fuel_type, fuel_split
year_description = model.getYearDescription
num_days_in_year = Constants.NumDaysInYear(year_description.isLeapYear)

# Get clothes washer properties
cw = nil
model.getElectricEquipments.each do |ee|
next if ee.name.to_s != Constants.ObjectNameClothesWasher(unit.name.to_s)

cw = ee
end
if cw.nil?
runner.registerWarning("Could not find clothes washer equipment.")
return nil
end
drum_volume = cw.additionalProperties.getFeatureAsDouble(Constants.ClothesWasherDrumVolume)
imef = cw.additionalProperties.getFeatureAsDouble(Constants.ClothesWasherIMEF)
rated_annual_energy = cw.additionalProperties.getFeatureAsDouble(Constants.ClothesWasherRatedAnnualEnergy)
Expand Down
4 changes: 2 additions & 2 deletions resources/measures/HPXMLtoOpenStudio/resources/waterheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1016,12 +1016,12 @@ def self.get_plant_loop_from_string(model, runner, plantloop_s, unit)
end

model.getPlantLoops.each do |plant_loop|
next if pl.name.to_s != plantloop_s
next if plant_loop.name.to_s != plantloop_s

return plant_loop
end

runner.registerError("Could not find plant loop.")
runner.registerWarning("Could not find plant loop.")
return nil
end

Expand Down
18 changes: 4 additions & 14 deletions resources/measures/ResidentialApplianceClothesDryer/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,12 @@ def run(model, runner, user_arguments)
space = Geometry.get_space_from_location(unit, location, location_hierarchy)
next if space.nil?

# Get clothes washer properties
cw = nil
model.getElectricEquipments.each do |ee|
next if ee.name.to_s != Constants.ObjectNameClothesWasher(unit.name.to_s)

cw = ee
end
if cw.nil?
runner.registerInfo("Could not find clothes washer equipment for '#{unit.name}', so no clothes dryer added.")
next
end

success, ann_e, ann_f, sch = ClothesDryer.apply(model, unit, runner, sch, cef, mult,
space, fuel_type, fuel_split, cw)
space, fuel_type, fuel_split)

if not success
if success.nil?
next
elsif not success
return false
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>residential_clothes_dryer</name>
<uid>0ed6fb35-c3e0-4a33-a397-ce4cec92d96e</uid>
<version_id>c170206e-faff-4005-ad2b-c86122d539ac</version_id>
<version_modified>20200129T202541Z</version_modified>
<version_id>0e126345-22d1-4ea7-8936-23f3c6a34a45</version_id>
<version_modified>20200221T164334Z</version_modified>
<xml_checksum>25A40D75</xml_checksum>
<class_name>ResidentialClothesDryer</class_name>
<display_name>Set Residential Clothes Dryer</display_name>
Expand Down Expand Up @@ -105,13 +105,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>59D1FE1E</checksum>
<checksum>721F51FC</checksum>
</file>
<file>
<filename>ResidentialClothesDryer_Test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>4E4D9AA0</checksum>
<checksum>A03C438B</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@ def test_argument_error_cd_mult_negative
assert_equal(result.errors.map { |x| x.logMessage }[0], "Occupancy energy multiplier must be greater than or equal to 0.0.")
end

def test_missing_cw
def test_warning_missing_cw
args_hash = {}
expected_num_del_objects = {}
expected_num_new_objects = {}
expected_values = { "Annual_kwh" => 0, "Annual_therm" => 0, "Annual_gal" => 0 }
_test_measure("SFD_2000sqft_2story_FB_GRG_UA_3Beds_2Baths.osm", args_hash, expected_num_del_objects, expected_num_new_objects, expected_values, 1)
expected_values = { "Annual_kwh" => 0, "Annual_therm" => 0, "Annual_gal" => 0, "FuelType" => nil, "Location" => nil }
_test_measure("SFD_2000sqft_2story_FB_GRG_UA_3Beds_2Baths.osm", args_hash, expected_num_del_objects, expected_num_new_objects, expected_values, 0, 1)
end

def test_error_missing_geometry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def run(model, runner, user_arguments)
# Get plant loop
plant_loop = Waterheater.get_plant_loop_from_string(model, runner, plant_loop_s, unit)
if plant_loop.nil?
return false
next
end

success, ann_e, cd_updated, cd_sch, mains_temps = ClothesWasher.apply(model, unit, runner, imef, rated_annual_energy, annual_cost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>residential_clothes_washer</name>
<uid>640bfdca-ba67-461e-b517-1a7291c22b22</uid>
<version_id>c0dc2118-73d1-4b34-bbf3-192ab27d2802</version_id>
<version_modified>20191127T155231Z</version_modified>
<version_id>406f8db3-d356-4377-86b1-f7256ca05b22</version_id>
<version_modified>20200203T223541Z</version_modified>
<xml_checksum>126F1C43</xml_checksum>
<class_name>ResidentialClothesWasher</class_name>
<display_name>Set Residential Clothes Washer</display_name>
Expand Down Expand Up @@ -220,13 +220,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>8D748C5B</checksum>
<checksum>768BB300</checksum>
</file>
<file>
<filename>ResidentialClothesWasher_Test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>C81354A0</checksum>
<checksum>5E266B5F</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,12 @@ def test_argument_error_cw_mult_hw_negative
assert_equal(result.errors.map { |x| x.logMessage }[0], "Occupancy hot water multiplier must be greater than or equal to 0.0.")
end

def test_error_missing_water_heater
def test_warning_missing_water_heater
args_hash = {}
result = _test_error("SFD_2000sqft_2story_FB_GRG_UA_3Beds_2Baths_Denver.osm", args_hash)
assert_equal(result.errors.map { |x| x.logMessage }[0], "Could not find plant loop.")
expected_num_del_objects = {}
expected_num_new_objects = {}
expected_values = { "Annual_kwh" => 0, "HotWater_gpd" => 0, "Location" => nil }
_test_measure("SFD_2000sqft_2story_FB_GRG_UA_3Beds_2Baths_Denver.osm", args_hash, expected_num_del_objects, expected_num_new_objects, expected_values, 0, 1)
end

def test_single_family_attached_new_construction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def run(model, runner, user_arguments)
# Get plant loop
plant_loop = Waterheater.get_plant_loop_from_string(model, runner, plant_loop_s, unit)
if plant_loop.nil?
return false
next
end

success, ann_e, mains_temps = Dishwasher.apply(model, unit, runner, num_settings, rated_annual_energy,
Expand Down
8 changes: 4 additions & 4 deletions resources/measures/ResidentialApplianceDishwasher/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>residential_dishwasher</name>
<uid>09ea4570-4666-4a55-812f-5e90091f5325</uid>
<version_id>83b1cbef-9409-4e9c-b9ec-af77a17bddc5</version_id>
<version_modified>20191016T190852Z</version_modified>
<version_id>2b818dbd-d0fe-432f-842e-03d9506e5df1</version_id>
<version_modified>20200203T223541Z</version_modified>
<xml_checksum>126F1C43</xml_checksum>
<class_name>ResidentialDishwasher</class_name>
<display_name>Set Residential Dishwasher</display_name>
Expand Down Expand Up @@ -182,13 +182,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>A1A34A45</checksum>
<checksum>C5053AEE</checksum>
</file>
<file>
<filename>ResidentialDishwasher_Test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>E61783B4</checksum>
<checksum>D3972C5A</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,12 @@ def test_error_missing_geometry
assert_equal(result.errors.map { |x| x.logMessage }[0], "No building geometry has been defined.")
end

def test_error_missing_water_heater
def test_warning_missing_water_heater
args_hash = {}
result = _test_error("SFD_2000sqft_2story_FB_GRG_UA_3Beds_2Baths_Denver.osm", args_hash)
assert_equal(result.errors.map { |x| x.logMessage }[0], "Could not find plant loop.")
expected_num_del_objects = {}
expected_num_new_objects = {}
expected_values = { "Annual_kwh" => 0, "HotWater_gpd" => 0, "Location" => nil }
_test_measure("SFD_2000sqft_2story_FB_GRG_UA_3Beds_2Baths_Denver.osm", args_hash, expected_num_del_objects, expected_num_new_objects, expected_values, 0, 1)
end

def test_single_family_attached_new_construction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>residential_geometry_from_floorspace_js</name>
<uid>79d7fbb8-e001-4c65-9444-c7dcb975290f</uid>
<version_id>ee3ff3a7-21e1-4b15-a23a-ac9351cd0b26</version_id>
<version_modified>20200225T225010Z</version_modified>
<version_id>7ffc3518-6d02-4c75-9d12-5b44d5ee35ee</version_id>
<version_modified>20200309T154538Z</version_modified>
<xml_checksum>0AD1E2E2</xml_checksum>
<class_name>ResidentialGeometryFromFloorspaceJS</class_name>
<display_name>Residential Geometry from FloorspaceJS</display_name>
Expand Down Expand Up @@ -236,7 +236,7 @@
<filename>create_residential_geometry_from_floorspacejs_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>7DDC76E7</checksum>
<checksum>551CF578</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>create_residential_multifamily_geometry</name>
<uid>9bc07973-98a4-46fc-b643-e280628817c5</uid>
<version_id>22ed0eba-4362-4701-8301-84ecaafd7d38</version_id>
<version_modified>20191015T140430Z</version_modified>
<version_id>e79831c8-30c2-4822-87e5-df4e43d20aec</version_id>
<version_modified>20200309T154538Z</version_modified>
<xml_checksum>2AF3A68E</xml_checksum>
<class_name>CreateResidentialMultifamilyGeometry</class_name>
<display_name>Create Residential Multifamily Geometry</display_name>
Expand Down Expand Up @@ -356,7 +356,7 @@
<filename>create_residential_multifamily_geometry_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>86F0CFB7</checksum>
<checksum>384C5282</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>create_residential_single_family_attached_geometry</name>
<uid>fb4e4db8-1b29-4cbf-abcd-6af194ad945c</uid>
<version_id>98d22bd6-0108-459d-be86-c861e1b29158</version_id>
<version_modified>20191015T140430Z</version_modified>
<version_id>fb593f7a-8641-4f25-a799-49515890a323</version_id>
<version_modified>20200309T154539Z</version_modified>
<xml_checksum>2AF3A68E</xml_checksum>
<class_name>CreateResidentialSingleFamilyAttachedGeometry</class_name>
<display_name>Create Residential Single-Family Attached Geometry</display_name>
Expand Down Expand Up @@ -423,7 +423,7 @@
<filename>create_residential_single_family_attached_geometry_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>AB27A7E6</checksum>
<checksum>DBB56D0B</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>create_residential_single_family_detached_geometry</name>
<uid>a1248ef4-c1ef-46ed-a9ea-4d8fbf719b6f</uid>
<version_id>fd151360-1ffd-4643-a202-c9df8466b02d</version_id>
<version_modified>20191015T140430Z</version_modified>
<version_id>2f7969ad-a369-4478-ad24-58242416d36d</version_id>
<version_modified>20200309T154539Z</version_modified>
<xml_checksum>2AF3A68E</xml_checksum>
<class_name>CreateResidentialSingleFamilyDetachedGeometry</class_name>
<display_name>Create Residential Single-Family Detached Geometry</display_name>
Expand Down Expand Up @@ -418,7 +418,7 @@
<filename>create_residential_single_family_detached_geometry_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>F9BF76A3</checksum>
<checksum>583C999F</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def run(model, runner, user_arguments)
# Get plant loop
plant_loop = Waterheater.get_plant_loop_from_string(model, runner, Constants.Auto, unit)
if plant_loop.nil?
return false
next
end

# Get water heater setpoint
Expand Down
Loading