Definition of a bore field using external text fileΒΆ

This example demonstrates the use of the borehole module to define the positions of the boreholes within a bore field from an external text file.

The following script generates a bore field with 32 boreholes. The field is then plotted on a figure.

The script is located in: ./pygfunction/examples/custom_bore_field_from_file.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    # Filepath to bore field text file
14    filename = './data/custom_field_32_boreholes.txt'
15
16    # -------------------------------------------------------------------------
17    # Borehole field
18    # -------------------------------------------------------------------------
19
20    # Build list of boreholes
21    field = gt.boreholes.field_from_file(filename)
22
23    # -------------------------------------------------------------------------
24    # Draw bore field
25    # -------------------------------------------------------------------------
26
27    gt.boreholes.visualize_field(field)
28
29    return
30
31
32# Main function
33if __name__ == '__main__':
34    main()