##### Personal tools
You are here: Home Use Meshing a borehole path in 3D box as exact internal edges

# Meshing a borehole path in 3D box as exact internal edges

Up to Use

### Meshing a borehole path in 3D box as exact internal edges

Posted by Linus Walter at June 10. 2021

Dear community,

I am working right now on two boreholes which are represented each via a polyline in a geological body.

My problem

In order to use the geometry in the OpenGeoSys Software, the edges of each segment of the polyline need to be the same with the edges of the 3D elements of the the geological body, in my case tetrahedrons.
Well the unstructured meshing with the NETGEN Algorithm never leads to a satisfying result.
Instead, additional nodes are sometimes created on the existing borehole path (see fig_01 in the google drive folder), or the edges of the borehole path are not included as edges of the tetrahedrons.

The Workflow so far

1. Creating all elements in the geompy module
2. Partition the geological body aka a box by a geological layer, all points/vertices of the borehole path and the boreholepath as polyline via geompy (see Line 1262 in the python file)
3. Load the python file in the salome geometry
4. Assign groups in the partitioned geometry
5. Create main Mesh on partitioned box with
- NETGEN 3D: Default; NETGEN 2Default; Wire discretisation: Local Length
6. Submesh on both borehole paths with 1D hypothesis: Wire discretisation, Number of Segments = 1
7. Submesh on an inner box which contains the boreholes in order to have a refined mesh in this region. Used Algorithm: Wire discretisation via Local Length on the 1D Elements

I would be really great if someone could help me with this issue. ❤️‍

Best regards and thank you in advance!

Linus

### Re: Meshing a borehole path in 3D box as exact internal edges

Posted by Linus Walter at June 15. 2021

Dear Community,

just wanted to update that my problem is solved. Here the solution if in future anyone else will have the same issue.

First of all it needs to be mentioned that the Netgen Algorithm doesn't recognise the borehole path as internal edge very well. The solution  is to extrude the polyline of the borehole path in two perpendicular directions (select option "both directions"). The intersecting line of the two created faces is the boreholepath (see picture).

Here the workflow:

1. Create the vertices of the Borehole path

2. Create a polyline (not spline) through the points of the borehole path

3. Extrude Path in two perpendicular directions, e.g. X-Vector and Y-Vector. The borehole is then the intersection line of both planes/faces

4. Partition Reservoir by the vertices of the borehole path, the polyline of the borehole path and the extruded faces of the borehole path

5. Assign groups to the polyline and the faces of the extrusion

6. Mesh faces of the extrusion

7. Create Mesh from Geometry --> Select polyline of the borehole path

Attachments