Electromagnetics

Base

class geoana.em.base.BaseDipole(**kwargs)

Bases: geoana.em.base.BaseEM

Base class for dipoles.

Required Properties:

  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
cross_orientation(xyz)

Take the cross product between a grid and the orientation of the dipole

distance(xyz)

Distance from the dipole location

dot_orientation(xyz)

Take the dot product between a grid and the orientation of the dipole

location

location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO

orientation

orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X

vector_distance(xyz)

Vector distance from the dipole location :param numpy.ndarray xyz: grid

class geoana.em.base.BaseEM(**kwargs)

Bases: properties.base.base.HasProperties

Base class for electromanetics. Contains physical properties that are relevant to all problems that use Maxwell’s equations

Required Properties:

  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
epsilon

epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12

mu

mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06

sigma

sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0

class geoana.em.base.BaseElectricDipole(**kwargs)

Bases: geoana.em.base.BaseDipole

Base class for electric current dipoles

Required Properties:

  • current (Float): magnitude of the injected current (A), a float in range [0.0, inf], Default: 1.0
  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • length (Float): length of the dipole (m), a float in range [0.0, inf], Default: 1.0
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
current

current (Float): magnitude of the injected current (A), a float in range [0.0, inf], Default: 1.0

length

length (Float): length of the dipole (m), a float in range [0.0, inf], Default: 1.0

class geoana.em.base.BaseMagneticDipole(**kwargs)

Bases: geoana.em.base.BaseDipole

Base class for magnetic dipoles

Required Properties:

  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • moment (Float): moment of the dipole (Am^2), a float in range [0.0, inf], Default: 1.0
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
moment

moment (Float): moment of the dipole (Am^2), a float in range [0.0, inf], Default: 1.0

Static

class geoana.em.static.MagneticDipoleWholeSpace(**kwargs)

Bases: geoana.em.base.BaseMagneticDipole, geoana.em.base.BaseEM

Static magnetic dipole in a wholespace.

Required Properties:

  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • moment (Float): moment of the dipole (Am^2), a float in range [0.0, inf], Default: 1.0
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
magnetic_field(xyz, coordinates='cartesian')

Magnetic field (\(\vec{h}\)) of a static magnetic dipole

Required

Parameters:xyz (numpy.ndarray) – Location of the receivers(s)

Optional

Parameters:coordinates (str) – coordinate system that the xyz is provided in and that the solution will be returned in (cartesian or cylindrical). Default: “cartesian”

Returns

Return type:numpy.ndarray
Returns:The magnetic field at each observation location
magnetic_flux_density(xyz, coordinates='cartesian')

Magnetic flux (\(\vec{b}\)) of a static magnetic dipole

Required

Parameters:xyz (numpy.ndarray) – Location of the receivers(s)

Optional

Parameters:coordinates (str) – coordinate system that the xyz is provided in and that the solution will be returned in (cartesian or cylindrical). Default: “cartesian”

Returns

Return type:numpy.ndarray
Returns:The magnetic flux at each observation location
vector_potential(xyz, coordinates='cartesian')

Vector potential of a static magnetic dipole. See Griffiths, 1999 equation 5.83

\[\vec{A}(\vec{r}) = \frac{\mu_0}{4\pi} \frac{\vec{m}\times\vec{r}}{r^3}\]

Required

Parameters:xyz (numpy.ndarray) – Location at which we calculate the vector potential

Optional

Parameters:coordinates (str) – coordinate system that the xyz is provided in and that the solution will be returned in (cartesian or cylindrical). Default: “cartesian”

Returns

Return type:numpy.ndarray
Returns:The magnetic vector potential at each observation location
class geoana.em.static.CircularLoopWholeSpace(**kwargs)

Bases: geoana.em.base.BaseDipole, geoana.em.base.BaseEM

Static magnetic field from a circular loop in a wholespace.

Required Properties:

  • current (Float): Electric current through the loop (A), a float, Default: 1.0
  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • radius (Float): radius of the loop (m), a float in range [0.0, inf], Default: 1.0
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
current

current (Float): Electric current through the loop (A), a float, Default: 1.0

radius

radius (Float): radius of the loop (m), a float in range [0.0, inf], Default: 1.0

vector_potential(xyz, coordinates='cartesian')

Vector potential due to the a steady-state current through a circular loop. We solve in cylindrical coordinates

\[A_\theta(\rho, z) = \frac{\mu_0 I}{\pi k} \sqrt{R / \rho^2}[(1 - k^2/2) * K(k^2) - K(k^2)]\]

where

\[k^2 = \frac{4 R \rho}{(R + \rho)^2 + z^2}\]

and

  • \(\rho = \sqrt{x^2 + y^2}\) is the horizontal distance to the test point
  • \(r\) is the distance to a test point
  • \(I\) is the current through the loop
  • \(R\) is the radius of the loop
  • \(E(k^2)\) and \(K(k^2)\) are the complete elliptic integrals

