Skip to content

Commit

Permalink
Fix for a few more unit tests. Hopefully all passing?
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaguire1 committed Dec 16, 2023
1 parent 047531b commit 6bf6989
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions HPXMLtoOpenStudio/tests/test_hvac_sizing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -477,15 +477,15 @@ def test_ground_loop
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_model, _test_hpxml, test_hpxml_bldg = _test_measure(args_hash)
assert_equal(3, test_hpxml_bldg.geothermal_loops[0].num_bore_holes)
assert_in_epsilon(688.5 / 3, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)
assert_in_epsilon(558.0 / 3, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)

# Bore depth greater than the max -> increase number of boreholes
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
hpxml_bldg.site.ground_conductivity = 0.2
hpxml_bldg.site.ground_conductivity = 0.18
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_model, _test_hpxml, test_hpxml_bldg = _test_measure(args_hash)
assert_equal(5, test_hpxml_bldg.geothermal_loops[0].num_bore_holes)
assert_in_epsilon(2062.9 / 5, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)
assert_in_epsilon(2120.0 / 5, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)

# Bore depth greater than the max -> increase number of boreholes until the max, set depth to the max, and issue warning
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
Expand All @@ -501,7 +501,7 @@ def test_ground_loop
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_model, _test_hpxml, test_hpxml_bldg = _test_measure(args_hash)
assert_equal(10, test_hpxml_bldg.geothermal_loops[0].num_bore_holes)
assert_in_epsilon(3187.0 / 10, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)
assert_in_epsilon(2340.0 / 10, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)
end

def test_g_function_library_linear_interpolation_example
Expand Down

0 comments on commit 6bf6989

Please sign in to comment.