Skip to content

Commit

Permalink
ensure there are no duplicate equation labels, move unused references…
Browse files Browse the repository at this point in the history
… to unused_references.bib
  • Loading branch information
lheagy committed Jan 2, 2019
1 parent ac4d3a9 commit 0f20d26
Show file tree
Hide file tree
Showing 21 changed files with 865 additions and 849 deletions.
7 changes: 6 additions & 1 deletion _ext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from autodoc import (
make_formula_sheet, make_contributorslist, make_case_histories
)
from environmentSetup import supress_nonlocal_image_warn, checkDependencies, supress_citation_not_referenced
from environmentSetup import (
# supress_nonlocal_image_warn,
checkDependencies,
# supress_citation_not_referenced,
# supress_nonlocal_image_and_citation_not_referenced
)
from copyImages import copyImages
from edit_on_github import *
from purpose import *
Expand Down
26 changes: 13 additions & 13 deletions _ext/environmentSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ def checkDependencies():
try:
import numpy, scipy, matplotlib, sphinxcontrib.bibtex, sphinx_bootstrap_theme
pass
except (Exception, e):
except Exception:
raise Exception("Requirements not installed, run: 'pip install -r requirements.txt' to install requirements")
else:
pass

def supress_nonlocal_image_warn():
sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_warn
def supress_nonlocal_image_and_citation_not_referenced():
sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_and_citation_not_referenced

def _supress_nonlocal_image_warn(self, msg, node, **kwargs):
def _supress_nonlocal_image_and_citation_not_referenced(self, msg, node, **kwargs):

if not msg.startswith("nonlocal image URI found:"):
self._warnfunc(msg, "%s:%s" % get_source_line(node))
if not msg.startswith("Citation") and msg.endswith("is not referenced."):
self._warnfunc(msg, "%s:%s" % get_source_line(node))

def supress_citation_not_referenced():
sphinx.environment.BuildEnvironment.warn_node = _supress_citation_not_referenced
# def supress_citation_not_referenced():
# sphinx.environment.BuildEnvironment.warn_node = _supress_citation_not_referenced

def _supress_citation_not_referenced(self, msg, node, **kwargs):
print(msg)
if not (
msg.lower().startswith("citation") and msg.lower().endswith("is not referenced.")
):
self._warnfunc(msg, "%s:%s" % get_source_line(node))
# def _supress_citation_not_referenced(self, msg, node, **kwargs):
# if not (
# msg.lower().startswith("citation") and msg.lower().endswith("is not referenced.")
# ):
# self._warnfunc(msg, "%s:%s" % get_source_line(node))



Expand Down
12 changes: 8 additions & 4 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,18 @@

from _ext import (
make_contributorslist, make_formula_sheet, make_case_histories,
checkDependencies, supress_nonlocal_image_warn, copyImages,
supress_citation_not_referenced
checkDependencies,
# supress_nonlocal_image_warn,
copyImages,
# supress_citation_not_referenced,
# supress_nonlocal_image_and_citation_not_referenced
)

make_contributorslist()
# make_formula_sheet()
make_case_histories()
# checkDependencies()
supress_nonlocal_image_warn()
supress_citation_not_referenced()
# supress_nonlocal_image_warn()
# supress_citation_not_referenced()
# supress_nonlocal_image_and_citation_not_referenced()
copyImages()
25 changes: 12 additions & 13 deletions content/maxwell1_fundamentals/appendix/wave_eq_derivation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,30 @@ Here, we derive the wave equations in time for the electric and magnetic fields.
.. math::
\boldsymbol{\nabla} \times \mathbf{e}
= -\frac{\partial \mathbf{b}}{\partial t}
:label: faraday_time
:label: faraday_time_derivation
.. math::
\boldsymbol{\nabla} \times \mathbf{h}
= \mathbf{j} + \frac{\partial \mathbf{d}}{\partial t}
:label: ampere_maxwell_time
:label: ampere_maxwell_time_derive
as well as the three constitutive relations:

.. math::
\boldsymbol{\nabla} \times \mathbf{h}
= \mathbf{j} + \frac{\partial \mathbf{d}}{\partial t}
:label: ampere_maxwell_time
\mathbf{j} = \sigma \mathbf{e}
:label: jsigmae
.. math:: \mathbf{d} = \epsilon \mathbf{e}
:label: depse
:label: depse_derivation

