Smart-Mesh Strategy in DGTD Method for Partially Filled Cavity with Uncertain Interface Parameters

To achieve high quality localization of nodes, a smart-mesh strategy is employed in the discontinuous Galerkin time-domain (DGTD) simulation. The strategy is able to adjust adaptively the nodes defined on the unstructured triangular element in real-time simulation, thus an arbitrary or uncertain shaped object can be modeled accurately. The benefits of smart-mesh strategy are demonstrated for a partially dielectric filled cavity with microscale random material height and uncertain rough interface. Numerical experiments show that the smart-mesh approach can capture fine structural information and achieve more effective positions to match variable shapes.


Introduction
A partially dielectric-filled cavity is a special type of resonator, consisting of a metallic enclosure that confines electric and magnetic energy therein. It is widely used in oscillators, frequency-selective limiters, filtering applications, resonator antenna elements, etc. [1]- [4]. When lack of detailed knowledge about some sensitive parameters of the cavity studied, e.g., geometrical shapes, physical dimensions, or surface roughness, there exists inevitably uncertainty in analyzing and characterizing the electromagnetic (EM) properties of this type of cavity. These uncertainties lead to a very challenging issue for computational electromagnetic (CEM) simulations. Many researchers have developed various ways to handle with these issues. For example, the method of moments (MoM) which relies on a first order truncated Taylor series expansions to obtain the estimates of the mean and uncertainty [5]. But the MoM has potential ill-condition matrices, resulting in a progressive degradation of accuracy of solutions as the size of the matrix increases. And its system matrix is full and dense, the computation efficiency of this approach is not very high [6]. Using the finite difference time domain (FDTD) method variables in the physical geometry or dimensions are modeled by an uncertainty in the material properties [7]. Reference [8] combines the FDTD and the stochastic Galerkin method in processing bio-electromagnetic uncertainty analysis. However, the staggered Cartesian grid of the FDTD can cause serious stair-casing errors [9]. Chauvière et al. demonstrate the randomness in shape or dimension can be modeled by the Jacobian of the transformation [10]. One of the major limitation in this method is the uncertainty must be described by a proper formula with some associated probability density function (PDF).
The necessity of geometry modeling and spatial meshes with good quality is well known as a key first step for CEM methods. While dealing with the EM problems of arbitrary or uncertain complex objects, geometry modeling and grid generation become more intractable. Especially, for an uncertain object incorporating anomalous small bumpiness or nanoscale pits on its surface, which may be introduced by a small fabrication tolerance in manufacturing processes [11], [12]. One general way is to generate different meshes for each of different objects. Obviously, it is a too waste of computational resources to generate repeatedly grid for every object sample. Because the uncertainty in the output of a computational scenario should be similar despite the CEM technique used [7], it may be possible to use a computationally efficient DGTD approach, along with a Monte Carlo method (MCM) with a good degree of accuracy to provide an accurate estimate of the output uncertainty with relatively little computational expense. Furthermore, since random meshes can't be obtained in an automatic and efficient way for a complex object with arbitrary shapes or uncertain parameters, a much smarter and more efficient uncertainty modeling is necessary.
In this paper, a smart-mesh strategy is proposed to apply to the DGTD simulation, which is able to adaptively adjust location of single node and multiple nodes (which defined on unstructured triangular elements) in a desired region to match arbitrary complex geometries with uncertainties in real-time simulation. For the partially filled cavity with microscale random material height and uncertain microscale rough interface, the core of the smart-mesh method is to keep the same mesh, e.g., the mean mesh, and to move randomly one side of the triangles sitting on the material interface. The advantage of the procedure lies in the fact that one need only generate a single mesh, the number of nodes and elements remains the same, and only the positions of few selected nodes are modified automatically to build a required interface. Moreover, the smartmesh procedure is integrated more easily into the DGTD algorithm and it mainly involves the generation of an initial coarse mesh, the adjustment of nodes according to the desired pattern, and the repetition of the process to meet some accuracy requirements. Following the principle of minimization of interpolation errors, local optimal grids can be captured for arbitrary observation points and uncertain material interfaces.

