Skip to content

Commit d7865a1

Browse files
committed
Simplify hvac_sizing.rb; no longer need to do azimuth-specific wall calcs.
1 parent 52116bb commit d7865a1

File tree

2 files changed

+39
-49
lines changed

2 files changed

+39
-49
lines changed

HPXMLtoOpenStudio/measure.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>hpxm_lto_openstudio</name>
55
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
6-
<version_id>d0eb0b5c-df97-43e4-bd1e-bd190a7ec005</version_id>
7-
<version_modified>2024-07-17T22:31:15Z</version_modified>
6+
<version_id>89e00e9c-fcb6-44d2-828f-5e1cc365cc7d</version_id>
7+
<version_modified>2024-07-17T23:48:54Z</version_modified>
88
<xml_checksum>D8922A73</xml_checksum>
99
<class_name>HPXMLtoOpenStudio</class_name>
1010
<display_name>HPXML to OpenStudio Translator</display_name>
@@ -387,7 +387,7 @@
387387
<filename>hvac_sizing.rb</filename>
388388
<filetype>rb</filetype>
389389
<usage_type>resource</usage_type>
390-
<checksum>F969A8C2</checksum>
390+
<checksum>DCBC4530</checksum>
391391
</file>
392392
<file>
393393
<filename>lighting.rb</filename>

HPXMLtoOpenStudio/resources/hvac_sizing.rb

Lines changed: 36 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def self.init_loads(hpxml_bldg)
580580
all_zone_loads[zone] = DesignLoadValues.new
581581
zone.spaces.each do |space|
582582
all_space_loads[space] = DesignLoadValues.new
583-
space.additional_properties.total_exposed_wall_area = 0.0
583+
space.additional_properties.total_exposed_wall_area = 0.0 # Wall area in contact with outdoor air
584584
# Initialize Hourly Aggregate Fenestration Loads (AFL)
585585
space.additional_properties.afl_hr_windows = [0.0] * 12 # Data saved for peak load
586586
space.additional_properties.afl_hr_skylights = [0.0] * 12 # Data saved for peak load
@@ -1023,55 +1023,45 @@ def self.process_load_walls(mj, hpxml_bldg, all_zone_loads, all_space_loads)
10231023

10241024
ashrae_wall_group = get_ashrae_wall_group(wall)
10251025

1026-
if wall.azimuth.nil?
1027-
azimuths = [0.0, 90.0, 180.0, 270.0] # Assume 4 equal surfaces facing every direction
1028-
else
1029-
azimuths = [wall.azimuth]
1030-
end
1031-
1032-
htg_htm = 0.0
1033-
clg_htm = 0.0
1034-
azimuths.each do |_azimuth|
1035-
if wall.is_exterior
1036-
# Store exposed wall gross area for infiltration calculation
1037-
space.additional_properties.total_exposed_wall_area += wall.area / azimuths.size
1038-
1039-
# Adjust base Cooling Load Temperature Difference (CLTD)
1040-
# Assume absorptivity for light walls < 0.5, medium walls <= 0.75, dark walls > 0.75 (based on MJ8 Table 4B Notes)
1041-
if wall.solar_absorptance <= 0.5
1042-
color_multiplier = 0.65 # MJ8 Table 4B Notes, pg 348
1043-
elsif wall.solar_absorptance <= 0.75
1044-
color_multiplier = 0.83 # MJ8 Appendix 12, pg 519
1045-
else
1046-
color_multiplier = 1.0
1047-
end
1048-
1049-
# Base Cooling Load Temperature Differences (CLTD's) for dark colored sunlit and shaded walls
1050-
# with 95 degF outside temperature taken from MJ8 Figure A12-8 (intermediate wall groups were
1051-
# determined using linear interpolation). Shaded walls apply to partition walls only.
1052-
cltd_base_sun = { 'G' => 38.0, 'F-G' => 34.95, 'F' => 31.9, 'E-F' => 29.45, 'E' => 27.0, 'D-E' => 24.5, 'D' => 22.0, 'C-D' => 21.25, 'C' => 20.5, 'B-C' => 19.65, 'B' => 18.8 }
1053-
# cltd_base_shade = { 'G' => 25.0, 'F-G' => 22.5, 'F' => 20.0, 'E-F' => 18.45, 'E' => 16.9, 'D-E' => 15.45, 'D' => 14.0, 'C-D' => 13.55, 'C' => 13.1, 'B-C' => 12.85, 'B' => 12.6 }
1026+
if wall.is_exterior
1027+
# Store exposed wall gross area for infiltration calculation
1028+
space.additional_properties.total_exposed_wall_area += wall.area
1029+
1030+
# Adjust base Cooling Load Temperature Difference (CLTD)
1031+
# Assume absorptivity for light walls < 0.5, medium walls <= 0.75, dark walls > 0.75 (based on MJ8 Table 4B Notes)
1032+
if wall.solar_absorptance <= 0.5
1033+
color_multiplier = 0.65 # MJ8 Table 4B Notes, pg 348
1034+
elsif wall.solar_absorptance <= 0.75
1035+
color_multiplier = 0.83 # MJ8 Appendix 12, pg 519
1036+
else
1037+
color_multiplier = 1.0
1038+
end
10541039