Required

Parameters:xyz (numpy.ndarray) – Location where we calculate the vector potential

Optional

Parameters:coordinates (str) – coordinate system that the xyz is provided in and that the solution will be returned in (cartesian or cylindrical). Default: “cartesian”

Returns

Return type:numpy.ndarray
Returns:The magnetic vector potential at each observation location

Frequency Domain

geoana.em.fdem.omega(frequency)

Angular frequency

\[\omega = 2 \pi f\]

Required :param frequency float: frequency (Hz)

geoana.em.fdem.wavenumber(frequency, sigma, mu=1.2566370614359173e-06, epsilon=8.854187817620389e-12, quasistatic=False)

Wavenumber of an electromagnetic wave in a medium with constant physical properties

\[k = \sqrt{\omega^2 \mu \varepsilon - i \omega \mu \sigma}\]

Required

Parameters:
  • numpy.ndarray) frequency ((float,) – frequency (Hz)
  • sigma (float) – electrical conductivity (S/m)

Optional

Parameters:
  • mu (float) – magnetic permeability (H/m). Default: \(\mu_0 = 4\pi \times 10^{-7}\) H/m
  • epsilon (float) – dielectric permittivity (F/m). Default: \(\epsilon_0 = 8.85 \times 10^{-12}\) F/m
  • quasistatic (bool) – use the quasi-static assumption? Default: False
geoana.em.fdem.skin_depth(frequency, sigma, mu=1.2566370614359173e-06)

Distance at which an em wave has decayed by a factor of \(1/e\) in a medium with constant physical properties

\[\sqrt{\frac{2}{\omega \sigma \mu}}\]

Required

Parameters:
  • frequency (float) – frequency (Hz)
  • sigma (float) – electrical conductivity (S/m)

Optional :param float mu: magnetic permeability (H/m). Default: \(\mu_0 = 4\pi \times 10^{-7}\) H/m

geoana.em.fdem.sigma_hat(frequency, sigma, epsilon=8.854187817620389e-12, quasistatic=False)

conductivity with displacement current contribution

\[\hat{\sigma} = \sigma + i \omega \varepsilon\]

Required

Parameters:
  • numpy.array) frequency ((float,) – frequency (Hz)
  • sigma (float) – electrical conductivity (S/m)

Optional

Parameters:
  • epsilon (float) – dielectric permittivity. Default \(\varepsilon_0\)
  • quasistatic (bool) – use the quasi-static assumption? Default: False
class geoana.em.fdem.BaseFDEM(**kwargs)

Bases: geoana.em.base.BaseEM

Base frequency domain electromagnetic class

Required Properties:

  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • frequency (Float): Source frequency (Hz), a float in range [0.0, inf], Default: 1.0
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • quasistatic (Boolean): Use the quasi-static approximation and ignore displacement current?, a boolean, Default: False
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
frequency

frequency (Float): Source frequency (Hz), a float in range [0.0, inf], Default: 1.0

omega

Angular frequency

\[\omega = 2\pi f\]
quasistatic

quasistatic (Boolean): Use the quasi-static approximation and ignore displacement current?, a boolean, Default: False

sigma_hat

conductivity with displacement current contribution

\[\hat{\sigma} = \sigma + i \omega \varepsilon\]
skin_depth

Distance at which an em wave has decayed by a factor of \(1/e\) in a medium with constant physical properties

\[\sqrt{\frac{2}{\omega \sigma \mu}}\]
wavenumber

Wavenumber of an electromagnetic wave in a medium with constant physical properties

\[k = \sqrt{\omega**2 \mu \varepsilon - i \omega \mu \sigma}\]
class geoana.em.fdem.ElectricDipoleWholeSpace(**kwargs)

Bases: geoana.em.base.BaseElectricDipole, geoana.em.fdem.BaseFDEM

Harmonic electric dipole in a whole space. The source is (c.f. Ward and Hohmann, 1988 page 173). The source current density for a dipole located at \(\mathbf{r}_s\) with orientation \(\mathbf{\hat{u}}\)

\[\mathbf{J}(\mathbf{r}) = I ds \delta(\mathbf{r} - \mathbf{r}_s)\mathbf{\hat{u}}\]

Required Properties:

  • current (Float): magnitude of the injected current (A), a float in range [0.0, inf], Default: 1.0
  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • frequency (Float): Source frequency (Hz), a float in range [0.0, inf], Default: 1.0
  • length (Float): length of the dipole (m), a float in range [0.0, inf], Default: 1.0
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • quasistatic (Boolean): Use the quasi-static approximation and ignore displacement current?, a boolean, Default: False
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
current_density(xyz)

Current density due to a harmonic electric dipole

electric_field(xyz)

Electric field from an electric dipole

\[\mathbf{E} = \frac{1}{\hat{\sigma}} \nabla \nabla \cdot \mathbf{A} - i \omega \mu \mathbf{A}\]
magnetic_field(xyz)

Magnetic field from an electric dipole

\[\mathbf{H} = \nabla \times \mathbf{A}\]
magnetic_flux_density(xyz)

magnetic flux density from an electric dipole

vector_potential(xyz)

Vector potential for an electric dipole in a wholespace

\[\mathbf{A} = \frac{I ds}{4 \pi r} e^{-ikr}\mathbf{\hat{u}}\]
class geoana.em.fdem.MagneticDipoleWholeSpace(**kwargs)

Bases: geoana.em.base.BaseMagneticDipole, geoana.em.fdem.BaseFDEM

Harmonic magnetic dipole in a whole space.

Required Properties:

  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • frequency (Float): Source frequency (Hz), a float in range [0.0, inf], Default: 1.0
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • moment (Float): moment of the dipole (Am^2), a float in range [0.0, inf], Default: 1.0
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • quasistatic (Boolean): Use the quasi-static approximation and ignore displacement current?, a boolean, Default: False
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
current_density(xyz)

Current density from a magnetic dipole in a wholespace

electric_field(xyz)

Electric field from a magnetic dipole in a wholespace

magnetic_field(xyz)

Magnetic field due to a magnetic dipole in a wholespace

magnetic_flux_density(xyz)

Magnetic flux density due to a magnetic dipole in a wholespace

vector_potential(xyz)

Vector potential for a magnetic dipole in a wholespace

\[\mathbf{F} = \frac{i \omega \mu m}{4 \pi r} e^{-ikr} \mathbf{\hat{u}}\]

Time Domain

class geoana.em.tdem.BaseTDEM(**kwargs)

Bases: geoana.em.base.BaseEM

Required Properties:

  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
  • time (Float): time after shut-off at which we are evaluating the fields (s), a float, Default: 0.0001
diffusion_distance
peak_time(z)
theta
time

time (Float): time after shut-off at which we are evaluating the fields (s), a float, Default: 0.0001

class geoana.em.tdem.ElectricDipoleWholeSpace(**kwargs)

Bases: geoana.em.base.BaseElectricDipole, geoana.em.tdem.BaseTDEM

Harmonic electric dipole in a whole space. The source is (c.f. Ward and Hohmann, 1988 page 173). The source current density for a dipole located at \(\mathbf{r}_s\) with orientation \(\mathbf{\hat{u}}\)

\[\mathbf{J}(\mathbf{r}) = I ds \delta(\mathbf{r} - \mathbf{r}_s)\mathbf{\hat{u}}\]

Required Properties:

  • current (Float): magnitude of the injected current (A), a float in range [0.0, inf], Default: 1.0
  • epsilon (Float): Permitivity value (F/m), a float in range [0.0, inf], Default: 8.854187817620389e-12
  • length (Float): length of the dipole (m), a float in range [0.0, inf], Default: 1.0
  • location (Vector3): location of the electric dipole source, a 3D Vector of <class ‘float’> with shape (3), Default: ZERO
  • mu (Float): Magnetic permeability (H/m), a float in range [0.0, inf], Default: 1.2566370614359173e-06
  • orientation (Vector3): orientation of dipole, a 3D Vector of <class ‘float’> with shape (3), Default: X
  • sigma (Float): Electrical conductivity (S/m), a float in range [0.0, inf], Default: 1.0
  • time (Float): time after shut-off at which we are evaluating the fields (s), a float, Default: 0.0001
current_density(xyz)

Current density due to a harmonic electric dipole

electric_field(xyz)

Electric field from an electric dipole

\[\mathbf{E} = \frac{1}{\hat{\sigma}} \nabla \nabla \cdot \mathbf{A} - i \omega \mu \mathbf{A}\]
magnetic_field(xyz)

Magnetic field from an electric dipole

magnetic_field_time_deriv(xyz)

Time derivative of the magnetic field, \(\frac{\partial \mathbf{h}}{\partial t}\)

magnetic_flux_density(xyz)

Magnetic flux density from an electric dipole

magnetic_flux_density_time_deriv(xyz)

Time derivative of the magnetic flux density from an electric dipole

geoana.em.tdem.diffusion_distance(time, sigma, mu=1.2566370614359173e-06)

Diffusion distance: Distance at which the signal amplitude is largest for a given time after shut off. Also referred to as the peak distance

geoana.em.tdem.peak_time(z, sigma, mu=1.2566370614359173e-06)

Peak time: Time at which the maximum signal amplitude is observed at a particular location for a transient plane wave through a homogeneous medium.

Required

Parameters:
  • z (float) – distance from source (m)
  • sigma (float) – electrical conductivity (S/m)

Optional

Parameters:mu (float) – magnetic permeability (H/m). Default: \(\mu_0 = 4\pi \times 10^{-7}\) H/m
geoana.em.tdem.theta(time, sigma, mu=1.2566370614359173e-06)

Analog to wavenumber in the frequency domain. See Ward and Hohmann, 1988 pages 174-175