ogstools.meshlib.gmsh_BHE module#

class ogstools.meshlib.gmsh_BHE.Groundwater[source]#

Bases: object

Groundwater(begin: float = -30, isolation_layer_id: int = 1, upstream: tuple[float, float] = (160, 200), downstream: tuple[float, float] = (340, 20))

begin: float = -30#

depth of groundwater begin (negative) in m from top surface

isolation_layer_id: int = 1#

number of the groundwater isolation layer (count starts with 0)

upstream: tuple[float, float] = (160, 200)#

Tuple of length 2 defining the angular range (in degrees) of groundwater inflow surfaces. Angles are measured on a 0 - 359° circle, where 0° corresponds to the +x axis direction and values increase counterclockwise. The first value defines the start angle, the second defines the end angle. If the start angle is larger than the end angle, the range wraps around 0° (e.g., (359, 1) covers 359° -> 0° -> 1°).

downstream: tuple[float, float] = (340, 20)#

Tuple of length 2 defining the angular range (in degrees) of groundwater outflow surfaces. Angles are measured on a 0 - 359° circle, where 0° corresponds to the +x axis direction and values increase counterclockwise. The first value defines the start angle, the second defines the end angle. If the start angle is larger than the end angle, the range wraps around 0° (e.g., (340, 20) covers 340° -> 359° -> 0° -> 20°).

__init__(begin=-30, isolation_layer_id=1, upstream=(160, 200), downstream=(340, 20))#
class ogstools.meshlib.gmsh_BHE.BHE[source]#

Bases: object

(B)orehole (H)eat (E)xchanger

x: float = 50.0#

x-coordinate of the BHE in m

__init__(x=50.0, y=50.0, z_begin=-1.0, z_end=-60.0, borehole_radius=0.076)#
y: float = 50.0#

y-coordinate of the BHE in m

z_begin: float = -1.0#

BHE begin depth (zero or negative) in m

z_end: float = -60.0#

BHE end depth (negative) in m

borehole_radius: float = 0.076#

borehole radius in m

ogstools.meshlib.gmsh_BHE.gen_bhe_mesh(model_area, layer, groundwater, BHE_Array, refinement_area, target_z_size_coarse=7.5, target_z_size_fine=1.5, n_refinement_layers=2, meshing_type='prism', inner_mesh_size=5.0, outer_mesh_size=10.0, propagation=1.1, order=1, meshname='bhe_mesh')[source]#

Create a generic BHE mesh for the Heat_Transport_BHE-Process with additionally submeshes at the top, at the bottom and the groundwater in- and outflow, which is returned as ogstools.meshlib.Meshes Refinement layers are placed at the BHE-begin, the BHE-end and the groundwater start/end. See detailed description of the parameters below:

Parameters:
  • model_area (Polygon) – A shapely.Polygon (see https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html) of the model. No holes are allowed.

  • layer (float | list[float]) – List of the soil layer thickness in m

  • groundwater (Groundwater | list[Groundwater]) – List of groundwater layers, where every is specified by a tuple of three entries: [depth of groundwater begin (negative), number of the groundwater isolation layer (count starts with 0), groundwater upstream and downstream as tuple of 2 thresholds angles starting with 0 at +x (first value start, second end), empty list [] for no groundwater flow

  • BHE_Array (BHE | list[BHE]) – List of BHEs, where every BHE is specified by a tuple of five floats: [x-coordinate BHE, y-coordinate BHE, BHE begin depth (zero or negative), BHE end depth (negative), borehole radius in m]

  • target_z_size_coarse (float) – maximum edge length of the elements in m in z-direction, if no refinemnt needed

  • target_z_size_fine (float) – maximum edge length of the elements in the refinement zone in m in z-direction

  • n_refinement_layers (int) – number of refinement layers which are evenly set above and beneath the refinemnt depths (see general description above)

  • meshing_type (Literal['prism', 'structured']) – ‘structured’ and ‘prism’ are supported

  • refinement_area (Polygon) – A shapely.Polygon (see https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html) of the refinement_area. No holes are allowed.

  • inner_mesh_size (float) – mesh size inside the refinement area in m

  • outer_mesh_size (float) – mesh size outside of the refinement area in m

  • propagation (float) – growth of the outer_mesh_size, only supported by meshing_type ‘structured’

  • order (int) – Define the order of the mesh: 1 for linear finite elements / 2 for quadratic finite elements

  • meshname (str) – The name of the domain mesh.

Returns:

A ot.Meshes object

Return type:

Meshes

# .. image:: ../../examples/howto_preprocessing/gen_bhe_mesh.png