gimli-org / gimli

Geophysical Inversion and Modeling Library :earth_africa:

Home Page:https://www.pygimli.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Forward mesh. Can it have flexible density? (ERT)

mariosgeo opened this issue · comments

I am trying to understand how you generate the forward mesh (btw, is anyway we can export it?).
My issue is with the size of the elements of elements close to the electrodes. In order to make the mesh finer close to the electrodes, I am adding nodes just below each electrode with the following:

data=ert.load(yt[i])
plc = mt.createParaMeshPLC(data, paraDx=0.5,paraDepth=40, paraMaxCellSize=2,
                         boundaryMaxCellSize=200)

for s in data.sensors():
    plc.createNode(s-[0.,0.3], marker=-99)
    
mesh = mt.createMesh(plc, quality=1.3)

The issue is that the number of elements on surface are just too many for the inversion (imho) and it returns some artifacts on the surface, in noise data (see Picture 1, at say 90-100m along axis). The question:

I assume, when you create the forward mesh, you spilt each element by adding a node in the center (smoothing like in Picture 2) , thus the forward mesh has 3 times more elements. Is anyway we can ask pygimli to add two or more nodes only on elements that are close to surface (or spilt them, like Picture 3), and the rest to have just one node?

a4_ddmgg
Picture 1

An-example-of-the-centroid-split-The-centroid-of-the-planar-triangle-ABC-is-added-and
node?
Picture 2

Centroid-of-a-triangle-polygon-III-PRELIMINARIES
Picture 3

Best

You can export the forward mesh with:

mt.fop.mesh.exportVTK(FILENAME)

The default refinement strategy for the forward operator is a simple h-refine, which means each cell is subdivided with new nodes on its edges without new nodes inside the cell, e.g., each Triangle is divided into 4 new triangles.

Unfortunately, there is not yet an adaptive or selective refinement strategy. However, it might be possible to manually insert a appropriate forward mesh with some effort. You can also try to avoid your manual node refinement and play with the paraDX parameter, which should already refine in electrode vicinity by dx.

I'm a little bit unsure if your artefacts came from a to dense mesh. Usually the regularization assures a mesh independent model, assuming the model is not to coarse. A 'to' fine mesh should only affect waiting time. You can test it with a manual h-refine of your input mesh

mesh = mesh.refineH2()

The resulting model should then look the same but 'smoother'.

Such model artifacts sometime can happen due to data artifacts, wrong geometric factors due to differences between real and measured electrode positions or topography, or just 3d effects.

I consider the question answered.