Abstract
The Hermite-Taylor method, introduced in 2005 by Goodrich et al. is highly efficient and accurate when applied to linear hyperbolic systems on periodic domains. Unfortunately, its widespread use has been prevented by the lack of a systematic approach to implementing boundary conditions. In this paper we present the Hermite-Taylor correction function method (CFM), which provides exactly such a systematic approach for handling boundary conditions. Here we focus on Maxwell’s equations but note that the method is easily extended to other hyperbolic problems.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The property of waves to travel over large distances and long time without changing their shape is an important feature used in current technologies, such as communication devices and other electromagnetic products. The governing equations for electromagnetic problems are the Maxwell’s equations and it is to these we seek approximate solutions in this paper. To make the numerical approximation to the solution accurate either low order methods on fine meshes, which can be computationally costly, or high-order methods on coarser meshes can be used. The latter approach is usually preferable for large scale problems.
Several high-order methods in computational electromagnetics have been proposed, such as high-order finite-difference time-domain (FDTD) methods [26, 28], discontinuous Galerkin (DG) methods [4, 8, 13, 14], and pseudo-spectral methods [9, 10, 27], to name a few. High-order explicit FDTD methods require a restrictive stability condition and wide stencils, which complicate the enforcement of boundary conditions. Unconditionally stable alternating-direction-implicit (ADI) FDTD methods have been developed to circumvent the time step constraints [6, 18, 24, 25, 29], however, methods are difficult to generalize to high order and treating complex geometry is not straightforward.
DG methods achieve high-order convergence rates by approximating the function using local high order polynomials and are an excellent choice for problems where a high quality mesh can be generated. The main drawbacks of DG methods are their restrictive time step at a high order of accuracy and the duplication of degrees of freedom on the edges of elements.
Another avenue to handle time dependent wave problems is the Hermite-Taylor method, which consists of a Hermite interpolation procedure in space and a Taylor method in time [11] (see also [12] for a review of Hermite methods). The key idea is to evolve, in time, the numerical solution as well as its space derivatives through order m to achieve a \((2\,m+1)\) order accurate method using only \((m+1)^d\) degrees of freedom per element in d-dimensions.
As was shown for linear symmetric hyperbolic problems in [11], this method provides a stability condition that only depends on the largest wave-speed, independent of the order. Hence, large time-step sizes can be used for these high-order methods and therefore ease the computational burden for large-scale problems. As the \((m+1)^d\) degrees of freedom in a Hermite method are collocated at a single node the imposition of general boundary conditions can be challenging. Typically, in addition to the physical boundary conditions the method needs to be augmented with a relatively large number of numerical boundary conditions (sometimes called compatibility boundary conditions or, more recently, inverse Lax-Wendroff conditions). While this has been successfully done for the wave equation on both Cartesian and curvilinear meshes in [20], it has proven difficult to use this technique for first order hyperbolic systems.
A possible solution to this is to use a hybrid DG-Hermite method [7] for Maxwell’s equations. The method in [7] takes advantage of the flexibility of DG solvers to handle complex geometries and boundary conditions by considering two non-overlapping meshes, an unstructured mesh for the DG method and a staircased Cartesian mesh where the Hermite method is used. This approach requires a hybrid structured-unstructured mesh and the use of local time-stepping to maintain large time-step sizes in the Hermite method. In [5] an overset grid method that combines a Hermite method (on Cartesian meshes) and a DG method (on structured curvilinear meshes) for the wave equation was proposed. This method does not require a hybrid non-overlapping mesh and as such it is somewhat more geometrically flexible but again, it is not easy to extend to first order hyperbolic systems.
In this work, we propose an alternative solution for imposing boundary conditions for Maxwell’s equations within the framework of Hermite methods. Our new method is based on the correction function method (CFM). The CFM was first proposed in [21] to handle Poisson’s equation with interface conditions and continuous coefficients in a finite-difference context. Given a numerical solution (for example from a finite difference method) that has been updated near but not on the boundary from the CFM seeks a polynomial approximation to the solution in the vicinity of a boundary or interface using a minimization procedure. A functional that is based on a square measure of the residual of the original PDE problem and that also contains terms from the finite difference solver is minimized over a suitable space of polynomials. Once this polynomial approximation, also called the correction function, is found, the numerical solution can be corrected so that it satisfies the boundary conditions to a high order of accuracy. The CFM has been used for Poisson’s equation [22, 23], the wave equation [1], and for electromagnetic problems with both interface and boundary [15,16,17].
In this paper we introduce a CFM-Hermite-Taylor method. An advantage of using Hermite based methods for the base scheme is that the Hermite stencil remains the same regardless of its order. This is not the case for FDTD methods. Additionally, the Hermite-Taylor method directly provides a space-time polynomial approximating the solution that is required in the CFM functional. In this paper we focus exclusively on the case when the geometry of the problem can be represented on a Cartesian mesh or on a logically Cartesian curvilinear mesh. Already in this setting the Hermite stencil provides a good advantage but we expect that in future work where we treat interfaces and non-grid aligned boundaries the advantage will be even greater.
We are focusing exclusively on the enforcement of boundary conditions. Other important concerns, such as the preservation of the divergence-free constraints and the energy, will not be addressed here.
The paper is organized as follows. We introduce Maxwell’s equations with the considered boundary conditions in Sect. 2. In Sect. 3, the one-dimensional Hermite-Taylor method is described in detail and some remarks are provided for higher dimensional cases. The correction function method is introduced and described in detail in the Hermite-Taylor setting in Sect. 4. Finally, numerical examples in one dimension (1-D) and two dimensions (2-D) that verify the properties of the Hermite-Taylor CFM are presented in Sect. 5.
2 Problem Definition
In this work, we seek approximate solutions to Maxwell’s equations
in the domain \(\varOmega \subset {\mathbb {R}}^d\) with \(d=1,2\) and the time interval \(I=[t_0,t_f]\). Here \({\varvec{H}}\) is the magnetic field, \({\varvec{E}}\) is the electric field, \(\mu\) is the magnetic permeability, and \(\epsilon\) is the electric permittivity. To complete the system (1), we consider the initial conditions
and the boundary conditions on the electromagnetic fields.
In this work, we focus on the following boundary conditions:
-
(i)
perfect electric conductor (PEC)
$$\begin{aligned} {\varvec{n}}\times {\varvec{E}} = 0 \quad \text {on } \varGamma \times I, \end{aligned}$$(2) -
(ii)
perfect magnetic conductor (PMC)
$$\begin{aligned} {\varvec{n}}\times {\varvec{H}} = 0 \quad \text {on } \varGamma \times I, \end{aligned}$$(3) -
(iii)
impedance boundary condition
$$\begin{aligned} {\varvec{E}}\times {\varvec{n}} +Z\,{\varvec{n}}\times ({\varvec{H}}\times {\varvec{n}})= 0 \quad \text {on } \varGamma \times I. \end{aligned}$$(4)
Here \(Z=\sqrt{\tfrac{\mu }{\epsilon }}\) is the impedance, \(\varGamma\) is the boundary of the domain \(\varOmega\), and \({\varvec{n}}\) is the outward unit normal to \(\varGamma\). For further discussions on Maxwell’s equations with these boundary conditions and results on their well-posedness, we refer the reader to [2, 19]. Note that we consider the non-homogeneous case of these boundary conditions to facilitate the verification of the Hermite-Taylor CFM. We denote the given right-hand side function by \({\varvec{g}}(x,y,t)\).
3 Hermite-Taylor Method
In the following, a brief review of the Hermite-Taylor method, introduced by Goodrich et al. [11], is provided. For simplicity, we consider the one-dimensional case and include some comments regarding higher dimensions.
The Hermite method uses a mesh staggered in both space and time as illustrated in Fig. 1.
Consider the domain \(\varOmega = [x_\ell , x_r]\) and a time interval \(I = [t_0,t_f]\). We then define the primal mesh to be
Here \(N_x\) is the number of cells on the primal mesh. The dual mesh is then defined as the cell centers of the primal mesh
The approximate solution on the primal mesh is centered at times
while the approximation on the dual mesh is centered at times
Here \(N_t\) is the number of time steps.
The Hermite-Taylor method requires three processes.
-
(i)
Hermite interpolation
Assume that the values of the electromagnetic fields and their derivatives through order m (or sufficiently accurate approximation of these) are available on the primal mesh at \(t_{n-1}\). Then, for each cell in the primal mesh, for each electromagnetic field, we construct the unique polynomial of degree \(2\,m+1\) coinciding with the electromagnetic field and its derivatives through order m at the endpoints of the cell, that is the Hermite interpolant of the electromagnetic field. In Fig. 1, this step is represented by \({\mathcal {I}}\).
-
(ii)
Recursion relation
The recursion relation constructs a space-time polynomial, referred as a Hermite-Taylor polynomial in this work, approximating each electromagnetic field. Considering a cell and a given Hermite interpolant of each electromagnetic field on this cell, we identify the derivatives of the electromagnetic field as scaled coefficients of the polynomial at the cell center. By expanding, in time, each scaled coefficient in a Taylor polynomial and enforcing the PDE at the cell center, we obtain a recursion relation for the coefficients of the Hermite-Taylor polynomials. This step is represented in Fig. 1 by either blue dashed circles or black dashed squares.
-
(iii)
Time evolution
Finally, we update the electromagnetic fields and their derivatives through order m at the dual mesh points by simply evaluating the Hermite-Taylor polynomials. This step is represented by \({\mathcal {T}}\) in Fig. 1.
Let us now detail each time step of the method.
3.1 Hermite Interpolation
Assuming that the space derivatives through order m of the electromagnetic fields at the initial time \(t_0\) are available on the primal mesh, we compute the \((2\,m+1)\) degree Hermite interpolant \(p_{i+1/2}^f(x)\) on each cell \([x_i, x_{i+1}]\) satisfying
Here f is either the magnetic field H or the electric field E. We then obtain a polynomial approximating each electromagnetic field on the cell \([x_i,x_{i+1}]\) and centered at the cell center \(x_{i+1/2}\),
where \(c^H(t)\) and \(c^E(t)\) are time-dependent coefficients.
3.2 Recursion Relation
Let us now compute a Hermite-Taylor polynomial approximating each electromagnetic field. To do so, we expand the coefficients in a Taylor polynomial of degree q centered at \(t_0\), which leads to
Here \(c^H_{\ell ,0}\) and \(c^E_{\ell ,0}\) are known from the initial data and the interpolation step. Consider Maxwell’s equations in 1-D with constant coefficients,
For smooth solutions, we then have
Substituting H and E by their Hermite-Taylor approximations \(p_{i+1/2}^H(x,t)\) and \(p_{i+1/2}^E(x,t)\) in the system (6) and evaluating them at \((x_{i+1/2},t_0)\), we obtain the following recursion relations for the coefficients:
Knowing \(c^H_{\ell ,0}\) and \(c^E_{\ell ,0}\), these recursion relations allow the computation of the Hermite-Taylor polynomials approximating the electromagnetic fields.
3.2.1 Variable Coefficients Problems
For spatially variable coefficients, the recursion relations for the polynomial coefficients involve high-order derivatives of the coefficients. As in [11], we consider high-order derivatives of the coefficients \(u(x) = \frac{1}{\mu (x)}\) and \(e(x) = \frac{1}{\epsilon (x)}\) and take advantage of the Leibnitz’ rule.
For sufficiently smooth solutions and coefficients u and e, we have
Identifying the coefficients of the Hermite-Taylor polynomials as scaled derivatives and enforcing the system (7) at \((x_{i+1/2},t_0)\), we obtain
for \(\ell = 0,\cdots ,2\,m+1\) and \(s=1,\cdots ,q\).
We note that this step can be generalized for other problems including linear, non-linear, and variable coefficient problems. We refer the reader to [12] for more details.
3.3 Time Evolution
Finally, we evolve the electromagnetic fields and their space derivatives through order m on the dual mesh nodes, located at \((x_{i+1/2},t_{1/2})\) for the cell \([x_i, x_{i+1}]\), by evaluating (5),
A similar process is repeated to evolve the data from the dual mesh at \(t_{1/2}\) to the primal mesh at \(t_1\) and therefore to complete the time step. The overall procedure is repeated until the final time is reached. Figure 1 illustrates the Hermite-Taylor method at a given primal node.
Remark 1
For linear constant coefficients hyperbolic problems, the Taylor expansion in time of the coefficients of the Hermite polynomials is computed exactly for q sufficiently large [11], for example \(q=2\,m+1\) in (5) for the one-dimensional case. In general, we set \(q=\nu \,(2\,m+1)\) in \({\mathbb {R}}^{\nu }\) to obtain an exact time expansion of the coefficients.
Remark 2
In higher dimensions, the primal mesh is defined as the classical Cartesian mesh while the dual nodes are defined at the cell center. Hence, this differs from the mesh used in FDTD methods. As for the Hermite interpolation procedure, approximations are computed using a tensor product of one-dimensional Hermite polynomials. We refer the interested reader to [11] for more details on the Hermite-Taylor setting for higher dimensions.
As mentioned before, a challenge for the Hermite-Taylor method is to enforce general boundary conditions. Indeed, this method requires to know all information on the boundary, including the space derivatives through order m, which are usually not available. In the next section, we present a way to obtain the needed information using the CFM.
4 Correction Function Method (CFM)
In this section, we describe the CFM that computes approximations to the electromagnetic fields and their derivatives through order m at the nodes located on the boundary of the domain. There are two key ingredients to the CFM: the minimization of functionals describing the electromagnetic fields near the boundary, and careful definition of the space-time domains of the functionals along the boundary. We refer to a space-time domain of a functional as a local patch. Once the minimization procedure is completed, we obtain space-time polynomials, called correction functions, approximating each electromagnetic field in the vicinity of the boundary. The correction functions are used to update the solution at the boundary nodes. In the following, we first describe the method in detail in 1-D and then generalize it in higher dimensions.
4.1 The Hermite-CFM in 1-D
On the mesh in Fig. 1, the first step has allowed for the update of the Hermite solution on the dual mesh at time level \(t_{n-1/2}\) and the second step has allowed for the update of the numerical solution on the primal mesh at \(t_{n}\), except near the boundary. At \((x_0,t_n)\) and \((x_{N_x},t_n)\) for \(n=1,\cdots ,N_t\) the solution will be updated using the CFM.
We define a node where the numerical solution is updated using the Hermite-Taylor method as a Hermite node and a node where the numerical solution is computed using the CFM we denote as a CF node. In the following, the subscript i refers to the ith CF node in the mesh and the superscript n refers to the time level \(t_n\). In the one-dimensional case, \(i=0\) and \(i=1\) refer respectively to the boundary nodes \(x_0\) and \(x_{N_x}\).
We further note that although the functional just to be defined can depend on time, as manifested by the n superscript, (for example to account for a moving geometry) but for all the problems considered here it will not. When there is no time dependence all the small linear system of equations (one at each CF node) resulting from the quadratic optimization problem, will not change in time and can thus be formulated, factored, and stored once and for all before the time stepping loop. Consequently, the complexity of the Hermite-CFM will approach that of the Hermite method in the limit \(h \rightarrow 0\).
The CFM minimizes a functional unique to each CF node composed of three parts
Here, \({\mathcal {G}}_i^n\) weakly enforces the governing equations, \({\mathcal {B}}_i^n\) weakly enforces the boundary conditions, and \({\mathcal {H}}_i^n\) weakly enforces that the correction functions match the Hermite solution near the ith CF node.
The domains over which the different terms in the functional are computed are not the same. The domain of \({\mathcal {B}}_i^n\) should include the part of the boundary in the vicinity of the ith CF node to weakly enforce the boundary conditions. The domain of \({\mathcal {H}}_i^n\) should be the same as the space-time domains of the Hermite nodes closest to the ith CF node. We then weakly enforce the correction functions to match the Hermite solution in the domain of \({\mathcal {H}}_i^n\) while avoiding extrapolation procedures of the Hermite solution. Finally, the domain of integration for \({\mathcal {G}}^n_i\) should enclose the ith CF node, the domain of integration for \({\mathcal {B}}_i^n\) and the domain of integration for \({\mathcal {H}}_i^n\) to enforce Maxwell’s equations over the whole local patch of the functional \(J_i^n\).
As an example for the CF node \(x_0\) at time level \(t_n\), \({\mathcal {G}}_0^n\) contains the residual of the PDE and it is integrated over the rectangular space-time region (the local patch) consisting of the direct product of the space interval \(S_0=[x_0,x_{3/2}]\) with the time interval \(I_n=[t_{n-1},t_n]\) as illustrated in Fig. 2.
We then have
where \(\ell _0 = x_{3/2}-x_0 = 1.5\,\Delta x\) is the characteristic length of the space interval \(S_0\). Here \(H^n_{h,0}\) and \(E^n_{h,0}\) are the sought correction functions approximating the electromagnetic fields and are used to update the numerical solution at \((x_0,t_n)\).
The term \({\mathcal {B}}_0^n\) contains the residual of the boundary condition at \(x_0\) and it is integrated over the time interval \(I_n\) as shown in Fig. 3. As an example, we have
for the boundary condition (2).
We now require the correction functions to weakly match the Hermite solution over the space-time domains of the primal Hermite node \(x_1\) and the dual Hermite node \(x_{1/2}\). This is what connects the two methods and is needed for the minimization problem to be well-posed. The first part of \({\mathcal {H}}_0^n\) contains the Hermite-Taylor polynomials \(H^*(x,t) = p_{1/2}^H(x,t)\) and \(E^*(x,t) = p_{1/2}^E(x,t)\), which are associated with the cell of the dual Hermite node \(x_{1/2}\), and it is integrated over the rectangular region consisting of the direct product of the space interval \(S^{{\mathcal {H}}}_{0,d} = [x_{0},x_{1}]\) with the time interval \([t_{n-1},t_{n-1/2}]\). The second part of the term \({\mathcal {H}}_0^n\) contains the Hermite-Taylor polynomials \(H^*(x,t)=p_{1}^H(x,t)\) and \(E^*(x,t)=p_{1}^E(x,t)\), and it is integrated over the rectangular space-time region consisting of the direct product of the space interval \(S^{{\mathcal {H}}}_{0,p} = [x_{1/2},x_{3/2}]\), which is the cell associated with the primal Hermite node \(x_1\) with the time interval \([t_{n-1/2},t_n]\). The space-time regions \(S^{{\mathcal {H}}}_{0,d}\times [t_{n-1},t_{n-1/2}]\) and \(S^{{\mathcal {H}}}_{0,p}\times [t_{n-1/2},t_{n}]\) are illustrated in Fig. 4. We then have
where \(c_H\) is a given penalization function that is such that \(0< c_H(\Delta x)\leqslant 1\).
A similar procedure is used to define the local patch and the functional associated with the second CF node \(x_{N_x}\) at the time level \(t_n\).
4.1.1 The Linear System of Equations that Solves the Optimization Problem
At each CF node we must solve the following problem:
Here \(V = {\mathbb {Q}}^k\big (S_i\times I_n \big )\) is the space of polynomials of degree k. In this work, we use space-time Legendre polynomials. In our one-dimensional example \(i=0,1\). Note that although \(n=1,\cdots ,N_t\), since the boundary does not change in time, there is in fact only one optimization problem for each CF node.
We formally compute the gradient of \(J_i^n\) with respect to the coefficients of the polynomial approximations \(H^n_{h,i}\) and \(E^n_{h,i}\), and use that it vanishes at a minimum to find a solution to the minimization problem (10). This leads to a linear system
where \({\varvec{c}}_i^n\) contains the coefficients of \(H^n_{h,i}\) and \(E^n_{h,i}\).
Again, since the boundary of the domain does not move, we have \(M_i = M_i^n\), so the matrices \(M_i\), their scaling and LU factorization are found in a pre-computation step. Consequently, the only computations needed at each time step is the computation of the right-hand side \({\varvec{b}}_i^n\), followed by forward and backward substitutions to find \({\varvec{c}}_i^n\).
4.1.2 Summary of the Hermite-CFM in 1-D
Given the numerical solution on the primal mesh at \(t_{n-1}\), the algorithm of the Hermite-Taylor CFM to evolve the numerical solution at \(t_{n}\) is:
-
(i)
update the numerical solution on the dual mesh at \(t_{n-1/2}\) using the Hermite-Taylor method and store the Hermite-Taylor polynomials needed for the CFM;
-
(ii)
update the numerical solution on the primal Hermite node at \(t_{n}\) using the Hermite-Taylor method and store the Hermite-Taylor polynomials needed for the CFM;
-
(iii)
update the numerical solution at the CF nodes using the CFM by computing the right-hand sides \({\varvec{b}}_i^n\) and solve for \({\varvec{c}}_i^n\). This is done independently for each i and can thus be done in parallel without any communication step.
4.2 The Hermite-CFM in 2-D
We only consider piecewise rectangular domains composed of straight lines between primal nodes. For higher dimensions, the spatial domain of a local patch is adapted depending on the geometry of the boundary and where the Hermite solution is available in the vicinity of its CF node while the time domain \(I_n\) remains the same. The spatial domain \(S_i\) of a local patch needs to satisfy three constraints:
-
(i)
the ith CF node must be inside;
-
(ii)
part of the boundary of the domain close to the ith CF node must be contained in it;
-
(iii)
it must contain the cells of the Hermite nodes closest to the ith CF node.
Examples of the spatial domains of local patches in 2-D that satisfy these constraints are shown in Figs. 5, 6, and 7. For simplicity, we omit the subscript associated with the CF node in the description of the local patches.
Let us first consider a CF node \((x_i,y_0)\) along an edge as depicted in Fig. 5. In this case, the spatial domain of the local patch is \(S = [x_{i-1},x_{i+1}]\times [y_0,y_{3/2}]\) while its intersection with the boundary of the domain, \(S\cap \varGamma\), is the line connecting the points \((x_{i-1},y_0)\) and \((x_{i+1},y_0)\). The spatial domains where we weakly enforce the Hermite solution are \(S_d^{{\mathcal {H}}} = [x_{i-1},x_{i+1}]\times [y_{0},y_{1}]\) over the time interval \([t_{n-1},t_{n-1/2}]\) and \(S_p^{{\mathcal {H}}} = [x_{i-1/2},x_{i+1/2}]\times [y_{1/2},y_{3/2}]\) over the time interval \([t_{n-1/2},t_n]\).
For a CF node located at a corner \((x_0,y_0)\) as illustrated in Fig. 6, we have \(S = [x_0,x_{3/2}]\times [y_0,y_{3/2}]\), \(S_d^{{\mathcal {H}}} = [x_{0},x_{1}]\times [y_{0},y_{1}]\), and \(S_p^{{\mathcal {H}}} = [x_{1/2},x_{3/2}]\times [y_{1/2},y_{3/2}]\). The intersection of S with the boundary is composed of the line connecting \((x_0,y_0)\) to \((x_0,y_{3/2})\) and that connecting \((x_0,y_0)\) to \((x_{3/2},y_0)\).
As a last example, we consider the situation in Fig. 7 where a CF node is located at a reentrant corner \((x_i,y_i)\). We then have \(S=[x_{i-1},x_{i+3/2}]\times [y_{j-1},y_{j+3/2}]\). The spatial domain where the Hermite solution is enforced \(S_d^{\mathcal {H}}\) over the time interval \([t_{n-1},t_{n-1/2}]\) is the union of \([x_{i-1},x_{i+1}]\times [y_{j},y_{j+1}]\) and \([x_{i},x_{i+1}]\times [y_{j-1},y_{j}]\). The spatial domain where the Hermite solution is enforced \(S_p^{\mathcal {H}}\) over the time interval \([t_{n-1/2},t_n]\) is the union of \([x_{i-1/2},x_{i+3/2}]\times [y_{j+1/2},y_{j+3/2}]\) and \([x_{i+1/2},x_{i+3/2}]\times [y_{j-1/2},y_{j+1/2}]\). The intersection between the spatial domain S of the local patch and the boundary is composed of the line connecting \((x_i,y_{j-1})\) to \((x_i,y_j)\) and that connecting \((x_{i-1},y_j)\) to \((x_i,y_j)\).
Let us now consider Maxwell’s equations in three dimensions (3-D) and seek polynomial approximations of the magnetic field and the electric field in each local patch, that is \({\varvec{H}}^n_{h,i}\) and \({\varvec{E}}^n_{h,i}\) for \(i=0,\cdots ,N_\varGamma\) and \(n=1,\cdots ,N_t\). Here \(N_\varGamma\) is the total number of CF nodes. The first part of the functional (8) becomes
where \(\ell _i = \beta \,h\) is the characteristic length of the spatial domain \(S_i\) that depends on the mesh size h and \(\beta >0\). The second part of the functional \(J_i^n\) that weakly enforces the boundary conditions is either
for the boundary condition (2),
for the boundary condition (3) or
for the boundary condition (4).
The final part of \(J_i^n\) that weakly enforces the correction functions to match the Hermite solution is given by
We then have the following problem statement:
for \(i=0,\cdots ,N_\varGamma\) and \(n=1,\cdots ,N_t\). Here
As in 1-D, we use that the gradient of the functional \(J_i^n\) with respect to the coefficients of the polynomial approximations \({\varvec{H}}_{h,i}^n\) and \({\varvec{E}}_{h,i}^n\) vanishes at a minimum to obtain a linear system of equations to solve. The dimension of the minimization problems is independent of the mesh size and the time step size, and is \(3\,(k+1)^{3}\) in 2-D and \(6\,(k+1)^{4}\) in 3-D. However, the number of minimization problems \((N_\varGamma +1)\,N_t\) increases as the mesh size and the time step size diminish. Once the minimization problem is solved on a local patch, the electromagnetic fields and their space derivatives through order m are estimated at its CF node using \({\varvec{H}}^n_{h,i}\) and \({\varvec{E}}^n_{h,i}\).
Remark 3
The terms in \({\mathcal {G}}_i^n\) enforcing the residual of Maxwell’s equations (1) are scaled by \(\ell _i\) to guarantee that all the terms in \({\mathcal {G}}_i^n\) and \({\mathcal {B}}_i^n\) behave in a similar way as the mesh size diminishes [21]. Let us assume that the correction functions are polynomials of degree k that leads to an accuracy of \({\mathcal {O}}(\ell _i^{k+1})\) and that \(k=2\,m\). Using \({\varvec{H}}_i^n = {\varvec{H}} + {\mathcal {O}}(\ell _i^{k+1})\) and \({\varvec{E}}_i^n = {\varvec{E}} + {\mathcal {O}}(\ell _i^{k+1})\) in the functional \(J_i^n\), we have that the terms in \({\mathcal {G}}_i^n\) and \({\mathcal {B}}_i^n\) behave as \({\mathcal {O}}(\ell _i^{2\,k+5})\) while the term in \({\mathcal {H}}_i^n\) scales as \({\mathcal {O}}(\ell _i^{2\,k+6})\). Hence, the functional \(J_i^n\) is dominated by the boundary conditions and Maxwell’s equations as \(\ell _i\) diminishes.
Remark 4
The number of matrices to construct can be further reduced depending on the geometry of the domain and the physical properties of the material \(\mu\) and \(\epsilon\). As an example, let us consider a two-dimensional geometry discretized with a Cartesian mesh with \(\Delta x = \Delta y\). We also assume the boundary \(\varGamma\) of the domain to coincide only with primal nodes. For problems with constant coefficients on a rectangular domain, the number of matrices is reduced to eight because the spatial domain \(S_i\) of local patches on an edge translates along it. If reentrant corners are also considered, there is a maximum of twelve matrices to compute.
Remark 5
Assuming that the correction functions are polynomials of degree k that lead to an accuracy of \({\mathcal {O}}(\ell _i^{k+1})\), we then have \(k\geqslant 2\,m\) to preserve the accuracy of a \((2\,m+1)\) order Hermite-Taylor method. As was remarked for FDTD methods in [16], the CFM impacts the stability of the original method because of the Hermite-Taylor polynomials \({\varvec{H}}^*\) and \({\varvec{E}}^*\). Since a rigorous proof of the stability of the proposed method is out of reach for the moment, we investigate numerically its stability properties in Sect. 5.
5 Numerical Examples
In this section, we numerically investigate the stability of the proposed method and perform convergence studies in 1-D and 2-D.
5.1 Examples in 1-D
Let us seek approximate solutions to Maxwell’s equations
in the domain \(\varOmega = [x_\ell , x_r]\) and the time interval \(I=[t_0,t_f]\). The initial conditions are \(H(x,t_0) = a(x)\) and \(E(x,t_0) = b(x)\), and we focus on the boundary conditions \(E(x_\ell ,t) = g_\ell (t)\) and \(E(x_r,t) = g_r(t)\). Here a(x), b(x), \(g_\ell (t)\), and \(g_r(t)\) are known functions.
In this subsection, we use the Hermite-Taylor CFM with \(1\leqslant m \leqslant 5\). We set the degree of the correction functions to be \(2\,m\). The CFM should not therefore impact the convergence rate of the Hermite-Taylor method.
5.1.1 Stability
Let us first investigate the stability of the Hermite-Taylor CFM. We consider \(\varOmega = [0,1]\), and set \(\mu =1\) and \(\epsilon =1\). The stability condition of the Hermite-Taylor method depends only on the largest wave speed and is given here by \(\Delta t < h\), where h is the mesh size. As mentioned in Remark 5, the stability of the Hermite-Taylor method is impacted by the CFM because we use Hermite-Taylor polynomials \({\varvec{H}}^*\) and \({\varvec{E}}^*\) in the minimization problem (11). Although we do not have a rigorous proof of the stability of the Hermite-Taylor CFM, we provide numerical evidences of it by investigating the eigenvalues of the global matrix associated with the method.
Since Maxwell’s equations are a linear system of PDEs and assuming \(g_\ell = g_r = 0\), the proposed numerical method can be written as
where A is a square matrix of dimension \(2\,(N_x+1)\,(m+1)\) and \({\varvec{W}}_p^n\) is a vector containing all the degrees of freedom on the primal mesh at time \(t_n\). A stable method should have all the eigenvalues of A inside the unit circle of the complex plane. In the following, we compute numerically the eigenvalues of A and consider that the scheme is stable if the spectral radius \(\rho (A)\) of the matrix A is at most one with an error of \({\mathcal {O}}(10^{-10})\).
The left plot of Fig. 8 illustrates the absolute difference between one and the spectral radius of the matrix A, denoted \(\rho (A)\), as a function of the mesh size for a CFL constant of 0.9, \(c_H=1\) and various values of m. For \(m\leqslant 4\), we observe that the method is stable for a sufficiently small mesh size. In other words, the eigenvalues of A are moving inside the unit circle as the mesh is refined. This is expected since the terms in \({\mathcal {H}}_i^n\) impacting the stability scale as \({\mathcal {O}}(\ell _i^{2\,k+6})\) while the other terms in \(J_i^n\) scale as \({\mathcal {O}}(\ell _i^{2\,k+5})\). For \(m=5\), we do not observe a clear improvement as the mesh size diminishes for the considered CFL constant. This motivates us to diminish the CFL constant and the value of \(c_H\) to improve the stability of the Hermite-Taylor CFM.
The middle plot of Fig. 8 illustrates the absolute difference between one and \(\rho (A)\) as a function of the CFL constant for \(h=\tfrac{1}{80}\), \(c_H=1\) and various values of m. We clearly have a stable method as the CFL constant diminishes.
The right plot of Fig. 8 illustrates the absolute difference between one and the spectral radius of the matrix A as a function of \(c_H\) for a CFL constant of 0.9, \(h=\tfrac{1}{80}\) and various values of m. For all m, a smaller value of the penalization coefficient \(c_H\) helps to obtain a stable method.
To give further evidences of that, Fig. 9 illustrates the absolute difference between one and \(\rho (A)\) as a function of the CFL constant for \(m=5\), \(h\in \big \{\tfrac{1}{20},\tfrac{1}{100},\tfrac{1}{250},\tfrac{1}{500},\tfrac{1}{750},\tfrac{1}{1\,000}\big \}\) and \(c_H \in \big \{1,\tfrac{1}{10},\tfrac{1}{100}\big \}\). A smaller penalization coefficient \(c_H\) does not improve the stability of the proposed method for coarser meshes. In these cases, we therefore need to lower the CFL constant.
Based on these results, the stability of the Hermite-Taylor CFM improves by reducing the CFL constant and the value of the penalization coefficient \(c_H\). Moreover, the stability of this method improves as the mesh size diminishes, which suggests that larger CFL constants could be used for finer meshes.
5.1.2 Condition Number of CFM Matrices
Let us now investigate the impact of h, \(c_H\), and the CFL constant on the condition number of the matrices \(M_i\) coming from the minimization procedure used in the CFM. Figure 10 illustrates the maximum condition number of these matrices as a function of the mesh size, the CFL constant and the penalization parameter \(c_H\) for various values of m. We observe that the condition number increases as the mesh size diminishes and, more precisely, scales as \(\tfrac{1}{h}\) for all different settings. We also notice that the condition number first diminishes as the CFL constant decreases, then appears to stabilize at a constant. Finally, the condition number increases as \(c_H\) diminishes and scales as \(\frac{1}{c_H}\). Hence, an arbitrary small value of \(c_H\) cannot be taken to avoid poorly conditioned matrices coming from the CFM. It is then preferable to diminish the CFL constant to obtain a stable method.
5.1.3 Accuracy
In the following, we use \(c_H=1\) and \(k=2\,m\) for all settings. We set the CFL constant at 0.9 for \(m=1\) and \(m=2\), 0.5 for \(m=3\) and \(m=4\), and 0.25 for \(m=5\). The computed spectral radius is maximum one up to an error of \(10^{-12}\) for all considered mesh sizes.
Let us now verify the convergence order of the proposed method. We consider a domain \(\varOmega = [\tfrac{1}{3},\tfrac{4}{3}]\), a time interval \(I = [0,1]\), \(\mu =1\), and \(\epsilon =1\). We set the initial and boundary data so find that the solution to the problem is
Figure 11 shows how the errors follow the expected \((2\,m+1)\) rates of convergence.
5.2 Examples in 2-D
Let us consider the transverse magnetic (\(\hbox {TM}_z\)) mode. We seek approximate solutions to Maxwell’s equations
in the domain \(\varOmega \subset {\mathbb {R}}^2\) and the time interval I with initial conditions for \(H_x\), \(H_y\), and \(E_z\). The boundary conditions are either
or
We consider two geometries of the domain, that is a square \(\varOmega = [\tfrac{1}{3},\tfrac{4}{3}]\times [\tfrac{1}{6},\tfrac{7}{6}]\) and one with reentrant corners, which is named cross domain and is illustrated in Fig. 12.
We set \(k=2\,m\) and \(c_H=1\). The CFL constant is 0.9 for \(m=1\), 0.5 for \(m=2\), and 0.25 for \(m=3\). In the following, we numerically investigate the stability of the Hermite-Taylor CFM and perform convergence studies for both geometries.
5.2.1 Stability
Since the total number of degrees of freedom on the primal mesh in 2-D, given by \(3\,(N_x+1)\,(N_y+1)\,(m+1)^2\) where \(N_x\) and \(N_y\) are the number of cells in respectively the x and y directions, is very large, we cannot compute the spectral radius of the matrix A for small mesh sizes, as in 1-D. To provide numerical evidences of the stability of the proposed method, we therefore compute the maximum norm of the electromagnetic fields over 10 000 time steps using the trivial solution, but with initial data, that is the electromagnetic fields and their derivatives through order m, to be random numbers in \(]-10\,\epsilon _M,10\,\epsilon _M[\). Here \(\epsilon _M\) is the machine precision. We set \(\mu =1\) and \(\epsilon =1\). Figure 13 illustrates the evolution of the maximum norm of the electromagnetic fields using different values of m and boundary conditions for the cross domain and different mesh sizes.
These results suggest that the method is stable.
5.2.2 Accuracy
For the convergence studies, we consider the time interval \(I=[0,1]\), and set \(\mu =1\) and \(\epsilon = 1\). The initial conditions and boundary conditions are chosen in such a way that the solution is given by
with \(\omega = 20\). Figure 14 illustrates convergence plots for different values of m, boundary conditions and geometries in 2-D. As expected, we observe a \((2\,m+1)\) rate of convergence in the maximum norm for the Hermite-Taylor CFM.
Figure 15 illustrates convergence plots for the divergence-free constraint on the magnetic field. We observe a \(2\,m\) rate of convergence as expected.
Let us now consider an initial Gaussian pulse on the electric field and PEC boundary conditions, that is \(E_z=0\), on all the boundary of the domain. The square domain \(\varOmega = [0,1]\times [0,1]\) and the cross domain are considered with the time domain \(I=[0,2]\). The initial conditions are given by \(H_x=H_y=0\) and
Here \(r^2 = (x-0.5)^2+(y-0.5)^2\) and \(\sigma = 0.035\). We set \(\mu =1\) and \(\epsilon =1\).
To our knowledge, there is no known analytic solution for this problem. Hence, we perform self-convergence studies. The reference solution \({\varvec{U}}^* = [H_x^*,H_y^*,E_z^*]^\text{T}\) is computed using the seventh-order Hermite-Taylor CFM with \(h=\frac{1}{800}\). We use meshes with \(h=\big \{\frac{1}{25}, \frac{1}{50}, \frac{1}{100}, \frac{1}{200}, \frac{1}{400}\big \}\), so all nodes used in the coarser meshes are also part of the reference solution mesh.
Figure 16 illustrates the self-convergence plots for the square domain. We obtain the expected \((2\,m+1)\) order of convergence for the electromagnetic fields, while a \(2\,m\) order of convergence is observed for the magnetic field divergence. The reference electromagnetic fields at the final time are shown in Fig. 17.
Figure 18 illustrates the self-convergence plots for the cross domain. The numerical solution does not convergence in the maximum norm. These results are explained by the reentrant corners in the cross domain. In this setting, the solution has a singular part that hinders the performance of the numerical method [3]. The reference solution of the cross domain is shown in Fig. 19, where strong variations in the magnetic field are observed at the reentrant corners.
As a final numerical example, we consider a variable coefficients problem. In this situation, we use a manufactured solution given by
with \(\mu (x,y) = \sin (5\,\uppi \,x\,y)+2\) and \(\epsilon (x,y) = 2\,\text{e}^{x\,y}\). Note that source terms were considered in Maxwell’s equations (13). We consider the cross domain and the time interval \(I=[0,1]\). We enforce impedance boundary condition (16). Figure 20 illustrates the convergence plots for the electromagnetic fields and the divergence of the magnetic field for different values of m.
For \(m=1\), we observe a lower rate of convergence than expected. Based on previous numerical examples and the convergence of the magnetic field divergence, finer meshes should exhibit the expected order of convergence. As for \(m=2\), we obtain the expected convergence order for the electromagnetic fields and the divergence-free constraint on the magnetic field. Finally, the error on the electromagnetic fields with \(m=3\) is already very low for coarser meshes, making it hard to observe the seventh-order convergence of the method, while a clear sixth-order convergence is observed for the divergence of the magnetic field.
6 Conclusion
In this work, we have proposed a new method to handle boundary conditions for the Hermite-Taylor method for first order hyperbolic problems based on the CFM. Our method relies on a functional to be minimized that is a square measure of the residual of Maxwell’s equations, the boundary conditions, and the polynomial approximations of the electromagnetic fields coming from the Hermite-Taylor method. Once the minimization problems are solved, the information needed on the boundary, that is both electromagnetic fields and their space derivatives through order m, are computed. Numerical examples suggest that the Hermite-Taylor CFM is stable under a loose CFL constant and the value of the penalization coefficient. Convergence rates of the Hermite-Taylor CFM have been verified in 1-D and 2-D with different boundary conditions and geometries of the domain. Future work will focus on embedded boundary and interface problems.
References
Abraham, D.S., Marques, A.N., Nave, J.C.: A correction function method for the wave equation with interface jump conditions. J. Comput. Phys. 353, 281–299 (2018)
Assous, F., Ciarlet, P., Labrunie, S.: Mathematical Foundations of Computational Electromagnetism. Springer International Publishing, New York (2018)
Assous, F., Ciarlet, P., Segré, J.: Numerical solution to time-dependent Maxwell equations in two-dimensional singular domains: the singular complement method. J. Comput. Phys. 161, 218–249 (2000)
Balsara, D.S., Käppeli, R.: von Neumann stability analysis of globally constraint-preserving DGTD and PNPM schemes for the Maxwell equations using multidimensional Riemann solvers. J. Comput. Phys. 376, 1108–1137 (2019)
Beznosov, O., Appelö, D.: Hermite-discontinuous Galerkin overset grid methods for the scalar wave equation. Commun. Appl. Math. Comput. 3, 391–418 (2021)
Chen, W., Li, X., Liang, D.: Energey-conserved splitting finite-difference time-domain methods for Maxwell’s equations in three dimensions. SIAM J. Numer. Anal. 48, 1530–1554 (2010)
Chen, X., Appelö, D., Hagstrom, T.: A hybrid Hermite-discontinuous Galerkin method for hyperbolic systems with application to Maxwell’s equations. J. Comput. Phys. 257, 501–520 (2014)
Cockburn, B., Shu, C.-W.: Runge-Kutta discontinuous Galerkin methods for convection-dominated problems. J. Sci. Comput. 16(3), 173–261 (2001)
Fan, G.X., Liu, Q.H., Hesthaven, J.S.: Multidomain pseudospectral time-domain simulations of scattering by objects buried in lossy media. IEEE Trans. Geosci. Remote Sens. 40, 1366–1373 (2002)
Galagusz, R., Shirokoff, D., Nave, J.C.: A Fourier penalty method for solving the time-dependent Maxwell’s equations in domains with curved boundaries. J. Comput. Phys. 306, 167–198 (2016)
Goodrich, J., Hagstrom, T., Lorenz, J.: Hermite methods for hyperbolic initial-boundary value problems. Math. Comp. 75, 595–630 (2005)
Hagstrom, T., Appelö, D.: Solving PDEs with Hermite interpolation. In: Spectral and High Order Methods for Partial Differential Equations ICOSAHOM 2014: Selected papers from the ICOSAHOM Conference, June 23–27, 2014, Salt Lake City, Utah, USA, pp. 31–49. Springer (2015)
Hazra, A., Chandrashekar, P., Balsara, D.S.: Globally constraint-preserving FR/DG scheme for Maxwell’s equations at all orders. J. Comput. Phys. 394, 298–328 (2019)
Hesthaven, J.S., Warburton, T.: Nodal high-order methods on unstructured grids: I. Time-domain solution of Maxwell’s equations. J. Comput. Phys. 181, 186–221 (2002)
Law, Y.M., Marques, A.N., Nave, J.C.: Treatment of complex interfaces for Maxwell’s equations with continuous coefficients using the correction function method. J. Sci. Comput. 82(3), 56 (2020)
Law, Y.M., Nave, J.C.: FDTD schemes for Maxwell’s equations with embedded perfect electric conductors based on the correction function method. J. Sci. Comput. 88(3), 72 (2021)
Law, Y.M., Nave, J.C.: High-order FDTD schemes for Maxwell’s interface problems with discontinuous coefficients and complex interfaces based on the correction function method. J. Sci. Comput. 91(1), 26 (2022)
Liang, D., Yuan, Q.: The spatial fourth-order energy-conserved S-FDTD scheme for Maxwell’s equations. J. Comput. Phys. 243, 344–364 (2013)
Lindell, I., Sihvola, A.: Boundary Conditions in Electromagnetics. John Wiley & Sons, New Jersey (2019)
Loya, A.A., Appelö, D., Henshaw, W.D.: Hermite methods for the wave equation: compatibility and interface conditions (2022) (in preparation)
Marques, A.N., Nave, J.C., Rosales, R.R.: A correction function method for Poisson problems with interface jump conditions. J. Comput. Phys. 230, 7567–7597 (2011)
Marques, A.N., Nave, J.C., Rosales, R.R.: High order solution of Poisson problems with piecewise constant coefficients and interface jumps. J. Comput. Phys. 335, 497–515 (2017)
Marques, A.N., Nave, J.C., Rosales, R.R.: Imposing jump conditions on nonconforming interfaces for the correction function method: a least squares approach. J. Comput. Phys. 397, 108869 (2019)
Namiki, T.: A new FDTD algorithm based on alternating-direction implicit method. IEEE Trans. Microw. Theory Technol. 47, 2003–2007 (1999)
Tan, E.L., Heh, D.Y.: ADI-FDTD method with fourth order accuracy in time. IEEE Microw. Wirel. Compon. Lett. 18, 296–298 (1999)
Xie, Z., Chan, C.H., Zhang, B.: An explicit fourth-order staggered finite-difference time-domain method for Maxwell’s equations. J. Comput. Appl. Math. 147, 75–98 (2002)
Yang, B., Gottlieb, D., Hesthaven, J.S.: Spectral simulations of electromagnetic wave scattering. J. Comput. Phys. 134, 216–230 (1997)
Yee, K.S.: Numerical solution of initial boundary value problems involving Maxwell’s equations in isotropic media. IEEE Trans. Antennas Propag. 14(3), 302–307 (1966)
Zheng, F., Chen, Z., Zhang, J.: A finite-difference time-domain method without the Courant stability conditions. IEEE Microw. Wirel. Compon. Lett. 9, 441–443 (1999)
Funding
This work was supported in part by the Grant NSF-2208164 and 2210286. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Law, YM., Appelö, D. The Hermite-Taylor Correction Function Method for Maxwell’s Equations. Commun. Appl. Math. Comput. (2023). https://doi.org/10.1007/s42967-023-00287-5
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s42967-023-00287-5