Skip to main content

Multi-order vector finite element modeling of 3D magnetotelluric data including complex geometry and anisotropy


We introduce MoVFEM, a computational algorithm for the modeling of three-dimensional magnetotelluric (MT) data using a vector finite element method of specific order from multiple elements’ orders. Our algorithm allows complex geometries, topography, and anisotropic resistivity structures. The software calculates secondary electric and magnetic fields for a plane-wave primary magnetic field. Accurate calculation of fields in the boundary regions of the computational domain are ensured by the implementation of the Generalized Perfect Matched Layers method. We validate the MoVFEM algorithm by applications to various scenarios, which allow a comparison with analytical or accepted numerical solutions where available. The respective results of our algorithm are in good agreement with existing solutions.


The inversion of MT data in connection with the modeling of three-dimensional resistivity structures has become a significant area of research with the increase of large-scale MT surveys (e.g. Robertson et al. 2016; Schultz 2010; Schultz et al. 2019) and the availability of high-performance computing strategies (Newman 2014). The modeling step is the critical hub of inversion methods. It consists of parametrizing the subsurface in terms of resistivity and generating synthetic MT responses. The results are obtained by numerically solving the partial differential equations describing the propagation of electromagnetic (EM) fields in various media.

The primary numerical methods for 3D MT modeling are integral equation, finite difference (FD), and finite element methods (FEM) (Avdeev 2005). Finite difference methods are well developed, but the focus has been changing toward finite element methods, because these can account for topography, bathymetry, and complex geometry of subsurface structures more accurately (Newman 2014). Since the publication of Reddy et al. (1977), nodal FEM has been applied to solve the forward EM modeling problem (e.g. Mogi 1996; Puzyrev et al. 2013).

Two types of numerical element geometries are commonly used in 3D FEM; namely grids of tetrahedrons or hexahedrons. According to Yilmaz and Kuzuoglu (2008), tetrahedron meshes are commonly used, because of the availability of mesh generation schemes. They have been frequently applied for the modeling of 3D structures from EM data (e.g. Ahagon and Kameari 2017; Ahagon et al. 2018; Cai et al. 2017; Camargos et al. 2017; Liu et al. 2010, 2018; Puzyrev et al. 2013; Ren et al. 2013; Schwarzbach et al. 2011; Weiss 2017). On the other hand, hexahedron mesh geometries are also commonly applied (Cai et al. 2014; Farquharson and Miensopust 2011; Mitsuhata and Uchida 2004; Mogi 1996; Nam et al. 2007; Shi et al. 2004; Xiao et al. 2018; Xiong et al. 2018; Zyserman and Santos 2000).

Han et al. (2009) argue that although FD methods are fast, vector finite element methods (VFEM) yield more accurate solutions. In VFEM, the EM fields are calculated at the edges of the tetrahedron or hexahedron element of the grid. On the other hand, FEM computes them as a vector with three unknowns on each node of the element. Therefore, VFEM reduces the degrees of freedom of the modeling problem and includes the continuity of EM fields among shared elements of the computational domain.

Mostly linear-order edge elements have been applied in the modeling of MT data (Farquharson and Miensopust 2011; Mitsuhata and Uchida 2004; Nam et al. 2007; Shi et al. 2004; Jin 2002). Mitsuhata and Uchida (2004) used linear-order edge elements and nodal basis functions to model MT data with the help of the \({{\mathbf {T}}}{-}\varOmega\) Helmholtz field decomposition on rectilinear elements. Shi et al. (2004) incorporated a divergence correction technique into VFEM for 3D MT modeling using linear-order edge elements on a hexahedral mesh. Farquharson and Miensopust (2011) also applied a divergence correction to 3D MT forward modeling and then used piecewise linear functions to define the vector basis functions on a rectilinear mesh. Nam et al. (2007) were the first to apply distorted hexahedrons in order to include surface topography for 3D MT modeling, using linear-order edge elements.

Edge elements of linear order require a fine grid spacing of the finite elements to obtain accurate solutions. Consequently, the problem has to be formulated with a large numbers of unknowns, which again leads to large numerical arrays. Yilmaz and Kuzuoglu (2008) therefore recommended the use of high-order edge elements for the EM scattering problem, since it is possible to obtain accurate solutions with larger elements. The resulting numerical problem contains fewer elements, which leads to reduced requirements in computer memory and faster convergence of solutions. Most recent applications of high-order elements have been using tetrahedral mesh (e.g. Ahagon et al. 2018; Schwarzbach et al. 2011; Weiss 2017). There have been some applications of high-order elements in hexahedral mesh (e.g Grayver and Kolev 2015; Käufl et al. 2018; Zyserman and Santos 2000). Kruglyakov and Kuvshinov (2018) introduced high-order polynomial basis for the volume integral-equation method.

The 3D forward modeling algorithms, available within the scientific community, consider the subsurface as isotropic (Cai et al. 2014; Farquharson and Miensopust 2011; Grayver and Kolev 2015; Käufl et al. 2018; Liu et al. 2010; Mackie et al. 1993; Mitsuhata and Uchida 2004; Nam et al. 2007; Shi et al. 2004; Xiao et al. 2018; Xiong et al. 2018; Zyserman and Santos 2000). However, an anisotropy of the modeled medium affects the interpretation of MT data (e.g. Naif et al. 2013); therefore. it is advantageous to extend the computational capabilities of modeling algorithms toward the handling of full 3D anisotropic structures. Recent implementations of anisotropy in VFEM have been applied with either linear-order tetrahedral elements (Cai et al. 2017; Liu et al. 2018) or using linear-order hexahedral elements (Xiao et al. 2018).

At this point, several algorithms for the forward calculation of MT responses for a given resistivity structures exist and have been used to infer unknown subsurface structures. However, the application of high-order hexahedral elements including anisotropy has not been discussed in the literature. We developed a multi-order vector finite element Method (MoVFEM) for the calculation of MT data for 3D structures, including anisotropy and complex geometry such as topography and subsurface interfaces. In addition, high-order hexahedral elements have been implemented in the algorithm. This algorithm produces accurate results if the right choice of boundary conditions is made along with the most efficient element order.

The MT problem is based on the secondary field formulation, in which the EM fields are defined as the sum of given primary EM fields with unknown secondary EM fields, where the primary fields are the EM fields propagating in the air. Both the electric and magnetic field governing equations are implemented in MoVFEM. Boundary conditions are considered using the Generalized Perfect Matched Layers (GPML). The GPML boundary conditions are applied by defining a layer zone (called Perfect Matched Layer), where the field values will gradually decrease to a zero value on the boundary of the domain (Fang and Wu 1996; Zhou et al. 2012). This method was first proposed by Fang and Wu (1996), and later Zhou et al. (2012) modified the GPML equations for MT and CSEM modeling. Both GPML approaches are included in MoVFEM to compare their behavior. Dirichlet boundary conditions are also implemented in this algorithm.

In this feasibility study for MoVFEM, we also compare three types of edge elements: linear-order hexahedrons (12 edges), quadratic-order hexahedrons (36 edges), and Lagrangian hexahedrons (54 edges). Linear- and quadratic-order hexahedral elements have been proposed by Kameari (1990). The Lagrangian edge elements are based on Crowley et al. (1988) and Kameari (1990). All element types and their respective basis function definitions lead to a global stiffness matrix, which is usually sparse and symmetric. The required matrix inversions are calculated using the MUMPS software library, which is a parallel direct-solver optimized for sparse matrices (Amestoy et al. 2006).

The multi-order vector finite element method

Finite elements

According to Börner (2010), nodal basis functions force the EM fields to be continuous across element boundaries, and it becomes difficult to impose boundary conditions. It is common to obtain spurious (non-physical) solutions, because of the lack of applying the divergence free condition (Jin 2002).

Hano (1984) introduced linear edge elements for 2D rectangular cells. Each basic polyhedral structure (i.e., each cell) consists of \(n_\text{n}\) nodes and \(n_\text{e}\) edges, on which the numerical elements are defined using mixed-order polynomials, i.e., polynomials of order \(o_\text{p}{-}1\) on the direction of the edge element itself, and order \(o_\text{p}\) in other directions. Using mixed-order polynomials, the degree of freedom in the polyhedral structure is reduced from \(3 n_\text{n}\) in FEM to \(n_\text{e}\) in VFEM. In the following, we assume a tiling of the numerical domain by \(N_\text{e}\) (hexahedral) cells, and all numerical elements refer to edge elements. The overall number of nodes is \(N_\text{e}\cdot n_\text{n}-N^{\text{shr}}_\text{e}\cdot n^{\text{shr}}_\text{n}\) and the overall number of edge elements \(N_\text{e} \cdot n_\text{e}-N^{\text{shr}}_\text{e} \cdot n^{\text{shr}}_\text{e}\), where the superscript shr refers to shared elements.

In addition to reducing the degrees of freedom, mixed-order vector basis functions will also have zero divergence for rectangular cells and very small divergence for distorted geometries. These elements will define EM fields that are continuous across the element boundaries (Jin 2002).

Kameari (1990) introduced a linear-order hexahedral element (8 nodes, 12 elements), and high-order edges for the quadratic element (20 nodes, 36 elements). Crowley et al. (1988) presented a formulation for high-order elements on hexahedra, called covariant projection element (see Fig. 1a–c), from which the Lagrangian element (27 nodes, 54 elements) is deduced. The mixed-order vector basis functions \(B^i_{\xi _{\beta }}\) are defined locally for each element i, \(i=1\ldots N_\text{e}\).

Fig. 1

Edge elements and nodes on the basis hexahedron. a Linear-order elements, \(n_\text{n}=8\), \(n_\text{e}=12\) (Kameari 1990). b High-order (quadratic) elements, \(n_\text{n}=20\), \(n_\text{e}=36\) (Kameari 1990). c High-order covariant projection (Lagrangian) elements, \(n_\text{n}=27\), \(n_\text{e}=54\) (Crowley et al. 1988). d Coordinate systems orientations. e Enumeration scheme for element nodes and element edges is internally enumerated depending on the numerical element

These edge elements allow the construction of local elements by defining the covariant projection of a global vector function \(\mathbf{V }(\mathbf{r }),\mathbf{r } = (x,y,z),\) onto a local coordinate system \((\varvec{{\hat{\xi }}},\varvec{{\hat{\eta }}},\varvec{\hat{\zeta )}}\):

$$\begin{aligned} {V}_{\xi _{\beta }}={\mathbf {V}}\cdot \frac{\partial {\mathbf {r}}}{\partial \xi _{\beta}},\quad \beta \in \{1,2,3\}. \end{aligned}$$

The coordinate orientations are shown in Fig. 1d.

EM field formulations

We consider both the electric (\({\mathbf {E}}\)) and the magnetic (\({\mathbf {H}}\)) fields as total fields, each consisting of the primary and secondary field components, as \({\mathbf {E}}={\mathbf {E}}_\text{p}+{\mathbf {E}}_\text{s}\) and \({\mathbf {H}}={\mathbf {H}}_\text{p}+{\mathbf {H}}_\text{s}\), respectively. The secondary field components are calculated within the range of the conducting medium.

Primary field

For the primary EM fields, the domain \(\varOmega\) is considered as air. The EM fields for xy-polarization are

$$\begin{aligned} \begin{aligned} E^\text{p}_x&=E_0-\text{i}\omega {B}_0z;\quad E_0=0\\ {B}^\text{p}_y&=B_0;\quad B_0=1 nT. \end{aligned} \end{aligned}$$

Electric field

The electric field governing equation is

$$\begin{aligned} \nabla \times \left( {\varvec{\mu }}^{-1} \cdot \nabla \times {\mathbf {E}}_\text{s}\right) +\text{i}\omega \varvec{\sigma } \cdot {\mathbf {E}}_\text{s}={\mathbf {s}}^E. \end{aligned}$$

with \(3\times 3\) tensors for the conductivity (\(\varvec{\sigma }\)) and for the magnetic permeability (\(\varvec{\mu }\)). The electric source term on the right-hand side is

$$\begin{aligned} {\mathbf {s}}^E = -\text{i}\omega \delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p}, \end{aligned}$$

