BRT Toutorial
BRT Toutorial
BRT Toutorial
Thomas Gnther & Carsten Rcker u u March 16, 2009 version 1.0
In this tutorial we like to show the users of the BERT inversion how to work with our software. Some small but instructive examples, all real eld cases, are presented to show how the dierent options in the conguration le can be used to yield case-specic inversion results. The examples start from 2d inversion of surface measurements with and without topography. We show how to include structural information and how buried electrodes are handled. 3d inversion is done on a at surface and topography. For the latter two main techniques are presented. Also, measurements on closed objects, such as trees, humans, soil columns and model tanks are shown. Finally we show how to handle time-lapse resistivity measurements. The user is invited to follow by processing the data in the examples directory.
Leibniz Institute for Applied Geophysics, Hannover Institute of Geology and Geophysics, University of Leipzig
Contents
1 Introduction 1.1 BERT, DCFEMLib, GIMLi - Nomen est omen . . . . . . . . . . . . . . . . . . 1.2 Options and commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2D 2.1 2.2 2.3 2.4 2.5 2.6 surface measurements A at surface example . . . . Regularisation and data t . Mesh quality and renement Incorporation of topography . Structural constraints . . . . A sophisticated example: The 3 3 4 5 6 6 7 7 8 9 10 12 13 13 15 15 16 19 19 19 20 20 21 21 22 23 24 25 27
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . lake case
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
3 3D surface measurements 3.1 Flat surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 3D Topography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Closed geometries 4.1 2d example - tree tomography . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 3d closed geometry - model tanks . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Buried electrodes 5.1 2D cross-hole data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 3D-Crosshole measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Topography and buried electrodes . . . . . . . . . . . . . . . . . . . . . . . . . 6 Time-lapse ERT 6.1 Crosshole timelapse measurements . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Soil column measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Concluding remarks and outlook A BERT for Windows users B Files and programs C Complete list of options and their default values D BERT using GIMLi
1 Introduction
1.1 BERT, DCFEMLib, GIMLi - Nomen est omen
Direct current electrical measurements are used in a wide range of applications such as medical imaging, geophysical surface or subsurface measurements or the investigation of trees and soil probes. This inverse problem is known under the terms ERT (electrical resistivity tomography), ERI (... imaging), EIT (... impedance tomography) or DC resistivity inversion. The aim of our software is to present a unique solution for all these cases. Main advantage is the possibility to work on arbitrary geometries. Therefore we decided to consequently use unstructured nite element meshes for forward calculation as well as for the parameter identication. By the use of triangles (2d) and tetrahedrons (3d) we can follow any geometry of the subsurface, probe or any structural information we have about the object to be investigated. Due to this generality we decided to call it BERT - Boundless Electrical Resistivity Tomography. BERT is a part of the software library DCFEMLib - Direct Current Finite Element Method Library. It is currently newly developed and will be called GIMLi - Generalized Inversion and Modelling Library. The latter is a much more general approach for arbitrary tomographic methods, as the functionality is growing BERT will more and more migrate to GIMLi1 . DCFEMLib is licensed under the GPL (GNU public license). Our aim is to give back to the academic community without letting people earning money by just clicking a button. Additionally to the library itself it comprises executables for ERT modelling and inversion, tools for generating mesh input (the so-called poly-tools) and tools applying the mesh generator. The theory and technology of BERT is described in our GJI paper (Gnther et al., 2006) u and bases on the nite element modelling techniques described by Rcker et al. (2006). It u is represented by a triple-grid scheme: Most inversion algorithm use a dual-grid scheme, i.e. the forward calculation is calculated on a ner mesh. We add another one in order to use a secondary eld approach and thus have a very fast forward calculation. Figure 1 shows the three grids: On a coarse and resolution-dependent grid the parameters are dened. On a globally rened and prolonged mesh the forward calculation is done. And a very ne primary mesh is used to calculate the primary potentials (for a homogeneous subsurface), but only once directly after the mesh creation.
Figure 1: The three meshs of inversion for a 2d example, from Gnther et al. (2006) u The overall scheme is visualised in Figure 2. It starts with the generation of the three meshes. Then the primary potentials are calculated and interpolated onto the secondary mesh. From this geometric factors are derived yielding the apparent resistivity and the sensitivity matrix is created for the homogeneous case. Finally the actual inversion is carried out: An inverse
1
sub-problem is used to update the resistivity model, a forward calculation is carried out and checked against the data. The latter is done until the data are tted well or the process stagnates.
Topography Electrodes Data
Parameter mesh
Primary mesh
Configuration factor
Secondary mesh
Apparent resistivity
Constraints
Sensitivity
Forward operator
Inverse subproblem
Check
Solution
Figure 2: The BERT inversion scheme, from Gnther et al. (2006): the geometrical information u is used to prepare the actual inversion (rectangle). BERT is available under Linux and Windows2 , either from pre-compiled binaries or selfcompiled code3 . The paths to the binaries and the library must be known, e.g. by setting $ export PATH=$PATH:/path/to/dcfemlib/bin $ export LD LIBRARY PATH=$LD LIBRARY PATH:/path/to/dcfemlib/lib
See appendix A for using BERT in Windows. See www.resistivity.net for information about how to obtain the binaries/codes and to compile the code 4 In order to change default options permanently, we suggest to create a le $HOME/.bertrc that will be read if present. Typical entries are, e.g., SENSMATMAXMEM=3000 (available memory in MB), LINSOLVER=2
commands for the individual tasks, namely invertNew2d, invertNew2dTopo, invertNew3d, invertNew3dTopo, invertNew2dCirc and invertNew3dCyl for the cases 2d/3d with or without topography and for circle/cylinder geometry. For example, $ invertNew2d datafile.dat > inv.cfg creates a new conguration le inv.cfg with the lines DATAFILE=datafile.dat, DIMENSION=2 and TOPOGRAPHY=0, but also adds a lot of possible options for this case with an explanation, most of them inactive/commented. The user can now (or later) change the options and run single steps or the whole of inversion by $ invert cfgfile commands where cfgle is the conguration le and commands can consist of the following: all makes all, that is probably the rst step in most (at least small) cases meshs just makes the meshes, so that these can be optimized (suggested for bigger problems) nomeshs do everything else but the meshes (after a successful mesh generation) primPot interpolate calculates primary potentials and interpolates it to the secondary mesh calcSensM actual inversion including sensitivity calculation (rst inversion) calc inversion with changed inversion options newPara after creating a new parameter model (keeps primary mesh and potential) save saves all important results (model&response for each iteration, log le, cfg le, meshes) in a directory called result<date> <time> clean cleans the directory from temporary results mrproper deletes all stu except input and result directories (releases disk memory fully) show creates a vtk le (can be used in the main directory or in a result directory)
1.3 Visualization
BERT creates a lot of les that can be used for post-processing, see appendix. You can visualize in-place or save the state rst using invert inv.cfg save. A result-directory is created out of the model le data and time and the les are moved in. Later you can change into the directory to do the visualization. There are several ways for doing it: 1. The command invSummary creates a pdf with all essential information and gures. This requires DCMatLab installed and is a easy method but only feasible for 2D. 2. You can use DCMatLab directly using >> Mesh=loadmesh(mesh/meshParaDomain.bms); %loads mesh into struct >> res=load(model_iter.final); %loads ascii resistivity vector >> tripatchmod(Mesh,res); % help tripatchmod for options
3. There is a graphical tool called bert2dpost for doing it automatically, where you can specify some options. 4. For 3D but also 2D you can call invertinv.cfg show which will create a le showmodel.vtk and opens ParaView with it. After show you can specify a dierent model le. Paraview5 is a highly sophisticated and free tool for 3d (and 2d) visualisation. It handles both complete inversion results (obtained by invert cfgle show), mesh inputs (*.poly, to be converted by polyConvert -V -S to vtk or stl) and meshes (to be converted by meshconvert, if not already done). In order to have a quick look at 3d meshes when nding optimal parameters, we also suggest MEDIT6 , a free and fast 3d viewer. The usual proceeding is (i) create meshes and look whether they are suitable, (ii) run a full inversion with all, (iii) look at the results (show, ParaView), (iv) rene options and do a calc, save good results using save. The rst step is usually omitted for small projects. We now start to prepare and run inversions using the exemplary les in dcfemlib/examples/inversion, starting from easy-going to complicated ones.
2 2D surface measurements
2.1 A at surface example
The example in dcfemlib/examples/inversion/2dat/gallery was friendly provided by the University of Mining and Technology, Freiberg (F. Donner). It is a very small prole over a known mining gallery that is used for draining water out of the mines. It represents a perfect two-dimensional anomaly since it strikes perpendicular to the prole and is a 2x2m cavity. On a prole using 21 electrodes with 2m spacing, dipole-dipole measurements have been applied, the data quality was very good. The input in the data le gallery.dat is already the apparent resistivity. Standard deviations have been measured and 1% were added. We create a conguration le using $ invertNew2d gallery.dat > inv.cfg just holding the data le and the dimension. Figure 3 shows the result of invert inv.cfg all with default options that converged with a chi-squared value of 0.99 (data tted within error bounds). It clearly shows the cavity at about 20 m and another anomaly whose origin is not completely clear from 2d measurements. See section 3.1 for inversion of a 3d data set.
0 z/m 4 6 8 [email protected] 0 5 10 15 20 25 30 x/m 40
5 6
Ohmm 79.4
100
126
158
200
251
316
398
501
Figure 4: Result for a regularization parameter of 200 (left) and 2 (right). Figure 4 shows the result for the two cases. The one for = 200 is clearly over-smoothed and cannot t the data appropriately (2 = 4.4, RMS=2.5%). The low value can t the data but produces too much small-scaled anomalies that are not necessary. Note that these data have a very good quality documented in the error values between 1 and 2.3%. An over-estimation of the errors will lead (if 2 = 1) to an over-smoothed result as well. Errors (in the meaning of how well can I t the data) should therefore be measured or estimated by reciprocal data or repetition. Always add a xed value that will account for error sources outside our measurements7 . In the absence of errors in the data le an estimation is made using a xed percentage (INPUTERRLEVEL) and a voltage error (INPUTERRVOLTAGE). If the current is not in the le, a value of 100 mA is assumed. For dierent current strengths the voltage error has to be adapted. Alternatively to a xed regularization it can be optimized using the L-curve by LAMBDAOPT=1. To decrease the regularization parameter in the course of iterations (cooling scheme) by, e.g., the factor 0.8 use LAMBDADEDREASE=0.8.
Therefore DCxdInvRes ask for an error percentage to be added to the measured if those are too small.
Usually the points are linearly interpolated, SPLINEBOUNDARY=1 forces a spline interpolation, which is useful for round geometries or smooth topography. The coarse-ness towards the boundary is controlled by the mesh quality PARA2DQUALITY, which denotes a minimum angle. The higher the quality is, the more accurate are the results but with an increasing number of cells and thus run-time. In triangle8 (Shewchuk, 1996) version 1.6, our favoured 2d mesh generator, the range goes from 25-30 (bad quality) to 34-35 (good quality). Default value is 33.8, a trade-o between accuracy and run-time. Another way of avoiding a too coarse mesh is the maximum cell size by setting PARAMAXCELLSIZE (in m2 ).
0 z/m 4 6 8 0 5 10 15 20 25 30 x/m 40 0 z/m 4 6 8 0 5 10 15 20 25 30 x/m 40
0 z/m 4 6 8
0 z/m 4 6 8
10
15
20
25
30
x/m
40
0 z/m 4 6 8
10
15
20
25
30
x/m
40
10
15
20
25
30
x/m
40
0 z/m 4 6 8
10
15
20
25
30
x/m
40
Figure 5: Meshes with dierent parameters: default values dx=0.2 & q=33.8 (top left), dx=0.2 & q=33 (top right), dx=0.2 & q=34.5 (center left), dx=0.2 equidist & q=33.8 (center right), dx=0.3 equidist & q=33.8 (bottom left), dx=0.5 equidist & q=33.8 (bottom right) In Figure 5 the resulting parameter meshes for dierent settings are displayed. A lower quality is only recommended in case of topography. A too large quality value produces nicer triangles but can lead to heterogeneous mesh density even for equidistant electrodes. The EQUIDISTANT switch produces a nice near-surface triangulation that can yield too much parameters. The latter can be avoided by a larger PARADX value. Finally the user has to nd the optimum settings for his case (and taste).
see http://www.cs.cmu.edu/~quake/triangle.research.html
M. Furche and is one of several proles over a slag dump. A Wenner array with a = 2 m spacing was applied yielding 222 data points. The topography was measured at 8 points by levelling and appended to the original le before converting it with DC2dInvRes. We initialize the inversion with standard options using the command: $ invertNew2dTopo slagdump.dat > inv.cfg Note that this produces additional lines in the le for the primary mesh. Similar to the parameter mesh, the PRIMDX value species the (absolute, not relative!) renement at the electrodes and PRIM2DQUALITY denes the mesh growth. Additionally, we decide by PRIMP2MESH whether the primary potentials shall be computed by quadratic shape functions. As stated by Rcker u et al. (2006) those are more ecient. The necessary renement for a P2 mesh is about a/10 and a/100 for a P1 mesh. Figure 6 shows the topographic eect and the resistivity image. The upper pseudo-section shows the apparent resistivities using at-earth geometry factors. The middle one is the pure geometric eect, t = Gf lat utopo ( = 1S/m), and the lower image is based on the geometric factors out of the primary potential. Several anomalies can be explained solely by topographical undulations. The resistivity distribution shows a conductive interior and a resistive hard pan.
0 we2 we4 we6 we8 we10 we12 10 20 30 40 50 x/m 70
0 120 10 20 30 40 50 x/m 70
z/m 110
10
20
30
40
50
x/m
70
105 100
95
10
30
0.89
40
50
1.12
x/m
1.26
70
Corrected Data in m
Ohmm
7.94
10
13
16
20
25
32
6.31
7.94
10
12.6
15.8
20
25.1
31.6
39.8
and without structure we call $ invertNew2d bedrock.dat > inv.cfg $ invert inv.cfg all save $ echo INTERFACE=bedrock.xz >> inv.cfg $ invert inv.cfg newPara save The latter (newPara) switch is used if we change parameterisation. So the primary mesh and potentials do not have to be calculated anew, but they have only to be interpolated onto the forward mesh and the sensitivities are re-calculated as well. Figure 7 shows the subsurface images without and with the structural information.
0 50 100 150 200 250 300 350 400 x/m 500 0 50 100 150 200 250 300 350 400 x/m 500
z/m
z/m
100
100
150
150
Figure 7: Resistivity distribution without (left) and with (right) structural information. Obviously the additional information leads to a much clearer image of the subsurface. At most positions there is a sharp resistivity contrast at the boundary. However at some positions there is either a dierence to velocity or the refraction result is ambiguous.
10
5. Finally we add a region marker somewhere in the lake with marker 1 (not inverted) by appending the line 2 50 -1 1 0.0 (number x y marker maxtrisize) and increasing the number of regions from 2 to 3.
0 5 10 15 20 z/m 30 1 2 1
20
40
60
x/m
100
Figure 8: Representation of the input PLC for the lake case. Figure 8 shows a section of the input PLC (the outer space needed for forward calculation is much bigger). All nodes are denoted by a cross. The electrodes, which are rened by additional nodes on both sides, are marked by a circle. They form the topography as in the 2d topographic examples. The red rectangle denes the region to be inverted. Therefore the marker 2 (inversion region) is in this region and the marker 1 (no inversion) is outside. We use this altered poly le in the inversion by introducing into the cfg le PARAGEOMETRY=cp mymesh.poly mesh/mesh.poly This means that mesh.poly is created by copying mymesh.poly. Alternatively we can put here a shell script or matlab call that makes up our geometry. Furthermore we add the following options (obsolete in GIMLi due to better automatics and the region technique): TOPOGRAPHY=0 SPACECONFIG=2 RHOSTART=22.5 NOPROLONGATION=1 SURFACESMOOTH=0 # # # # # ensures that the primary potentials are really analytic ensures that mirror sources will be used (obsolete?) Start(=background) resistivity no resistivity prolongation (outside & lake stay const) prevent smoothing (edge swapping possible)
Furthermore we use the following options ZPOWER=0.3 # enhances layered (sediment) structures OVERRIDEERROR=1 # do not use the measured errors in file (optimistic), but: INPUTERRLEVEL=2 # 2% plus INPUTERRVOLTAGE=20e-6 # 20 microvolts and the inversion converges at 1 < 2 < 2. Since the data le also contains induced polarisation (IP) phases, they are automatically inverted at the end using a single inverse sub-step with the same options as for the amplitude. Figure 9 shows resistivity and phase distribution. The lake sediments show generally by low resistivities and phases. Particularly the youngest sediments are almost as conductive as the water. Below dierent sediment layers are visible giving hints how the historic topography was covered by sediments step by step. Note that for pure underwater measurements there is an additional option UNDERWATER which forms the sea bottom topography by the electrodes and adds the water surface at z = 0 automatically.
11
0 z/m 10 15
10
20
30
40
50
60
70
x/m
90
Ohmm 25.1
31.6
39.8
50.1
63.1
79.4
100
126
158
200
251
0 z/m 10 15
10
20
30
40
50
60
70
x/m
90
Figure 9: Inversion result of the water case: resistivity (top) and phase (bottom). Note that the water is not part of the inversion mesh and thus not plotted.
3 3D surface measurements
3D surface measurements can be carried out in several variants: 1. Layout of an electrode grid. However, due to the limited electrode number grids are restricted to small areas. 2. Parallel (and perpendicular) proles along the coordinate axes. 3. Proles in arbitrary directions due to accessibility limits. 4. Non-prole layout, e.g. large-scale dipole-dipole experiments. In any case, the electrode positions and measurements must be dened according to the unied data format. The data for the rst two types can be easily organized by hand. For number 3 (and 2) we suggest to prepare 2d les and to write a pro-le containing of lines with the 2d le name and x-y pairs of points where the line is going. This le can be read into DC3dInvRes Gnther (2008) and used to write the 3d le. In case of topography it is best to do the tape u correction on the 2d les before using DC2dInvRes and Export Ohm. The most exible element in 3d is the tetrahedron. The tetrahedralization is done by a mesh generator. Out choice is Tetgen (Si, 2008), a free and versatile quality mesh generator. The quality measure is dierent from 2d and describes a radius-to-edge ratio, note that small values point to higher quality. Appropriate values for (primary eld) forward calculation are 1.12 to 1.2, for the inverse (and thus secondary) mesh values of 1.2-1.5 are appropriate, the keys are called PRIM3DQUALITY and PARA3DQUALITY.
12
Figure 10: Inversion result of the 3d gallery data set using a smoothed iso-surface of 650m and a Plane Clip, the red spheres are the used electrodes. Figure 10 shows a Paraview visualisation that has been created by the following steps: i) Cell Data To Point Data, ii) Clip by Scalar 650 (m), iii) Extract Surface, iv) Smooth Surface, v) Another Clip based on Cell2Point with Plane, vi) representation of the input as Outline and Cube Axes. The color bar is logarithmic with a manual range of 100-1000m. The electrodes have been included as point vtk le and displayed by Glyph as Spheres of radius 0.05. After some exercise the reader will be able to create nice images, plots and calculate results such as extensions or volumes of geological bodies.
3.2 3D Topography
The denition of a 3d topography is much more complicated than in 2d, where every shape can be described by a simple polygon. The input PLC consists of faces instead of edges, the
10
13
resulting poly le has a similar but dierent format11 . Generally the proceeding is the following: i) create a at surface mesh, ii) interpolate heights from topographic information, iii) make a small (inversion mesh) and a large (forward mesh) box around it, iv) make renement, if necessary, and v) create the mesh using tetgen. For specifying topography, there are two dierent ways: the electrodes in the data le have an elevation and all other points are interpolated there is a digital elevation model (DEM) or at least a list of measured topo points (in a 3-column le containing x,y and z) Whereas the rst case is sucient for smooth topography and/or dense electrode coverage, the latter is more general. The topographic points are Delaunay triangulated. For every point of the meshes, also the electrodes, the elevation is linearly interpolated. Therefore electrodes with measured elevations should be included in the topo le as well to make sure their z values are correct. We specify this topographical list by the line TOPOPOINTS=filename. In dcfemlib/examples/inversion/examples/acucar there is a project measured by the Federal Institute of Geology and Natural Resources (BGR) Hannover (M. Furche12 ). The site is an old slag dump that comprises a topography reminding on the sugar hat in Rio. Two resistivity proles have been measured crossing the top of the isolated hill. Another prole was realised around the hill in a more or less constant elevation. Although this is not a dense sampling as an electrode grid it should be sucient to obtain a rough image. Additionally to the electrodes, some topographical points have been measured and put into the le points.xyz. So we create a new project using $ invertNew3dTopo acucar.ohm > inv.cfg and add the line TOPOPOINTS=points.xyz to the model. If we now call invert inv.cfg meshs we see the mesh does not show the hill, since the topography overrides the electrode elevation. Therefore we have to add the electrode denition (lines 3-230) to the topography le and see then the hill (Figure 11 left). However due to the point density the electrode line appears as a sharp edge that is not really the truth but sucient in this case. In other cases we might have a digital elevation model. In order to show this on the same example, we created one by cubic interpolation of the available points on a regular grid of 2m spacing. In order to avoid interpolation errors between the electrodes we created a polygon le poly.xyz for the three proles13 and introduce it by TOPOPOLY=poly.xyz. Figure 11 shows the surface mesh of both variants. The sharp edges are now disappeared. Finally the inversion result is visualised in Figure 12. It shows a conductive interior of the slag dump and dierent sediments at the surface, e.g. a resistive top. Of course the data coverage is low between the proles and at the model boundaries. Therefore the model becomes more or less interpolated by the smoothness constraints.
11 12
See http://tetgen.berlios.de Now at Leibniz institute of Applied Geosciences 13 Several polygons are separated by a blank line.
14
Figure 11: Surface mesh for the point-wise topographic information (left) and the digital elevation model (right), the electrodes are shown as red points.
4 Closed geometries
Closed geometries are actually easier than open ones since we do not need a mesh prolongation and two dierent regions. However since the whole boundary is of Neumann type, we must ensure two additional conditions that are not necessary in the open case: The current cannot vanish in innity, therefore we must use dipole sources, e.g. by a reference current node. Since only derivatives are present in the boundary value problem, we must make the forward solution unique, e.g. by adding a reference potential node, whose potential is forced to zero.
15
GUI named TreeBERT (before DC2dTree) was created making it easy to process the data visually. Tree tomography EIT on trees has been successfully established to investigate decay of trees. The example in dcfemlib/examples/circle/tree was measured and friendly provided by Niels Homann, HAWK Gttingen. It represents a lime tree, measured by 24 steel electrodes that are plugged into the o bark. Dipole-dipole measurements have been applied using a Geotom equipment. The conguration le reads as follows DATAFILE=hollow_limetree.ohm DIMENSION=2 TOPOGRAPHY=1 # activates the primary mesh CYLINDER=1 # defines a closed geometry SURFACESMOOTH=1 # makes a nicer surface EQUIDISTBOUNDARY=1 # equidistant refinement PARADX=0.2 # 5 segments between the electrodes PARA2DQUALITY=34.8 # very good quality, almost the upper limit SPLINEBOUNDARY=1 # round geometry PRIMDX_R=0.001 # refinement of primary mesh in radial direction LAMBDA=10 # regularisation strength BLOCKYMODEL=1 # enhance contrasts by robust (L1) methods For this case an equidistant renement, the use of splines and a high quality ensures a nice mesh with a round boundary. The primary renement is done in radial direction. Additionally we used the robust modelling in order to obtain a clearer contrast of the high resistivity.
0.2 0.2 0.1 0 x/m 0.2 0.2 0.1 0 x/m 0.2 0.2
z/m
0.1
0.05
0.05
0.1
0.15
0.2
0.25
126
158
200
251
316
398
Figure 13: Tree cut (left), inversion result (center) and overlay. After the measurements the tree was cut and revealed a cavity inside caused by decay. Figure 13 shows a photograph, the inversion result and an overlay of both. Clearly the cavity is marked by high resistivity that is in almost perfect accordance with the photo.
16
dump. The column has diameter of 30cm and a height of 80cm. In each of 5 rings with 5 cm vertical distance 24 steel electrodes of 2cm length were installed. Dipole-dipole measurements have been applied to all rings yielding a number of 320 data. The example is located in dcfemlib/examples/inversion/3dtank. Since the parameterization cannot be detected automatically from the le, we have to create the mesh input, i.e. the PLC in mesh/mesh.poly by hand using a script. There is a poly tool polyCreateCube creating a unit cube. With the option -Z is creates a unit cylinder instead, which has to be scaled appropriately. Then we put in the electrodes as points14 with the marker -99. We insert two additional nodes with markers -999 and -1000 that are used for current reference and potential reference. So the script reads: MESH=mesh/mesh # PLC name polyCreateCube -v -Z -s 48 -m 2 $MESH # create unit cylinder with 48 segments polyTranslate -z -0.5 $MESH # moves it such that top is zero polyScale -x 0.3 -y 0.3 -z 0.8 $MESH # scale to radius 0.15 & height 0.8 cat soil_column.dat | head -n 82 |tail -n 80 > elec.xyz # extract electrodes polyAddVIP -m -99 -f elec.xyz $MESH # add electrodes to mesh polyAddVIP -m -999 -x 0 -y 0 -z 0 $MESH # current reference node polyAddVIP -m -1000 -x 0 -y 0 -z -0.8 $MESH # potential reference node polyConvert -V -o $MESH-poly $MESH # convert to vtk to load it to paraview We create an empty cfg le (or use invertNew3dCyl) with the lines DATAFILE=soil_column.dat DIMENSION=3 TOPOGRAPHY=1 CYLINDER=1 # ensures the closed geometry We add our PLC script to the PARAGEOMETRY variable such that mesh/mesh.poly will be created by it. PARAGEOMETRY=mymesh.sh # make sure that mymesh.sh is executable A further renement can be achieved by quality improvement (PARAQUALITY), local renement (PARADX) or maximum cell size (PARAMAXCELLSIZE). In order to obtain an accurate we use a renement for the primary mesh of 1cm and quadratic shape functions ending in about 32000 nodes. PRIMDX=0.01 PRIMP2MESH=1 Figure 14 shows the course from the mesh input via the parameter mesh to the nal result.
14
Since the electrodes cannot be show a signicant extension compared to the column size, we put the points not onto the surface but moved it 1cm inside.
17
Figure 14: PLC (left), parameter mesh (center) and inversion result (right) of the soil column experiment.
18
5 Buried electrodes
5.1 2D cross-hole data
Of course cross-hole measurements can also be inverted using BERT. The height of each electrode must be set to the elevation minus depth. However, since we cannot distinguish whether it is topography or a buried electrode we must create the geometry by hand. Note, that for this reason we introduced the tokens h (height) and d (depth below surface) to the data format, but this is only recognized by GIMLi. The example in dcfemlib/examples/inversion/2dxh was produced by O. Kuras of the British Geological Survey (BGS) in the ALERT project (Kuras et al. (tted)). It represents about 1300 data obtained by cross-hole measurement between 5 very shallow (0-1.6m) boreholes. In order to create an inversion mesh we would create a small box with marker 2 (inversion) inside of a big box that is used for forward calculation (marker 1) by 8 points and 8 edges. This is more rigorously implemented by the script polyFlatWorld which automatically calculates the size of the model and the boundary around the electrodes from the parameters BOUNDARY, PARABOUNDARY and PARADEPTH. To pass the variables we use the Unix command source and introduce PARAGEOMETRY="source polyFlatPara 2dxh.ohm into the cfg le. Additionally we set SPACECONFIG=2 for subsurface sources and a pretty good quality for the parameter mesh PARA2DQUALITY=34.5. As before, we can use PARADX to rene the model at the electrodes. In this case we introduce a node between each of the 0.1m separated electrodes using PARADX=0.05. Note that, dierent from 2d surface measurements, it is treated by polyFlatWorld as an absolute value. We use a relatively large regularization parameter LAMBDA=300 for suppressing oscillations at the electrodes. Figure 15 shows the obtained resistivity distribution at the very beginning of a tracer experiment. See section 6.1 for time-lapse inversion.
0 2 2.5 3 3.5 4 4.5 x/m 5.5
z/m
1.5
10
12.6
15.8
20
25.1
31.6
39.8
50.1
63.1
79.4
100
19
SPACECONFIG=2 # for mirror sources at z=0 PARABOUNDARY=15 # to get a bit more space around the electrodes PARAGEOMETRY="source polyFlatWorld $DATAFILE" By using ZPOWER=0.3 we can enhance the predominantly layered structures. The inversion converges then with defaults down to about 2 = 1. Figure 16 shows the nal result.
6 Time-lapse ERT
We are often interested in ongoing physical processes and use ERT for monitoring experiments. There are many dierent time-lapse inversion approaches. Here we use a very simple one that solves the linear subsystem for the resistivity ratio of two data sets after the inversion. An arbitrary number of subsequent data sets can be processed by writing their le names in a text le and pass it by TIMESTEPS=filename. Up to now, the data les must contain identical congurations in the same order.
20
z/m
z/m
1.5
1.5
10 0
12.6 2
15.8 2.5
20 3
25.1
31.6 3.5
39.8 4
50.1 4.5
63.1 x/m
79.4
100 5.5
10 0
12.6 2
15.8 2.5
20 3
25.1
31.6 3.5
39.8 4
50.1 4.5
63.1 x/m
79.4
100 5.5
z/m
z/m
1.5
1.5
10
12.6
15.8
20
25.1
31.6
39.8
50.1
63.1
79.4
100
10
12.6
15.8
20
25.1
31.6
39.8
50.1
63.1
79.4
100
Figure 17: Inversion results 3 hours (upper left), 7 hours (upper right), 12 hours (lower left) and 16.5 hours (lower right) after tracer injection.
21
Figure 18: Relative resistivity dierence (in %) for the repeated measurements at about 2, 4, 6, 10 and 16 hours after irrigation.
Acknowledgements
We like to thank all the guys that provided the very instructive data: Folker Donner (formerly University of Mining and Technology, Freiberg), Markus Furche and Ulla Noell (BGR Hannover), Thomas Schicht (K-UTec GmbH Sondershausen), Niels Homann (formerly HAWK Gttingen), Oliver Kuras (British Geological Survey), Joseph Doetsch and Ilaria Coscia (ETH o Zurich). Furthermore we acknowledge all the users and testers of BERT that made the software what it is now, a powerful expert tool.
22
References
Gnther, T. (2002-2007). DC2dInvRes - Direct Current 2d Inversion and Resolution. resistivu ity.net productions, http://dc2dinvres.resistivity.net. Gnther, T. (2003-2008). DC3dInvRes - Direct Current 3d Inversion and Resolution. resistivu ity.net productions, http://dc3dinvres.resistivity.net. Gnther, T. and Rcker, C. (2006). A general approach for introducing structural information u u - from constraints to joint inversion. In Ext. Abstract, EAGE Near Surface Geophysics Workshop. 3.-6.9.06, Helsinki(Finland). Gnther, T., Rcker, C., and Spitzer, K. (2006). 3-d modeling and inversion of dc resistivity u u data incorporating topography - part II: Inversion. Geophys. J. Int., 166(2):506517. Kuras, O., Pritchard, J., Meldrum, P. I., Chambers, J. E., Wilkinson, P. B., Ogilvy, R. D., and Wealthall, G. P. (submitted). Monitoring hydraulic processes with automated time-lapse electrical resistivity tomography (ALERT). Compte Rendus Geosciences - Special issue on Hydrogeophysics. Rcker, C., Gnther, T., and Spitzer, K. (2006). 3-d modeling and inversion of dc resistivity u u data incorporating topography - part I: Modeling. Geophys. J. Int., 166(2):495505. Shewchuk, J. R. (1996). Triangle: Engineering a 2D Quality Mesh Generator and Delaunay Triangulator. In Lin, M. C. and Manocha, D., editors, Applied Computational Geometry: Towards Geometric Engineering, volume 1148 of Lecture Notes in Computer Science, pages 203222. Springer-Verlag. From the First ACM Workshop on Applied Computational Geometry. Si, H. (2002-2008). TetGen - a quality-constrained tetrahedral mesh generator. Weierstrass institute, Berlin, http://tetgen.berlios.de.
Since the scripts are written in bash syntax and in MSYS there is no /bin/bash, it has to be copied once from /bin/sh (cp /bin/sh /bin/bash)
23
Note that le names are in dierent from Windows, i.e. /c instead of c:, slash instead of backslash and names are case-sensitive. If you prepared your data and conguration le in a directory, you should go there with the shell by i.e. $ cd /c/data/profile1/trial and run the inversion using invert inv.cfg all and so on.
Directories and their content: mesh primaryPot/primary primaryPot/interpolated sensM result* meshes and mesh input (meshPara,meshSec,meshPrim) primary potentials on primary mesh primary potentials on secondary mesh sensitivity columns (smatrix.*) or rows smatrixCol.* saved result directory with most important les
Files in project or result directory: command.history *.data inv.log model iter.nal model iter.*.vector modelResponse.*.vector modelReciprocity.*.vector sensCov.vector mesh/mesh.poly mesh/meshParaDomain history of commands executed by invert ltered data le with apparent resistivities and errors inversion log le nal resistivity distribution model vectors of individual iterations model response vectors for each iteration model response reciprocity for each iteration coverage (sum of absolute sensitivies) mesh input PLC pure parameter mesh (use for visualization)
24
collectdata - assemble potentials from dcfem lterdata - lter data yielding apparent resistivity and error estimate Vector functions: createStartModel va2b va2b interpolate create starting model vector convert ascii to binary vector convert binary to ascii vector interpolate quantity from one mesh to another
Mesh creation and alteration: createParaMesh createSecondaryMesh createSurface closeSurface prepareMeshRenement dctriangle meshconvert create parameter mesh from dat le create secondary mesh out of parameters create 3d surface mesh from xyz point list close 3d surface mesh by surrounding boxes insert renemeht points triangle call convert mesh between various import formats
Poly tools - creating PLC objects: polyCreateWorld polyFlatWorld polyCreateCube polyTranslate polyScale polyRotate polyMerge polyAddVIP polyAddProle polyReneVIPS polyConvert polyScripts.sh makes a world with 2 surface and interior boundary make inversion world (2 regions) around electrodes create (unit) cube around origin translate PLC scale PLC rotate PLC merge 2 PLCs into a new one add points (e.g. electrodes) to PLC add prole of electrodes rene points by local renement convert PLC to VTK or STL format various functions
25
SPACECONFIG=0 UNDERWATER=0
# geometric factor (0=half space, 1=full space, 2=mirror source) # defines underwater survey, sets SPACECONFIG=2
# Data settings INPUTOHM=0 # input data is in Ohm OVERRIDEERROR=0 # overrides given errors with INPUTERRLEVEL/INPUTERRVOLTAGE INPUTERRLEVEL=3 # sets input error level (in percent) if no error given INPUTERRVOLTAGE=100e-6 # sets input voltage error (V) if no error given FILTERVALS=0 # defines filter values (experimental) # Inversion settings RHOSTART=0 # resistivity of start model (0 = median of the data) NOPROLONGATION=0 # disables resistivity prolongation into non-inversion regions MAXITER=20 # maximum number of iteration steps SINGVALUE=-1 # potential value at electrodes, for sensitivity (internal) LAMBDA=20 # regularization parameter LAMBDAOPT=0 # optimze lambda by using l-curve (0 or 1) LAMBDADECREASE=1 # decrease lambda with each iteration CONSTRAINT=1 # order 0, 1, 2 (experimental) ZPOWER=0 # weight for vertical gradients BLOCKYMODEL=0 # iteratively reweighted model (L1) ROBUSTDATA=0 # iteratively reweighted data (L1) LOWERBOUND=0.0 # lower resistivity bound (logarithmic barrier) UPPERBOUND=0.0 # upper resistivity bound (0.0 = deactivated) SENSMATUPDATE=0 # update sensitivity matrix with each iteration step SENSMATDROPTOL=0 # only for very large problems (internal) SENSMATMAXMEM=800 # only for very large problems (internal) # Mesh settings PARAMAXCELLSIZE=0 # maximum cell size volume (m3) or area (m2) for para mesh PRIMMAXCELLSIZE=0 # maximum cell size volume (m3) or area (m2) for prim mesh PARADEPTH=0 # maximum depth of parameter domain in meter (0 = automatic) PARABOUNDARY=5 # boundary around electrodes in parameter domain (percent) SPLINEBOUNDARY=0 # use splines for additional surface points EQUIDISTBOUNDARY=0# equidistant refined space between electrodes BOUNDARY=500 # size of boundary area around parameter domain MESHGEN=tetgen # 3d mesh generator TETGENTOLERANCE=1e-12 # tetgen tolerance limit for face checks TETGENPRESERVEBOUNDARY=0 # prevents tetgen from splitting boundary facets PARADX=0.0 # refinement for para mesh (values>0.5 is forced to 0.5) PRIMDX=0.1 # ref. for prim mesh towards mesh center(2d: electrode) PRIMDX_R=0.0 # ref. for prim mesh towards electr. center (overrides PRIMDX) PARA2DQUALITY=33.0# parameter grid (from 20 (bad) to 33.4 (good)) PRIM2DQUALITY=33.4# primary grid (from 20 (bad) to 33.4 (good)) PARA3DQUALITY=1.5 # parameter grid (from 1.1 (good) to 2 (bad)) PRIM3DQUALITY=1.2 # primary grid (from 1.1 (good) to 2 (bad)) SURFACEQUALITY=30 # quality of topographical surface grid (20 (bad) - 33.4 (good))
26
SURFACEMAXTRISIZE=0.0 # maximal triangle area of paramatric surface grid SURFACESMOOTH=0 # improve quality of topographical surface grid ICDROPTOL=0.0 # if number of nodes 200k drop tolerance is set for ICCG solver LINSOLVER=1 # linear solver: 1=CHOLMOD, 2=LDL, 3=PCG (very slow), 4=TAUCS SECMESHREFINE=1 # refinement steps for secondary mesh (use with caution) SECP2MESH=0 # quadratic shapefunction for secmesh (experimental) PRIMP2MESH=0 # use primary p2 mesh (use with caution) # Directory settings MESHBASENAME=mesh # basename for mesh files DIRMESHS=mesh # directory name for mesh files DIRPOT=primaryPot # directory name for primary and interpolated potentials DIRPRIMPOT=potentials # subdirectory name for primary potentials DIRINTERPOLPOT=interpolated # subdirectory name for interpolated potentials DIRFEM=femM # directory name for finite element solutions DIRSENS=sensM # directory name for sensitivity matrix OLDPRIMMESHSTYLE=0# for internal use only
27
$ dcinv -v -1 -b20 -u5000 -l12.5 -z 0.2 -t timesteps.txt mydata.data Finally, the command dcedit can be used to process and edit data. In order to build some sort of a complete environment we prefer the free open-source environment Python16 as a combination of shell programming and visualization. We are trying to develop some graphical user interfaces for specic purposes that allow easier control about whether meshes are appropriate.
16
see http://www.python.org
28