.. math:: \mathbf{b} = \mu \mathbf{h}
:label: bmuh
:label: bmuh_derivation

Derivation for the Electric Field
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To derive the wave equation for :math:`\mathbf{e}`, we first take
the curl of Faraday's Law, shown in equation :eq:`faraday_time`:
the curl of Faraday's Law, shown in equation :eq:`faraday_time_derivation`:

.. math:: \boldsymbol{\nabla} \times (\boldsymbol{\nabla} \times \mathbf{e}) = - \boldsymbol{\nabla} \times \frac{\partial \mathbf{b}}{\partial t}
:label: hme1
Expand Down Expand Up @@ -60,10 +59,10 @@ time derivatives. Equation :eq:`hme3` can then also be written as:

This expression is now solely in terms of :math:`\boldsymbol{\nabla} \times
\mathbf{e}` and :math:`\boldsymbol{\nabla} \times \mathbf{h}`. Thus, we can
use Equation :eq:`ampere_maxwell_time` to generate an equation with only
:math:`\mathbf{e}`. We substitute in Equation :eq:`ampere_maxwell_time` into
use Equation :eq:`ampere_maxwell_time_derive` to generate an equation with only
:math:`\mathbf{e}`. We substitute in Equation :eq:`ampere_maxwell_time_derive` into
Equation :eq:`hme4` and simplify using the constitutive relations in Equations
:eq:`ohms_law_time` and :eq:`depse`:
:eq:`ohms_law_time` and :eq:`depse_derivation`:

.. math:: \boldsymbol{\nabla} \times \boldsymbol{\nabla} \times \mathbf{e} = - \mu \frac{\partial}{\partial t} \left ( \mathbf{j} + \frac{\partial \mathbf{d}}{\partial t} \right )

Expand Down Expand Up @@ -92,7 +91,7 @@ Derivation for the Magnetic Field

To derive the wave equation for :math:`\mathbf{h}`, we repeat the above
derivation but start by taking the curl of Ampere's Law, shown in
equation :eq:`ampere_maxwell_time`:
equation :eq:`ampere_maxwell_time_derive`:

.. math:: \boldsymbol{\nabla} \times (\boldsymbol{\nabla} \times \mathbf{h}) = \boldsymbol{\nabla} \times \mathbf{j} + \boldsymbol{\nabla} \times \frac{\partial \mathbf{d}}{\partial t}
:label: hmh1
Expand All @@ -119,7 +118,7 @@ written as:

