https://github.com/hardcode3/salamesh
A python geological mesh software to verticalize and horizontalize horizons and faults.
https://github.com/hardcode3/salamesh
geology laplace least-squares mesh poisson python
Last synced: 7 months ago
JSON representation
A python geological mesh software to verticalize and horizontalize horizons and faults.
- Host: GitHub
- URL: https://github.com/hardcode3/salamesh
- Owner: Hardcode3
- License: mit
- Created: 2022-12-08T13:51:34.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-13T14:11:17.000Z (over 2 years ago)
- Last Synced: 2025-01-23T19:38:49.532Z (9 months ago)
- Topics: geology, laplace, least-squares, mesh, poisson, python
- Language: Python
- Homepage:
- Size: 7.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#  SalaMesh
## Overview
**A python geological mesh software to verticalize and horizontalize faults and horizons.**
This work is based on the [least squares lecture of Dmitri Sokolov](https://github.com/ssloy/least-squares-course).
The work done is described in the [following repository](https://github.com/ssloy/ENSG.git).
See [main](main.py) for more details.### Meshes
There are four geological slices called [chevron](chevron), [ifp1](ifp1), [ifp2](ifp2) and [shell](shell).
These slices describe 2D geological models having zero or more faults and some horizons.
Each mesh has different object files describing either the slice, the horizons or the set of faults.
Slices can have different connex components.
The attributes.py files contains preprocessed data about horizon's and fault's edges.
Mesh class is coded in [mesh.py](mesh.py).## General scheme
We processed the mesh using the following scheme, for each dimension (x, y):
1. Load the mesh
2. Constructs containers for horizon's and fault's edges
3. Beautify triangles while keeping the original shape
4. Horizontalize geological stratifications / verticalize faults
5. Write output mesh## Least squares
Editing the mesh amounts to minimizing energy functions. Hence, we use least square's formulation for our problem.
In our work, we mainly:
- Optimized the triangles using Poisson's equation
- Minimized distance between some vertice's positions (for faults and horizons)
- Lower / raise vertices (for visualization purposes)### Poisson's problem
First the mesh has to be smoothed in order to show regular triangles.
For this, Poisson's equation has been implemented.
We minimized the difference of distances between the current edge length and the processed one. It was done for the x, and y coordinates.
### Constraints
#### On horizons
##### Horizontalizing geological layers
In order to make a geological horizon flat, the y-coordinate variation was minimized, between a reference point and the origin vertice of each edge. The process has been repeated for each horizon, leading to the following result:
#### On faults
##### Verticalizing faults
Concerning the fault, the aim is to minimize the x coordinate variation between the origin and destination vertices for each edge of the fault. With this condition the faults were verticalized.
##### Joining connexe components
Another condition must be added to prevent the connexe component from splitting. The connexe components were joined by minimizing the x distance between an edge and its opposite along the fault, the same was done for the y coordinate.By applying together the minimizations mentioned above, the following results are obtained:
###### ifp1
###### ifp2

###### chevron
###### shell
