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

New regression equations added from RECS 2020 for N_Bedrooms Vs N_Occ… #1690

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 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>b55edf04-941c-413c-bb54-af96ee6e3aac</version_id>
<version_modified>2024-04-29T21:40:45Z</version_modified>
<version_id>35f81fd6-a286-4756-9688-86da6d19f01d</version_id>
<version_modified>2024-05-04T00:30:46Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -310,7 +310,7 @@
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>7DD4B643</checksum>
<checksum>05A49260</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand Down Expand Up @@ -616,7 +616,7 @@
<filename>test_hotwater_appliance.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>E3A99BA1</checksum>
<checksum>273D80F6</checksum>
</file>
<file>
<filename>test_hvac.rb</filename>
Expand Down Expand Up @@ -646,7 +646,7 @@
<filename>test_miscloads.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>0135301B</checksum>
<checksum>DC739A38</checksum>
</file>
<file>
<filename>test_pv.rb</filename>
Expand Down
13 changes: 9 additions & 4 deletions HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3319,10 +3319,15 @@ def self.get_orientation_from_azimuth(azimuth)
def self.get_nbeds_adjusted_for_operational_calculation(hpxml_bldg)
n_occs = hpxml_bldg.building_occupancy.number_of_residents
unit_type = hpxml_bldg.building_construction.residential_facility_type
if [HPXML::ResidentialTypeApartment, HPXML::ResidentialTypeSFA].include? unit_type
return -0.68 + 1.09 * n_occs
elsif [HPXML::ResidentialTypeSFD, HPXML::ResidentialTypeManufactured].include? unit_type
return -1.47 + 1.69 * n_occs
# Relations below come from 2020 RECS weighted regressions between NBEDS and NHSHLDMEM (sample weights = NWEIGHT)
if [HPXML::ResidentialTypeApartment].include? unit_type
return -1.36 + 1.49 * n_occs
elsif [HPXML::ResidentialTypeSFA].include? unit_type
return -1.98 + 1.89 * n_occs
elsif [HPXML::ResidentialTypeSFD].include? unit_type
return -2.19 + 2.08 * n_occs
elsif [HPXML::ResidentialTypeManufactured].include? unit_type
return -1.26 + 1.61 * n_occs
else
fail "Unexpected residential facility type: #{unit_type}."
end
Expand Down
20 changes: 10 additions & 10 deletions HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -953,31 +953,31 @@ def test_operational
model, _hpxml, _hpxml_bldg = _test_measure(args_hash)

# water use equipment peak flows
fixture_gpd = 16.46
dist_gpd = 3.261
cw_gpd = 2.131
dw_gpd = 1.3599
fixture_gpd = 0.0
dist_gpd = 0.0
cw_gpd = 1.943070
dw_gpd = 1.197361
Comment on lines -956 to +959
Copy link
Contributor

Choose a reason for hiding this comment

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

Yikes, the fixtures & distribution GPD dropped to zero. We need to look at that.

assert_in_epsilon(cw_gpd, get_wu_gpd(model, Constants.ObjectNameClothesWasher), 0.001)
assert_in_epsilon(dw_gpd, get_wu_gpd(model, Constants.ObjectNameDishwasher), 0.001)
assert_in_epsilon(fixture_gpd, get_wu_gpd(model, Constants.ObjectNameFixtures), 0.001)
assert_in_epsilon(dist_gpd, get_wu_gpd(model, Constants.ObjectNameDistributionWaste), 0.001)

# electric equipment
cw_ee_kwh_yr = 61.4635
cw_ee_kwh_yr = 56.04660
cw_sens_frac = 0.27
cw_lat_frac = 0.03
assert_in_epsilon(cw_ee_kwh_yr, get_ee_kwh_per_year(model, Constants.ObjectNameClothesWasher), 0.001)
assert_in_epsilon(cw_sens_frac, get_ee_fractions(model, Constants.ObjectNameClothesWasher)[0], 0.001)
assert_in_epsilon(cw_lat_frac, get_ee_fractions(model, Constants.ObjectNameClothesWasher)[1], 0.001)

dw_ee_kwh_yr = 46.450
dw_ee_kwh_yr = 40.89748
dw_sens_frac = 0.3
dw_lat_frac = 0.300
assert_in_epsilon(dw_ee_kwh_yr, get_ee_kwh_per_year(model, Constants.ObjectNameDishwasher), 0.001)
assert_in_epsilon(dw_sens_frac, get_ee_fractions(model, Constants.ObjectNameDishwasher)[0], 0.001)
assert_in_epsilon(dw_lat_frac, get_ee_fractions(model, Constants.ObjectNameDishwasher)[1], 0.001)

cd_ee_kwh_yr = 254.4948
cd_ee_kwh_yr = 232.080643
cd_sens_frac = 0.135
cd_lat_frac = 0.015
assert_in_epsilon(cd_ee_kwh_yr, get_ee_kwh_per_year(model, Constants.ObjectNameClothesDryer), 0.001)
Expand All @@ -989,16 +989,16 @@ def test_operational
assert_in_epsilon(rf_sens_frac, get_ee_fractions(model, Constants.ObjectNameRefrigerator)[0], 0.001)
assert_in_epsilon(rf_lat_frac, get_ee_fractions(model, Constants.ObjectNameRefrigerator)[1], 0.001)

cook_ee_kwh_yr = 339.4481
cook_ee_kwh_yr = 326.9375
cook_sens_frac = 0.72
cook_lat_frac = 0.080
assert_in_epsilon(cook_ee_kwh_yr, get_ee_kwh_per_year(model, Constants.ObjectNameCookingRange), 0.001)
assert_in_epsilon(cook_sens_frac, get_ee_fractions(model, Constants.ObjectNameCookingRange)[0], 0.001)
assert_in_epsilon(cook_lat_frac, get_ee_fractions(model, Constants.ObjectNameCookingRange)[1], 0.001)

# other equipment
water_sens = -140.879
water_lat = 142.945
water_sens = -126.44072
water_lat = 128.2956
assert_in_epsilon(water_sens, get_oe_kwh(model, Constants.ObjectNameGeneralWaterUseSensible), 0.001)
assert_in_epsilon(1.0, get_oe_fractions(model, Constants.ObjectNameGeneralWaterUseSensible)[0], 0.001)
assert_in_epsilon(0.0, get_oe_fractions(model, Constants.ObjectNameGeneralWaterUseSensible)[1], 0.001)
Expand Down
36 changes: 18 additions & 18 deletions HPXMLtoOpenStudio/tests/test_miscloads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_operational_defaults

# Check television
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscTelevision)
assert_in_delta(894, kwh_yr, 1.0)
assert_in_delta(979.49, kwh_yr, 1.0)
assert_equal(0, therm_yr)

# Check vehicle
Expand Down Expand Up @@ -263,7 +263,7 @@ def test_operational_large_uncommon_loads

# Check television
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscTelevision)
assert_in_delta(428, kwh_yr, 1.0)
assert_in_delta(405.81, kwh_yr, 1.0)
assert_equal(0, therm_yr)

# Check vehicle
Expand All @@ -273,43 +273,43 @@ def test_operational_large_uncommon_loads

# Check well pump
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscWellPump)
assert_in_epsilon(348, kwh_yr, 0.1)
assert_in_epsilon(337.1527, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check pool pump
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscPoolPump)
assert_in_epsilon(1970, kwh_yr, 0.1)
assert_in_epsilon(1908.455, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check pool heater
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscPoolHeater)
assert_equal(0, kwh_yr)
assert_in_epsilon(186, therm_yr, 0.1)
assert_in_epsilon(180.5, therm_yr, 0.1)

# Check permanent spa pump
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscPermanentSpaPump)
assert_in_epsilon(877, kwh_yr, 0.1)
assert_in_epsilon(850.177, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check permanent spa heater
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscPermanentSpaHeater)
assert_in_epsilon(889, kwh_yr, 0.1)
assert_in_epsilon(861.13637, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check grill
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscGrill)
assert_equal(0, kwh_yr)
assert_in_epsilon(25, therm_yr, 0.1)
assert_in_epsilon(25.2864583, therm_yr, 0.1)

# Check lighting
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscLighting)
assert_equal(0, kwh_yr)
assert_in_epsilon(16, therm_yr, 0.1)
assert_in_epsilon(15.45284, therm_yr, 0.1)

# Check fireplace
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscFireplace)
assert_equal(0, kwh_yr)
assert_in_epsilon(55, therm_yr, 0.1)
assert_in_epsilon(51.36312, therm_yr, 0.1)
end

