Definition of a bore field using custom borehole positionsΒΆ
This example demonstrates the use of the borehole module to define the positions of the boreholes within a bore field from a list of borehole positions.
Two borehole positions (1 and 2) are intentionally added as duplicates and
are removed by calling the pygfunction.boreholes.remove_duplicates()
function.
The following script generates a bore field with 5 boreholes. The field is then plotted on a figure.
The script is located in: pygfunction/examples/custom_bore_field.py
1# -*- coding: utf-8 -*-
2""" Example of definition of a bore field using custom borehole positions.
3
4"""
5import pygfunction as gt
6
7
8def main():
9 # -------------------------------------------------------------------------
10 # Parameters
11 # -------------------------------------------------------------------------
12
13 # Borehole dimensions
14 D = 4.0 # Borehole buried depth (m)
15 H = 150.0 # Borehole length (m)
16 r_b = 0.075 # Borehole radius (m)
17
18 # Borehole positions
19 # Note: Two duplicate boreholes have been added to this list of positions.
20 # Position 1 has a borehole that is directly on top of another bore
21 # Position 2 has a borehole with radius inside of another bore
22 # The duplicates will be removed with the remove_duplicates function
23 pos = [(0.0, 0.0),
24 (0.0, 0.0), # Duplicate (for example purposes)
25 (0.03, 0.0), # Duplicate (for example purposes)
26 (5.0, 0.),
27 (3.5, 4.0),
28 (1.0, 7.0),
29 (5.5, 5.5)]
30
31 # -------------------------------------------------------------------------
32 # Borehole field
33 # -------------------------------------------------------------------------
34
35 # Build list of boreholes
36 field = [gt.boreholes.Borehole(H, D, r_b, x, y) for (x, y) in pos]
37
38 # -------------------------------------------------------------------------
39 # Find and remove duplicates from borehole field
40 # -------------------------------------------------------------------------
41
42 field = gt.boreholes.remove_duplicates(field, disp=True)
43
44 # -------------------------------------------------------------------------
45 # Draw bore field
46 # -------------------------------------------------------------------------
47
48 gt.boreholes.visualize_field(field)
49
50 return
51
52
53# Main function
54if __name__ == '__main__':
55 main()