DGTD Approximation and Uncertainty Analysis
Consider two-dimensional (2D) TMz-polarized timedependent Maxwell's equations in normalized form, where H x , H y , and E z denote the components of magnetic and electric fields, ε r and μ r are the relative local permittivity and permeability, respectively, of the assumed isotropic, linear, and time-invariant medium in which the electromagnetic fields propagate [13].
The DGTD method offers a number of advantages, such as high-order accuracy in spatial and temporal dimension, geometrical flexibility through fully unstructured grids and higher computational efficiency [13]- [17]. In our work, it is employed to solve the coupled equations (1) and find approximations for H x , H y , and E z . Supposing a general computational domain Ω is decomposed into K nonoverlapping triangles in 2D space, x = (x,y). Given an arbitrary element D k of the tessellation, the local unknown solutions can be well approximated as where ℓ i k (x i k ) is the two dimensional multivariate Lagrange interpolation polynomial, N p = (N + 1)(N + 2)/2 stands for the minimum number of nodal points, and N signifies the maximum order of the polynomial [14]. On account of the fact that correctly choosing interpolation nodes can bring about good numerical behaviors, this work employs the Legendre-Gauss-Lobatto (LGL) interpolating nodes as x i , [14], [21].
The discrete unknown solutions of Maxwell's equations are required to satisfy In (3), n̂ denotes the local outward pointing normal vector.
] stand for the numerical fluxes, whose expression can be found in [14]. Using the Riemann conditions and for stability reasons, we use a pure upwind flux [14] which could strongly damp unphysical modes.
After discretization of the operators and evaluation of the integrals, the fully explicit semi-discrete scheme can be obtained, The matrices J, D, and M represent the transformation Jacobian, differentiation matrix and mass-integration matrix, respectively (see [14] for details). The material coefficient Z and Y are given as , the minus and plus signs represent the 'left' and 'right' elements which share a common interface. Temporal integration of the semi-discrete formulation given in (4) is done by employing a 4 th -order low-storage explicit Runge-Kutta (LSERK) solver.
Lack of detailed knowledge about system parameters, e.g., geometry shapes or boundary conditions, leads to the introduction of uncertainty in the output of the DGTD simulations. Assume there are random events θ with some associated PDF in the input parameters, the field solutions can, therefore, be represented as H x (x, y, t, θ), H y (x, y, t, θ), and E z (x, y, t, θ).
Monte Carlo method (MCM) is a widely used to solve stochastic differential equations and has been demonstrated to provide accurate results for EM issues [18]. To deter-mine the uncertainty in a DGTD simulation via the MCM, the uncertain input parameters associated with PDF must first be sampled many times. To estimate the statistical properties of random parameters, multiple deterministic DGTD simulations are required. One DGTD simulation is performed for each sample and the outputs formed from each simulation are combined to form the output statistics of interest, e.g., mean and standard deviation. Although its convergence rate is relatively slow, it is generally accepted as a benchmark uncertainty analysis (UA) method with a good degree of accuracy, which can test the computationally efficient of other UA methods. In addition, the MCM does not rely on any assumption on the relationship between the uncertain inputs and the output of the DGTD simulations. It is independent of the number of random variables used to characterize the random inputs [19].
The first few resonant frequencies of the partially loaded cavity are referred to as an output measure of interest in our work. To compute the resonant frequencies, we solve the time-domain DG equations for each sample, and collect one time-trace at an observation point in the cavity. The spectrum of the time-series yields the resonant frequencies. Once the numerical solutions of (4) are obtained, the statistical moments (mean and variance) of the random unknown solutions can also be evaluated as where f m signifies the resonant frequency resulted from the m th stochastic input parameters. These input parameters are able to be generated by a random number generator. M is the number of samples of the stochastic input parameters. E[f] and Var[f] are the expectation and the variance of the random variable f, respectively. These statistical moments are essential when determining whether the output results are acceptable or useful.