def test_operational_large_uncommon_loads2
Expand All @@ -324,7 +324,7 @@ def test_operational_large_uncommon_loads2

# Check television
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscTelevision)
assert_in_delta(428, kwh_yr, 1.0)
assert_in_delta(405.81, kwh_yr, 1.0)
assert_equal(0, therm_yr)

# Check vehicle
Expand All @@ -334,12 +334,12 @@ def test_operational_large_uncommon_loads2

# Check well pump
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscWellPump)
assert_in_epsilon(348, kwh_yr, 0.1)
assert_in_epsilon(337.1527, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check pool pump
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscPoolPump)
assert_in_epsilon(1970, kwh_yr, 0.1)
assert_in_epsilon(1908.455, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check pool heater
Expand All @@ -349,28 +349,28 @@ def test_operational_large_uncommon_loads2

# Check permanent spa pump
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscPermanentSpaPump)
assert_in_epsilon(877, kwh_yr, 0.1)
assert_in_epsilon(850.177, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check permanent spa heater
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscPermanentSpaHeater)
assert_in_epsilon(178, kwh_yr, 0.1)
assert_in_epsilon(172.227, kwh_yr, 0.1)
assert_equal(0, therm_yr)

# Check grill
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscGrill)
assert_equal(0, kwh_yr)
assert_in_epsilon(25, therm_yr, 0.1)
assert_in_epsilon(25.2864583, therm_yr, 0.1)

# Check lighting
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscLighting)
assert_equal(0, kwh_yr)
assert_in_epsilon(16, therm_yr, 0.1)
assert_in_epsilon(15.45, therm_yr, 0.1)

# Check fireplace
kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants.ObjectNameMiscFireplace)
assert_equal(0, kwh_yr)
assert_in_epsilon(55, therm_yr, 0.1)
assert_in_epsilon(51.36312, therm_yr, 0.1)
end

def _test_measure(args_hash)
Expand Down
10 changes: 7 additions & 3 deletions docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,15 @@ Building occupancy is entered in ``/HPXML/Building/BuildingDetails/BuildingSumma
======================================================= ======== ===== =========== ======== ======== ========================

.. [#] If NumberofResidents not provided, an *asset* calculation is performed assuming standard occupancy, in which various end use defaults (e.g., plug loads, appliances, and hot water usage) are calculated based on NumberofBedrooms and ConditionedFloorArea per `ANSI/RESNET/ICC 301-2019 <https://codes.iccsafe.org/content/RESNET3012019P1>`_.
If NumberofResidents is provided, an *operational* calculation is instead performed in which the end use defaults are adjusted using the relationship between NumberofBedrooms and NumberofResidents from `RECS 2015 <https://www.eia.gov/consumption/residential/reports/2015/overview/>`_:
If NumberofResidents is provided, an *operational* calculation is instead performed in which the end use defaults are adjusted using the relationship between NumberofBedrooms and NumberofResidents from `RECS 2020 <https://www.eia.gov/consumption/residential/data/2020/csv/recs2020_public_v7.csv>`_:

\- **single-family detached or manufactured home**: NumberofBedrooms = -1.47 + 1.69 * NumberofResidents
\- **manufactured home**: NumberofBedrooms = -1.26 + 1.61 * NumberofResidents

\- **single-family attached or apartment unit**: NumberofBedrooms = -0.68 + 1.09 * NumberofResidents
\- **single-family detached**: NumberofBedrooms = -2.19 + 2.08 * NumberofResidents

\- **single-family attached**: NumberofBedrooms = -1.98 + 1.89 * NumberofResidents

\- **apartment unit or multifamily**: NumberofBedrooms = -1.36 + 1.49 * NumberofResidents

.. [#] If WeekdayScheduleFractions or WeekendScheduleFractions not provided (and :ref:`schedules_detailed` not used), default values from Table C.3(5) of ANSI/RESNET/ICC 301-2022 Addendum C are used: "0.035, 0.035, 0.035, 0.035, 0.035, 0.059, 0.082, 0.055, 0.027, 0.014, 0.014, 0.014, 0.014, 0.014, 0.019, 0.027, 0.041, 0.055, 0.068, 0.082, 0.082, 0.070, 0.053, 0.035".
.. [#] If MonthlyScheduleMultipliers not provided (and :ref:`schedules_detailed` not used), default values are used: "1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0".
Expand Down