These expressions are now in terms of :math:`\boldsymbol{\nabla} \times
\mathbf{e}` and :math:`\boldsymbol{\nabla} \times \mathbf{h}`. Thus, we can
use Equation :eq:`faraday_time` to generate an equation with only
use Equation :eq:`faraday_time_derivation` to generate an equation with only
:math:`\mathbf{h}`. We then again use the vector identity
:math:`\boldsymbol{\nabla} \times \boldsymbol{\nabla} \times \mathbf{x} =
\boldsymbol{\nabla} \boldsymbol{\nabla} \cdot \mathbf{x} -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Analytic Solution
Here, Maxwell's equations are solved for a harmonic magnetic dipole source.
This is accomplished by using the method of Schelkunoff potentials, as shown in Ward and Hohmann (:cite:`ward1988`).
Analytic expressions for the electric field, the magnetic field and the corresponding vector potential are provided.




For a magnetic source (:math:`\mathbf{J_m^s}`), Maxwell's equations in the frequency domain are given by:


.. math::
\nabla \times \mathbf{E_m} + i\omega \mu \mathbf{H_m} = - \mathbf{J_m^s}
\nabla \times \mathbf{E_m} + i\omega \mu \mathbf{H_m} = - \mathbf{J_m^s}
:label: Faraday_m
.. math::
\nabla \times \mathbf{H_m} - (\sigma + i\omega \varepsilon) \mathbf{E_m} = 0
Expand All @@ -40,24 +40,24 @@ and
Eq. :eq:`E_F_potential` can be obtained simply by taking the divergence of Eq. :eq:`Ampere_m`.
Eq. :eq:`H_F_potential` is obtained by manipulating Eqs. :eq:`Faraday_m`, :eq:`Ampere_m` and :eq:`E_F_potential`, and choosing an appropriate Gauge.
We can see from Eqs. :eq:`H_F_potential` and :eq:`E_F_potential` that :math:`\mathbf{F}` contains all the information corresponding to the electric and magnetic fields.
Therefore, Maxwell's equations will be manipulated to solve for :math:`\mathbf{F}`; which can then be used to obtain :math:`\mathbf{E_m}` and :math:`\mathbf{H_m}`.
Therefore, Maxwell's equations will be manipulated to solve for :math:`\mathbf{F}`; which can then be used to obtain :math:`\mathbf{E_m}` and :math:`\mathbf{H_m}`.

By manipulating Eqs. :eq:`Faraday_m`, :eq:`Ampere_m` and :eq:`E_F_potential` and choosing an appropriate Gauge, we find that :math:`\mathbf{F}` can be expressed using the Helmholtz equation:


.. math::
\nabla^2 \mathbf{F} + k^2 \mathbf{F} = - \mathbf{J}_m^s, \ \ \ \ \text{where} \ \ k^2 = \omega^2\mu\varepsilon -i\omega\mu\sigma
:label: Helmholtz_F
:label: Helmholtz_F
The Helmholtz equation with boundary conditions can be solved to generate :math:`\mathbf{F}`.
The Helmholtz equation with boundary conditions can be solved to generate :math:`\mathbf{F}`.
For infinite media, the boundary condition is such that :math:`\mathbf{F} \rightarrow 0` as :math:`r \rightarrow \infty`.
From the Helmholtz equation, we can see that :math:`\mathbf{F}` will only have a component along the direction of :math:`\mathbf{J_m^s}`.
The scalar Green's function for the Helmholtz equation is:


.. math::
G(r) = \frac{e^{-ikr}}{4\pi r}.
:label: GreensFncFullSpace
:label: GreensFncFullSpaceMag
and hence the vector potential for an arbitrary magnetic source is:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Asymptotic Approximations
.. purpose::

Here, simplified expressions for the electric and magnetic fields are presented for several cases.
By examining simplified expressions, we can more easily see how the fields depend on certain parameters.
By examining simplified expressions, we can more easily see how the fields depend on certain parameters.


.. _frequency_domain_magnetic_dipole_asymptotics_DC:
Expand Down Expand Up @@ -42,14 +42,14 @@ In this case, the exponential term in :math:`\mathbf{E}_m` and :math:`\mathbf{H}

.. math::
e^{-ikr} \approx 1 - ikr + O \left ( k^2 r^2 \right )
:label: eq_exp_TaylorO2
:label: eq_exp_TaylorO2_mag
The near-field approximation for :math:`\mathbf{H}_m` can be obtained by replacing the exponential term in the full analytic solution with the Taylor series approximation from Eq. :eq:`eq_exp_TaylorO2`.
The near-field approximation for :math:`\mathbf{H}_m` can be obtained by replacing the exponential term in the full analytic solution with the Taylor series approximation from Eq. :eq:`eq_exp_TaylorO2_mag`.
Thus:

