title | short_title | description | license | keywords | export | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Pixels and Their Neighbours |
Finite Volume |
A tutorial of the finite volume method for the Direct Current (DC) resistivity problem. |
|
|
|
+++ { "part": "abstract" }
In this tutorial we take you on the journey from continuous equations to their discrete matrix representations using the finite volume method for the Direct Current (DC) resistivity problem. These techniques are widely applicable across geophysical simulation types and have their parallels in finite element and finite difference. We show derivations visually, as you would on a whiteboard, and have provided an accompanying notebook to explore the numerical results using SimPEG.
+++
This article was originally published in the Leading Edge ([Cockett et al., 2016](http://library.seg.org/doi/10.1190/tle35080703.1)) and is licensed under [CC-BY-SA-3.0](https://creativecommons.org/licenses/by-sa/3.0/).
+++
DC resistivity surveys obtain information about subsurface electrical conductivity,
:width: 90%
:class: col-margin-right row-span-2
:name: dc-setup
Setup of a DC resistivity survey.
The equations for DC resistivity are derived in (). Conservation of charge (which can be derived by taking the divergence of Ampere's law at steady state) connects the divergence of the current density everywhere in space to the source term which consists of two point sources, one positive and one negative.
The flow of current sets up electric fields according to Ohm's law, which relates current density to electric fields through the electrical conductivity. From Faraday's law for steady state fields, we can describe the electric field in terms of a scalar potential,
:name: dc-eqns
Derivation of the DC resistivity equations.
To set up a solvable system of equations, we need the same number of unknowns as equations, in this case two unknowns (one scalar,
In this tutorial, we walk through setting up these first order equations in finite volume in three steps: (1) defining where the variables live on the mesh; (2) looking at a single cell to define the discrete divergence and the weak formulation; and (3) moving from a cell based view to the entire mesh to construct and solve the resulting matrix system. The notebooks included with this tutorial leverage the SimPEG package, which extends the methods discussed here to various mesh types.
To bring our continuous equations into the computer, we need to discretize the earth and represent it using a finite(!) set of numbers. In this tutorial we will explain the discretization in 2D and generalize to 3D in the notebooks. A 2D (or 3D!) mesh is used to divide up space, and we can represent functions (fields, parameters, etc.) on this mesh at a few discrete places: the nodes, edges, faces, or cell centers. For consistency between 2D and 3D we refer to faces having area and cells having volume, regardless of their dimensionality. Nodes and cell centers naturally hold scalar quantities while edges and faces have implied directionality and therefore naturally describe vectors. The conductivity,
:name: fig-mesh
:align: center
:width: 100%
Anatomy of a finite volume cell.
To discretize the first order differential equations we consider a single cell in the mesh and we will work through the discrete description of equations (1) and (2) over that cell.
:name: fig-div
:align: left
:class: col-page-right
:width: 90%
Geometrical definition of the divergence and the discretization.
So we have half of the equation discretized - the left hand side. Now we need to take care of the source: it contains two dirac delta functions - these are infinite at their origins,
As such, we can integrate both sides of the equation over the volume enclosed by the cell. Since
Equation is a vector equation, so really it is two or three equations involving multiple components of
In , we visually walk through the discretization of equation (b). On the left hand side, a dot product requires a single cartesian vector,
:name: fig-weak-formulation
:align: center
:width: 100%
Discretization using the weak formulation and inner products.
The final step is to recognize that, now discretized, we can cancel the general face function
We have now discretized the two first order equations over a single cell. What is left is to assemble and solve the DC system over the entire mesh. To implement the divergence on the full mesh, the stencil of ±1's must index into for-loop
, it is conceptually, and often computationally, easier to create this stencil using nested Kronecker Products (see notebook). The volume and area terms in the divergence get expanded to diagonal matrices, and we multiply them together to get the discrete divergence operator. The discretization of the face inner product can be abstracted to a function,
Note that now all variables are defined over the entire mesh. We could solve this coupled system or we could eliminate
\text{diag}({\mathbf{v}}) \mathbf{D}\mathbf{M}_f(\sigma^{-1})^{-1}\mathbf{D}^\top\text{diag}({\mathbf{v}})\phi = \mathbf{q}
By solving this system matrix, we obtain a solution for the electric potential
:name: fig-results
:align: center
:width: 100%
Electric potential on (a) tensor and (b) curvilinear meshes.
:::{figure} #interactive Interactive output of the a DC Resistivity simulation. :::
Moving from continuous equations to their discrete analogues is fundamental in geophysical simulations. In this tutorial, we have started from a continuous description of the governing equations for the DC resistivity problem, selected locations on the mesh to discretize the continuous functions, constructed differential operators by considering one cell at a time, assembled and solved the discrete DC equations. Composing the finite volume system in this way allows us to move to different meshes and incorporate various types of boundary conditions that are often necessary when solving these equations in practice.
+++ {"part": "data_availability"}
Associated notebooks are available on GitHub and can be run online with MyBinder.
+++ {"part": "appendix"}
All article content, except where otherwise noted (including republished material), is licensed under a Creative Commons Attribution 3.0 Unported License (CC BY-SA). See https://creativecommons.org/licenses/by-sa/3.0/. Distribution or reproduction of this work in whole or in part commercially or noncommercially requires full attribution of the original publication, including its digital object identifier (DOI). Derivatives of this work must carry the same license. All rights reserved.