An introduction to pyGIMLi
RWTH Aachen University
Geophysical Imaging and Monitoring (GIM)
Binley et al. (2015)
–> model coupling is challenging and requires versatile open-source software
The default inversion framework is based on the generalized Gauss-Newton method and is compatible with any given forward operator and thus applicable to various physical problems.
\[ \mathbf{W}_\text{d} (\mathbf{F}(\mathbf{m})-\mathbf{d}) \|^2_2 + \lambda \| \mathbf{W}_\text{m} (\mathbf{m}-\mathbf{m_0}) \|^2_2 \rightarrow\min \]
Note
The inversion is physics-independent and very flexible in terms of adding prior information, regularization and integrating different geophysical methods.
Website and documentation: https://pygimli.org
Rücker, C., Günther, T., Wagner, F.M., 2017. pyGIMLi: An open-source library for modelling and inversion in geophysics, Computers and Geosciences, 109, 106-123.
pyGIMLi is organized in three different abstraction levels:
In the application level, ready-to-use method managers and frameworks are provided. Method managers (pygimli.manager) hold all relevant functionality related to a geophysical method. A method manager can be initialized with a data set and used to analyze and visualize this data set, create a corresponding mesh, and carry out an inversion. Various method managers are available in pygimli.physics. Frameworks (pygimli.frameworks) are generalized abstractions of standard and advanced inversions tasks such as time-lapse or joint inversion for example. Since frameworks communicate through a unified interface, they are method independent.
In the modelling level, users can set up customized forward operators that map discretized parameter distributions to a data vector. Once defined, it is straightforward to set up a corresponding inversion workflow or combine the forward operator with existing ones.
The underlying equation level allows to directly access the finite element (pygimli.solver.solveFiniteElements()) and finite volume (pygimli.solver.solveFiniteVolume()) solvers to solve various partial differential equations on unstructured meshes, i.e. to approach various physical problems with possibly complex 2D and 3D geometries.
pyGIMLi objects (Mesh, DataContainer, matrix types, etc.), geostatistical vs. smoothness regularization, treatment of subsurface regions, adding prior data.LSQRinversion framework enabling additional parameter relations (from Wagner et al., 2019)MultiFrameModelling framework for temporally/spectrally/spatially constrained inversionTimelapseERT class with different strategies, e.g. 4D inversionpip install pygimli for easier installation (e.g. on Google Colab)“In open source, we feel strongly that to really do something well, you have to get a lot of people involved.”
– Linus Torvalds
#pyGIMLi chat on Mattermost!import pygimli as pg
import pygimli.meshtools as mt
# Create a simple 3 layer model
world = mt.createWorld(start=[-20, 0], end=[20, -16], layers=[-2, -8],
worldMarker=False)
# Create a heterogeneous block
block = mt.createRectangle(start=[-6, -3.5], end=[6, -6.0],
marker=4, boundaryMarker=10, area=0.1)
# Merge geometrical entities
geom = world + block
pg.show(geom, markers=True)\[c \frac{\partial u}{\partial t} = \nabla\cdot(a \nabla u) + b u + f(\mathbf{r},t)~~|~~\Omega_{\text{Mesh}}\]
Mesh: Mesh: Nodes: 2987 Cells: 5782 Boundaries: 8768
Assembling time: 0.0465015
Solving time: 0.005456584
Geophysical Imaging and Monitoring