Accounting for Smart-Mesh Strategy
For arbitrary complex objects or uncertain computational domains, accurate modeling and flexible division of space are crucial. For a DGTD simulation, unstructured mesh always suffers from variation in geometric joints or grid nodes. Using the smart-mesh technique developed in this paper, the grid size and the nodal position can be adjusted adaptively in order to match the variational physical objects with uncertainties. Our smart-mesh strategy is composed of five steps as follows: Step 1. Generation of an original mesh For an arbitrary computational domain, its original grids can be generated by any mesh generating software. In our work, the arbitrary computational domain is covered fully by body-conforming triangular elements. Step 2. Smart mesh of single node In the DGTD technique, the unknown fields are defined on interpolation nodes for, as sensitive parameters vary uncertainly, the required nodal locations become indefinite in the domain. The original mesh may turn into a nonconforming grid which could lead to non-coincide position of a desired point. This scenario is depicted in Fig. 1(a). The desired point P (green star) does not lie on either of the nodes of two different triangular meshes. Thus the effective field values would not be captured. Traditionally, it can be achieved by iteratively refining the mesh till the error introduced is minimized [22]. The refinement of the unstructured triangles can be done by employing edge bisection [23], point insertion, or by use of templates [24], [25]. These methods suffer from various problems like handling nonconformity, treatment of surrounding elements, generation of redundant elements, and over-refinement which leads to strict the Courant-Friedrichs-Lewy (CFL) condition in time-domain simulations [22].
Using the proposed smart-mesh technique, the nodes (red dot and black dot) which lie in the proximity of the desired point are identified by using Euclidian distance formula, given in (6). Then, the position of the identified nodes, which is the closest to the desired point, is smart to match the exact coordinates of the desired point, as shown in Fig. 1 where Q k is the k th number of node in the n-dimensional Euclidian space and d k is the distance between Q k and the desired point P. The node with the shortest distance d k is marked out.
Step 3. Smart mesh of node to node To model an uncertain material interface, such as, to split the unstructured triangular mesh with respect to some reference line. The reference line is defined by two points, P 1 (x 1 , y 1 ) and P 2 (x 2 , y 2 ), in the 2D Cartesian coordinate system, as shown in Fig. 2. If the two points do not exist as nodes in the mesh, they are constructed by employing the methodology presented in Step 2.
First, select P 1 as the current node and find all the nodes which are connected with P 1 , e.g., the magenta dot N 1 , N 2 , N 3 , and N 4 . Next, calculate the relative distance of all the nodes to the end point P 2 , that is, the distance of point to point, d 1 , d 2 , d 3 , and d 4 , by using (6). Last, shortlist two nodes with the smallest value of a point-to-point distance are picked up, N 2 and N 3 .
Step 4. Smart mesh of node to line After Step 3, we get two candidate nodes. Next, it needs to decide which node should be suited to modify the mesh based on some criterion (guarantee a good accuracy without increasing the computational cost).
Calculate the perpendicular distance from the shortlisted nodes to the reference line by using (7), where (x k , y k ) are the coordinates of the k th node in the 2D mesh.
Finally, the smallest perpendicular distance is singled out to determine the most suited node. Thereby, the selected node is adjusted adaptively to match the computational model. If this node belongs to an element whose two nodes have already been modified, then skip this node and adjust the other node. Otherwise, three nodes of the same element will become collinear giving rise to the silver element with a radius equal to zero. To understand the modification of nodes, a graphical sketch of the whole process is given in Fig. 2.
Step 5. Update mesh For the given ensample shown in Fig. 2, the node N 3 is selected to substitute the node P 1 of the reference line as the current point. Thus, N 3 and P 2 compose an updated reference line. Repeat Step 3 and Step 5 until the distance of the reference line becomes equal to zero. Consequently, the unstructured triangular mesh can be split into a different region by adjusting adaptively nodal position and grid size that fall in the vicinity of the reference line.
To demonstrate the smart-mesh procedure discussed above, a simple test case is considered firstly, i.e., a straight line with a fixed height is built by recurrently executing smart-mesh strategy. In this trial, the 2D unstructured triangular mesh is made from 32 nodes and constitutes 46 elements. The red squares highlight the nodes whose position is used to change. The green line, black dotted lines and the cyan circles show the modification of the mesh. The advantage of the procedure is that the number of nodes and elements remains the same, and only the positions of few selected nodes are changed automatically to build a required interface, as shown in Fig. 3.

Numerical Experiments
With the terahertz electromagnetic wave detection technology developing very rapidly, its application is also becoming wider and wider. Using terahertz non-destructive testing technique, microscale bumpiness or nanoscale pits on a material surface can be detected. To validate the per-  formance of the smart-mesh procedure described above, we consider a metallic partially dielectric-filled cavity with microscale defective material interface, i.e., random microscale material height h and uncertain local microscale rough interface. Figure 4 shows a setup of the partially dielectric-filled cavity with the material interface perpendicular to the y axis, assumed to be defined by (x, y) = [1, 1] 2 . The region I stands for vacuum and region II is dielectric, which are designated by subscripts 0 and d, respectively. For simplicity, the materials are assumed as nonmagnetic. The computational domain is discretized by triangular elements, each supporting a 4 th -order polynomial approximation. The initial condition is a simple oscillatory solution as
To compute the resonant frequencies which are output measure of interest, we solve the 2D time-domain Maxwell's equations in the TMz-polarization and collect one time-trace at the desired observation point in this type of cavity. The spectrum of the time-series yields the resonant frequencies as strong peaks which are found by using Fast Fourier Transform (FFT).
Theoretically, there are an infinite number of resonant modes for the longitudinal section electric (LSE) modes, and the desired mode is usually selected based on the application requirements [1], [4]. The aim of the experiment is to compute the first few resonance frequencies of the partially filled cavity. For the case considered, the resonant frequencies are given as where a = 2 and b = 2 are the normalized dimensions of the cavity. The analytical formula of resonant frequencies (9) is a transcendental equation. Transcendental equations often do not have closed-form solution, which can be solved using numerical, analytical, or graphical methods. The graphical method is to set each side of a single variable transcendental equation equal to a dependent variable and plot the two graphs, using their intersecting points to find solutions. In our work, (9) is suited to be resolved by the graphical method. The intersection of the two curves of the right function and the left function of (9), is the root of the equation, as shown in Fig. 5.