1055-
# Non-directional exterior walls
1056-
cltd_base = cltd_base_sun
1057-
cltd = cltd_base[ashrae_wall_group] * color_multiplier
1040+
# Base Cooling Load Temperature Differences (CLTD's) for dark colored sunlit and shaded walls
1041+
# with 95 degF outside temperature taken from MJ8 Figure A12-8 (intermediate wall groups were
1042+
# determined using linear interpolation). Shaded walls apply to partition walls only.
1043+
cltd_base_sun = { 'G' => 38.0, 'F-G' => 34.95, 'F' => 31.9, 'E-F' => 29.45, 'E' => 27.0, 'D-E' => 24.5, 'D' => 22.0, 'C-D' => 21.25, 'C' => 20.5, 'B-C' => 19.65, 'B' => 18.8 }
1044+
# cltd_base_shade = { 'G' => 25.0, 'F-G' => 22.5, 'F' => 20.0, 'E-F' => 18.45, 'E' => 16.9, 'D-E' => 15.45, 'D' => 14.0, 'C-D' => 13.55, 'C' => 13.1, 'B-C' => 12.85, 'B' => 12.6 }
10581045

1059-
if mj.ctd >= 10.0
1060-
# Adjust base CLTD for different CTD or DR
1061-
cltd += (hpxml_bldg.header.manualj_cooling_design_temp - 95.0) + mj.daily_range_temp_adjust[mj.daily_range_num]
1062-
else
1063-
# Handling cases ctd < 10 is based on A12-18 in MJ8
1064-
cltd_corr = mj.ctd - 20.0 - mj.daily_range_temp_adjust[mj.daily_range_num]
1065-
cltd = [cltd + cltd_corr, 0.0].max # NOTE: The CLTD_Alt equation in A12-18 part 5 suggests CLTD - CLTD_corr, but A12-19 suggests it should be CLTD + CLTD_corr (where CLTD_corr is negative)
1066-
end
1046+
# Non-directional exterior walls
1047+
cltd_base = cltd_base_sun
1048+
cltd = cltd_base[ashrae_wall_group] * color_multiplier
10671049

1068-
clg_htm += (1.0 / wall.insulation_assembly_r_value) / azimuths.size * cltd
1069-
htg_htm += (1.0 / wall.insulation_assembly_r_value) / azimuths.size * mj.htd
1070-
else # Partition wall
1071-
adjacent_space = wall.exterior_adjacent_to
1072-
clg_htm += (1.0 / wall.insulation_assembly_r_value) / azimuths.size * (mj.cool_design_temps[adjacent_space] - mj.cool_setpoint)
1073-
htg_htm += (1.0 / wall.insulation_assembly_r_value) / azimuths.size * (mj.heat_setpoint - mj.heat_design_temps[adjacent_space])
1050+
if mj.ctd >= 10.0
1051+
# Adjust base CLTD for different CTD or DR
1052+
cltd += (hpxml_bldg.header.manualj_cooling_design_temp - 95.0) + mj.daily_range_temp_adjust[mj.daily_range_num]
1053+
else
1054+
# Handling cases ctd < 10 is based on A12-18 in MJ8
1055+
cltd_corr = mj.ctd - 20.0 - mj.daily_range_temp_adjust[mj.daily_range_num]
1056+
cltd = [cltd + cltd_corr, 0.0].max # NOTE: The CLTD_Alt equation in A12-18 part 5 suggests CLTD - CLTD_corr, but A12-19 suggests it should be CLTD + CLTD_corr (where CLTD_corr is negative)
10741057
end
1058+
1059+
clg_htm = (1.0 / wall.insulation_assembly_r_value) * cltd
1060+
htg_htm = (1.0 / wall.insulation_assembly_r_value) * mj.htd
1061+
else # Partition wall
1062+
adjacent_space = wall.exterior_adjacent_to
1063+
clg_htm = (1.0 / wall.insulation_assembly_r_value) * (mj.cool_design_temps[adjacent_space] - mj.cool_setpoint)
1064+
htg_htm = (1.0 / wall.insulation_assembly_r_value) * (mj.heat_setpoint - mj.heat_design_temps[adjacent_space])
10751065
end
10761066
clg_loads = clg_htm * wall.net_area
10771067
htg_loads = htg_htm * wall.net_area

0 commit comments

Comments
 (0)