scieee AI-readable full text Open interactive document viewer

Time-harmonic electromagnetics with exact controllability and discrete exterior calculus

Mönkölä, Sanna,Räbinä, Jukka,Rossi, Tuomo

Full text

This is a self-archived version of an original article. This version may differ from the original in pagination and typographic details. Author(s): Title: Year: Version: Copyright: Rights: Rights url: Please cite the original version: CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ Time-harmonic electromagnetics with exact controllability and discrete exterior calculus © The Authors 2023 Published version Mönkölä, Sanna; Räbinä, Jukka; Rossi, Tuomo Mönkölä, S., Räbinä, J., & Rossi, T. (2023). Time-harmonic electromagnetics with exact controllability and discrete exterior calculus. Comptes Rendus. Mecanique, Online first . https://doi.org/10.5802/crmeca.234 2023 Comptes Rendus Mécanique Sanna Mönkölä, Jukka Räbinä and Tuomo Rossi Time-harmonic electromagnetics with exact controllability and discrete exterior calculus Published online: 13 December 2023 https://doi.org/10.5802/crmeca.234 Part of Special Issue: The scientific legacy of Roland Glowinski Guest editors: Gregoire Allaire (CMAP, Ecole Polytechnique, Institut Polytechnique de Paris, Palaiseau, France), Jean-Michel Coron (Laboratoire Jacques-Louis Lions, Sorbonne Université) and Vivette Girault (Laboratoire Jacques-Louis Lions, Sorbonne Université) This article is licensed under the Creative Commons Attribution 4.0International License. http://creativecommons.org/licenses/by/4.0/ Les Comptes Rendus. Mécanique sont membres du Centre Mersenne pour l’édition scientifique ouverte www.centre-mersenne.org e-ISSN : 1873-7234 Comptes Rendus Mécanique Published online: 13 December 2023 https://doi.org/10.5802/crmeca.234 The scientific legacy of Roland Glowinski / L’héritage scientifique de Roland Glowinski Time-harmonic electromagnetics with exact controllability and discrete exterior calculus Électromagnétique harmonique temporelle avec contrôlabilité exacte et calcul extérieur discret Sanna Mönkölä ,a, Jukka Räbinä aand Tuomo Rossi ,∗,a aFaculty of Information Technology, University of Jyväskylä, P.O. Box 35, FI-40014 University of Jyväskylä, Finland E-mail: tuomo.j[email protected] (T. Rossi) Abstract. In this paper, we apply the exact controllability concept for time-harmonic electromagnetic scattering. The problem is presented in terms of the differential forms, and the discrete exterior calculus is utilized for spatial discretization. Accordingly, the physical properties of the problem are maintained. Despite we consider time-harmonic problems, we concentrate on transient wave equations treated by the exact controllability approach. Essentially, we use a controlled variation of the asymptotic approach with periodic constraints, in which the time-dependent equation is simulated in time, until the time-harmonic solution is reached. Résumé. Dans cet article, nous appliquons le concept de contrôlabilité exacte à la dispersion électromagnétique temporelle. Le problème est présenté en termes de formes différentielles et le calcul extérieur discret est utilisé pour la discrétisation spatiale. En conséquence, les propriétés physiques du problème sont maintenues. Bien que nous considérions des problèmes harmoniques temporels, nous nous concentrons sur les équations d’ondes transitoires traitées par l’approche de contrôlabilité exacte. Essentiellement, nous utilisons une variation contrôlée de l’approche asymptotique avec des contraintes périodiques, dans laquelle l’équation dépendant du temps est simulée dans le temps, jusqu’à ce que la solution harmonique temporelle soit atteinte. Keywords. Maxwell equations, Electromagnetic scattering, Differential forms, Discrete exterior calculus, Exact controllability. Mots-clés. Équations de Maxwell, Diffusion électromagnétique, Formes différentielles, Calcul extérieur discret, Contrôlabilité exacte. Funding. Academy of Finland (Grant agreement nos. 259925 and 260076). Published online: 13 December 2023 ∗Corresponding author. ISSN (electronic) : 1873-7234 https://comptes-rendus.academie-sciences.fr/mecanique/ 2Sanna Mönkölä et al. 1. Introduction Wave equations are important for modeling acoustic, elastic, electromagnetic, and quantum mechanical systems in different fields of science, engineering, and technology. There has recently been growing interest in differential form -based approaches for considering wave equations (see, e.g., [1–3]). There are several reasons why the framework is a good alternative for the traditional vector field presentation. The metric-free nature of the differential forms allows the construction of differential operators that are independent of the coordinate system [4]. Further, the discrete spaces and exact differential operators can be constructed to mimic their continuous counterparts (see, e.g., [5, 6]). This property also implies that certain properties of the system, such as, energy, are conserved, provided that the scheme is stable. In this study, we consider time-harmonic electromagnetic waves. We present the Maxwell equations as a first-order system in terms of the differential forms (see, e.g., [7]) for electromagnetic scattering problems. That is, instead of the vector presentation E=(E1,E2,E3) for the electric field, we present a 1-form e E=E1dx1+E2dx2+E3dx3, where dis the exterior derivative. Further, the electric flux density is considered, instead of the vector D=(D1,D2,D3), as a 2-form e D=D1dx2∧dx3+D2dx3∧dx1+D3dx1∧dx2, where ∧is a generalization of the cross product, known as the wedge product or exterior product. We also present a 1-form e Hfor the magnetic field and a 2-form e Bfor the magnetic flux density. For the spatial discretization, the discrete counterparts of the variables presented as differential forms are appointed at geometric objects such as points, lines, surfaces, and volumes. We apply, in particular, the discrete exterior calculus (DEC) following the groundwork presented by Marsden and his group [8] and pioneered for electromagnetics simulations by Bossavit and Kettunen [9]. This construction provides, e.g., the conservation of energy, the elimination of nonphysical modes, and exact differential operators at the discrete level [10]. The other related approaches include the finite integration technique (FIT), the discrete geometric approach, and mixed finite element techniques with Nédélec and Raviart–Thomas elements (see [11] and the references therein). From a mathematical point of view, it is convenient to use a four-dimensional (three spatial dimensions and one temporal dimension) space–time presentation. The framework also allows the application of the generalized theories proposed in [12,13]. Still, the four-dimensional system leads to large numerical systems that also require sophisticated computational grids. To demonstrate how the conventional three-dimensional problem is inherited from the generalized wave model, we first present the four-dimensional background at the modeling phase and go on to proceed in time with three-dimensional spatial discretization. Earlier we have presented a numerical scheme for transient electromagnetics with the DEC and high-quality grids [14, 15]. In this paper, we systematically apply and test these techniques for simulating time-harmonic electromagnetic scattering. We follow the exact controllability concept (see, e.g., [16]) and solve the time-harmonic problem by using the model presented in the time domain. This concept has a history dating back to the early 1990s, when Glowinski et al. (see [17–19]) first considered a numerical method based on it. Its first application in three-dimensional electromagnetics was, to our knowledge, presented in the INRIA report [20]. The drawback of the approach was that it used H1-conforming finite elements, rendering it applicable only to limited classes of problems due to spurious modes that can arise in the numerical solution. Additional computational costs are due to the second-order formulation of the Maxwell’s equations that was used, leading to slower convergence and the need for preconditioning of the minimization process, since the energy space is not of L2-type. To improve the methodology, Glowinski and Rossi [21] considered the wave equation as a firstorder system, and they derived the associated exact controllability scheme. The main benefit of Sanna Mönkölä et al. 3 their approach is that the system’s energy space, where the minimization is realized, is of L2-type, and the minimization converges without preconditioning. The drawback, however, is the need to use mixed methods (e.g. Raviart–Thomas finite elements [22]) in discretizing the problem. Recently, a first-order form based on a discontinuous Galerkin method was developed for the three-dimensional Maxwell case [23]. Instead of using mixed finite elements, another approach, based on DEC, started to progress with the PhD thesis of Räbinä [24]. The idea for his thesis arose from the theoretical article [25]. Räbinä also considered exact controllability techniques for the computation of time-harmonic waves. Several improvements for the time integration of the Maxwell’s system, such as adaptive local time-stepping, harmonic Hodge star approximation, and spatial tilings inspired by crystallography, were then introduced in [14]. In [15], the DEC approach was further generalized to a class of wave problems covering acoustics, elastodynamics, electromagnetism, and even quantum mechanics (the Weyl equation). Further applications in quantum mechanics were then considered in [26–28]. The systematization of scientific software development covering fundamental conservation laws was sketched in [29], and a generic category-theoretic framework of space– time linear wave phenomena was finally proposed by [30] in 2022. Such formalisms allow, e.g., moving and deforming computational domains [29]. Another research track considers higherorder discrete exterior calculus involving higher order Whitney forms and novel Hodge star formulations [31–33]. The exact controllability approach was extensively studied in the late 2000s and early 2010s by Mönkölä et al. In particular, higher-order spectral element discretizations and fluid-structure interaction problems were considered in [34–36]. The approach was recently extended to threedimensional visco-elastic equations [37]. Essentially, the approach is a controlled variation of the asymptotic approach with periodic constraints, in which the time-dependent equation is simulated in time until the time-harmonic solution is reached. The time discretization is realized with a staggered leapfrog-type scheme with asynchronous time steps (see, [14,38,39]). In practice, the residual of the exact controllability algorithm defines at each iteration how far the solution is from a periodic one. It also gives an an impulse to the system to accelerate the convergence rate. Roughly speaking, the number of computational operations grows linearly with the number of degrees of freedom involved in the spatial discretization. The rest of this article is organized as follows. In Section 2, we present the four-dimensional differential form formulation. The model is simplified into separate time and space dimensions in Section 3, where we also carry out discretization. To eliminate discretization errors, we adjust the scheme for time-harmonic problems with spatial and temporal corrections. This type of strategy has been used to improve the accuracy of time discretization in electromagnetics, e.g., by Ma and Chen [40] and Appelö et al. [41]. The spatial correction term is derived within the discrete exterior calculus that we use for space discretization, and the temporal correction term arises from adapting the leapfrog time discretization to time-harmonic equations. Nevertheless, both correction terms can be encapsulated into discrete Hodge operators. In Section 4, we focus on a time-harmonic problem and consider how it can be solved efficiently in the time domain with the exact controllability method. The problem is reformulated as a least-squares optimization problem that is solved by the conjugate gradient algorithm. In Section 5, we apply the approach to three-dimensional electromagnetic scattering problems and test the performance of the method with several types of computational meshes. The concluding remarks are presented in Section 6. 2. Model We consider a linear combination of the differential forms in the four-dimensional Euclidean space (x0,x1,x2,x3)Tas ˜ F=˜ u1+˜ u2dx0+˜ u3dx1+˜ u4dx2+˜ u5dx3+˜ u6(dx0∧dx1)+˜ u7(dx0∧dx2)+ 4Sanna Mönkölä et al. ˜ u8(dx0∧dx3)+˜ u11(dx2∧dx3)+˜ u10(dx3∧dx1)+˜ u9(dx1∧dx2)+˜ u14(dx0∧dx2∧dx3)+˜ u13(dx0∧ dx3∧dx1)+˜ u12(dx0∧dx1∧dx2)+˜ u15(dx1∧dx2∧dx3)+˜ u16(dx0∧dx1∧dx2∧dx3), where the coefficients ˜ ui,i=1,...,16 are scalar-valued. The basis 1-forms are the coordinate differentials dx0,dx1,dx2, and dx3, and higher order basis k-forms, k=2,3,4, are constructed as exterior products of kbasis 1-forms, such that, dxi∧dxi=0 and dxi∧dxj=−dxj∧dxi. This formulation allows us to present a set of linear models with the first-order differential operator in a short form, (d+δ)˜ F=˜ J, (1) where d=P3 i=0(dxi∂i∧) is the exterior derivative, δis the coderivative of d, and ˜ Jis a source term presented as a linear combination of the differential forms. Accordingly, Equation (1) is equivalent to the system                −∂0∇· −∂0∇· −∂0−∇× ∇ −∂0−∇× ∇ ∇ ∇× −∂0 ∇ ∇× −∂0 ∇· −∂0 ∇· −∂0                               ˜ u15 ˜ u16 ˜ u3 ˜ u6 ˜ u11 ˜ u14 ˜ u1 ˜ u2                =                −˜ b16 ˜ b15 −˜ b6 ˜ b3 −˜ b14 ˜ b11 −˜ b2 ˜ b1                , (2) where ˜ u3:=  ˜ u3 ˜ u4 ˜ u5 ,˜ u6:=  ˜ u6 ˜ u7 ˜ u8 ,˜ u11 :=  ˜ u11 ˜ u10 ˜ u9 , and ˜ u14 :=  ˜ u14 ˜ u13 ˜ u12 , and ˜ b3:=  ˜ b3 ˜ b4 ˜ b5 ,˜ b6:=  ˜ b6 ˜ b7 ˜ b8 ,˜ b11 :=  ˜ b11 ˜ b10 ˜ b9 , and ˜ b14 :=  ˜ b14 ˜ b13 ˜ b12 . We interpret ∂0as a time derivative and ∇,∇·, and ∇× as three-dimensional gradient, divergence, and curl operators, respectively. By the choice ˜ u1=˜ u2=˜ u15 =˜ u16 =0, rows 1, 2, 5, and 6 of Equation (2) give the complete set of the Maxwell equations with the magnetic field strength ˜ u3=(H1,H2,H3)T, the electric field strength ˜ u6=(E1,E2,E3)T, the magnetic flux density ˜ u11 =−(B1,B2,B3)T, and the electric flux density ˜ u14 =(D1,D2,D3)T, respectively. The magnetic current density is −˜ b14, the electric current density is −˜ b11, and magnetic and electric charges are modeled by −˜ u15 and −˜ u16. A Maxwell-like system is also obtained from rows 3, 4, 7, and 8 of Equation (2). We return to Equation (1) and consider ˜ F=e H+dx0∧e E−e B+dx0∧e D, (3) ˜ J= −e JE−dx0∧e JH−e JρH−dx0∧e JρE−e JB−dx0∧e JD−e JρD−dx0∧e JρB, (4) where respectively, electric and magnetic field strengths are represented by spatial 1-forms e E= E1dx1+E2dx2+E3dx3and e H=H1dx1+H2dx2+H3dx3, electric and magnetic flux densities and electric and magnetic current densities by spatial 2-forms e D=D1dx2∧dx3+D2dx3∧dx1+ D3dx1∧dx2,e B=B1dx2∧dx3+B2dx3∧dx1+B3dx1∧dx2,e JE=JE1(dx2∧dx3)+JE2(dx3∧ dx1)+JE3(dx1∧dx2), and e JH=JH1(dx2∧dx3)+JH2(dx3∧dx1)+JH3(dx1∧dx2), and electric and magnetic charges, ρEand ρH, by spatial 3-forms e JρE=ρE(dx1∧dx2∧dx3) and Sanna Mönkölä et al. 5 e JρH=ρH(dx1∧dx2∧dx3). Further, in Equation (3), there are also source forms for current densities and charges corresponding to the dual components of the electric and magnetic ones, referred to with subscripts Band D, respectively. From the choices made above, we get from Equation (1) to the differential form formulations        de H−∂0e D=−e JE, dx0∧(de E−de B)=−dx0∧e JH, −dx0∧de B=−dx0∧e JρH, −dx0∧de D=−dx0∧e JρE, (5)        −⋆(dx0∧de H)=−⋆(dx0∧e JρB), −⋆(dx0∧de E)=−⋆(dx0∧e JρD), ⋆(dx0∧(de B−de E)) =−⋆(dx0∧e JD), ⋆(de D−∂0e H)=−⋆e JB, (6) where ⋆is the Hodge star operator. The systems (5) and (6) are dual to each other, and in what follows, we proceed with Equation (5) in separate space and time dimensions. For further information on differential forms in electromagnetics, the reader is referred to, e.g., [42–44] and the references therein. 3. Discretization The quality of the discrete model, based on the structure of the computational grid, has a significant impact on the efficiency of the method. As presented in [14], we generate partly-structured non-uniform polygonal grids imitating the close packing in crystal lattices and discretize the operators in the spatial domain with the DEC. We discretize the three-dimensional spatial domain by a pair of primal and dual grids. The elements of a grid are called k-cells, where k=0,1,2,3 is the dimension of the cell. Basically, a k-cell is an oriented, convex, polygon style object, and it is defined in a recursive manner by a list of k−1-cells. A 0-cell (node) is a vertex. A 1-cell (edge) is defined as a line segment between two 0-cells and oriented from the first to the second node of the list. A 2-cell (face) is a convex polygon surrounded by a finite set of edges. The boundary edges are presented with counterclockwise orientation, also providing, the orientation of the face element. A 3-cell (body) is a convex polyhedron surrounded by a finite set of faces. The grid construction has a crucial role in the accuracy of the method. In practice, we generate a partly structured grid that consists of structured areas separated by unstructured ones. The approach allows us to model boundaries as accurately as with fully unstructured grids, and it is also possible to modify element sizes inside the domain. The grid generation is based on the Delaunay triangulation (see [45]). With the help of a Voronoi diagram, it is possible to create sophisticated polyhedral grids to fill the structured parts of the grid. By maintaining the number of unstructured elements at a relatively low level, the grid generation process is considerably sped up. By constructing the dual elements that are orthogonal to the corresponding primal elements, we get diagonal discrete Hodge operators, providing a significant saving in computing time. 3.1. Discrete differential forms The discrete differential k-forms (k-cochains) are variables associated by the de Rham map with the k-cells in the grid (see, e.g., [24, 46]) that, in the three-dimensional construction, are 1-cells (edges) and 2-cells (faces). We denote the ith edge of the grid by ei,i=1,...,ne, and the jth face by fj,j=1,...,mf, and the corresponding dual elements by f∗ iand e∗ j, respectively. Accordingly, 6Sanna Mönkölä et al. the components of the vector-valued discrete differential 1-forms Eand H, presenting the discretized electric and magnetic fields and associated with the primal and dual edges, are Ei=Zeie E,Hj=Ze∗ je H,i=1,...,ne,j=1,...,mf. (7) Respectively, Dand Bpresent the discretized electric and magnetic fluxes, such that, Di=Zf∗ ie D,Bj=Zfje B,i=1,...,ne,j=1,...,mf, (8) are the discrete differential 2-forms associated with the dual and primal faces of the grid elements. Also, the vectors for source forces, JEand JH, are considered as discrete differential 2- forms JEi=Zf∗ ie JE,JHj=Zfje JH,i=1,...,ne,j=1,...,mf, (9) associated with the dual and primal faces. The relation between the discrete 1-forms Eand Hand discrete 2-forms Dand Bis presented by the constitutive equations D=⋆ϵE,B=⋆µH, (10) where the discrete Hodge star operators ⋆ϵand ⋆µcover the material properties, permittivity ϵ and permeability µ, respectively, and the metric properties of the space or coordinate system. In this paper, the discrete Hodge star operators are diagonal matrices based on the orthogonality of the primal and dual elements and defined as ⋆α=|f| |e||f⋄e|Zf⋄eαne·nedv, (11) where neis the unit orientation vector of edge e, and f⋄eis a convex hull including both e and f. The ith diagonal component of ⋆ϵis composed by setting α=ϵ,e=ei, and f=f∗ iin Equation (11). The jth diagonal component of ⋆µis composed by setting α=µ,e=e∗ j, and f=fjin Equation (11). The key component of the discrete exterior calculus is the discrete exterior derivative, or incidence matrix, drepresenting the neighboring relations and relative orientations of the primal edges and faces. We use the notation d1to emphasize that in this case, the discrete exterior derivative operates discrete 1-forms. The matrix entry, d1ji , is non-zero if and only if the edge eiis included in the boundary of the face fj. Further, the non-zero entries have the value ±1, indicating the relative orientation defined by counter-clockwise circulation. With the notations presented above, the electromagnetic system after space discretization in a three-dimensional domain Ωis ⋆ϵ ∂E ∂t−dT 1H=−JE, in Ω×[0,τ], (12) ⋆µ ∂H ∂t+d1E=−JH, in Ω×[0,τ], (13) with the initial conditions, E(0) and H(0), set at the initial time 0. The final state is considered at the final time τ. By denoting M=µ⋆ϵ0 0⋆µ¶,K=µ0−dT 1 d10¶, (14) we can write Equations (12)–(13) with the initial conditions as (M∂0+K)µE H¶=−µJE JH¶, in Ω×[0,τ], (15) µE(0) H(0)¶=µE0 H0¶, in Ω, (16) Sanna Mönkölä et al. 7 the solution of which, at time t, is µE(t) H(t)¶=e−tM−1KµE0 H0¶−Zt 0e−(t−s)M−1KM−1µJE(s) JH(s)¶ds, (17) where e−tM−1K=I+³0⋆−1 ϵdT 1t −⋆−1 µd1t0´+³0⋆−1 ϵdT 1t −⋆−1 µd1t0´2 2! +³0⋆−1 ϵdT 1t −⋆−1 µd1t0´3 3! +³0⋆−1 ϵdT 1t −⋆−1 µd1t0´4 4! +... =Ãcosµ³⋆−1 ϵdT 1⋆−1 µd1´1 2t¶⋆−1 ϵdT 1³⋆−1 µd1⋆−1 ϵdT 1´−1 2sinµ³⋆−1 µd1⋆−1 ϵdT 1´1 2t¶ −⋆−1 µd1³⋆−1 ϵdT 1⋆−1 µd1´−1 2sinµ³⋆−1 ϵdT 1⋆−1 µd1´1 2t¶cosµ³⋆−1 µd1⋆−1 ϵdT 1´1 2t¶!. (18) The derivative of the total energy d dtE(E,H)=ET⋆ϵ∂0E+HT⋆µ∂0H=−(ETJE+HTJH) (19) is obtained by multiplying Equation (15) from the left by (ETHT). The right-hand side of Equation (19) includes the source functions set on the absorbing boundary or layer, such as the Silver– Müller boundary condition [47] or perfectly matched layer (PML) [48]. By assuming them to be of the forms JE=⋆σEEand JH=⋆σHH, where σEand σHpresent the electric and magnetic conductivities, respectively, we get (d/dt)E(E,H)= −(ET⋆σEE+HT⋆σHH)≤0, implying that the energy is conserved or dissipated as the waves are absorbed from the domain. The total energy of the electromagnetic system is E(E,H)=1 2(ET⋆ϵE+HT⋆µH). (20) 3.2. Spatial harmonic correction To improve the accuracy of the simulations involving time-harmonic waves with the timedependence of the form eiωt, where ωis the angular frequency and i is the imaginary unit, we formulate spatially harmonic corrections for the discrete Hodge operators. Since the electromagnetic wave speed is c=1/pµε, we can present time tas distance multiplied by pµε. From this basis, the concept of spatial correction is based on obtaining the components of Eand Hin Equation (7) by integrating over ˆ Eeiωtand ˆ Heiωt, with complex-valued ˆ Eand ˆ H, instead of integrating over e Eand e H. Respectively, in Equations (8) we integrate over ϵiˆ Eeiωtand µjˆ Heiωt, instead of e D and e B, to obtain the components of Dand B. Accordingly, by minimizing the squared norm of errors based on the constitutive equations, we find spatially harmonic discrete Hodge star operators ⋆spat ϵand ⋆spat µto satisfy the constitutive equations. These are diagonal matrices with the diagonal components ⋆spat ϵi=⋆ϵiκi,i=1,...,ne,⋆spat µj=⋆µjκ∗ j,j=1,...,mf, (21) where the spatial correction terms, κiand κ∗ j, are κi=  1−κf∗ 5+κ2 f∗ 56 1−κf∗ 10 −κe 120 +κ2 f∗ 280 +κf∗κe 1680 +κ2 e 22,400   ,κ∗ j=  1−κf 5+κ2 f 56 1−κf 10 −κe∗ 120 +κ2 f 280 +κfκe∗ 1680 +κ2 e∗ 22,400   , with κe=ω2ϵµ|ei|2,κf∗=ω2ϵµr2 f∗ i,κe∗=ω2ϵµ|e∗ j|2, and κf=ω2ϵµr2 fjand the squared radii of the faces f∗ iand fj,r2 f∗ iand r2 fj, respectively (see [14,24]). Respectively, ⋆spat σEi=⋆σEiκi,i=1,...,ne,⋆spat σHj=⋆σHjκ∗ j,j=1,...,mf. (22) The larger the grid elements, the more advantages are gained by replacing ⋆ϵby ⋆spat ϵ,⋆µby ⋆spat µ,⋆σEby ⋆spat σE, and ⋆σHby ⋆spat σHin time-harmonic simulations. 14 Sanna Mönkölä et al. Figure 2. Relative error of the Mueller matrix, integrated over all scattering directions. boundary of the PML at the radius 2.7. To report the accuracy of the method, the near-field solution is transferred to far-field scattering results by applying a near-field to far-field transformation [51,52]. The far-field scattering data are applied to produce the Mueller matrix [53] characterizing how a material interacts with electromagnetic waves and providing information about scattering intensities and polarization in all scattering directions. The accuracy is evaluated by comparing the Mueller matrix solution with the analytical Mie scattering solution [54]. Figure 2 illustrates the relative error of the Mueller matrices compared to the exact Mie solution for each grid type with five different mesh resolutions (numbers of elements per wavelength). We see that the harmonic correction improves the accuracy of the method with all the grid types. The most accurate results, obtained with the C15- and Z-grids and harmonic correction with respect to space and time, are almost an order of magnitude more accurate than the least accurate results obtained with the cubical grid and conventional Yee’s discrete Hodge operator. 5.2. Non-convex obstacle In the second test, we use the Stanford bunny [55] as a non-convex obstacle (see Figure 3). Inside the bunny, we set ϵ=4 and µ=1, while the media surrounding the bunny is modeled with ϵ=1 and µ=1. The bunny, with height 6.173 (from ear tip to the ground), length 5.265, and depth 4.782, is centered in a rectangular prism of height 9.453, length 9.508, and depth 8.107. The outermost layer, of thickness 1.5, of the rectangular prism features the PML condition of Equation (57). In the interior of the obstacle, we constructed for each grid type a set of grids with varying resolution. Outside the obstacle, we used a regular grid with an edge length of one tenth of the wavelength. As an incident wave, we used a circularly polarized plane wave propagating in the direction of the positive x1-axis. The simulation result is illustrated in Figure 3. The red, green, and blue components in the illustration present the x1,x2, and x3components of the electric field, respectively. There can be seen a little over five scattering waves in the horizontal direction inside the bunny, which is in good agreement with the wavelength and the bunny’s width. To assess the accuracy, the reference solution is computed with the BCC grid with 40 elements per wavelength, and the results of the electric and magnetic wave components compared with the reference solution are shown in Figure 4. Again, we observe a significant difference between the errors computed with the conventional Yee’s discrete Hodge operator and with the harmonic Hodge operator. When the harmonic Hodge operator is used, the cubical grid is the most inaccurate, but there are only slight differences in accuracy between the other grid types. In the last examples, we used the BCC type bunny mesh with 50,190 nodes, 269,621 edges, and 403,215 faces to compare the control method with the asymptotic approach and to consider Sanna Mönkölä et al. 15 Figure 3. The Stanford bunny object is illustrated on the left-hand side. The x1–x3plane cross-section of the interior scattered field is illustrated on the right-hand side. Figure 4. Relative error of the interior scattered fields. the number of iterations required by the control method with increasing angular frequency. In these tests, we truncated the bunny by applying the Silver–Müller boundary condition without additional absorbing layers. We found that despite each iteration of the control method involves solving both the state and adjoint state equations, it remains more efficient than the asymptotic approach (see Figure 5). This is because the number of iterations required by the control method is less than half of the number of time periods needed for the asymptotic approach to achieve the accuracy level of the stopping criterion of the control method. Figure 6 shows the convergence of the control method at four different angular frequencies. The number of iterations increases with the angular frequency. 6. Conclusion We presented a four-dimensional origin of the electromagnetic wave problem and derived from it a differential form formulation where the spatial and temporal variables are separated. We completed the discretization in space by the discrete exterior calculus. Since our main focus was on time-harmonic problems, to improve the accuracy, we applied an exact time-stepping scheme and a harmonic correction on the Hodge operator matrices used at the discrete level. In principle, we used a transient wave solver with space and time discretization adapted to time-periodic 16 Sanna Mönkölä et al. Figure 5. Comparison of CPU usage between the exact controllability method and the asymptotic approach at various angular frequencies. Figure 6. Number of iterations of the exact controllability method at various angular frequencies. problems. We further accelerated the convergence to the time-harmonic solution by using the exact controllability approach realized by the conjugate gradient method. The energy norm is a weighted L2-norm, and we minimize the discrete quadratic functional spanned by a diagonal mass matrix. Thus, the conjugate gradient algorithm operates in an L2-type Hilbert space, and no preconditioning is needed. The numerical results demonstrate the accuracy improvements of the harmonic corrections. They also show the capability of the exact controllability method with the chosen discretization strategies in non-convex domains. Declaration of interests The authors do not work for, advise, own shares in, or receive funds from any organization that could benefit from this article, and have declared no affiliations other than their research organizations. Sanna Mönkölä et al. 17 Dedication The manuscript was written through contributions of all authors. All authors have given approval to the final version of the manuscript. Acknowledgments This project has been partially funded by the Academy of Finland, grants 259925 and 260076. The authors appreciate two anonymous reviewers for their insightful and constructive remarks. References [1] S. C. Chen, W. C. Chew, “Electromagnetic theory with discrete exterior calculus”, Progr. Electromagn. Res. 159 (2017), p. 59-78. [2] L. da Silva, C. Batista, I. González, A. Macêdo, W. de Oliveira, S. Melo, “A discrete exterior calculus approach to quantum transport and quantum chaos on surface”, J. Comput. Theor. Nanosci. 16 (2019), no. 9, p. 3670-3682. [3] P. D. Boom, O. Kosmas, L. Margetts, A. P. Jivkov, “A geometric formulation of linear elasticity based on discrete exterior calculus”, Int. J. Solids Struct. 236 (2022), article no. 111345. [4] J. B. Perot, C. J. Zusi, “Differential forms for scientists and engineers”, J. Comput. Phys. 257, Part B (2014), p. 1373- 1393. [5] D. N. Arnold, P. B. Bochev, R. B. Lehoucq, R. A. Nicolaides, M. Shashkov (eds.), Compatible Spatial Discretizations, The IMA Volumes in Mathematics and its Applications, vol. 142, Springer, New York, USA, 2006. [6] S. H. Christiansen, H. Z. Munthe-Kaas, B. Owren, “Topics in structure-preserving discretization”, Acta Numer. 20 (2011), p. 1-119. [7] H. Cartan, Differential Forms, Kershaw Publishing Company, London, 1971. [8] M. Desbrun, A. N. Hirani, M. Leok, J. E. Marsden, “Discrete exterior calculus”, 2005, preprint, https://arxiv.org/abs/ math/0508341v2. [9] A. Bossavit, L. Kettunen, “Yee-like schemes on a tetrahedral mesh, with diagonal lumping”, Int. J. Numer. Model. 12 (1999), no. 1–2, p. 129-142. [10] M. Desbrun, E. Kanso, Y. Tong, “Discrete differential forms for computational modeling”, Discrete Differ. Geom. Oberwolfach Semin. 38 (2008), p. 287-324. [11] S. H. Christiansen, F. Rapetti, “On high order finite element spaces of differential forms”, Math. Comput. 85 (2016), no. 298, p. 517-548. [12] R. Picard, S. Trostorff, M. Waurick, “Well-posedness via monotonicity—an overview”, in Operator Semigroups Meet Complex Analysis, Harmonic Analysis and Mathematical Physics, Springer, Cham, Switzerland, 2015, p. 397-452. [13] R. Picard, S. Trostorff, M. Waurick, “On a connection between the Maxwell system, the extended Maxwell system, the Dirac operator and gravito-electromagnetism”, Math. Methods Appl. Sci. 40 (2017), no. 2, p. 415-434. [14] J. Räbinä, S. Mönkölä, T. Rossi, “Efficient time integration of Maxwell’s equations by generalized finite-differences”, SIAM J. Sci. Comput. 37 (2015), no. 6, p. B834-B854. [15] J. Räbinä, L. Kettunen, S. Mönkölä, T. Rossi, “Generalized wave propagation problems and discrete exterior calculus”, ESAIM: Math. Model. Numer. Anal. 52 (2018), no. 3, p. 1195-1218. [16] M. O. Bristeau, R. Glowinski, J. Périaux, “Controllability methods for the computation of time-periodic solutions; application to scattering”, J. Comput. Phys. 147 (1998), no. 2, p. 265-292. [17] R. Glowinski, “Ensuring well-posedness by analogy; Stokes problem and boundary control for the wave equation”, J. Comput. Phys. 103 (1992), no. 2, p. 189-221. [18] M. O. Bristeau, R. Glowinski, J. Périaux, “Numerical simulation of high frequency scattering waves using exact controllability methods”, in Nonlinear Hyperbolic Problems: Theoretical, Applied, and Computational Aspects: Proceedings of the Fourth International Conference on Hyperbolic Problems, Taormina, Italy, April 3–8, 1992, Vieweg+Teubner Verlag, Wiesbaden, Germany, 1993, p. 86-108. [19] M. O. Bristeau, R. Glowinski, J. Périaux, “Scattering waves using exact controllability methods”, in 31st Aerospace Sciences Meeting, American Institute of Aeronautics and Astronautics, Washington, USA, 1993. [20] M. O. Bristeau, R. Glowinski, J. Périaux, T. Rossi, “3D harmonic Maxwell solutions on vector and parallel computers using controllability and finite element methods”, Tech. Report RR-3607, INRIA, 1999. [21] R. Glowinski, T. Rossi, “A mixed formulation and exact controllability approach for the computation of the periodic solutions of the scalar wave equation. (I) Controllability problem formulation and related iterative solution”, C. R. Acad. Sci. Paris 343 (2006), no. 7, p. 493-498. 18 Sanna Mönkölä et al. [22] S. Kähkönen, R. Glowinski, T. Rossi, R. Mäkinen, “Solution of time-periodic wave equation using mixed finiteelements and controllability techniques”, J. Comput. Acoust. 19 (2011), no. 4, p. 335-352. [23] T. Chaumont-Frelet, M. J. Grote, S. Lanteri, J. H. Tang, “A controllability method for Maxwell’s equations”, SIAM J. Sci. Comput. 44 (2022), no. 6, p. A3700-A3727. [24] J. Räbinä, “On a numerical solution of the Maxwell equations by discrete exterior calculus”, Phd thesis, University of Jyväskylä, 2014, http://urn.fi/URN:ISBN:978-951-39-5951-7. [25] D. Pauly, T. Rossi, “Theoretical considerations on the computation of generalized time-periodic waves”, Adv. Math. Sci. Appl. 21 (2011), no. 1, p. 105-131. [26] J. Räbinä, P. Kuopanportti, M. Kivioja, M. Möttönen, T. Rossi, “Three-dimensional splitting dynamics of giant vortices in Bose–Einstein condensates”, Phys. Rev. A 98 (2018), article no. 023624. [27] M. Kivioja, S. Mönkölä, T. Rossi, “GPU-accelerated time integration of Gross–Pitaevskii equation with discrete exterior calculus”, Comput. Phys. Commun. 278 (2022), article no. 108427. [28] M. Kivioja, R. Zamora-Zamora, A. Blinova, S. Mönkölä, T. Rossi, M. Möttönen, “Evolution and decay of an Alice ring in a spinor Bose–Einstein condensate”, Phys. Rev. Res. 5(2023), no. 2, article no. 023104. [29] T. Rossi, J. Räbinä, S. Mönkölä, S. Kiiskinen, J. Lohi, L. Kettunen, “Systematisation of systems solving physics boundary value problems”, in Numerical Mathematics and Advanced Applications ENUMATH 2019: European Conference, Egmond aan Zee, The Netherlands, September 30–October 4, Springer, Cham, Switzerland, 2020, p. 35- 51. [30] L. Kettunen, T. Rossi, “Systematic derivation of partial differential equations for second order boundary value problems”, Int. J. Numer. Model.: Electronic Networks, Devices and Fields 36 (2023), no. 3, article no. e3078. [31] J. Lohi, L. Kettunen, “Whitney forms and their extensions”, J. Comput. Appl. Math. 393 (2021), article no. 113520. [32] L. Kettunen, J. Lohi, J. Räbinä, S. Mönkölä, T. Rossi, “Generalized finite difference schemes with higher order Whitney forms”, ESAIM: Math. Model. Numer. Anal. 55 (2021), no. 4, p. 1439-1460. [33] J. Lohi, “Systematic implementation of higher order Whitney forms in methods based on discrete exterior calculus”, Numer. Algorithms 91 (2022), no. 3, p. 1261-1285. [34] E. Heikkola, S. Mönkölä, A. Pennanen, T. Rossi, “Controllability method for the Helmholtz equation with higher-order discretizations”, J. Comput. Phys. 225 (2007), no. 2, p. 1553-1576. [35] S. Mönkölä, E. Heikkola, A. Pennanen, T. Rossi, “Time-harmonic elasticity with controllability and higher order discretization methods”, J. Comput. Phys. 227 (2008), no. 11, p. 5513-5534. [36] S. Mönkölä, “An optimization-based approach for solving a time-harmonic multiphysical wave problem with higherorder schemes”, J. Comput. Phys. 242 (2013), p. 439-459. [37] J. H. Tang, R. Brossier, L. Métivier, “Fully scalable solver for frequency-domain visco-elastic wave equations in 3D heterogeneous media: a controllability approach”, J. Comput. Phys. 468 (2022), article no. 111514. [38] A. Lew, J. E. Marsden, M. Ortiz, M. West, “Asynchronous variational integrators”, Arch. Rational Mech. Anal. 167 (2003), no. 2, p. 85-146. [39] A. Stern, Y. Tong, M. Desbrun, J. E. Marsden, “Geometric computational electrodynamics with variational integrators and discrete differential forms”, in Geometry, Mechanics, and Dynamics: The Legacy of Jerry Marsden, Springer, New York, USA, 2015, p. 437-475. [40] C. Ma, Z. Chen, “Stability and numerical dispersion analysis of CE-FDTD method”, IEEE Trans. Antennas Propag. 53 (2005), no. 1, p. 332-338. [41] Z. Peng, D. Appelö, “EM-WaveHoltz: a flexible frequency-domain method built from time-domain solvers”, IEEE Trans. Antennas Propag. 70 (2022), no. 7, p. 5659-5671. [42] I. Lindell, Differential Forms in Electromagnetics, IEEE Press Series on Electromagnetic Wave Theory, Wiley, New Jersey, USA, 2004. [43] K. F. Warnick, P. H. Russer, “Differential forms and electromagnetic field theory”, Progr. Electromagnet. Res. 148 (2014), p. 83-112. [44] C. von Westenholz, Differential Forms in Mathematical Physics, Studies in Mathematics and its Applications, North Holland, Amsterdam, Netherlands, 1978. [45] A. N. Hirani, K. Kalyanaraman, E. B. VanderZee, “Delaunay Hodge star”, Comput. Aided Des. 45 (2013), no. 2, p. 540- 544, Solid and Physical Modeling 2012. [46] S. Mönkölä, J. Räty, “Discrete exterior calculus for photonic crystal waveguides”, Int. J. Numer. Methods Eng. 124 (2023), no. 5, p. 1035-1054. [47] B. Hanouzet, M. Sesques, “Absorbing boundary conditions for Maxwell’s equations”, in Nonlinear Hyperbolic Problems: Theoretical, Applied, and Computational Aspects, Vieweg+Teubner Verlag, Wiesbaden, Germany, 1993, p. 315- 322. [48] J.-P. Berenger, “A perfectly matched layer for the absorption of electromagnetic waves”, J. Comput. Phys. 114 (1994), no. 2, p. 185-200. [49] J. Räbinä, S. Mönkölä, T. Rossi, A. Penttilä, K. Muinonen, “Comparison of discrete exterior calculus and discretedipole approximation for electromagnetic scattering”, J. Quant. Spectrosc. Rad. Transf. 146 (2014), p. 417-423. Sanna Mönkölä et al. 19 [50] P. Mullen, P. Memari, F. de Goes, M. Desbrun, “HOT: Hodge-optimized triangulations”, ACM Trans. Graph. 30 (2011), no. 4, article no. 103, p. 1–12. [51] K. Umashankar, A. Taflove, “A novel method to analyse electromagnetic scattering of complex object”, IEEE Trans. Electromagn. Compat. 24 (1982), no. 4, p. 397-405. [52] A. Taflove, K. Umashankar, “Radar cross section of general three-dimensional scatterers”, IEEE Trans. Electromagn. Compat. 25 (1983), no. 4, p. 433-440. [53] C. F. Bohren, D. R. Huffman, Absorption and Scattering of Light by Small Particles, Wiley & Sons, New York, 1983, 53-56 pages. [54] C. Mätzler, “MATLAB Functions for Mie scattering and absorption. Version 2”, Tech. Report 2002–11, Institute of Applied Physics, University of Bern, 2002. [55] G. Turk, M. Levoy, “Zippered polygon meshes from range images”, in Proceedings of the 21st Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’94, ACM, New York, NY, USA, 1994, p. 311-318.