in which the primary electric field is modified by the model change \(\delta \varvec{\sigma }\). This change is defined as the difference between the model in study \(\varvec{\sigma }\) and the model used for primary fields \(\varvec{\sigma }_\text{p}\), i.e., \(\delta \varvec{\sigma }=\varvec{\sigma }-\varvec{\sigma }_\text{p}\).

For MT data, it is common to approximate \({\varvec{\mu }}\approx \mu _0{\mathbf {I}}\), with \({\mathbf {I}}\in {\mathbb {R}}^{3\times 3}\) as the identity operator, and \(\varvec{\sigma }\in {\mathbb {R}}^{3\times 3}\) being a positive definite and symmetric tensor. This tensor again can be written as \(\varvec{\sigma }=\varvec{\sigma }_{\text {{real}}}+\text{i}\omega \varepsilon _0{\mathbf {I}}; \quad \varvec{\sigma }_{\text {{real}}} \in {\mathbb {R}}^{3\times 3}.\) The free-air conductivity is implemented by letting \(\varvec{\sigma }_{\text {{real}}}\equiv {\mathbf {0}}\text { S/m}\).

Magnetic field

For the magnetic component in MT modeling, we assume that the magnetic permeability does not change from the primary model to the model in study. Therefore, we assume that \(\delta {\varvec{\mu }}=0\) and \(\nabla \times \left( {\varvec{\mu }}^{-1}\delta {\varvec{\mu }}\cdot {\mathbf {H}}_\text{p}\right) =0.\)

The magnetic field governing equation is given by

$$\begin{aligned} \nabla \times \left( \varvec{\sigma}^{-1}\cdot \nabla \times {\mathbf {H}}_\text{s}\right) +\text{i}\omega \varvec{\mu }\cdot {\mathbf {H}}_\text{s}={\mathbf {s}}^H\,, \end{aligned}$$

with a magnetic source term

$$\begin{aligned} {\mathbf {s}}^H=\nabla \times \left( \varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p}\right) . \end{aligned}$$

Generalized formulation

The MT problem is solved for the secondary field, from a known primary field. If the electric field problem is used, the total magnetic field \({\mathbf {H}}\) is obtained by applying Faraday’s Law to the electric field solution: \({\mathbf {E}}={\mathbf {E}}_\text{p}+{\mathbf {E}}_\text{s}\Rightarrow {\mathbf {H}}=-\left( \text{i}\omega {\varvec{\mu }}\right) ^{-1}\nabla \times {\mathbf {E}}.\) On the other hand, if the magnetic field problem is used, the total electric field \({\mathbf {E}}\) is calculated from Ampere’s Law applied to the magnetic field solution: \({\mathbf {H}}={\mathbf {H}}_\text{p}+{\mathbf {H}}_\text{s}\Rightarrow {\mathbf {E}}=\varvec{\sigma}^{-1}\nabla \times {\mathbf {H}}.\)

Because of the similarity of the governing equations. (3) and (5), a generalized governing equation can be formulated:

$$\begin{aligned} \nabla \times \left( \varvec{\nu }^{-1}\cdot \nabla \times {\mathbf {F}}_\text{s}\right) +\text{i}\omega \varvec{\kappa }\cdot {\mathbf {F}}_\text{s}={\mathbf {s}}^F\,, \end{aligned}$$