.. math::
\begin{split}
\mathbf{H_m} \approx \frac{m}{4 \pi r^3} \Big ( 1 - ikr + O ( k^2 r^2 ) \Big ) \Bigg [ \Bigg ( & \frac{x^2}{r^2} \mathbf{\hat x} + \frac{xy}{r^2} \mathbf{\hat y} + \frac{xz}{r^2} \mathbf{\hat z} \Bigg ) ... \\
\mathbf{H_m} \approx \frac{m}{4 \pi r^3} \Big ( 1 - ikr + O ( k^2 r^2 ) \Big ) \Bigg [ \Bigg ( & \frac{x^2}{r^2} \mathbf{\hat x} + \frac{xy}{r^2} \mathbf{\hat y} + \frac{xz}{r^2} \mathbf{\hat z} \Bigg ) ... \\
& \Big ( -k^2 r^2 + 3ikr +3 \Big ) + \Big ( k^2 r^2 - ikr -1 \Big ) \mathbf{\hat x} \Bigg ]
\end{split}
:label: eq_Mdip_Hnear1
Expand All @@ -63,7 +63,7 @@ Eq. :eq:`eq_Mdip_Hnear1` can be simplified by neglecting polynomial terms which
According to Eq. :eq:`eq_Mdip_Hnear2`, the near magnetic field depends only on the observation location and the magnetic dipole moment.
Additionally, the source and the magnetic field are completely in-phase.

The near-field approximation for :math:`\mathbf{E}_m` can be obtained by replacing the exponential term in the full analytic solution with the Taylor series approximation from Eq. :eq:`eq_exp_TaylorO2`.
The near-field approximation for :math:`\mathbf{E}_m` can be obtained by replacing the exponential term in the full analytic solution with the Taylor series approximation from Eq. :eq:`eq_exp_TaylorO2_mag`.
Thus:

.. math::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Analytic Solution
This is accomplished by applying the inverse Laplace transform to frequency domain solutions for the harmonic magnetic dipole.
Analytic expressions for the electric field, the magnetic field and the corresponding vector potential are provided.
Due to the difficulties which arise in deriving the final expressions, we will not include the effects of dielectric permittivity (:math:`\varepsilon`); this is known as the quasi-static approximation.



**Obtaining the Transient Response from a Harmonic Solution**
Expand All @@ -19,7 +19,7 @@ For a causal system, the unit step-response (:math:`g_+`) at :math:`t \geq 0` is

.. math::
g_+(t) = \int_{-\infty}^\infty f(\tau) u(t - \tau) d\tau = \int_0^t f(\tau) d\tau \; \; \; \textrm{for} \; \; \; t\geq 0
:label: causal_step
:label: causal_step_mag
where :math:`f(t)` is the system's impulse response.
For most geophysical problems however, we are interested in the step-off or transient response (:math:`g_-`).
Expand All @@ -30,7 +30,7 @@ The step-off response for a causal system may be given by:
g_-(t) = \int_{-\infty}^\infty f(\tau) \big [ 1 - &u(t - \tau) \big ] d\tau = \; ... \\
& \int_0^\infty f(\tau) d\tau - \int_0^t f(\tau) d\tau = g_+ (\infty) - g_+(t) \; \; \; \textrm{for} \; \; \; t\geq 0
\end{split}
:label: causal_step_off
:label: causal_step_mag_off
where :math:`g_+ (\infty )` represents the step-response at :math:`t = \infty`.
Therefore, if the step-response is known for :math:`t \geq 0`, it can be used to obtain the step-off response at :math:`t \geq 0`.
Expand All @@ -39,15 +39,15 @@ From Ward and Hohmann :cite:`ward1988`, the step-response can be obtained via th

.. math::
g_+(t) = L^{-1} \Bigg [ \frac{F(s)}{s} \Bigg ]
:label: step_Laplace_transform
:label: step_Laplace_transform_mag
where :math:`F(s)` is obtained by replacing :math:`s=i\omega` in the system's harmonic response function.
For the electric field, magnetic field and vector potential arising from a harmonic magnetic dipole in the :math:`\mathbf{\hat x}` direction, these have :ref:`already been derived<frequency_domain_magnetic_dipole_analytic_solution>`.


**Harmonic Solutions for a Magnetic Dipole**

As we just mentionned, harmonic solutions for the electric field, magnetic field and vector potential have :ref:`already been derived<frequency_domain_magnetic_dipole_analytic_solution>` for a source term :math:`\mathbf{J_m^s} = -i\omega IS \delta (x) \delta (y) \delta (z) \mathbf{\hat x}`.
As we just mentionned, harmonic solutions for the electric field, magnetic field and vector potential have :ref:`already been derived<frequency_domain_magnetic_dipole_analytic_solution>` for a source term :math:`\mathbf{J_m^s} = -i\omega IS \delta (x) \delta (y) \delta (z) \mathbf{\hat x}`.


For the vector potential:
Expand All @@ -73,7 +73,7 @@ where the wavenumber :math:`k` is given by:

.. math::
k = \big ( \omega^2\mu\varepsilon - i \omega \mu \sigma \big )^{1/2}
:label: wave_number
:label: wave_number_mag
Expand All @@ -84,7 +84,7 @@ Due to the difficulties which arise in deriving the final expressions, we will n

.. math::
k = \big (- i \omega \mu \sigma \big )^{1/2}
:label: wave_number_quasi_static
:label: wave_number_mag_quasi_static
If we substitute :math:`s = i\omega` in Eqs. :eq:`F_harmonic_response`, :eq:`E_harmonic_response` and :eq:`H_harmonic_response` and divide by :math:`s` then:

Expand Down Expand Up @@ -133,13 +133,13 @@ Thus:

.. math::
L^{-1} \Bigg [ \frac{{\bf F}(s)}{s} \Bigg ] = \frac{m\theta^3}{\pi^{3/2} \sigma} e^{-\theta^2 r^2} \mathbf{\hat x} \; ,
:label: a_step_response
:label: a_step_response_mag
.. math::
L^{-1}\Bigg [ \frac{{\bf E_m}(s)}{s} \Bigg ] = \frac{2 m \theta^5 }{\pi^{3/2} \sigma} e^{-\theta^2 r^2} \big ( z \, \mathbf{\hat y} - y \, \mathbf{\hat z} \big )
:label: e_step_response
:label: e_step_response_mag
and
Expand All @@ -149,7 +149,7 @@ and
L^{-1}\Bigg [ \frac{{\bf H_m}(s)}{s} \Bigg ] = \frac{m}{4\pi r^3} \Bigg [ & \Bigg ( \frac{x^2}{r^2}\mathbf{\hat x} + \frac{xy}{r^2}\mathbf{\hat y} + \frac{xz}{r^2}\mathbf{\hat z} \Bigg ) \Bigg ( \bigg ( \frac{4}{\sqrt{\pi}} \theta^3 r^3 + \frac{6}{\sqrt{\pi}} \theta r \bigg ) e^{-\theta^2 r^2} \, ... \\
& + 3\, \textrm{erfc} (\theta r) \Bigg ) - \Bigg ( \bigg ( \frac{4}{\sqrt{\pi}} \theta^3 r^3 + \frac{2}{\sqrt{\pi}} \theta r \bigg ) e^{-\theta^2 r^2} + \textrm{erfc} (\theta r) \Bigg ) \mathbf{\hat x} \Bigg ]
\end{split}
:label: h_step_response
:label: h_step_response_mag
where

Expand All @@ -158,7 +158,7 @@ where
:label: theta_quasi_static
Using the previous three expressions, we can determine the transient vector potential, electric field magnetic fields according to Eq. :eq:`causal_step_off`.
Using the previous three expressions, we can determine the transient vector potential, electric field magnetic fields according to Eq. :eq:`causal_step_mag_off`.
For the vector potential, the transient response is given by:


Expand All @@ -179,7 +179,7 @@ And for the magnetic field, the transient response is given by:

.. math::
\begin{split}
{\bf h_m}(t) = \frac{m}{4\pi r^3} \Bigg [ & \Bigg ( \frac{x^2}{r^2} \mathbf{\hat x} + \frac{xy}{r^2}\mathbf{\hat y} + \frac{xz}{r^2} \mathbf{\hat z} \Bigg ) \Bigg ( 3 \, \textrm{erf}(\theta r) - \bigg ( \frac{4}{\sqrt{\pi}}\theta^3 r^3 \; ... \\
{\bf h_m}(t) = \frac{m}{4\pi r^3} \Bigg [ & \Bigg ( \frac{x^2}{r^2} \mathbf{\hat x} + \frac{xy}{r^2}\mathbf{\hat y} + \frac{xz}{r^2} \mathbf{\hat z} \Bigg ) \Bigg ( 3 \, \textrm{erf}(\theta r) - \bigg ( \frac{4}{\sqrt{\pi}}\theta^3 r^3 \; ... \\
&+ \frac{6}{\sqrt{\pi}}\theta r \bigg ) e^{-\theta^2 r^2} \Bigg ) - \Bigg (\textrm{erf}(\theta r) - \bigg ( \frac{4}{\sqrt{\pi}}\theta^3 r^3 + \frac{2}{\sqrt{\pi}}\theta r \bigg ) e^{-\theta^2 r^2} \Bigg ) \mathbf{\hat x} \Bigg ]
\end{split}
:label: h_step_off_response
Expand Down
Loading

0 comments on commit 0f20d26

Please sign in to comment.