Definition of a bore field using pre-defined configurationsΒΆ

This example demonstrates the use of the borehole module to define the positions of the boreholes within a bore field using pre-define bore field configurations.

The following script generates rectangular, box-shaped, U-shaped and L-shaped bore fields in a 4 x 3 configuration as well as a circular field of 8 boreholes. Each field is then plotted on a separate figure.

The script is located in: pygfunction/examples/regular_bore_field.py

 1# -*- coding: utf-8 -*-
 2""" Example of definition of a bore field using pre-defined configurations.
 3
 4"""
 5import matplotlib.pyplot as plt
 6
 7import pygfunction as gt
 8
 9
10def main():
11    # -------------------------------------------------------------------------
12    # Parameters
13    # -------------------------------------------------------------------------
14
15    # Borehole dimensions
16    D = 4.0             # Borehole buried depth (m)
17    H = 150.0           # Borehole length (m)
18    r_b = 0.075         # Borehole radius (m)
19    B = 7.5             # Borehole spacing (m)
20    N_1 = 4             # Number of boreholes in the x-direction (columns)
21    N_2 = 3             # Number of boreholes in the y-direction (rows)
22
23    # Circular field
24    N_b = 8     # Number of boreholes
25    R = 5.0     # Distance of the boreholes from the center of the field (m)
26
27    # -------------------------------------------------------------------------
28    # Borehole fields
29    # -------------------------------------------------------------------------
30
31    # Rectangular field of 4 x 3 boreholes
32    rectangularField = gt.boreholes.rectangle_field(N_1, N_2, B, B, H, D, r_b)
33
34    # Rectangular field triangular field of 4 x 3 borehole rows
35    staggeredRectangularField = gt.boreholes.staggered_rectangle_field(
36        N_1, N_2, B, B, H, D, r_b, False)
37
38    # Dense field triangular field of 4 x 3 borehole rows
39    denseRectangularField = gt.boreholes.dense_rectangle_field(
40        N_1, N_2, B, H, D, r_b, False)
41
42    # Box-shaped field of 4 x 3 boreholes
43    boxField = gt.boreholes.box_shaped_field(N_1, N_2, B, B, H, D, r_b)
44
45    # U-shaped field of 4 x 3 boreholes
46    UField = gt.boreholes.U_shaped_field(N_1, N_2, B, B, H, D, r_b)
47
48    # L-shaped field of 4 x 3 boreholes
49    LField = gt.boreholes.L_shaped_field(N_1, N_2, B, B, H, D, r_b)
50
51    # Circular field of 8 boreholes
52    circleField = gt.boreholes.circle_field(N_b, R, H, D, r_b)
53
54    # -------------------------------------------------------------------------
55    # Draw bore fields
56    # -------------------------------------------------------------------------
57    for field in [
58            rectangularField, staggeredRectangularField, denseRectangularField,
59            boxField, UField, LField, circleField]:
60        gt.boreholes.visualize_field(field)
61        plt.show()
62
63    return
64
65
66# Main function
67if __name__ == '__main__':
68    main()