$$\begin{aligned} \{{\mathbf {F}},\,\varvec{\nu },\,\varvec{\kappa }\} = {\left\{ \begin{array}{ll} \{{\mathbf {E}},\,\varvec{\mu },\,\varvec{\sigma } \}\,\qquad {\mathrm {electric\, field\, problem,}}\\ \{{\mathbf {H}},\,\varvec{\sigma },\,\varvec{\mu } \}\, \qquad {\mathrm {magnetic\, field\, problem.}} \end{array}\right. } \end{aligned}$$

The MoVFEM procedure is applied to this general formulation.

Applying the Galerkin method to Eq. (7), the problem to be solved becomes the inner product of a differentiable weighting function \({\mathbf {w}}\) with the governing equation, such as \(\left\langle {\mathbf {w}},\mathrm {D}(\varvec{\nu },\varvec{\kappa }){\mathbf {F}}_\text{s}\right\rangle =\left\langle {\mathbf {w}},{\mathbf {s}}^F\right\rangle,\) \(\forall \,{\mathbf {w}}\in {\mathcal {C}}'(\varOmega ),\) where \(\mathrm {D}(\varvec{\nu },\varvec{\kappa })\) is the left-hand side of Eq. (7). The solution for the aforementioned partial differential equations is given by the following integrals,

$$\begin{aligned} \left\langle {\mathbf {w}},\mathrm {D}(\varvec{\nu },\varvec{\kappa }){\mathbf {F}}_\text{s}\right\rangle&=\int _\varOmega \left[ \left( \nabla \times {\mathbf {w}}\right) \cdot \varvec{\nu }^{-1} \cdot \left( \nabla \times {\mathbf {F}}_\text{s}\right) +\text{i}\omega {\mathbf {w}}\cdot \varvec{\kappa }\cdot {\mathbf {F}}_\text{s}\right] \,{\text{d}}\varOmega \nonumber \\&\quad -C_\varGamma \int _\varGamma {\mathbf {w}}\cdot (\varvec{\nu }^{-1}\cdot \nabla \times {\mathbf {F}}_\text{s}) \times \hat{{\mathbf {n}}}\,{\text{d}}\varGamma \end{aligned}$$
$$\begin{aligned} \left\langle {\mathbf {w}},{\mathbf {s}}^F\right\rangle&=\int _\varOmega {{\mathbf {w}}\cdot {\mathbf {s}}^F\,{\text{d}}\varOmega }. \end{aligned}$$

These integrals are computed over the numerical domain \(\varOmega\) or over its boundary \(\varGamma\), the vector \(\hat{{\mathbf {n}}}\) is a normal vector to the respective boundary element.

The boundary \(\varGamma\) integral in Eq. (8) describes the Neumann boundary condition for tangential fields. From the construction of edge elements in MoVFEM, the tangential EM fields are considered to be continuous among shared elements; therefore, \(C_\varGamma =0\) in the local calculation of Eq. (8) (Farquharson and Miensopust 2011). On the boundary of the domain, homogeneous Neumann boundary conditions are applied. Hence, \({\mathbf {H}}_\text{s}\times \hat{{\mathbf {n}}}=0\) and \({\mathbf {H}}_\text{p}\times \hat{{\mathbf {n}}}=0\), and \({\mathbf {E}}_\text{s}\times \hat{{\mathbf {n}}}=0\) and \({\mathbf {E}}_\text{p}\times \hat{{\mathbf {n}}}=0\). By applying these conditions, we can omit the respective boundary integral.

Implemented boundary conditions


Dirichlet boundary conditions, in which the values of boundary elements are specified to be a known function, require that the boundaries are far away from the inhomogeneities. Therefore, the model domain is extended for several skin depths in each direction \(({\mathbf {x}},{\mathbf {y}},{\mathbf {z}})\). However, it is often computationally impossible to extend the domain until Dirichlet boundary conditions are satisfied. This results in reflections of propagating fields at the outer boundaries back into model domain and even the inhomogeneities, making the solution inaccurate. The GPML approach is based on the assumption that the secondary EM fields gradually decrease to zero in the PML zone (Fang and Wu 1996) as shown in Fig. 2.

Fig. 2

GPML scheme and parameters. a PML boundary extension around a modeling domain with irregularly shaped structures of different conductivity values \(\sigma _i\). PML zone starts at \(x_a\) and ends at the point \(x_b\) which are indicated for one of \(\hat{{\mathbf {x}}}\) direction (marked by red lines). b Vertical cross-section through the computational domain of the respective structure, including the PML zone. The numerical grid contains irregularities of the model structure and is regular within the PML zone. c Horizontal cross-section through the computational grid structure. The numerical grid is regularly spaced within the model domain and non-regularly extended in the PML zone. The model domain is marked by the yellow rectangle in b and c

According to Fang and Wu (1996), the original PML formulation of Berenger (1994) does not absorb efficiently evanescent waves and significant reflections can occur at the boundary of models involving wave propagation in lossy media. The author suggested the GPML method, a modified version of the original PML method, able to absorb evanescent waves propagating in lossy media. We implemented that improved version (GPML) to appropriately handle propagating and evanescent waves.

The implementation of the GPML method is based on the transformation of real valued into complex valued coordinates. The relevant governing equations in this case transform into

$$\begin{aligned} h^{(x_1+x_2+x_3)}\left[ {\tilde{\nabla }}\times \left( \varvec{\nu }^{-1}\cdot {\tilde{\nabla }}\times {\mathbf {F}}_\text{s}\right) +\text{i}\omega \varvec{\kappa }\cdot {\mathbf {F}}_\text{s}\right] =h^{(x_1+x_2+x_3)}{\tilde{\mathbf {s}}}^F \,, \end{aligned}$$

where \({\tilde{\mathbf {s}}}^F\) is the source term using the modified Nabla operator

$$\begin{aligned} {\tilde{\nabla }}:=\left( \frac{1}{h_{x_1}}\frac{\partial }{\partial x_1},\frac{1}{h_{x_2}}\frac{\partial }{\partial x_2},\frac{1}{h_{x_3}}\frac{\partial }{\partial x_3}\right) , \end{aligned}$$

and \(h^{(x_1+x_2+x_3)}=h_{x_1}h_{x_2}h_{x_3}\). The \(h_{x_m}=h_{x_m}(x_m)\,(m=1,2,3);\) are called stretching factors and are defined by Fang and Wu (1996) as follows:

$$\begin{aligned} h_{x_m}(x_m)&=h_{x_0}(x_m)\left( 1+\frac{b(x_m)}{(\text{i}\omega \varepsilon )}\right) \,, \end{aligned}$$
$$\begin{aligned}&\forall \,x_m\in \text {PML zone}\,; \end{aligned}$$
$$\begin{aligned} b(x_m)&=b_0\sin ^2\left( \frac{\pi |x_m-x_{am}|}{2|x_{bm}-x_{am}|}\right) \,; \end{aligned}$$
$$\begin{aligned} h_{x_0}(x_m)&=1+a_0\left( \frac{|x_m-x_{am}|}{|x_{bm}-x_{am}|}\right) ^n . \end{aligned}$$

The \(x_{am}\) and \(x_{bm}\) are the starting and end points of PML zone, respectively (see Fig. 2), and index m identifies the Cartesian coordinate component.

Expanding Eq. (9) with the modified Nabla operator (Eq. 10), it is possible to factorize the stretching factors from the partial differentiations (e.g., \(\partial _{m n}\)) into the model tensors \(\nu _{i j}\) in the anisotropic case, obtaining the final formulation of the MT governing equation for the GPML method:

$$\begin{aligned} \nabla \times \left( \tilde{\varvec{\nu }}^{-1}\cdot \nabla \times {\mathbf {F}}_\text{s}\right) +\text{i}\omega \tilde{\varvec{\kappa }}\cdot {\mathbf {F}}_\text{s}={\tilde{\mathbf {s}}}^F. \end{aligned}$$

We use the modified model tensors

$$\begin{aligned} \tilde{\varvec{\nu }}&=\left\{ {\tilde{\nu }}_{i j}^{m n}\right\} =\left\{ \nu _{i j}\frac{h^{(x_1+x_2+x_3)}}{h_{x_m}h_{x_n}}\right\} \,, \nonumber \\ \tilde{\varvec{\kappa }}&=h^{(x_1+x_2+x_3)}\varvec{\kappa }. \end{aligned}$$

The indexes \(m=1,2,3\) and \(n=1,2,3\) are related to the components of the partial derivatives in the expanded curl–curl (e.g. \(\partial _{m n}\) in Eq. 9). Consequently, \({1}/{h_{x_m}h_{x_n}}\) belongs to the partial derivatives of the expanded curl–curl with the modified Nabla operator. The indexes \(i=1,2,3\) and \(j=1,2,3\) are related to the components of \(\varvec{\nu }\) that correspond to the respective derivative. Appendix shows the expanded governing equation where the modified model tensor \(\varvec{{\tilde{\nu }}}\) can be deducted.

According to Fang and Wu (1996), it is necessary to define the best parameters \(a_0\), \(b_0\), and n that lead to a smooth increase of the stretching factor \(h_{x_m}(x_m)\) over space, for a frequency range \(f\in [f_{\text{min}},f_{\text{max}}]\). If \(b(x_m)\) and \(h_{x_0}(x_m)\) (Eq. 11) have large values, the attenuation will be faster. However, these parameters vary with space, bringing up numerical discretization errors that could cause reflections as the wave travels through the PML zone. Steeper variation of these parameters will bring larger numerical reflections (Fang and Wu 1996). For these reasons, the parameters \(b(x_m)\) and \(h_{x_0}(x_m)\) have to be increased gradually in space until the end of the PML zone. As stated by Fang and Wu (1996), \(a_0\) must be bounded by the condition that \(\lambda /(1+a_0)> 2 \, \mathrm {to} \, 3\text{d}x_m\) where \(\text{d}x_m\) is the spacing of the grid, and \(\lambda\) is the shortest wavelength. The parameter \(b_0\) could be determined from the theoretical reflection coefficient of the absorber (Fang and Wu 1996). Therefore, these parameters have to be numerically determined based on the given setup.


Zhou et al. (2012) modified the stretching factors to optimize the GPML method for an application to MT and CSEM forward modeling:

$$\begin{aligned} h_{x_m}(x_m)&=1\pm \text{i} b(x_m)/(a_0+\text{i}\omega ), \end{aligned}$$
$$\begin{aligned} b(x_m)&=b_0\left( \frac{|x_m-x_{am}|}{|x_{bm}-x_{am}|}\right) ^n, \end{aligned}$$
$$\begin{aligned} a_0&=(a_{\text{max}}-a_{\text{min}})\frac{(f-f_{\text{min}})}{(f_{\text{max}}-f_{\text{min}})}+a_{\text{min}}, \end{aligned}$$
$$\begin{aligned} b_0&=(b_{\text{min}}-b_{\text{max}})\frac{(f-f_{\text{min}})}{(f_{\text{max}}-f_{\text{min}})}+b_{\text{max}}. \end{aligned}$$

The smoothness of the stretching factors \(h_{x_m}(x_m)\) is modified by the parameter set \(\{a_{\text{min}}\), \(a_{\text{max}}\), \(b_{\text{min}}\), \(b_{\text{max}}\}\), which again has to be selected according to the range of signal frequencies, and based on the given setup. In both formulations, the exponent n is usually chosen from the interval [1,3] for evanescent waves.

All definitions of \(h_{x_m}(x_m)\) (Eqs. 11a and 14a) depend on the frequency applied. For higher frequencies, this stretching factor smoothness increases in space than for lower frequencies. The selection of the stretching factor parameters is important to achieve a sufficiently smooth increase for all frequencies. Figure 3 shows the increase of both definitions of the stretching factors for different frequencies, and fixed GPML parameters. However, a systematic analysis of these parameters has not been carried out up to this point.

Fig. 3

Top panel shows the magnitude of stretching factor from Fang and Wu (1996), for fixed parameters \(a_0=100\) and \(b_0=10^{-10}\). Bottom panel shows that from Zhou et al. (2012), with \(a_{\text{min}}=0\), \(a_{\text{max}}=100\), \(b_{\text{min}}=10^{-2}\), \(b_{\text{max}}=10^6\)

Domain discretization

The model domain consists of an input subsurface model including an air domain with height \(h_{\text{air}}\). It is extended to a distance \(\sim 3\delta _{\text{max}}\) in all directions, where \(\delta _{\text{max}}\) is the maximum skin depth, calculated from the minimum conductivity of the model and minimum frequency of the frequency range in use. The extension can be truncated to avoid numerical problems in cases of large computational grids. The conductivity values on the extension zones will be identical to the values on the respective boundaries of the input model.

The computational domain \(\varOmega\) is the model domain together with the extension zones. This domain is discretized into \({N_\text{e}=N_x\cdot \text {N}_y\cdot \text {N}_z}\) unstructured hexahedral elements \(\{\varOmega _i\}\), such that \(\varOmega =\bigcup ^{N_\text{e}}_{i=1}\varOmega _i.\) Let \(\varGamma _{ik}\) be the kth surface of \(\varOmega _i\) and \(\varGamma _{jl}\) the lth surface of \(\varOmega _j\), then \(\varGamma _{ik}=\varGamma _{jl}\) for adjacent \(\varOmega _{i}\) and \(\varOmega _{j}\).

Each hexahedral element is defined by the outer product of intervals in directions of the orthogonal basis \(({\hat{\mathbf {x}}},{\hat{\mathbf {y}}},{\hat{\mathbf {z}}})\):

$$\begin{aligned} \varOmega _i&=[x_j,x_{j+1}]\times [y_k,y_{k+1}]\times [z_l(x,y),z_{l+1}(x,y)]\nonumber \\&\forall i \in \{1,2,\ldots ,N_\text {e}\} \nonumber \\&\text{ with } 1\le j\le N_x,\, 1 \le k \le N_y,\, 1\le l \le N_z. \end{aligned}$$

The element size is subsequently increased throughout the extension zone with a geometric stretching factor of 1.3. These hexahedral elements will fit any topography and subsurface interfaces by defining \(z=z(x,y)\). The surface and interfaces interpolation is applied using a quadratic Shepard method that interpolates scattered data by weighted average of data point values (Algorithm 660: QSHEP2D of Renka 1988). Figure 2 shows this discretization approach with its extension zones.

The \(n_\text{n}\) element nodes are defined in isoparametric coordinates (\(\varvec{\xi }\)), and the representation in Cartesian coordinates (\({\mathbf {r}}\)) is

$$\begin{aligned} x&=\frac{1}{2}\left[ \left( x_{j+1}-x_j\right) \xi +\left( x_j+x_{j+1}\right) \right] \,, \end{aligned}$$
$$\begin{aligned} y&=\frac{1}{2}\left[ \left( y_{k+1}-y_k\right) \eta +\left( y_k+y_{k+1}\right) \right] \,, \end{aligned}$$
$$\begin{aligned} z&=\frac{1}{2}\left[ \left( z_{l+1}-z_l\right) \zeta +\left( z_l+z_{l+1}\right) \right] \,, \nonumber \\&\quad\text{ with } (\xi ,\eta ,\zeta ) \in [-1,1] \times [-1,1] \times [-1,1]\, ; \, z = z(x,y). \end{aligned}$$

Three types of numerical elements are defined according to the numbers of nodes used for each local calculation. These are the linear, the quadratic, and the Lagrangian element. Figure 1a–c shows the location of the respective nodes.

For the linear element, eight corner points of the hexahedral element are used (nodes 1–8 in Fig. 1e). The edge nodes are included for the quadratic element (nodes 1–20 in Fig. 1e), and in addition, the six face nodes and the center are included for the Lagrangian element (nodes 1–27 in Fig. 1e).

Vector basis functions

The vector basis function \({\mathbf {v}}\) is defined in the Sobolev space \({{\mathcal {H}}_0(\varOmega ,{\mathrm {curl}})}\) to satisfy the divergence-free condition and to have these basis functions defined on element edges. In addition, these vector functions are defined in a way that the basis function of edge \(\alpha\) will have a value of one on the node \(\beta\) of the edge, and zero on other nodes that do not belong to the edge \(\alpha\), such as \({\mathbf {v}}_{\alpha }(\varvec{\xi }_{\beta })=\delta _{\alpha \beta }\), where \(\delta _{\alpha \beta }\) is the Kronecker delta.

Crowley et al. (1988) described the field \({\mathbf {F}}\) components as \(F_{\varvec{\xi }_{\beta }}\) a projection onto the curvilinear basis vectors \({\hat{\varvec{\xi }}}_{\beta }=\partial {\mathbf {r}}/\partial \varvec{\xi }_{\beta }\):

$$\begin{aligned} F_{\varvec{\xi }_{\beta }} = \mathbf{F} \cdot {{\hat{\varvec{\xi }}}_{\beta }}. \end{aligned}$$

This field component is called the covariant component, and consequently, this definition is the so-called covariant projection. According to Crowley et al. (1988), the total field and the local gradient are then locally defined as

$$\begin{aligned} {\mathbf {F}}=\sum _{\beta =1}^{3}F_\mathbf {\xi _{\beta }}\nabla \varvec{\xi }_{\beta },\quad {\mathrm {and}} \quad \nabla \varvec{\xi }_{\tau }=\frac{\hat{\varvec{\xi }}_{\lambda } \times \hat{\varvec{\xi }}_{\kappa } }{|{\mathbf {J}}|}\cdot \varepsilon _{\tau ,\lambda ,\kappa }\,, \end{aligned}$$

where \(|{\mathbf {J}}|\) is the determinant of the Jacobian matrix of the respective coordinate transformation and \(\varepsilon\) the Levi-Civita symbol for permutations.

The resulting gradients \(\nabla \varvec{\xi }_{\beta }= (\nabla \xi ,\nabla \eta ,\nabla \zeta\)) are orthogonal to the surfaces spanned by pairs of basis vectors of the curvilinear elements \((\hat{\varvec{\eta }},\hat{\varvec{\zeta }})\), \((\hat{\varvec{\xi }},\hat{\varvec{\zeta }})\), \((\hat{\varvec{\xi }},\hat{\varvec{\eta }})\), and therefore, they define local basis vectors. Kameari (1990) used the same definition.

The vector basis functions are defined with mixed-order polynomials \(B^i_{\alpha } \, (\alpha \in \{1,2,3\}, i=1,\ldots, n_\text{e})\) (Crowley et al. 1988; Kameari 1990). The use of mixed-order polynomials results in a problem with \(m_\text{e}\) degrees of freedom. With a consecutive indexing of the edges within one isoparametric hexahedral cell, the field interpolation can be locally formulated as

$$\begin{aligned} {\mathbf {F}}=\sum _{i=1}^{n_e}{F^i{\mathbf {v}}^i(\varvec{\xi })}\,, \end{aligned}$$

with the respective vector basis functions (Kameari 1990):

$$\begin{aligned} {\mathbf {v}}^i= B_{\varvec{\xi }_\beta }^i \nabla \varvec{\xi }_\beta = \left\{ \begin{aligned}&B^i_{\xi }\nabla \xi&\quad&\text {for edges in } {\xi } \text { direction}\,,\\&B^i_{\eta }\nabla \eta&\quad&\text {for edges in } {\eta } \text { direction}\,,\\&B^i_{\zeta }\nabla \zeta&\quad&\text {for edges in } {\zeta } \text { direction}. \end{aligned} \right. \end{aligned}$$

These vector functions are continuous among shared edges, because they are constructed with the same nodes of the grid, thus the condition of continuity of tangential EM fields between interfaces is automatically satisfied (Jin 2002).

Mixed-order polynomials can be obtained from nodal basis polynomial functions by reducing the order in the direction of the edge, and normalizing it with the length of local edge. We will only define the respective polynomials in \({\hat{\xi }}\) direction here, the definitions for the other basis elements are equivalent.

Kameari (1990) presented basis functions for the linear (12 edges) and quadratic (36 edges) elements, and we use those definitions in MoVFEM. Webb and Miniowitz (1991) first presented the covariant projections for the implemented Lagrangian Element (54 edges), we modified those to obtain the formulation of Kameari (1990). The mixed-order polynomials are defined with nodes \({\varvec{\xi }^i_{j} = (\xi _{j},\eta _{j},\zeta _{j})}\), which are the end nodes of the respective edges (i), so the indexes for edges (i) and nodes (j) are bijectively connected for all element orders:

  1. 1.

    Linear order

    The mixed-order polynomial for the ith basis vector in \(\xi\) direction in the linear element is

    $$\begin{aligned} B^i_{\xi }=\frac{1}{4}(1+\eta _j\eta )(1+\zeta _j\zeta ). \end{aligned}$$
  2. 2.

    Quadratic order

    Two types of mixed-order polynomials are defined, one for basis vectors at the edges of the hexahedral element, and the second for basis vectors at the faces of the hexahedral element:

    $$B_{\xi }^{i} = \left\{ {\begin{array}{*{20}l} {\frac{1}{8}(1 + \eta _{j} \eta )(1 + \zeta _{j} \zeta )(\xi _{j} \xi + \eta _{j} \eta + \zeta _{j} \zeta - 1),} &\quad {\xi {\text{-edges}}} \\ {\frac{1}{2}(1 - \eta ^{2} )(1 + \zeta _{j} \zeta ),} &\quad {(\xi \times \eta ){\text{-faces}}} \\ \end{array} } \right.$$
  3. 3.

    Lagrangian order

    Three types of mixed-order polynomials are obtained, i.e. polynomials of order \(o_\text{p}{-}1\) on the direction of the edge element itself, and order \(o_\text{p}\) in other directions. The first type is defined for basis vectors over element edges, the second type is defined for basis vectors over element faces, and the last is defined for elements on the center of this element:

    $$B_{\xi }^{i} = \left\{ {\begin{array}{*{20}l} {\frac{1}{8}(1 + \xi _{j} \xi )(1 + \eta _{j} \eta )(1 + \zeta _{j} \zeta )\eta _{j} \eta \zeta _{j} \zeta } &\quad {\xi {\text{-edges}}} \\ {\frac{1}{4}(1 + \xi _{j} \xi )(1 - \eta ^{2} )(1 + \zeta _{j} \zeta )\zeta _{j} \zeta } &\quad {(\xi \times \eta ){\text{-faces}}} \\ {\frac{1}{2}(1 + \xi _{j} \xi )(1 - \eta ^{2} )(1 - \zeta ^{2} )} &\quad {{\text{central}}} \\ \end{array} } \right.$$

With field and vector basis functions as defined in Eqs. (19) and (20), the curl of a field is

$$\begin{aligned} \nabla \times {\mathbf {F}}&= \nabla \times \sum _{i=1}^{n_\text{e}} F^i \cdot {\mathbf {v}}^i = \sum _{i=1}^{n_e} F^i \cdot \left( \nabla \times {\mathbf {v}}^i \right) , \end{aligned}$$
$$\begin{aligned} \nabla \times {\mathbf {v}}^i&=\nabla B^i_{\varvec{\xi }_{\beta } }\times \nabla \varvec{\xi }_{\beta },\quad \beta \in \{1,2,3\}. \end{aligned}$$

A detailed proof for Eq. (24b) can be found in Rivera-Rios (2014).

Local numerical integration

When applying the basis functions in finite elements, the integration is first calculated on the local isoparametric hexahedral cell and is then transformed into global coordinates. Gauss quadrature is used in MoVFEM. The number of quadrature points \(n_g\) is selected according to the order of the respective polynomial, i.e., for linear order \(n_g=8\), and for quadratic order \(n_g=20\), and for Lagrangian elements \(n_g=27\) (Jin 2002).

From the Galerkin formulation (Eq. 8), three integrals are calculated within each hexahedral cell \(\varOmega _i\):

$$\begin{aligned} I^i_1&=\int _{\varOmega _i} {\left( \nabla \times {\mathbf {w}}_{i}\right) \cdot \varvec{\nu }^{-1}\cdot \left( \nabla \times {\mathbf {F}}_{\text{s}}^i\right) }\,\text{d}\varOmega \end{aligned}$$
$$\begin{aligned} I^i_2&=\int _{\varOmega _i} {\mathbf {w}}_{i} \cdot \varvec{\kappa } \cdot {\mathbf {F}}_{\text{s}}^i\,\text{d}\varOmega \end{aligned}$$
$$\begin{aligned} I^i_3&=\int _{\varOmega _i}{{\mathbf {w}}_{i} \cdot {\mathbf {s}}_F^i}\,\text{d}\varOmega \end{aligned}$$

where \({\mathbf {w}}_i\), \({\mathbf {F}}_\text{s}^i\), and \({\mathbf {s}}_F^i\) are the weighting function, the unknown field, and the source term of the hexahedral \(\varOmega _i\), respectively.

The basis vectors \({\mathbf {v}}^i\) (Eq.  20) are applied as the weighting function \({\mathbf {w}}_i\) in the Galerkin formulation (\({\mathbf {w}}_i={\mathbf {v}}^i\) in Eq. 25). The curl of a field (Eq. 24a) is applied into \(I^i_1\) in Eq. (25a), and the field interpolation (Eq. 19) is applied into \(I^i_2\) in Eq. (25b). Subsequently, three integrals are calculated on each hexahedral cell \(\varOmega _i\), for edges \(i_1\) and \(i_2\):

$$\begin{aligned} I^i_1&=\sum _{i_1,i_2=1}^{n_\text{e}}{{F_{i_2}\int _{\varOmega _i} {\left( \nabla \times {\mathbf {v}}_{i_1}\right) \cdot \varvec{\nu }^{-1} \cdot \left( \nabla \times {\mathbf {v}}_{i_2}\right) }\,\text{d}\varOmega }} \end{aligned}$$
$$\begin{aligned} I^i_2&=\sum _{i_1,i_2=1}^{n_\text{e}} F_{i _2} \int _{\varOmega _i} {\mathbf {v}}_{i_1} \cdot \varvec{\kappa } \cdot {\mathbf {v}}_{i_2}\,\text{d}\varOmega \end{aligned}$$
$$\begin{aligned} I^i_3&=\sum _{i_1=1}^{n_\text{e}}{\int _{\varOmega _i}{{\mathbf {v}}_{i_1} \cdot {\mathbf {s}}_F}\,\text{d}\varOmega } -\bigg [\sum _{i_1,i_2=1}^{n_\text{e}}F_{i_2}\cdot \int _{\varOmega _i}\bigg \{ {\left( \nabla \times {\mathbf {v}}_{i_1}\right) \cdot \varvec{\nu }^{-1}\cdot \left( \nabla \times {\mathbf {v}}_{i_2}\right) } \nonumber \\&\quad +\text{i}\omega \, {{\mathbf {v}}_{i_1}\cdot \varvec{\kappa }\cdot {\mathbf {v}}_{i_2}}\bigg \}\,\text{d}\varOmega,\text{ for } \, {\mathbf {v}}_{i_1},{\mathbf {v}}_{i_2}\in \varOmega \, \wedge \, {\mathbf {v}}_{i_1}\notin \varGamma \wedge {\mathbf {v}}_{i_2}\in \varGamma \bigg ]. \end{aligned}$$

The second integration in Eq. (26c) represent Dirichlet boundary conditions, in which \(F_{i_2}\) is a value assigned for the boundary edge element \(i_2\). Field values \(F_{i_2}\) at edge elements from the boundaries of the domain are usually the analytical or numerical solution of a 1D model or numerical solution of a 2D model that best represent the EM boundary parameters. In the GPML formulation, the second integration in Eq. (26c) disappears because \(F_{i_2}\) is also unknown at the boundaries.

These integrals can be re-written in matrix form for the finite number of elements:

$$\begin{aligned}&I^i_1=\bar{{\mathbf {M}}}^i_1\cdot \bar{{\mathbf {F}}};\quad I^i_2=\bar{{\mathbf {M}}}^i_2\cdot \bar{{\mathbf {F}}}; \\&I^i_3=(\bar{{\mathbf {b}}}_F^{i})^T; \quad {{\mathbf {F}}}=\left( {\mathbf {F}}^1,\ldots ,{\mathbf {F}}^{n_\text{e}}\right) ^T. \end{aligned}$$

In the matrix formulation, \(\bar{{\mathbf {M}}}^i_1 \in {\mathbb {R}}^{n_\text{e}\times n_\text{e}}\) is commonly called stiffness matrix whose component \(M_{i_1i_2}\) is the solution of the integral in Eq. (26a) for edges \(i_1\) and \(i_2\). \(\bar{{\mathbf {M}}}^i_2 \in {\mathbb {R}}^{n_\text{e}\times n_\text{e}}\) is commonly called mass matrix and comprises the integral over the \(\varOmega _i\) element in Eq. (26b). The local source vector is \(\bar{{\mathbf {b}}}^i_F\), comprised of the edge-wise integrations \(I^i_3\) in Eq. (26c).

The global matrices are assembled by summing the respective matrices from all \(N_\text{e}\) hexahedral cells: the stiffness matrix \(\bar{\bar{{\mathbf {M}}}}_1=\sum _{i=1}^{N_\text{e}}{\bar{{\mathbf {M}}}_1^{i}}\); the mass matrix \(\bar{\bar{{\mathbf {M}}}}_2=\sum _{i=1}^{N_\text{e}}{\bar{{\mathbf {M}}}_2^{i}}\); the source vector \(\bar{\bar{{\mathbf {b}}}}_F=\sum _{i=1}^{N_\text{e}}{\bar{{\mathbf {b}}}_F^{i}}\); and vector of total unknowns \(\bar{\bar{{\mathbf {F}}}}_\text{s}=\sum _{i=1}^{N_\text{e}}{\bar{{\mathbf {F}}}_\text{s}^{i}}\). The global system of equations to be solved for the MT forward modeling at this point is given by

$$\begin{aligned} \left[ \bar{\bar{{\mathbf {M}}}}_1+\text{i}\omega \bar{\bar{{\mathbf {M}}}}_2\right] \cdot \bar{\bar{{\mathbf {F}}}}_\text{s}=\bar{\bar{{\mathbf {b}}}}_F. \end{aligned}$$

This formulation results in a sparse and symmetric complex valued matrix, because the integration is calculated locally, and elements that are wide apart will not share any edges on the global matrix. Therefore, the matrix storage can be reduced by defining an array of the non-zero entries of global matrix. That global matrix is then inverted using MUMPS (Amestoy et al. 2006), which is a parallel direct solver optimized for sparse matrices. Direct solvers do not use preconditioner, that is why it is not shown in Eq. (28). According to the authors, this direct solver takes advantage of parallelism of sparsity and dense factorization kernels. This package factorizes the symmetric matrix into a matrix of the form \({\mathbf {L}}{\mathbf {D}}{\mathbf {L}}^T\), where \({\mathbf {L}}\) is the lower triangular matrix, and \({\mathbf {D}}\) is the diagonal matrix.

From the matrix inversion we obtain the unknown secondary field components by \(\bar{\bar{{\mathbf {F}}}}_\text{s}=\left[ \bar{\bar{{\mathbf {M}}}}_1+\text{i}\omega \bar{\bar{{\mathbf {M}}}}_2\right] ^{-1}\cdot \bar{\bar{{\mathbf {b}}}}_F.\) After obtaining the total field (e.g. \({\mathbf {E}}_\text{s}+{\mathbf {E}}_\text{p}\)), the other EM field (e.g. \({\mathbf {H}}\)) can be calculated directly using Maxwell’s equations. The modeled fields are finally stored as MT response functions (i.e. impedance tensor and tipper). To obtain these responses from the field values, the equations must be solved for the xy- and yx-polarization independently in the formulation of the EM source fields (Eqs. 46) as well as in the complex source of GPML if used (Eq. 9). The xy-polarization denotes the EM field with an non-zero amplitude of the electric component in x-direction (and a magnetic field component in y-direction, and the yx-polarization denotes the case of a non-zero electric component amplitude in y-direction (and a magnetic component in x-direction).

The impedance \(\mathbf{Z }\) is obtained by a combination of EM field components \((F_{x'}, F_{y'})\) for both polarizations (xy and yx):

$$\begin{aligned} \begin{pmatrix} E_{x'}^{xy} \\ E_{y'}^{xy} \end{pmatrix}= \begin{pmatrix} Z_{x'x'} \quad Z_{x'y'}\\ Z_{y'x'} \quad Z_{y'y'} \end{pmatrix}\cdot \begin{pmatrix} H_{x'}^{xy} \\ H_{y'}^{xy} \end{pmatrix} ,\quad \text{ for } xy\text{-polarization },\end{aligned}$$
$$\begin{aligned} \begin{pmatrix} E_{x'}^{yx} \\ E_{y'}^{yx} \end{pmatrix}= \begin{pmatrix} Z_{x'x'} \quad Z_{x'y'}\\ Z_{y'x'} \quad Z_{y'y'} \end{pmatrix}\cdot \begin{pmatrix} H_{x'}^{yx} \\ H_{y'}^{yx} \end{pmatrix},\quad \text{ for } yx\text{-polarization }. \end{aligned}$$

The basis for the representation of the resulting matrix \(\mathbf{Z }\) can be transformed into the \((\mathbf{x },\mathbf{y })\) system, and the impedance components can be expressed as a combination of apparent resistivity \(\rho ^a\) and phase angle \(\phi\):

$$\begin{aligned} \rho _{ij}^a=\frac{1}{\mu _0\omega }\left| Z_{ij}\right| ^2; \quad \phi _{ij}=\tan ^{-1}\left( \frac{\mathfrak {I}{\{Z_{ij}}\}}{\mathfrak {R}{\{Z_{ij}}\}}\right); \quad i,j \in \{x',y'\}. \end{aligned}$$

The tipper \((T_{x'z'}, T_{y'z'})\), i.e. the transfer function of magnetic field components, is defined by the following equation

$$\begin{aligned} \left(H_{z'}^{xy}, H_{z'}^{yx}\right) =(T_{x'z'}, T_{y'z'}) \begin{pmatrix} H_{x'}^{xy} \quad H_{x'}^{yx}\\ H_{y'}^{xy} \quad H_{y'}^{yx} \end{pmatrix}. \end{aligned}$$

These transfer functions are obtained for either the whole domain \(\varOmega\) or just for receivers at the surface of the model. This section has shown that MoVFEM is expected to produce results with great accuracy when the correct choice of boundary conditions is made along with the most efficient element order (in accuracy and computational time).

General validation of the MoVFEM algorithm

We validate the MoVFEM algorithm by testing it against a model with known MT responses. We start with the numerical analysis of synthetic data from a homogeneous Earth model, for which the resulting field values can be calculated analytically. The apparent resistivity is equal to the inverse of the pre-set conductivity \(\rho _a=1/\sigma\), and the MT signal phase is \(\phi =45^\circ\). The test input model is 100 km in each x- and y-direction, and it extends down to a depth of 50 km. The resistive half-space has a conductivity of 0.01 S/m. We analyze the MT responses obtained from MoVFEM for a frequency of 0.1 Hz. For the primary fields the domain is considered as air, where \(\varvec{\sigma }_{\text {real}}\equiv {\mathbf {0}}\text { S/m}\).

The grid spacing is chosen according to the element order, and to the skin depth \(\delta\). For linear elements, the spacing in all directions is \(\text{d}x=\text{d}y=\text{d}z=\frac{1}{8}\delta =1.99\) km, the air height is 20 km, and the model is extended to the sides in all directions by \(\sim 55\) km. The computational domain is \(\varOmega =[-104.33,103.83]\times [-104.33,103.83]\times [0,178.65] \text { km}^3\), and the number of cells is \(N_\text{e}=62\times 62\times 47\).

For quadratic and Lagrangian elements, \(\text{d}x=\text{d}y=\text{d}z=\frac{1}{3}\delta =5.3\) km, the air height is also 20 km, and the extension zone in all directions is \(\sim 69\) km. The computational domain is \(\varOmega =[-118.9,114.3]\times [-118.9,114.3]\times [0,207.8] \text { km}^3\), and the number of cells is \(N_\text{e}=26\times 26\times 20\).

GPML boundary conditions I

We have implemented GPML boundary conditions in the formulation of Fang and Wu (1996). The stretching factor parameters (c.f. Eq. 11) have been set to \(a_0=1\), \(b_0=1\), \(n=2\), selected after testing some combinations of parameters’ values. The MT responses are presented in Fig. 4.

Fig. 4

MT responses obtained from applying GPML-I boundary conditions (Fang and Wu 1996). a Apparent resistivity at the model surface for xy-(left panel) and yx-(right panel) polarizations using Lagrangian elements. b Numerical values for apparent resistivity (left panel) and phase angle (right panel) along the profile \(y\equiv 0\) for the xy-polarization, shown for all implemented numerical elements

Table 1 displays the computational time and memory consumption for solving the model with the given parameters.

Table 1 Time and memory used in MoVFEM with GPML-I boundary conditions (Fang and Wu 1996)

Using linear elements, the resulting values for the apparent resistivity are at \(\sim 115\, \Omega \, \text {m}\) over the whole computational domain, and the profile shows less deviation toward the edges. Therefore, the effect of errors propagating from the boundaries of the computational domain is present increasing the resistivity by \(\sim 10\, \Omega \, \text {m}\).

The MT responses with quadratic elements are more accurate than before over the whole model domain. The apparent resistivity converges to 100 \(\Omega \, \text {m}\), and the phase converges to \(\sim 46^\circ\). Also, very small effects of field reflections at boundaries can be observed. The average resistivity error is small with \(0.20\%\), and the error of the phase is \(2.20\%\).

The solution based on Lagrangian elements displays almost the same accuracy as the solution for quadratic elements. The average resistivity error is \(0.17\%\), which is again slightly smaller than before. The error of the phase has not been changed compared to the results for quadratic elements. Compared to the aforementioned cases, the current numerical solutions show a subtle but systematically observable oscillatory behavior over the range of the model domains. This implies that there are still errors propagating from the boundaries of the domain, but these errors are smaller than previous cases.

The application of GPML-I boundary conditions results in a significant decrease of boundary errors, especially the small amplitude oscillations over the domain when increasing the element order. The errors are randomly distributed over the surface area of the modeling domain, and the absolute deviation is significantly small for quadratic and Lagrangian elements. This holds for both signal polarizations xy and yx. The values for the apparent resistivity are well recovered, and the values for the phase angle show a small but systematic deviation from the correct values. An increasingly oscillatory behavior of the spatial profiles of values can be observed with increasing element order, but with amplitudes closer to the real solution. These effects suggest that the selection of stretching factor parameters could also be a function of the element order. However, a systematic study of these parameters was not performed.

GPML boundary conditions II

To optimize the numerical results obtained using the GPML-I boundary conditions, we implemented the alternative formulation (GPML-II) for the parameters as proposed in Zhou et al. (2012). We present results for the parameter values \(a_{\text{min}}=0\), \(a_{\text{max}}=100\), \(b_{\text{min}}=10^{-2}\), \(b_{\text{max}}=10^6\), and \(n=2\), which were the best results after tweaking with some combination of stretching factor parameters. The MT responses are shown in Fig. 5, and the computational parameters are presented in Table 2.

Fig. 5

MT responses obtained from applying GPML-II boundary conditions (Zhou et al. 2012). a Apparent resistivity at the model surface for xy-(left panel) and yx-(right panel) polarizations using Lagrangian elements. b Numerical values for apparent resistivity (left panel) and phase angle (right panel) along the profile \(y\equiv 0\) for the xy-polarization, shown for all implemented numerical elements

Table 2 Time and memory used in multi-order VFEM with GPML-II boundary conditions (Zhou et al. 2012)

The grid parameters and number of degrees of freedoms in this setup are the same as the setup for GPML-I, the effective differences in computation time are therefore small.

In the linear elements, the apparent resistivity converges to \(\sim 112\,\Omega \, \text {m}\), which is slightly better than using the Fang and Wu (1996) formulation; the average surface error is \(12.77 \%\). There still the presence of errors propagating from the boundary of the domain that increases the resistivity values to \(\sim 10 \,\Omega \, \text {m}\). The phase converges to 48.5° with this GPML formulation, and the average phase error is \(3.29 \%\).

Using quadratic elements, the obtained apparent resistivity is approximately \(\sim 100 \,\Omega \, \text {m}\), the correct value, and the average resistivity error is \(0.26\%\). The phase fluctuates around 46°, and the error is similar to that from the original (Fang and Wu 1996) GPML-I formulation.

The solution for Lagrangian elements is similar to the one obtained for GPML-I. However, this solution appears more stable than the previous one. The surface resistivity values range here from 99.9 to \(101\,\Omega \, \text {m}\), while they vary from 98.9 to \(101\,\Omega \, \text {m},\) when using the formulation of Fang and Wu (1996). The average resistivity and phase errors are the same as before.

Frequency range

To demonstrate the behavior of the solutions over a range of frequencies, we model the resistivity structure for five frequencies in the range from \(10^{-2}\) to \(10^{-1}\) Hz. One decade was selected because of computational and time resources. The MT responses are shown to compare the boundary conditions for each element order. All displayed responses are taken from the center of the model surface \((x,y)=(0,0)\).

For higher frequencies, the results from all boundary conditions converge to the same resistivity value of \(\sim 101\,\Omega \, \text {m}\). The phase ranges from \(\sim 45^\circ\) for \(10^{-2}\) Hz to \(\sim 48^\circ\) for \(10^{-1}\) Hz. The results for the various setups are displayed in Fig. 6.

Fig. 6

MT responses over frequency range. Apparent resistivity (left) and phase angles (right) at the center point of the model surface, dependent on the signal frequency. Results are shown for all implemented boundary conditions, and for the following element orders: a linear elements, b quadratic elements, and c Lagrangian elements

The skin depth ranges from 16 to 50 km for the frequency range used. The air height is set to 10 km. For linear elements, a grid spacing of 2.3 km is used for all frequencies, which we expect will yield a solution adequate for the whole frequency range. The apparent resistivity obtained with Dirichlet boundary conditions ranges from \(\sim 99\,\Omega \, \text {m}\) for the lowest frequency to \(\sim 120\,\Omega \, \text {m}\) for the highest frequency. For both GPML formulations, the apparent resistivities range from \(\sim 105\,\Omega \, \text {m}\) for \(10^{-2}\) Hz to \(\sim 117\,\Omega \, \text {m}\) for \(10^{-1}\) Hz, and the phase from around \(45^\circ\) for \(10^{-2}\) Hz, up to \(50^\circ\) for \(10^{-1}\) Hz.

For quadratic elements, the grid spacing is 10 km, and the other parameters are kept the same as before. The resulting apparent resistivity values obtained from solving the problem with Dirichlet boundary conditions range from \(\sim 98\,\Omega \, \text {m}\) for \(10^{-2}\) Hz to around \(101\,\Omega \, \text {m}\) for the highest frequency. The resistivity values obtained with GPML are more accurate and range from 100 to \(101\,\Omega \, \text {m}\) for the frequency range of \([10^{-2},\,10^{-1}]\) Hz. The three boundary conditions produce results that converge to the same resistivity values for the higher frequencies. The phase values are similar to the behavior obtained with linear elements for all the boundary conditions, and they vary from \(\sim 45^\circ\) to \(\sim 48^\circ\) over the frequency range.

In the case of Lagrangian elements, all parameters are the same as before for quadratic elements. The behavior and accuracy of the MT responses using Lagrangian elements are therefore very similar to the results obtained before, improving only with minor differences.

In all cases, a systematic increase of error with frequency is observed. These large errors are due to not having the optimal grid setting for each frequency. As the skin depth is a function of frequency, so are the grid spacing and boundaries’ position. However, these parameters were kept the same for all frequencies used. The higher the frequency, the smaller the skin depth is. Therefore, a finer grid is required for higher frequencies to achieve better results. Results with Dirichlet boundary conditions suggest an error in the implementation of the boundary elements.

Boundary errors

During the validation of MoVFEM, large errors have been noticed for a half-space model. For linear elements the errors are specially high, and for high-order elements, the errors oscillate closer to the solution, but are scattered across the surface. Figure 7 shows a comparison of the solution at the surface for (a) linear, (b) quadratic, and (c) Lagrangian elements. We compare the apparent resistivity, real electric field, and imaginary electric field for the xy-polarization only.

Fig. 7

Electric field solution for all elements. Surface view of resistivity (left panel), real electric field (central panel), and imaginary electric field (right panel). a Linear elements, b quadratic elements, and c Lagrangian elements

In the case of linear elements, large oscillations are seen over \({\hat{y}}\) axis, suggesting large errors propagating from the boundaries of the domain. In quadratic elements, the oscillations are smoother for the real field and larger oscillations are seen in the imaginary field.

Going to Lagrangian elements, the oscillations become even smoother for both the real and imaginary fields. These errors, although closer to the solution, scatter across the surface, suggesting that the GPML parameters may depend on the element order. However, the large oscillations on linear elements suggest an error in the implementation of the boundary conditions.

Figure 8 shows the convergence of the implementation using Dirichlet boundary conditions. For linear elements to reach a similar accuracy as the high-order elements, it needs a finer grid with more unknowns. However, even with Dirichlet boundary conditions, the model converges to a large error in relation to half-space model. This result suggests a bug in the implementation of boundary conditions or in the implementation of boundary elements. Unfortunately, this error has not been found in the code up to this point.

Fig. 8

Convergence with Dirichlet BC. The average surface error is shown for \(\rho _{xy}\) as a function of the number of unknowns (DoF), which relates to the size of the grid

Modeling of complex resistivity structures

Despite of the error mentioned above, we continued to validate MoVFEM with complex resistivity structures. We analyze the model 3D-2, that is a part of the COMMEMI project (Zhdanov et al. 1997), for comparing EM forward modeling responses between international researchers. We use this model to compare the outputs of our algorithm with the respective reference values. Unfortunately, the COMMEMI report does not provide information about the phase angle data, and therefore, we additionally compare the MT responses from MoVFEM with the results obtained by Mackie et al. (1993).

Effects of a non-flat topography in the model are investigated using a homogeneous Earth model including a 2D surface hill, as modeled by Wannamaker et al. (1986) and Nam et al. (2007). Results of MoVFEM are compared with that of linear VFEM modeling presented by Nam et al. (2007).

Finally, effects of an anisotropic resistivity structure are analyzed. In that case, the conductivity tensor has only diagonal components to understand the MT responses for a transverse anisotropic model.

The results for the modeling with MoVFEM are chosen from the tests executed for each synthetic example with different frequencies. Different edge elements′ orders and boundary conditions are applied to each synthetic test model. The results of MoVFEM are shown for the frequency used in previous publications. For models that have not been published, the results of MoVFEM are shown for the frequency related to the skin depth and dimensions of the input model structures.


Figure 9 shows the synthetic test model COMMEMI 3D-2 from Zhdanov et al. (1997), and also describes the geometry and structure of the computational grid used in MoVFEM. We compute the MT response for a signal frequency of 0.01 Hz. Dirichlet boundary conditions are applied, in which the boundaries are layered with the same thickness and resistivity as the background of the input model. Additional tests were run with GPML, changing the spacing and extensions of the model; the results showed MT responses that fluctuate around the values of each resistivity structure. Meaning that small amplitude errors propagate from the boundaries of the domain. Table 3 shows the time and memory used in this application of MoVFEM.

Fig. 9

Input model of COMMEMI 3D-2. a Two adjacent rectangular blocks (A, B) with dimensions of \(20 \times 40 \times 10\) \(\text {km}^3\) are embedded in a horizontally layered background and located at the center of the top layer. Resistivities are \(A=1\,\Omega \, \text {m}\), \(B=100\,\Omega \, \text {m}\), \(C=10\,\Omega \, \text {m}\), and \(D=0.1\,\Omega \, \text {m}\). Thickness of the first two layers is 10 km and 20 km from top to bottom. This model has overall dimensions of \(x,y\in [-40,40]\) km, and \(z\in [0,-50]\) km. Horizontal (left) and vertical (right) cross-sections. b Computational domain, including grid structure, air layer, and boundary extension zones. Horizontal (left) and vertical (right) cross-sections. Air height is set to 10 km, the spacing is \(\text{d}x=\text{d}y=\text{d}z=3\) km. The inner domain was extended 175.5 km in all directions, and the computational grid dimensions are \(x,y\in [-215.5, 213.5]\) km and \(z\in [-205.5,205.5]\) km

Table 3 Time and memory used in MoVFEM with COMMEMI 3D-2 model

The matrix inversion and solution finished in \(\approx 197\) min for both xy- and yx-polarizations. Zyserman and Santos (2000) applied an FEM algorithm with non-conforming vectors (12 edge elements for the electric field, plus 9 face-vectors for the magnetic field); their algorithm required a model of \(54\times 54\times 32\) cells, for a total CPU time for one mode (xy-polarization) of \(\sim 115\) min in sequential mode.

Figure 10 displays the apparent resistivities and phase angles, taken at the model surface. The results from the COMMEMI report (Zhdanov et al. 1997) and from the FD modeling algorithm of Mackie et al. (1994) are shown for comparison. The phase angles obtained from MoVFEM are similar to the ones published in Mackie et al. (1994).

Fig. 10

Modeled MT responses of COMMEMI 3D-2. Apparent resistivity and phase angles for a signal of 0.01 Hz. a Response curves of xy-(left) and yx-(right) polarizations. Values are taken at the model surface along the profile \(y\equiv 0, x\in [0,2]\) km. Bottom plots show phase angle results. Results for MoVFEM and two references models are displayed. b Map view of apparent resistivities at the model surface for xy-(left) and yx-(right) polarizations

The xy-polarization plots show how the apparent resistivity changes abruptly from one body to the next in the x direction. This model shows more clearly the effect of an electric field propagating orthogonal to the contact of resistivity structures, similar to the Transverse-Magnetic (TM) mode in 2D structures. Outputs of MoVFEM compare well with the results from Zhdanov et al. (1997) and Mackie et al. (1994), differences are of about \(2\,\Omega\) m and \(4^\circ\). The largest discrepancies are at the contacts of resistivity structures, due to the discretization scheme used in MoVFEM, where no grid refinement takes place.

For the yx-polarization, variations across the blocks are smoother than in the xy-polarization. The obtained results fit the available reference values, although the apparent resistivities are slightly lower than those of Zhdanov et al. (1997) by \(\sim 2\,\Omega \, \text {m}\), and Mackie et al. (1994) by \(\sim 3\,\Omega \, \text {m}\) at the location of the blocks. Phase values obtained with MoVFEM are slightly higher than those of Mackie et al. (1994) (\(\sim 3^\circ\)). Some of the discrepancies between the results occur at the contacts of different structures, again most likely caused by the discretization scheme applied in MoVFEM.

The apparent resistivity surface maps indicate no significant error propagating from the side boundaries of the computational domain (Fig. 10). In addition, the xy-polarization shows sharp contacts in the x direction, and the yx-polarization shows sharp contacts in the y direction. A slight asymmetry can be observed in the yx-polarization responses, probably due to a numerical round off that propagates through the matrix LU decomposition. The overall error is also influenced by the boundary errors mentioned before; however, the cause of this error has not been found in the code yet.

Topography effect for homogeneous earth

The effect of non-flat topography on the resistivity structure of MT responses is investigated using the 2D surface hill model by Wannamaker et al. (1986) and Nam et al. (2007) (Fig. 11). To compare our results with the values published by Nam et al. (2007), a signal frequency of 10 Hz is used in this test, see Fig. 11 for the geometry and structure of the computational grid. GPML boundary conditions are applied, using the scheme of Zhou et al. (2012). The stretching factor parameters are the same as in the homogeneous model shown previously in "GPML boundary conditions II" section (\(a_{\text{min}}=0\), \(a_{\text{max}}=100\), \(b_{\text{min}}=10^{-2}\), \(b_{\text{max}}=10^6\), \(n=2\)).

Fig. 11

2D topography input model. a Geometry of the setup from a vertical cross-section, showing the topography of the model. The hill is a smooth vertical extension to a homogeneous background with \(\rho =100\,\Omega \, \text {m}\), with a variable symmetric height profile reaching up to 100 m, and a lateral extent in x direction of 2.4 km. Input model dimensions are \(4 \times 10 \times 5\) km. b The model domain is indicated by a yellow rectangle. Air height is 2.5 km, and the depth of the input model is increased by 5 km. The spacing for the inner grid is of \(\text{d}x=250\) m, \(\text{d}y=500\) m, and \(\text{d}z=250\) m. The width of the boundary regions surrounding the inner model are 4.9 km in the x and z directions, and 9.75 km in the y direction. This computational grid has dimensions of \(x\in [-6.9,6.9]\) km, \(y\in [-14.75,14.75]\) km, and \(z\in [0,17.35]\) km

Table 4 shows the time and memory used in this application of MoVFEM.

Table 4 Time and memory used in MoVFEM with the non-flat topography model

The time spent for the matrix inversion and to calculate the solution was \(\approx 28\) min. Nam et al. (2007) applied linear VFEM to the problem, using \(48\times 48\times 31\) cells. The total time to obtain a convergence of bi-conjugate gradient was about 5 min in xy-polarization and 4 min in the yx-polarization. MoVFEM required more time because of the use of Lagrangian elements and anisotropy, where the isotropic model is stored as the symmetric part of \(\sigma {\mathbf {I}}\) which has six components. Consequently,  252 more local integrations are made within each element compared with the linear and isotropic case in Nam et al. (2007).

Apparent resistivity and phase angle values plots are presented (Fig. 12). Comparing the results obtained from MoVFEM to those of Nam et al. (2007), it can be seen that the yx-polarization exhibits a better agreement between the results than the xy-polarization, with an average \(\rho _{yx}\) difference of \(\sim 3\,\Omega\) m and phase angle difference of \(\sim 1^\circ\). However, the results from both polarizations show a similar pattern.

Fig. 12

Modeled MT responses from the homogeneous model with 2D topography apparent resistivity and phase angles for a signal of 10 Hz. a Response curves of xy-(left) and yx-(right) polarizations. Values are taken at the model surface along the profile \(y\equiv 0\). Values for MoVFEM and a reference models are displayed. b Map view of apparent resistivities at the model surface for xy-(left) and yx-polarization (right)

Values of \(\rho _{xy}\) calculated with MoVFEM are higher than the reference values from Nam et al. (2007). They vary by around \(5\,\Omega \, \text {m}\) in the center of the 2D hill, and by \(\sim 2\,\Omega \, \text {m}\) toward the model boundaries. Phase angle values in the center of the hill are lower by around \(1^\circ\). The authors discretized the domain with a finer grid at the air/subsurface contact. Meanwhile, MoVFEM applies the same spacing over depth, but taking into consideration the topography of the model or any other subsurface interface defined, such that Eq. (15) is satisfied. In addition, the surface interpolation method used in MoVFEM obtains a smoother hill than the input model, where the break of slope is slightly different than the input surface.

For the xy-polarization, the apparent resistivity starts with a value of around 100 \(\Omega \, \text {m}\) at the boundary where the topography is flat. When the topography starts to change \(\rho _{xy}\) takes its higher values and at the center of the hill, it decreases to its minimum value. The yx-polarization changes gradually from 97 \(\Omega \, \text {m}\) across the boundaries to 104 \(\Omega \, \text {m}\) on top of the center of the hill. From the apparent resistivity model surface plots, it can be inferred that errors from the boundaries of the computational domain are not significantly scattered across the inner model. Therefore, we conclude that the implemented GPML boundary conditions work appropriately, despite the mentioned bug in the implementation of boundary conditions.

Anisotropic homogeneous earth

We consider an anisotropic homogeneous model with spatial dimensions of \(100 \times 100 \times 50\) \(\text {km}^3\) and a transverse resistivity tensor in (xyz) (Fig. 13)

$$\begin{aligned} \varvec{\rho }=\begin{pmatrix} 100 &\quad 0 &\quad 0 \\ 0 &\quad 50 &\quad 0 \\ 0 &\quad 0 &\quad 1 \end{pmatrix} \,\Omega \, \text {m}. \end{aligned}$$

The signal frequency for the example presented here is 0.01 Hz, and Fig. 13 describes the geometry and structure of the computational grid. GPML boundary conditions following the scheme of Zhou et al. (2012) is applied, the stretching factor parameters are \({a_{\text{min}}=0}\), \({a_{\text{max}}=100}\), \({b_{\text{min}}=10^{-2}}\), \({b_{\text{max}}=10^6}\), and \(n=2\). Table 5 present the time and memory used for the anisotropic model.

Fig. 13

Anisotropic homogeneous model. Computational grid, showing the discretization of the homogeneous anisotropic Earth model. Blue color corresponds to the air domain, and the red color corresponds to the anisotropic subsurface with the diagonal conductivity tensor defined in Eq. (32).The input model was extended 50 km downwards in \({\mathbf {z}}\)-direction, increasing the depth to 100 km before the extension zone. The air height is 10 km. A spacing of \(\text{d}x=\text{d}y=\text{d}z=7\) km has been chosen. The extension zone has a width of 191 km for all directions. The computational grid has dimensions of \(x,y\in [-241.1,239.1]\) km, and \(z\in [0,442.2]\) km

Table 5 Time and memory used in MoVFEM with the anisotropic model

Figure 14 shows the resulting apparent resistivity and phase angles for both polarization modes. For the xy-polarization, the apparent resistivity has a constant value of 99.8 \(\Omega \, \text {m}\) with an error of \(\sim 0.2\%\), and the phase angle has a constant value of \(44.2^\circ\), as opposed to the expected \(45^\circ\) (error of \(\sim 1.7\%\)). For the yx-polarization, the apparent resistivity has a constant value of 49.8 \(\Omega \, \text {m}\) with an error of \(\sim 0.4\%\), and the phase angle has a constant value of \(45.4^\circ\) with an error of \(\sim 0.88\%\). Consequently, the apparent resistivity in xy-polarization yields the \(\rho _{xx}\) component of the input resistivity tensor, and the apparent resistivity in yx-polarization yields the \(\rho _{yy}\) component of the input resistivity tensor.

Fig. 14

Modeled MT responses for the anisotropic homogeneous model. Apparent resistivities and phase angles for a signal frequency of 0.01 Hz. a Apparent resistivity (left) and phase angles (right) for the xy- and yx-polarization. Values are taken at the model surface along the profile \(y\equiv 0\). b Map view of apparent resistivities at the model surface for xy-(left) and yx-polarization (right)

The modeled apparent resistivities are constant over the total model surface, but high errors are associated with wrongly implemented boundary conditions in the code itself.

Discussion and conclusions

We have presented the multi-order vector finite element algorithm MoVFEM, which has been implemented in Fortran to model 3D MT data for arbitrary resistivity structures, including anisotropy and complex geometry. Linear, quadratic, and Lagrangian elements have been included, with Generalized Perfect Matched Layers boundary conditions. The software enables the handling and solving of electric and magnetic field decoupled governing equations. The resulting values are returned in the form of standard MT response estimates. All calculations have been implemented directly, with the exceptions of MUMPS (Amestoy et al. 2006) and the Shepard Algorithm 660 for surface interpolation (Renka 1988).

The general functionality of MoVFEM has been demonstrated by modeling a homogeneous resistivity structure. This allowed not only the comparison of resulting values with known correct solutions, but also a detailed study of parameter dependencies. We see from the analysis that high-order elements obtain a better solution with a coarse grid; linear-order elements require a finer spacing to obtain the same accuracy. We obtained solutions with a minimum average resistivity error ranging from \(3\%\) for linear order to \(0.2\%\) for high-order elements.

GPML boundary conditions stabilize the solution as the element order increases. However, the use of GPML-I boundary conditions can cause oscillatory solutions that vary spatially on a small scale around the true value, especially for high-order numerical elements, which again return the lowest errors. These oscillations are considered to be small amplitude errors from the boundaries of the computational domain. The application of GPML-II reduces these oscillations even more and produces stabler results. In linear-order elements, the application of GPML (I and II) tends to stabilize the solution to numerical values that are systematically higher than the correct value for a homogeneous Earth. This suggests that high-amplitude errors from the boundaries are encountered using linear elements, meaning that the code has a bug in the implementation of boundary conditions.

The selection of stretching factor parameters within the setup of GPML depends on the signal frequency and on the absolute value of the major conductivity structures. In addition, both GPML stretching factors seem to depend on the order of the element used. Consequently, it is difficult to implement robust values for a wide variation of Earth resistivities; a systematic study of stretching factor parameters is necessary to find the best values.

For the application of MoVFEM to complex resistivity structures, we obtained MT responses that agree with the average solutions presented in the COMMEMI project (Zhdanov et al. 1997). The main discrepancy occurred at the boundaries between resistivity structures. Most likely they stem from the applied grid spacing; in MoVFEM, a regular spacing is applied to the whole model domain, and it only increases gradually toward the boundary of the computational domain. Other authors implement a refined grid in areas of high conductivity gradients or in the location of receivers (Mackie et al. 1994; Mitsuhata and Uchida 2004; Zhdanov et al. 1997). A variable grid spacing can be implemented at a later stage in MoVFEM, but such a step requires more careful studies on the various parameter options. At the current state, we primarily focused on the correct numerical behavior for the existing setup. Furthermore, high errors are mostly related to the bug in the code.

In the case of a non-flat surface topography, MoVFEM returns results that are similar to the values published by Nam et al. (2007), especially for the yx-polarization data. In the xy-polarization, the resistivity curve differs from the reference solution at locations where the topography changes most rapidly. Again, we interpret this effect to occur due to the regular grid spacing and boundary errors.

Anisotropic effects were analyzed with a homogeneous (transverse) anisotropic resistivity structure. In this case, we did not have published results as references. The MoVFEM solution for the anisotropic homogeneous model correctly returns responses, in which the field polarization is related to the conductivity tensor components. The xy-polarization is related to \(\sigma _{xx}\) and yx-polarization to \(\sigma _{yy}\). Only small deviations from the expected results have been observed. Numerical inaccuracies are small and are due to the error in the implementation of boundary conditions. However, we believe that with the correction of this error, the code will have a lot of capability modeling 3D anisotropic structures with complex geometry.

Currently existing software that includes anisotropy is only able to handle 1D or 2D structures for the forward modeling and inversion of MT data (Key 2016; Pek and Santos 2006; Pek et al. 2011). A comparison of the results obtained from MoVFEM (3D forward modeling) with those of a 2D algorithm can be made, but the 3D effects of modeling anisotropic media cannot be described with a 2D algorithm.

MoVFEM assemble the global matrix in an acceptable CPU time when compared with similar algorithms (Farquharson and Miensopust 2011; Nam et al. 2007; Zyserman and Santos 2000), and first approaches toward minimizing the numerical costs have been made. However, the external MUMPS software library systematically requires a major part of the total computational time for the inversion of the global matrix.

We have presented here the results of a thorough analysis of the MoVFEM software to proof its functionality and demonstrate its capabilities. In addition to the cases discussed in the sections above, the algorithm has undergone more tests that we are not able to present within the scope of this article. We refer to Rivera-Rios (2014) for more detailed information on the implementation and additional test scenarios.

In conclusion, we have developed a MoVFEM computational algorithm for the forward modeling of 3D-MT synthetic data, for a model including anisotropy, topography, and complex subsurface interfaces. This algorithm implements edge elements of linear, quadratic, and Lagrangian orders, in which higher orders produce accurate solutions when compared with linear order. In addition to Dirichlet boundary conditions, GPML boundary conditions were also implemented in this algorithm, showing large amplitude oscillations for linear elements, and small amplitude oscillations for higher orders. These oscillations are indicative of errors propagating from the boundaries of the domain. This suggests a bug in the code and that the selection of stretching factors’ parameters depends not only on the frequency used and conductivity, but also on the element order and spacing of the PML zone. A systematic study for the best combination of these parameters needs to be performed in order to properly apply GPML boundary conditions. Despite the oscillations with GPML, very accurate models can be obtained when choosing the right boundary conditions once the boundary error is fixed.

This algorithm provides to the EM community a set of vector basis functions of different order for hexahedral cells, in addition to the GPML boundary conditions. MoVFEM can be applied to various scenarios, including anisotropic resistivity models and models with complex geometries. The domain discretization can be modified to implement h-adaptive methods, where the mesh is refined iteratively on areas that need better resolution, especially on the contacts between resistivity structures. The setting of element order can also be modified to implement p-adaptive methods, where the element order is increased iteratively on areas that need more accuracy. The hp-adaptive method incorporates both grid refinement and element order assignment iteratively for better results.

Data availability statement

The source code and an example of input files can be accessed at:


  1. Ahagon A, Kameari A (2017) New types of second-order edge element by reducing edge variables for electromagnetic field analysis. IEEE Trans Magn 53(6):1–4

    Google Scholar 

  2. Ahagon A, Kameari A, Ebrahimi H, Fujiwara K, Takahashi Y (2018) New type of second-order tetrahedral edge elements by reducing edge variables for quasi-static field analysis. IEEE Trans Magn 54(3):1–4

    Google Scholar 

  3. Amestoy PR, Guermouche A, L’Excellent JY, Pralet S (2006) Hybrid scheduling for the parallel solution of linear systems. Parallel Comput 32(2):136–156

    Google Scholar 

  4. Avdeev DB (2005) Three-dimensional electromagnetic modelling and inversion from theory to application. Surv Geophys 26(6):767–799

    Google Scholar 

  5. Berenger JP (1994) A perfectly matched layer for the absorption of electromagnetic waves. J Comput Phys 114:185–200

    Google Scholar 

  6. Börner R (2010) Numerical modelling in geo-electromagnetics: advances and challenges. Surveys Geophys 31(2):225–245

    Google Scholar 

  7. Cai H, Xiong B, Han M, Zhdanov M (2014) 3D controlled-source electromagnetic modeling in anisotropic medium using edge-based finite element method. Comput Geosci 73:164–176

    Google Scholar 

  8. Cai H, Hu X, Li J, Endo M, Xiong B (2017) Parallelized 3D CSEM modeling using edge-based finite element with total field formulation and unstructured mesh. Comput Geosci 99:125–134

    Google Scholar 

  9. Camargos A, Silva V, Guichon JM, Meunier G (2017) GPU-accelerated iterative solution of complex-entry systems issued from 3D edge-FEA of electromagnetics in the frequency domain. J High Perform Comput Appl 31(2):119–133

    Google Scholar 

  10. Crowley CW, Silvester PP, Hurwitz H Jr (1988) Covariant projection elements for 3D vector field problems. IEEE Trans Magn 24:397–400

    Google Scholar 

  11. Fang J, Wu Z (1996) Generalized perfectly matched layer for the absorption of propagating and evanescent waves in lossless and lossy media. IEEE Trans Microw Theory Tech 44:2216–2222

    Google Scholar 

  12. Farquharson CG, Miensopust MP (2011) Three-dimensional finite-element modelling of magnetotelluric data with divergence correction. J Appl Geophys 75:699–710

    Google Scholar 

  13. Grayver AV, Kolev TV (2015) Large-scale 3D geoelectromagnetic modeling using parallel adaptive high-order finite element method. Geophysics 80(6):E277–E291

    Google Scholar 

  14. Han H, Nam MJ, Kim HJ, Song Y, Suh JH (2009) A comparison of accuracy and computation time of three-dimensional magnetotelluric modeling algorithms. J Geophys Eng 6(2):136–145

    Google Scholar 

  15. Hano M (1984) Finite-element analysis of dielectric-loaded waveguides. IEEE Trans Microw Theory Tech 32:1275–1279

    Google Scholar 

  16. Jin J (2002) The finite element method in electromagnetics, 2nd edn. Wiley, Hoboken

    Google Scholar 

  17. Kameari A (1990) Calculation of transient 3D eddy current using edge-elements. IEEE Trans Magn 26:466–469

    Google Scholar 

  18. Käufl JS, Grayver AV, Kuvshinov AV (2018) Topographic distortions of MT transfer functions: a high resolution 3D modeling study using real elevation data. Geophys J Int 215(3):1943–1961

    Google Scholar 

  19. Key K (2016) MARE2DEM: a 2-D inversion code for controlled-source electromagnetic and magnetotelluric data. Geophys J Int 207(1):571–588

    Google Scholar 

  20. Kruglyakov M, Kuvshinov A (2018) Using high order polynomial basis in 3D EM forward modeling based on volume integral equation method. Geophys J Int 213(2):1387–1401

    Google Scholar 

  21. Liu C, Yu Y, Ren Z, Wu Q (2010) 3-D magnetotelluric adaptive finite-element modeling. In: Proceedings of the advances in computation and intelligence: 5th international symposium, ISICA, pp 465–473

  22. Liu Y, Xu Z, Li Y (2018) Adaptive finite element modeling of three-dimensional magnetotelluric fields in general anisotropic media. J Appl Geophys 151:113–124

    Google Scholar 

  23. Mackie RL, Madden TR, Wannamaker PE (1993) Three-dimensional magnetotelluric modeling using difference equations—theory and comparisons to integral equation solutions. Geophysics 58(2):215–226

    Google Scholar 

  24. Mackie R, Smith J, Madden T (1994) Three-dimensional electromagnetic modeling using finite difference equations: the magnetotelluric example. Radio Sci 29:923–935

    Google Scholar 

  25. Mitsuhata Y, Uchida T (2004) 3D magnetotelluric modeling using the T-\(\Omega\) finite-element method. Geophysics 69(1):108–119

    Google Scholar 

  26. Mogi T (1996) Three-dimensional modeling of magnetotelluric data using finite element method. J Appl Geophys 35:185–189

    Google Scholar 

  27. Naif S, Key K, Constable S, Evans RL (2013) Melt-rich channel observed at the lithosphere–asthenosphere bounday. Nature 55:356–359

    Google Scholar 

  28. Nam M, Kim H, Song Y, Lee T, Son J, Suh J (2007) 3D magnetotelluric modelling including surface topography. Geophys Prospect 55:277–287

    Google Scholar 

  29. Newman G (2014) A review of high-performance computational strategies for modeling and imaging of electromagnetic induction data. Surveys Geophys 35:85–100

    Google Scholar 

  30. Pek J, Santos FAM (2006) Magnetotelluric inversion for anisotropic conductivities in layered media. Phys Earth Planet Inter 158(2–4):139–158

    Google Scholar 

  31. Pek J, Santos FAM, Li Y (2011) Non-linear conjugate gradient magnetotelluric inversion for 2-D anisotropic conductivities. In: Smith Y (ed) Proceedings of the 24 Schmicker-Weidelt-Kolloquium, Nustadt and der Weinstraße, 19–23 September, pp 187–206

  32. Puzyrev V, Koldan J, de la Puente J, Houzeaux G, Vázquez M, Cela J (2013) A parallel finite-element method for three-dimensional controlled-source electromagnetic forward modelling. Geophys J Int 193:678–693

    Google Scholar 

  33. Reddy I, Rankin D, Phillips R (1977) Three-dimensional modelling in magnetotelluric and magnetic variational sounding. Geophys J Int 51:313–325

    Google Scholar 

  34. Ren Z, Kalscheuer T, Greenhalgh S, Maurer H (2013) A goal-oriented adaptive finite-element approach for plane wave 3-D electromagnetic modelling. Geophys J Int 194(2):700–718

    Google Scholar 

  35. Renka R (1988) Algorithm 660: QSHEP2D: quadratic Shepard method for bivariate interpolation of scattered data. ACM Trans Math Softw 14(2):149–150

    Google Scholar 

  36. Rivera-Rios AM (2014) Multi-order vector finite element modeling of 3D magnetotelluric data including complex geometry and anisotropy. PhD Thesis, School of Earth and Environmental Sciences, University of Adelaide

  37. Robertson K, Heinson G, Thiel S (2016) Lithospheric reworking at the Proterozoic-Phanerozoic transition of Australia imaged using AusLAMP Magnetotelluric data. Earth Planet Sci Lett 452:27–35

    Google Scholar 

  38. Schultz A (2010) EMScope: a continental scale magnetotelluric observatory and data discovery resources. Data Sci J 8:IGY6–IGY20

    Google Scholar 

  39. Schultz A, Egbert GD, Kelbert A, Peery T, Clote V, Fry B, Erofeeva S (2019) Staff of the National Geoelectromagnetic Facility and their contractors (2006–2018). “USArray TA Magnetotelluric Transfer Functions”. Retrieved from the IRIS database on May 31.

  40. Schwarzbach C, Börner RU, Spitzer K (2011) Three-dimensional adaptive high order finite element simulation for geo-electromagnetics—a marine CSEM example. Geophys J Int 187(1):63–74

    Google Scholar 

  41. Shi X, Utada H, Wang J, Wu W (2004) Three dimensional magnetotelluric forward modeling using vector finite element method combined with divergence corrections (VFE++). In: Proceedings of the 17th IAGA WG 1.2 workshop on electromagnetic induction in the earth, October 18–23, Hyderabad, India

  42. Wannamaker PE, Stodt JA, Rijo L (1986) Two-dimensional topographic responses in magnetotellurics modeled using finite elements. Geophysics 51:2131–2144

    Google Scholar 

  43. Webb JP, Miniowitz R (1991) Analysis of 3-D microwave resonators using covariant-projection elements. IEEE Trans Microw Theory Tech 39:1895–1899

    Google Scholar 

  44. Weiss CJ (2017) Finite-element analysis for model parameters distributed on a hierarchy of geometric simplices. Geophysics 82(4):E155–E167

    Google Scholar 

  45. Xiao T, Liu Y, Wang Y, Fu LY (2018) Three-dimensional magnetotelluric modeling in anisotropic media using edge-based finite element method. J Appl Geophys 149:1–9

    Google Scholar 

  46. Xiong B, Luo T, Chen L (2018) Direct solutions of 3D MT fields using edge-based finite element. J Appl Geophys 159:204–208

    Google Scholar 

  47. Yilmaz AE, Kuzuoglu M (2008) Comparison of linear and quadratic hexahedral edge elements in electromagnetic scattering problems. AEU Int J Electron Commun 62:582–587

    Google Scholar 

  48. Zhdanov MS, Varentsov IM, Weaver JT, Golubev NG, Krylov VA (1997) Methods for modelling electromagnetic fields. Results from COMMEMI—the international project on comparison of modelling methods for electromagnetic induction. J Appl Geophys 37:133–271

    Google Scholar 

  49. Zhou B, Heinson G, Rivera-Rios A, Patten C (2012) 3D geo-electromagnetic modelling with subdomain Chebyshev spectral method [extended abstract]. In: ASEG 21st EM induction workshop, July 25–31, Darwin, Australia

  50. Zyserman F, Santos J (2000) Parallel finite element algorithm with domain decomposition for three-dimensional magnetotelluric modelling. J Appl Geophys 44:337–351

    Google Scholar 

Download references


We are grateful to Andrew Hill and Paul Coddington of E-ResearchSA for their support in the use of high performance computing facilities. Special thanks go to Fundación Kinesis, PR, for financial support of the lead author.


This research was supported by the Australian Research Council with the Discovery Project (DP20106713).

Author information




AMR developed the theory and the main computational program. BZ helped with the theory, and LK helped with the computations. GH worked with the project concept and supervision. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Aixa M. Rivera-Rios.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix: GPML governing equations

Appendix: GPML governing equations

Expanding the modified governing Eq. (9) with the modified Nabla Eq. (10), we obtain

$$\begin{aligned}&h_1h_2h_3[{\tilde{\nabla }}\times \varvec{\nu }^{-1}\cdot {\tilde{\nabla }}\times {\mathbf {F}}_\text{s}+\text{i}\omega \varvec{\kappa }\cdot {\mathbf {F}}_\text{s}]\\ &\quad = \left( \begin{aligned} (h_{_1}\nu _{_{32}}+h_{_1}\nu _{_{23}})\partial _{_{23}}F_{_1}-\frac{h_{_1}h_{_3}}{h_{_2}}\nu _{_{33}}\partial _{_{22}}F_{_1}-\frac{h_{_1}h_{_2}}{h_{_3}}\nu _{_{22}}\partial _{_{33}}F_{_1}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{11}}F_{_1}\\ h_{_3}\nu _{_{33}}\partial _{_{12}}F_{_1}-h_{_2}\nu _{_{32}}\partial _{_{13}}F_{_1}-h_{_1}\nu _{_{13}}\partial _{_{23}}F_{_1}+\frac{h_{_1}h_{_2}}{h_{_3}}\nu _{_{12}}\partial _{_{33}}F_{_1}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{21}}F_{_1}\\ h_{_2}\nu _{_{22}}\partial _{_{13}}F_{_1}-h_{_3}\nu _{_{23}}\partial _{_{12}}F_{_1}+\frac{h_{_1}h_{_3}}{h_{_2}}\nu _{_{13}}\partial _{_{22}}F_{_1}-h_{_1}\nu _{_{12}}\partial _{_{23}}F_{_1}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{31}}F_{_1} \end{aligned}\right) \\ &\quad\quad +\left( \begin{aligned} h_{_3}\nu _{_{33}}\partial _{_{12}}F_{_2}-h_{_2}\nu _{_{23}}\partial _{_{13}}F_{_2}-h_{_1}\nu _{_{31}}\partial _{_{23}}F_{_2}+\frac{h_{_1}h_{_2}}{h_{_3}}\nu _{_{21}}\partial _{_{33}}F_{_2}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{12}}F_{_2}\\ (h_{_2}\nu _{_{13}}+h_{_2}\nu _{_{31}})\partial _{_{13}}F_{_2}-\frac{h_{_2}h_{_3}}{h_{_1}}\nu _{_{33}}\partial _{_{11}}F_{_2}-\frac{h_{_1}h_{_2}}{h_{_3}}\nu _{_{11}}\partial _{_{33}}F_{_2}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{22}}F_{_2}\\ h_{_1}\nu _{_{11}}\partial _{_{23}}F_{_2}-h_{_3}\nu _{_{13}}\partial _{_{12}}F_{_2}+\frac{h_{_2}h_{_3}}{h_{_1}}\nu _{_{23}}\partial _{_{11}}F_{_2}-h_{_2}\nu _{_{21}}\partial _{_{13}}F_{_2}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{32}}F_{_2} \end{aligned}\right) \\ &\quad\quad +\left( \begin{aligned} h_{_2}\nu _{_{22}}\partial _{_{13}}F_{_3}-h_{_3}\nu _{_{32}}\partial _{_{12}}F_{_3}-h_{_1}\nu _{_{21}}\partial _{_{23}}F_{_3}+\frac{h_{_1}h_{_3}}{h_{_2}}\nu _{_{31}}\partial _{_{22}}F_{_3}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{13}}F_{_3}\\ h_{_1}\nu _{_{11}}\partial _{_{23}}F_{_3}-h_{_3}\nu _{_{31}}\partial _{_{12}}F_{_3}+\frac{h_{_2}h_{_3}}{h_{_1}}\nu _{_{32}}\partial _{_{11}}F_{_3}-h_{_2}\nu _{_{12}}\partial _{_{13}}F_{_3}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{23}}F_{_3}\\ (h_{_3}\nu _{_{21}}+h_{_3}\nu _{_{12}})\partial _{_{12}}F_{_3}-\frac{h_{_2}h_{_3}}{h_{_1}}\nu _{_{22}}\partial _{_{11}}F_{_3}-\frac{h_{_1}h_{_3}}{h_{_2}}\nu _{_{11}}\partial _{_{22}}F_{_3}+\text{i}\omega h_{_1}h_{_2}h_{_3}\kappa _{_{33}}F_{_3} \end{aligned}\right) . \end{aligned}$$

