1"""
2This document is an example of how the borefield configuration can influence the total borehole length and hence the cost of the borefield.
3"""
4
5# import all the relevant functions
6from GHEtool import GroundConstantTemperature, Borefield, MonthlyGeothermalLoadAbsolute
7import numpy as np
8import pygfunction as gt
9
10
11def effect_borefield_configuration():
12 # GroundData for an initial field of 11 x 11
13 data = GroundConstantTemperature(3, 10)
14 borefield_gt = gt.boreholes.rectangle_field(11, 11, 6, 6, 110, 1, 0.075)
15
16 # Monthly loading values
17 peak_cooling = np.array([0., 0, 34., 69., 133., 187., 213., 240., 160., 37., 0., 0.]) # Peak cooling in kW
18 peak_heating = np.array([160., 142, 102., 55., 0., 0., 0., 0., 40.4, 85., 119., 136.]) # Peak heating in kW
19
20 # annual heating and cooling load
21 annual_heating_load = 150 * 10 ** 3 # kWh
22 annual_cooling_load = 400 * 10 ** 3 # kWh
23
24 # percentage of annual load per month (15.5% for January ...)
25 monthly_load_heating_percentage = np.array([0.155, 0.148, 0.125, .099, .064, 0., 0., 0., 0.061, 0.087, 0.117, 0.144])
26 monthly_load_cooling_percentage = np.array([0.025, 0.05, 0.05, .05, .075, .1, .2, .2, .1, .075, .05, .025])
27
28 # resulting load per month
29 monthly_load_heating = annual_heating_load * monthly_load_heating_percentage # kWh
30 monthly_load_cooling = annual_cooling_load * monthly_load_cooling_percentage # kWh
31
32 # set the load
33 load = MonthlyGeothermalLoadAbsolute(monthly_load_heating, monthly_load_cooling, peak_heating, peak_cooling)
34
35 # create the borefield object
36 borefield = Borefield(load=load)
37
38 borefield.set_ground_parameters(data)
39 borefield.set_borefield(borefield_gt)
40 borefield.Rb = 0.2
41
42 # set temperature boundaries
43 borefield.set_max_avg_fluid_temperature(16) # maximum temperature
44 borefield.set_min_avg_fluid_temperature(0) # minimum temperature
45
46 # size borefield
47 depth = borefield.size()
48 print("The borehole depth is:", depth, "m for a 11x11 field")
49 print("The total length is:", int(depth * 11 * 11), "m")
50 print("------------------------")
51
52
53 # borefield of 6x20
54 data = GroundConstantTemperature(3, 10)
55 borefield_gt = gt.boreholes.rectangle_field(6, 20, 6, 6, 110, 1, 0.075)
56
57 # set ground parameters to borefield
58 borefield.set_borefield(borefield_gt)
59 borefield.set_ground_parameters(data)
60
61 # set Rb
62 borefield.Rb = 0.2
63
64 # size borefield
65 depth6_20 = borefield.size()
66 print("The borehole depth is:", depth6_20, "m for a 6x20 field")
67 print("The total length is:", int(depth6_20 * 6 * 20), "m")
68 print("The second field is hence", -int(depth6_20 * 6 * 20) + int(depth * 11 * 11), "m shorter")
69
70 borefield.print_temperature_profile()
71
72
73if __name__ == "__main__": # pragma: no cover
74 effect_borefield_configuration()