Skip to content

Commit

Permalink
revert changes related to iad ceilings
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhou601 committed Apr 15, 2024
1 parent 70ffc39 commit a87f3a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 70 deletions.
11 changes: 1 addition & 10 deletions rulesets/resources/301ruleset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -832,21 +832,12 @@ def self.set_enclosure_ceilings_iad(orig_bldg, new_bldg)
new_bldg.floors.each do |new_floor|
next unless new_floor.is_ceiling

if Constants.ERIVersions.index(@eri_version) >= Constants.ERIVersions.index('2022')
# Only include ceilings above Conditioned Space Volume and below an Attic, Unconditioned Space Volume, Unrated Heated Space, Multifamily Buffer Boundary, Non-Freezing Space, or outdoor environment
next unless new_floor.is_thermal_boundary
end

sum_ceiling_area += new_floor.area
end
new_bldg.floors.each do |new_floor|
next unless new_floor.is_ceiling

if Constants.ERIVersions.index(@eri_version) >= Constants.ERIVersions.index('2022')
new_floor.area = new_floor.is_thermal_boundary ? 1200.0 * new_floor.area / sum_ceiling_area : 0.01
else
new_floor.area = 1200.0 * new_floor.area / sum_ceiling_area
end
new_floor.area = 1200.0 * new_floor.area / sum_ceiling_area
end
end

Expand Down
60 changes: 0 additions & 60 deletions rulesets/tests/test_enclosure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ def test_enclosure_ceilings
end

hpxml_name = 'base-bldgtype-mf-unit.xml'
hpxml_name = _change_eri_version(hpxml_name, '2019')

_all_calc_types.each do |calc_type|
_hpxml, hpxml_bldg = _test_ruleset(hpxml_name, calc_type)
Expand All @@ -507,23 +506,8 @@ def test_enclosure_ceilings
_check_ceilings(hpxml_bldg, area: 1200, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
end
end
hpxml_name = _change_eri_version(hpxml_name, '2022')
_all_calc_types.each do |calc_type|
_hpxml, hpxml_bldg = _test_ruleset(hpxml_name, calc_type)
if [Constants.CalcTypeERIRatedHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 900, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
elsif [Constants.CalcTypeERIReferenceHome, Constants.CalcTypeCO2eReferenceHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 900, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
# No ceiling created because no thermal boundary ceiling
elsif [Constants.CalcTypeERIIndexAdjustmentDesign].include? calc_type
_check_ceilings(hpxml_bldg, area: 0.01, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
elsif [Constants.CalcTypeERIIndexAdjustmentReferenceHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 0.01, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
end
end

hpxml_name = 'base-bldgtype-mf-unit-adjacent-to-multiple.xml'
hpxml_name = _change_eri_version(hpxml_name, '2019')

_all_calc_types.each do |calc_type|
_hpxml, hpxml_bldg = _test_ruleset(hpxml_name, calc_type)
Expand All @@ -537,50 +521,6 @@ def test_enclosure_ceilings
_check_ceilings(hpxml_bldg, area: 1200, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
end
end
hpxml_name = _change_eri_version(hpxml_name, '2022')
_all_calc_types.each do |calc_type|
_hpxml, hpxml_bldg = _test_ruleset(hpxml_name, calc_type)
if [Constants.CalcTypeERIRatedHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 900, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
elsif [Constants.CalcTypeERIReferenceHome, Constants.CalcTypeCO2eReferenceHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 900, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
# No ceiling created because no thermal boundary ceiling
elsif [Constants.CalcTypeERIIndexAdjustmentDesign].include? calc_type
_check_ceilings(hpxml_bldg, area: 0.01, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
elsif [Constants.CalcTypeERIIndexAdjustmentReferenceHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 0.01, rvalue: 2.1, floor_type: HPXML::FloorTypeWoodFrame)
end
end

# Check ANSI-301-2022 with themal boundary ceilings
hpxml = HPXML.new(hpxml_path: File.join(@root_path, 'workflow', 'sample_files', hpxml_name))
hpxml_bldg = hpxml.buildings[0]
orig_ceiling = hpxml_bldg.floors.find { |floor| floor.is_ceiling }
orig_ceiling.area /= 3
hpxml_bldg.floors << orig_ceiling.dup
hpxml_bldg.floors[-1].exterior_adjacent_to = HPXML::LocationOtherMultifamilyBufferSpace
hpxml_bldg.floors[-1].id = "Floor#{hpxml_bldg.floors.size}"
hpxml_bldg.floors[-1].insulation_id = "Floor#{hpxml_bldg.floors.size}Insulation"
hpxml_bldg.floors[-1].insulation_assembly_r_value = 3.0
hpxml_bldg.floors << orig_ceiling.dup
hpxml_bldg.floors[-1].exterior_adjacent_to = HPXML::LocationOtherNonFreezingSpace
hpxml_bldg.floors[-1].id = "Floor#{hpxml_bldg.floors.size}"
hpxml_bldg.floors[-1].insulation_id = "Floor#{hpxml_bldg.floors.size}Insulation"
hpxml_bldg.floors[-1].insulation_assembly_r_value = 4.0
hpxml_name = File.basename(@tmp_hpxml_path)
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_all_calc_types.each do |calc_type|
_hpxml, hpxml_bldg = _test_ruleset(hpxml_name, calc_type)
if [Constants.CalcTypeERIRatedHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 900, rvalue: (2.1 * 300 + 3.0 * 300 + 4.0 * 300) / 900, floor_type: HPXML::FloorTypeWoodFrame)
elsif [Constants.CalcTypeERIReferenceHome, Constants.CalcTypeCO2eReferenceHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 900, rvalue: (2.1 * 300 + 33.3 * 300 + 33.3 * 300) / 900, floor_type: HPXML::FloorTypeWoodFrame)
elsif [Constants.CalcTypeERIIndexAdjustmentDesign].include? calc_type
_check_ceilings(hpxml_bldg, area: 1200, rvalue: 3.5, floor_type: HPXML::FloorTypeWoodFrame)
elsif [Constants.CalcTypeERIIndexAdjustmentReferenceHome].include? calc_type
_check_ceilings(hpxml_bldg, area: 1200, rvalue: 33.3, floor_type: HPXML::FloorTypeWoodFrame)
end
end

# Check w/ mass ceilings
hpxml_name = 'base-bldgtype-mf-unit-adjacent-to-multiple.xml'
Expand Down

0 comments on commit a87f3a3

Please sign in to comment.