The source term becomes

$$\begin{aligned} \tilde{{\mathbf {s}}}&=h_1h_2h_3\left\{ \begin{aligned}&-\text{i}\omega \delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p}&\quad&\text {For }{\mathbf {E}}\text {-PDE}\\&{\tilde{\nabla }}\times (\varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p})&\quad&\text {For }{\mathbf {H}}\text {-PDE} \end{aligned}\right. \\&=\left\{ \begin{aligned}&-\text{i}\omega h_1h_2h_3\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p}&\quad&\text {For }{\mathbf {E}}\text {-PDE}\\&\left( \begin{aligned} h_1h_3\partial _2(\varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p})_3-h_1h_2\partial _3(\varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p})_2\\ h_1h_2\partial _3(\varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p})_1-h_2h_3\partial _1(\varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p})_3\\ h_2h_3\partial _1(\varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p})_2-h_1h_3\partial _2(\varvec{\sigma }^{-1}\delta \varvec{\sigma }\cdot {\mathbf {E}}_\text{p})_1 \end{aligned}\right)&\quad&\text {For }{\mathbf {H}}\text {-PDE} \end{aligned}\right. . \end{aligned}$$

From the above formulation is where the stretching factors can be factorized from the partial derivatives (\(\partial _{mn}\)) into the modeling tensor \(\nu _{ij}\).

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Rivera-Rios, A.M., Zhou, B., Heinson, G. et al. Multi-order vector finite element modeling of 3D magnetotelluric data including complex geometry and anisotropy. Earth Planets Space 71, 92 (2019).

Download citation


  • Numerical modeling
  • Electrical resistivity anisotropy
  • Finite element method
  • Edge elements
  • Magnetotellurics