Carbonate precipitation is a process that can be used to consolidate soils. The precipitation of carbonate in the ground can be followed using geophysical methods. Induced polarisation (IP) has proven useful for this. In this dataset, the 3D distribution of carbonate precipitation is inferred from field time-domain IP data. See Sina et al. (200X) for more details.
# trick to import a resipy from a local copy (you won't need that if you `pip install resipy`)
import sys
sys.path.append('../src')
from resipy import R2
import numpy as np
import matplotlib.pyplot as plt
import pyvista as pv
datadir = '../src/examples/dc-2d-timelapse/data/'
k = R2(typ='cR3t')
k.create3DSurvey(datadir, lineSpacing=2, zigzag=False,
name='mergedSurvey', ftype='Syscal')
Working directory is: /media/jkl/data/phd/tmp/resipy/src/resipy clearing dirname 308/344 reciprocal measurements found. 0 measurements error > 20 % 308/344 reciprocal measurements found. 0 measurements error > 20 % 308/344 reciprocal measurements found. 0 measurements error > 20 % 266/314 reciprocal measurements found. 0 measurements error > 20 %
k.showPseudo(threed=True)
k.createMesh(cl_factor=50)
k.showMesh()
Creating tetrahedral mesh...fmd in gmshWrap.py: 2.770128 writing .geo to file completed, save location: /media/jkl/data/phd/tmp/resipy/src/resipy/invdir Reading mesh3d.msh Gmsh version == 3.x reading node coordinates... Determining element type...Tetrahedra Reading connection matrix... ignoring 15498 elements in the mesh file, as they are not required for R2/R3t Finished reading .msh file interpolating topography onto mesh using triangulate interpolation...done Done ResIPy Estimated RAM usage = 0.184715 Gb done
k.invert()
Writing .in file and protocol.dat...
divide by zero encountered in log10
done! --------------------- MAIN INVERSION ------------------ >> c R 3 t C o m p l e x R e s i s t i v i t y M o d e l v1.0 << >> Date: 01-09-2020 >> My beautiful 3D survey >> I n v e r s e S o l u t i o n S e l e c t e d << >> T e t r a h e d r a l E l e m e n t M e s h << >> Reading mesh file >> Determining storage needed for finite element conductance matrix >> Generating index array for finite element conductance matrix >> Reading resistivity model from res0.dat >> N o r m a l R e g u l a r i s a t i o n << >> Memory estimates: For 1000 measurements the memory needed is: 0.48 Gb For 2000 measurements the memory needed is: 0.94 Gb For 5000 measurements the memory needed is: 2.32 Gb For 10000 measurements the memory needed is: 4.61 Gb Measurements read: 751 Measurements rejected: 0 Geometric mean of apparent resistivities: 0.60376E+02 >> Total Memory required: 0.367 Gb Processing frame 1 - output to file f001.dat Iteration 1 Initial RMS Misfit: 28.43 Number of data ignored: 0 Alpha: 608.5998 RMS Misfit: 3.753 Roughness: 17.472 Alpha: 282.4870 RMS Misfit: 3.680 Roughness: 18.290 Alpha: 131.1188 RMS Misfit: 3.122 Roughness: 27.686 Alpha: 60.8600 RMS Misfit: 2.865 Roughness: 36.282 Alpha: 28.2487 RMS Misfit: 2.678 Roughness: 48.706 Alpha: 13.1119 RMS Misfit: 2.625 Roughness: 63.662 Alpha: 6.0860 RMS Misfit: 2.698 Roughness: 83.243 Step length set to 1.00000 Final RMS Misfit: 2.62 Updated data weights Iteration 2 Initial RMS Misfit: 1.75 Number of data ignored: 0 Alpha: 7.1669 RMS Misfit: 4.668 Roughness: 60.212 Alpha: 3.3266 RMS Misfit: 1.867 Roughness: 88.371 Alpha: 1.5441 RMS Misfit: 4.651 Roughness: 89.914 Step length set to 0.50000 Final RMS Misfit: 1.23 Attempted to update data weights and caused overshoot treating as converged Final phase improvement Iteration 1 Initial Phase RMS Misfit: 0.000 Number of data ignored: 0 WARNING: Initial RMS shows solution ! - Your error estimates (or c_wgt) are too high End of data: Terminating >> Program ended normally 1/1 results parsed (1 ok; 0 failed)
print(k.meshResults[0].df.columns) # view attributes available
k.showResults(attr='Magnitude(ohm.m)', pvslices=[[3],[2,4],[0]], vmin=10, vmax=100,
background_color=(1,1,1))
Index(['param', 'elm_id', 'region', 'cellType', 'X', 'Y', 'Z', 'Magnitude(ohm.m)', 'Phase(mrad)', 'Magnitude(log10)', 'Sigma_real(log10)', 'Sigma_imag(log10)', 'Sensitivity_map(log10)', 'Parameter_zones', 'Conductivity(mS/m)', 'Chargeability(mV/V)'], dtype='object')
k.showResults(attr='Phase(mrad)', pvslices=[[3],[2,4],[0]],
background_color=(1,1,1), vmin=0, vmax=0.5)