def get_scheme():
    scheme = ert.createData(elecs=np.linspace(start=0, stop=50, num=51),
                            schemeName='dd')
    # Not strictly required, but we switch potential electrodes to yield
    # positive geometric factors. Note that this was also done for the
    # synthetic data inverted later.
    m = scheme['m']
    n = scheme['n']
    scheme['m'] = n
    scheme['n'] = m
    scheme.set('k', [1 for x in range(scheme.size())])
    return scheme
        label=r"$log_{10}(|\rho|~[\Omega m])$"
    )
    pg.show(mesh, data=np.abs(rho), ax=axes[1], label=r"$|\rho|~[\Omega m]$")
    pg.show(
        mesh, data=np.arctan2(np.imag(rho), np.real(rho)) * 1000,
        ax=axes[2],
        label=r"$\phi$ [mrad]",
        cMap='jet_r'
    )
    fig.tight_layout()
    fig.show()


###############################################################################
# Create a measurement scheme for 51 electrodes, spacing 1
scheme = ert.createData(elecs=np.linspace(start=0, stop=50, num=51),
                        schemeName='dd')
# Not strictly required, but we switch potential electrodes to yield positive
# geometric factors. Note that this was also done for the synthetic data
# inverted later.
m = scheme['m']
n = scheme['n']
scheme['m'] = n
scheme['n'] = m
scheme.set('k', [1 for x in range(scheme.size())])

###############################################################################
# Mesh generation for the inversion
world = mt.createWorld(
    start=[-15, 0], end=[65, -30], worldMarker=False, marker=2)

# local refinement of mesh near electrodes
Exemplo n.º 3
0
                        isClosed=True,
                        addNodes=3,
                        interpolate='spline',
                        marker=5)

###############################################################################
# Merge geometry definition into a Piecewise Linear Complex (PLC)
geom = world + block + poly

###############################################################################
# Optional: show the geometry
pg.show(geom)

###############################################################################
# Create a Dipole Dipole ('dd') measuring scheme with 21 electrodes.
scheme = ert.createData(elecs=np.linspace(start=-15, stop=15, num=21),
                        schemeName='dd')

###############################################################################
# Put all electrode (aka sensors) positions into the PLC to enforce mesh
# refinement. Due to experience, its convenient to add further refinement
# nodes in a distance of 10% of electrode spacing to achieve sufficient
# numerical accuracy.
for p in scheme.sensors():
    geom.createNode(p)
    geom.createNode(p - [0, 0.1])

# Create a mesh for the finite element modelling with appropriate mesh quality.
mesh = mt.createMesh(geom, quality=34)

# Create a map to set resistivity values in the appropriate regions
# [[regionNumber, resistivity], [regionNumber, resistivity], [...]
Exemplo n.º 4
0
Compare 2D FEM modelling with 1D VES sounding with and without complex
resistivity values.
"""
import numpy as np

import pygimli as pg
import pygimli.meshtools as mt
from pygimli.physics import ert
# from pygimli.physics.ert import simulate as simulateERT
from pygimli.physics.ert import VESModelling, VESCModelling
# from pygimli.physics.ert import createERTData

###############################################################################
# First we create a data configuration of a 1D Schlumberger sounding with
# 20 electrodes and and increasing MN/2 electrode spacing from 1m to 24m.
scheme = ert.createData(pg.utils.grange(start=1, end=24, dx=1, n=10, log=True),
                        sounding=True)

###############################################################################
# First we create a geometry that covers the sought geometry.
# We start with a 2 dimensional simulation world
# of a bounding box [-200, -100] [200, 0], the layer at -5m and some suitable
# requested cell sizes.
plc = mt.createWorld(start=[-200, -100],
                     end=[200, 0],
                     layers=[-10],
                     area=[5.0, 500])

###############################################################################
# To achieve a necessary numerical accuracy, we need some local mesh refinement
# in the vicinity of the electrodes. However, since we don't need the
# electrode (aka sensor) positions to be present as nodes in the geometry, we only add forced mesh
Exemplo n.º 5
0
        return self.data_


# class DataSchemeMultipleGradient(...)

if __name__ == '__main__':
    schemes = ['wa', 'wb', 'pp', 'pd', 'dd', 'slm', 'gr', 'hw']
    fig, ax = pg.plt.subplots(3, 3)
    kw = dict(cMin=10,
              cMax=1000,
              logScale=True,
              colorBar=False,
              cMap="viridis")
    for i, schemeName in enumerate(schemes):
        shm = ert.createData(elecs=41, schemeName=schemeName)
        print(schemeName, shm)
        k = ert.geometricFactor(shm)
        mg = DataSchemeManager()
        longname = mg.scheme(schemeName).name
        ert.show(shm,
                 vals=np.abs(k),
                 ax=ax.flat[i],
                 colorBar=1,
                 logScale=0,
                 label='k ' + longname + ')-' + schemeName)

    createColorBarOnly(**kw, ax=ax.flat[-1], aspect=0.1)
    pg.plt.show()
# %%
# import matplotlib.pyplot as plt