Merge branch 'em/dev' into em/ref/tdem

# Conflicts:
#	SimPEG/EM/FDEM/FDEM.py
#	SimPEG/EM/FDEM/SrcFDEM.py
#	SimPEG/EM/FDEM/SurveyFDEM.py
#	SimPEG/Examples/EM_FDEM_1D_Inversion.py
This commit is contained in:
Lindsey Heagy
2016-05-11 09:21:59 -07:00
73 changed files with 5852 additions and 1239 deletions
+150
View File
@@ -0,0 +1,150 @@
.. _api_DC:
.. math::
\renewcommand{\div}{\nabla\cdot\,}
\newcommand{\grad}{\vec \nabla}
\newcommand{\curl}{{\vec \nabla}\times\,}
\newcommand{\dcurl}{{\mathbf C}}
\newcommand{\dgrad}{{\mathbf G}}
\newcommand{\Acf}{{\mathbf A_c^f}}
\newcommand{\Ace}{{\mathbf A_c^e}}
\renewcommand{\S}{{\mathbf \Sigma}}
\renewcommand{\Div}{{\mathbf {Div}}}
\renewcommand{\Grad}{{\mathbf {Grad}}}
\newcommand{\St}{{\mathbf \Sigma_\tau}}
\newcommand{\diag}{\mathbf{diag}}
\newcommand{\M}{{\mathbf M}}
\newcommand{\Me}{{\M^e}}
\newcommand{\Mes}[1]{{\M^e_{#1}}}
\newcommand{\be}{\mathbf{e}}
\newcommand{\bj}{\mathbf{j}}
\newcommand{\bphi}{\mathbf{\phi}}
\newcommand{\bq}{\mathbf{q}}
\newcommand{\bJ}{\mathbf{J}}
\newcommand{\bG}{\mathbf{G}}
\newcommand{\bP}{\mathbf{P}}
\newcommand{\bA}{\mathbf{A}}
\newcommand{\bm}{\mathbf{m}}
\newcommand{\B}{\vec{B}}
\newcommand{\D}{\vec{D}}
\renewcommand{\H}{\vec{H}}
\renewcommand {\j} { {\vec j} }
\newcommand {\h} { {\vec h} }
\renewcommand {\b} { {\vec b} }
\newcommand {\e} { {\vec e} }
\newcommand {\c} { {\vec c} }
\renewcommand {\d} { {\vec d} }
\renewcommand {\u} { {\vec u} }
\newcommand{\I}{\vec{I}}
DC resistivity survey
*********************
Electrical resistivity of subsurface materials is measured by causing an electrical current to flow in the earth between one pair of electrodes while the voltage across a second pair of electrodes is measured. The result is an "apparent" resistivity which is a value representing the weighted average resistivity over a volume of the earth. Variations in this measurement are caused by variations in the soil, rock, and pore fluid electrical resistivity. Surveys require contact with the ground, so they can be labour intensive. Results are sometimes interpreted directly, but more commonly, 1D, 2D or 3D models are estimated using inversion procedures (`GPG <http://www.eos.ubc.ca/courses/eosc350/content/>`_).
Background
==========
As direct current (DC) implies, in DC resistivity survey, we assume steady-state. We consider Maxwell's equations in steady state as
.. math::
\curl \frac{1}{\mu} \vec{b} - \j = \j_s \\
\curl \e = 0
Then by taking \\(\\curl\\) for the first equation, we have
.. math::
- \div\j = q \\
where
.. math::
\div \j_s = q = I(\delta(\vec{r}-\vec{r}_{s+})-\delta(\vec{r}-\vec{r}_{s-}))
Since \\(\\curl \\e = 0\\), we have
.. math::
\e = \grad \phi
And by Ohm's law, we have
.. math::
\j = \sigma \grad \phi
Finally, we can compute the solution of the system:
.. math::
- \div\j = q
\j = \sigma \grad \phi
\frac{\partial \phi}{\partial r}\Big|_{\partial \Omega_{BC}} = 0
Discretization
==============
By using finite volume method (FVM), we discretize our system as
.. math::
-\Div \bj = \bq
\diag(\Acf^{T}\sigma^{-1}) \bj = \Grad \bphi
Here boundary condtions are embedded in the discrete differential operators. With some linear algebra we have
.. math::
\bA\bphi = -\bq
where
.. math::
\bA = \Div (\diag(\Acf^{T}\sigma^{-1}))^{-1} \Grad
By solving this linear equation, we can compute the solution of \\(\\phi\\). Based on this discretization, we derive sensitivity in discretized space. Sensitivity matrix can be in general can be written as
.. math ::
\bJ = -\bP\bA^{-1}\bG
where
.. math ::
\bP: \text{Projection}
\bJ = \bP\frac{\partial \phi}{\partial \bm}
Here \\(\\bm\\) indicates model parameters in discretized space.
Verification
============
Comparing to the analytic function:
.. plot::
import simpegDC as DC
DC.Examples.Verification.run(plotIt=True)
API
===
.. automodule:: simpegDC.BaseDC
:show-inheritance:
:members:
:undoc-members:
:inherited-members:
+2 -2
View File
@@ -51,9 +51,9 @@ copyright = u'2013, SimPEG Developers'
# built documents.
#
# The short X.Y version.
version = '0.1.9'
version = '0.1.10'
# The full version, including alpha/beta/rc tags.
release = '0.1.9'
release = '0.1.10'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+21
View File
@@ -0,0 +1,21 @@
.. _examples_DC_Analytic_Dipole:
.. --------------------------------- ..
.. ..
.. THIS FILE IS AUTO GENEREATED ..
.. ..
.. SimPEG/Examples/__init__.py ..
.. ..
.. --------------------------------- ..
DC Analytic Dipole
==================
.. plot::
from SimPEG import Examples
Examples.DC_Analytic_Dipole.run()
.. literalinclude:: ../../SimPEG/Examples/DC_Analytic_Dipole.py
:language: python
:linenos:
@@ -0,0 +1,36 @@
.. _examples_DC_Forward_PseudoSection:
.. --------------------------------- ..
.. ..
.. THIS FILE IS AUTO GENEREATED ..
.. ..
.. SimPEG/Examples/__init__.py ..
.. ..
.. --------------------------------- ..
DC Forward Simulation
=====================
Forward model two conductive spheres in a half-space and plot a
pseudo-section. Assumes an infinite line source and measures along the
center of the spheres.
INPUT:
loc = Location of spheres [[x1,y1,z1],[x2,y2,z2]]
radi = Radius of spheres [r1,r2]
param = Conductivity of background and two spheres [m0,m1,m2]
stype = survey type "pdp" (pole dipole) or "dpdp" (dipole dipole)
dtype = Data type "appr" (app res) | "appc" (app cond) | "volt" (potential)
Created by @fourndo
.. plot::
from SimPEG import Examples
Examples.DC_Forward_PseudoSection.run()
.. literalinclude:: ../../SimPEG/Examples/DC_Forward_PseudoSection.py
:language: python
:linenos:
@@ -0,0 +1,58 @@
.. _examples_EM_Schenkel_Morrison_Casing:
.. --------------------------------- ..
.. ..
.. THIS FILE IS AUTO GENEREATED ..
.. ..
.. SimPEG/Examples/__init__.py ..
.. ..
.. --------------------------------- ..
EM: Schenkel and Morrison Casing Model
======================================
Here we create and run a FDEM forward simulation to calculate the vertical
current inside a steel-cased. The model is based on the Schenkel and
Morrison Casing Model, and the results are used in a 2016 SEG abstract by
Yang et al.
- Schenkel, C.J., and H.F. Morrison, 1990, Effects of well casing on potential field measurements using downhole current sources: Geophysical prospecting, 38, 663-686.
The model consists of:
- Air: Conductivity 1e-8 S/m, above z = 0
- Background: conductivity 1e-2 S/m, below z = 0
- Casing: conductivity 1e6 S/m
- 300m long
- radius of 0.1m
- thickness of 6e-3m
Inside the casing, we take the same conductivity as the background.
We are using an EM code to simulate DC, so we use frequency low enough
that the skin depth inside the casing is longer than the casing length (f
= 1e-6 Hz). The plot produced is of the current inside the casing.
These results are shown in the SEG abstract by Yang et al., 2016: 3D DC
resistivity modeling of steel casing for reservoir monitoring using
equivalent resistor network. The solver used to produce these results and
achieve the CPU time of ~30s is Mumps, which was installed using pymatsolver_
.. _pymatsolver: https://github.com/rowanc1/pymatsolver
This example is on figshare: https://dx.doi.org/10.6084/m9.figshare.3126961.v1
If you would use this example for a code comparison, or build upon it, a
citation would be much appreciated!
.. plot::
from SimPEG import Examples
Examples.EM_Schenkel_Morrison_Casing.run()
.. literalinclude:: ../../SimPEG/Examples/EM_Schenkel_Morrison_Casing.py
:language: python
:linenos:
+26
View File
@@ -0,0 +1,26 @@
.. _examples_Inversion_IRLS:
.. --------------------------------- ..
.. ..
.. THIS FILE IS AUTO GENEREATED ..
.. ..
.. SimPEG/Examples/__init__.py ..
.. ..
.. --------------------------------- ..
Inversion: Linear Problem
=========================
Here we go over the basics of creating a linear problem and inversion.
.. plot::
from SimPEG import Examples
Examples.Inversion_IRLS.run()
.. literalinclude:: ../../SimPEG/Examples/Inversion_IRLS.py
:language: python
:linenos: