choclo.prism.magnetic_field#
- choclo.prism.magnetic_field(easting, northing, upward, prism_west, prism_east, prism_south, prism_north, prism_bottom, prism_top, magnetization_east, magnetization_north, magnetization_up)[source]#
Magnetic field due to a rectangular prism
Returns the three components of the magnetic field due to a single rectangular prism on a single computation point.
Note
Use this function when all the three component of the magnetic fields are needed. Running this function is faster than computing each component separately. Use one of
magnetic_e
,magnetic_n
,magnetic_u
if you need only one of them.- Parameters:
- easting
float
Easting coordinate of the observation point. Must be in meters.
- northing
float
Northing coordinate of the observation point. Must be in meters.
- upward
float
Upward coordinate of the observation point. Must be in meters.
- prism_west
float
The West boundary of the prism. Must be in meters.
- prism_east
float
The East boundary of the prism. Must be in meters.
- prism_south
float
The South boundary of the prism. Must be in meters.
- prism_north
float
The North boundary of the prism. Must be in meters.
- prism_bottom
float
The bottom boundary of the prism. Must be in meters.
- prism_top
float
The top boundary of the prism. Must be in meters.
- magnetization_east
float
The East component of the magnetization vector of the prism. Must be in \(A m^{-1}\).
- magnetization_north
float
The North component of the magnetization vector of the prism. Must be in \(A m^{-1}\).
- magnetization_up
float
The upward component of the magnetization vector of the prism. Must be in \(A m^{-1}\).
- easting
- Returns:
- b_e
float
Easting component of the magnetic field generated by the prism on the observation point in \(\text{T}\). It will be
numpy.nan
if the observation point falls in a singular point: prism vertices, prism edges or interior points.- b_n
float
Northing component of the magnetic field generated by the prism on the observation point in \(\text{T}\). It will be
numpy.nan
if the observation point falls in a singular point: prism vertices, prism edges or interior points.- b_u
float
Upward component of the magnetic field generated by the prism on the observation point in \(\text{T}\). It will be
numpy.nan
if the observation point falls in a singular point: prism vertices, prism edges or interior points.
- b_e
Notes
Consider an observation point \(\mathbf{p}\) and a prism \(R\) with a magnetization vector \(\mathbf{M}\). The magnetic field \(\mathbf{B}\) it generates on the observation point \(\mathbf{p}\) is defined as:
\[\mathbf{B}(\mathbf{p}) = - \frac{\mu_0}{4\pi} \nabla_\mathbf{p} \left[ \int\limits_R \mathbf{M} \cdot \nabla_\mathbf{q} \left( \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} \right) dv \right]\]Since the magnetization vector is constant inside the boundaries of the prism, we can write the easting component of \(\mathbf{B}\) as:
\[B_x(\mathbf{p}) = - \frac{\mu_0}{4\pi} \left[ M_x \int\limits_R \frac{\partial}{\partial x_p} \left[ \frac{\partial}{\partial x_q} \left( \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} \right) \right] dv + M_y \int\limits_R \frac{\partial}{\partial x_p} \left[ \frac{\partial}{\partial y_q} \left( \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} \right) \right] dv + M_z \int\limits_R \frac{\partial}{\partial x_p} \left[ \frac{\partial}{\partial z_q} \left( \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} \right) \right] dv \right]\]where \(M_x\), \(M_y\) and \(M_z\) are the components of the magnetization vector. The other components can be expressed in an analogous way.
It can be proved that
\[\frac{\partial}{\partial x_q} \left( \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} \right) = - \frac{\partial}{\partial x_p} \left( \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} \right)\]and that it also holds for the two other directions. Therefore, we can rewrite \(B_x\) as:
\[B_x(\mathbf{p}) = + \frac{\mu_0}{4\pi} \left[ M_x \frac{\partial^2}{\partial x_p^2} \int\limits_R \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} dv + M_y \frac{\partial^2}{\partial x_p \partial y_p} \int\limits_R \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} dv + M_z \frac{\partial^2}{\partial x_p \partial z_p} \int\limits_R \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} dv \right]\]Solutions to each one of the integrals in the previous equation and their second derivatives are given by [Nagy2000].
Following [Oliveira2015] we can define a symmetrical 3x3 matrix \(\mathbf{U}\) whose elements are the second derivatives of the previous integrals, such as:
\[u_{ij} = \frac{\partial}{\partial i} \frac{\partial}{\partial j} \int\limits_R \frac{1}{\lVert \mathbf{p} - \mathbf{q} \rVert} dv\]with \(i, j \in \{x, y, z\}\).
We can then express the magnetic field \(\mathbf{B}(\mathbf{p})\) generated by the prism in a compact form:
\[\mathbf{B}(\mathbf{p}) = \frac{\mu_0}{4\pi} \mathbf{U} \cdot \mathbf{M}\]References