Uncertain Parameter in Material Height
This section focuses on the cavity where the height of the material interface is uncertain, such that both domains are of variable width. These uncertain parameters may be caused by fabrication tolerances. Suppose the material interface moves only in a small region, thus the adjustment is made only in the local domain by using the smart-mesh method. The height of the material interface is defined as Fig. 4. One sample of a geometry for the partially dielectricfilled cavity with defective material interface, i.e., random height h or uncertain rough interface.
where θ is a Gaussian variable with zero mean and unit variance. Further assume that the interface roughness of the material is zero, that is, the material interface is smooth. And all other parameters are fixed, i.e., a = 2, b = 2, μ 0 = μ d = 1, ε 0 = 1, and ε d = 2.56. It should be noted that using the smart-mesh procedure one just needs to generate a single mesh for the cavity with random material height.
We compute the mean and variance of the resonant frequencies of the partially loaded cavity. The analytical results are obtained by performing up to 1200 samples (which is the sample size of variable θ) on the analytical Analytical formula  formula of the resonance frequencies in (9). Table 1 and Table 2 indicate statistic of the resonance frequencies calculated by the DGTD method and sampling of the analysis solution. As expected a good agreement between the smartmesh DGTD approach and the exact method is seen. Figure 6 shows the error bar of resonant frequency for LSE y mode. In contrast of the smart-mesh DGTD and analysis method's results, it demonstrates the accuracy of the smartmesh DGTD approach. Moreover, Figure 6 illustrates the higher order modes of the partially loaded cavity are affected more obviously by the uncertainty in the material height.

Uncertain Local Rough Interface
In this section, we assume an uncertainty in the material interface in Region II. These uncertainties may be induced by fabrication tolerances. Firstly, we set the material interface is smooth, i.e., h = 0. Then, using any mesh generator, a coarse grid is generated for our computational set, as shown in Fig. 7. In this trial, the 2D unstructured triangular mesh is made from 143 nodes and constitutes 258 elements. The smooth material interface is modelled by some line segments from the finite element mesh. Those line segments are represented by the points of the coordinates x. Further assume that the vertex x can be moved randomly by a quantity  to take a new position x = x + .
For the partially filled cavity with uncertain microscale rough interface, it should be noted that when the vertexes defining the smooth interface are moved randomly, For the sake of simplicity, a part of the rough interface is assumed to be uncertain, i.e., the region of x  0.25. Other parameters are fixed as a = 2, b = 2, h = b/4,  0 = 1,  d = 2.56, and  0 =  d = 1.
Traditionally, for a problem with the microscale rough interface, a new mesh is usually required for each considered target. To obtain the accuracy statistical properties of uncertain rough interface, a larger number of samples for the similar computational set are required. For a DGTD simulation, each one studied sample needs one mesh. Obviously, it is a too waste of computational resources to generate repeatedly grid for the similar target. Using our smart-mesh procedure, one just needs to generate a coarse mesh only once for a special computational set, for instance, h = 0. Only the positions of few selected nodes are changed automatically, the number of nodes and elements remains same. Figure 8 shows the error bar of resonant frequency for LSE y mode with different rough material interface. In contrast of the normal and uniform random variable, it demonstrates the greater Std leads to the worse resonant frequency. Moreover, it illustrates the first three modes are affected more obviously by the uncertain rough material interface.

Conclusions
In order to flexibly and efficiently model a complex object with arbitrary shapes or uncertain parameters, a smart-mesh strategy integrated into the nodal-based DGTD method is proposed in this paper. Taking advantages of the smallest Euclidean distance to adjust adaptively the locations of nodes defined on unstructured triangular elements, one can achieve a smart geometric modeling of arbitrary complex shapes with microscale uncertainties in real-time DGTD simulations. The benefit in this procedure is that the number of nodes and elements remains same, and only the positions of few selected nodes are changed automatically to build a required interface. The test cases with both microscale uncertain material height and random rough interface demonstrated that the proposed strategy can obtain a good numerical accuracy compared with the analytical method. Moreover, they also show that the uncertainties in material interface affect the resonant frequency mostly in some first modes. With further development, the smart-grid strategy is expected to provide a powerful tool for solving multi-dimensional complex EM problems involving random behaviors.