Skip to content

Commit

Permalink
Merge pull request #1842 from NREL/mj_default_num_occupants
Browse files Browse the repository at this point in the history
Update default for `HVACSizingControl/ManualJInputs/NumberofOccupants`
  • Loading branch information
shorowit authored Sep 24, 2024
2 parents 845b6ab + cb81e54 commit 990df15
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
8 changes: 4 additions & 4 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>f0246d8c-71d7-41ff-af64-50ab6a0a278d</version_id>
<version_modified>2024-09-24T16:19:32Z</version_modified>
<version_id>e5f1c576-9881-4a74-b9c0-d9a96ec4c6be</version_id>
<version_modified>2024-09-24T18:24:04Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -357,7 +357,7 @@
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>B87BD99E</checksum>
<checksum>331D7C8E</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand Down Expand Up @@ -663,7 +663,7 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>1E42191C</checksum>
<checksum>FA4AF769</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
Expand Down
5 changes: 4 additions & 1 deletion HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ def self.apply_building_header_sizing(runner, hpxml_bldg, weather)
if sum_space_manualj_num_occupants > 0
hpxml_bldg.header.manualj_num_occupants = sum_space_manualj_num_occupants
else
hpxml_bldg.header.manualj_num_occupants = hpxml_bldg.building_construction.number_of_bedrooms + 1 # Per Manual J
# Manual J default: full time occupants = 1 + number of bedrooms
# If the actual number of full time occupants exceeds the default value, the actual occupant count is used
# See https://github.com/NREL/OpenStudio-HPXML/issues/1841
hpxml_bldg.header.manualj_num_occupants = [hpxml_bldg.building_construction.number_of_bedrooms + 1, hpxml_bldg.building_occupancy.number_of_residents.to_f].max
end
hpxml_bldg.header.manualj_num_occupants_isdefaulted = true
end
Expand Down
12 changes: 12 additions & 0 deletions HPXMLtoOpenStudio/tests/test_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,18 @@ def test_building
_test_default_building_values(default_hpxml_bldg, true, 3, 12, 11, 5, 'CO', 'Denver Intl Ap', -7, 5413.4, 39.83, -104.65, 3, HPXML::HeatPumpSizingHERS, false,
5, 1, 10, 31, 6.8, 91.76, HPXML::ManualJDailyTempRangeHigh, 70.0, 75.0, 0.45, -28.8, 2400.0, 0.0, 4, HPXML::HeatPumpBackupSizingEmergency, HPXML::ManualJInfiltrationMethodBlowerDoor, 4)

# Test defaults w/ NumberOfResidents provided and less than Nbr+1
hpxml_bldg.building_occupancy.number_of_residents = 1
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_default_hpxml, default_hpxml_bldg = _test_measure()
assert_equal(4, default_hpxml_bldg.header.manualj_num_occupants)

# Test defaults w/ NumberOfResidents provided and greater than Nbr+1
hpxml_bldg.building_occupancy.number_of_residents = 6
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_default_hpxml, default_hpxml_bldg = _test_measure()
assert_equal(6, default_hpxml_bldg.header.manualj_num_occupants)

# Test defaults - DST in weather file
hpxml, hpxml_bldg = _create_hpxml('base-location-AMY-2012.xml')
hpxml_bldg.dst_enabled = nil
Expand Down
2 changes: 1 addition & 1 deletion docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ Additional inputs for ACCA Manual J design loads, used for sizing HVAC equipment
This default represents loads that normally occur during the early evening in mid-summer.
Additional adjustments or custom internal loads can instead be specified here.
.. [#] If NumberofOccupants not provided, defaults to the sum of conditioned spaces' NumberofOccupants values if provided (see :ref:`zones_spaces`).
Otherwise defaults to the number of bedrooms plus one per Manual J.
Otherwise defaults to the the larger of NumberofBedrooms+1 and NumberofResidents (if provided).
Each occupant produces an additional 230 Btu/hr sensible load and 200 Btu/hr latent load.
.. [#] If InfiltrationShieldingClass not provided defaults to class 4 with these adjustments:
+1 if ShieldingofHome="well-shielded", -1 if ShieldingofHome="exposed", +1 if SiteType="urban", -1 if SiteType="rural".
Expand Down
2 changes: 1 addition & 1 deletion workflow/tests/base_results/results_simulations_hvac.csv
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ base-residents-0.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575
base-residents-1-misc-loads-large-uncommon.xml,6.8,91.76,36000.0,24000.0,0.0,33431.0,8742.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,5779.0,0.0,0.0,21277.0,6150.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,4520.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0
base-residents-1-misc-loads-large-uncommon2.xml,6.8,91.76,36000.0,24000.0,0.0,33431.0,8742.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,5779.0,0.0,0.0,21277.0,6150.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,4520.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0
base-residents-1.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0
base-residents-5.xml,6.8,91.76,36000.0,24000.0,0.0,32173.0,4674.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,8590.0,0.0,0.0,16931.0,1046.0,7758.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,1860.0,0.0,3320.0,0.0,0.0,-1175.0,0.0,-1975.0,0.0,800.0
base-residents-5.xml,6.8,91.76,36000.0,24000.0,0.0,32173.0,4674.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,8590.0,0.0,0.0,17176.0,1061.0,7758.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,1860.0,0.0,3550.0,0.0,0.0,-975.0,0.0,-1975.0,0.0,1000.0
base-schedules-detailed-all-10-mins.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0
base-schedules-detailed-mixed-timesteps-power-outage.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0
base-schedules-detailed-mixed-timesteps.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0
Expand Down

0 comments on commit 990df15

Please sign in to comment.