1818from GHEtool .VariableClasses import MonthlyGeothermalLoadAbsolute , HourlyGeothermalLoad , EERCombined , \
1919 HourlyBuildingLoad , EER , HourlyBuildingLoadMultiYear
2020from GHEtool .Methods import *
21+ from GHEtool import *
2122
2223data = GroundConstantTemperature (3 , 10 )
2324data_ground_flux = GroundFluxTemperature (3 , 10 )
@@ -294,7 +295,7 @@ def test_sizing_with_use_constant_Rb():
294295 borefield .load = load
295296 assert not borefield .borehole .use_constant_Rb
296297 borefield .calculation_setup (L4_sizing = True )
297- assert np .isclose (205.49615778557904 , borefield .size ())
298+ assert np .isclose (205.4926086157351 , borefield .size ())
298299 assert np .isclose (182.17320067531486 , borefield .size (use_constant_Rb = True ))
299300
300301
@@ -303,7 +304,7 @@ def test_size_with_different_peak_lengths(borefield):
303304
304305 borefield .load .peak_injection_duration = 8
305306 borefield .load .peak_extraction_duration = 6
306- assert np .isclose (99.33058400216774 , borefield .size (L3_sizing = True ))
307+ assert np .isclose (99.36581644570013 , borefield .size (L3_sizing = True ))
307308
308309
309310def test_convergence_eer_combined ():
@@ -468,3 +469,31 @@ def test_optimise_methods_different_start_year_dhw():
468469
469470 load = HourlyBuildingLoadMultiYear (load .hourly_heating_load_simulation_period ,
470471 load .hourly_cooling_load_simulation_period )
472+
473+
474+ def test_case_issue_390 ():
475+ ground_data = GroundFluxTemperature (1.57 , 9.6 , flux = 0.07 )
476+ fluid = TemperatureDependentFluidData ('MPG' , 25 , False )
477+ flow = ConstantFlowRate (mfr = 0.3 )
478+ pipe = SingleUTube (1.5 , 0.013 , 0.016 , 0.4 , 0.035 )
479+
480+ borehole = Borehole (fluid , pipe , flow )
481+
482+ peak_cooling = [0 , 0 , 0 , 0 , 6.225 , 11.339999999999998 , 15 , 14.639999999999999 , 8.235 , 0 , 0 , 0 ]
483+ peak_heating = [31.3 , 31.0183 , 25.102600000000002 , 17.7158 , 8.2632 , 0 , 0 , 0 , 2.0658 , 11.5184 , 21.8474 , 29.2342 ]
484+ baseload_cooling = [0 , 0 , 0 , 0 , 1232 , 2255 , 2970 , 2904 , 1639 , 0 , 0 , 0 ]
485+ baseload_heating = [11017.6 , 10892.4 , 8826.6 , 6260 , 2817 , 0 , 0 , 0 , 751.1999999999999 , 4069 , 7699.8 , 10266.4 ]
486+
487+ load = MonthlyBuildingLoadAbsolute (baseload_heating , baseload_cooling , peak_heating , peak_cooling , dhw = 5000 ,
488+ efficiency_dhw = 3 , efficiency_cooling = 20 , simulation_period = 25 )
489+
490+ borefield = Borefield (ground_data = ground_data , load = load )
491+
492+ borefield .create_rectangular_borefield (4 , 4 , 6 , 6 , 100 , 1 , 0.07 )
493+
494+ borefield .set_min_avg_fluid_temperature (0 )
495+ borefield .set_max_avg_fluid_temperature (17 )
496+
497+ borefield .borehole = borehole
498+ borefield .size_L3 ()
499+ assert borefield .H == 86.4119598683636
0 commit comments