Energy Conserving Data Driven Discretizations for Maxwells Equations
Victory Obieke
TL;DR
This work develops energy-conserving, data-driven spatial discretizations for the one-dimensional Maxwell system by learning a convolution stencil $w$ from spectral data under a linear skew-adjoint constraint $C w = d$, ensuring a semi-discrete energy identity. Energy conservation follows from the skew-adjointness, and the stencil's Fourier symbol $\mu(\theta)=\sum_{k=-R}^{R} w_k e^{i k \theta}$ yields the numerical wave speed $c_{\max}=\max_{\theta} |\mu(\theta)|$, defining a CFL bound $\Delta t \le 2 / c_{\max}$ for explicit schemes; Crank-Nicolson, however, preserves energy exactly for any $\Delta t$ when the generator is skew-adjoint. The learned stencils match central differences in accuracy while exactly conserving energy under CN, and solution quality with ADMM and CVXPY is nearly indistinguishable but offers tradeoffs in speed. The framework bridges data-driven discretizations with physics-based structure, with potential extensions to higher dimensions, material models, and boundary treatments.
Abstract
We study data-driven construction of spatial discretizations for the one-dimensional Maxwell system. Given high-fidelity training data generated by a spectral discretization, we learn a linear convolution stencil that approximates the spatial derivative operator appearing in Maxwell's equations. The stencil is obtained by solving a convex quadratic optimization problem, subject to linear constraints that enforce skew-adjointness of the discrete derivative. These constraints guarantee a semi-discrete energy identity for the resulting Maxwell system. We prove that our constraints characterize the class of skew-symmetric convolution operators and express the associated numerical wave speed and CFL restriction for the classical leapfrog scheme in terms of the learned stencil's Fourier symbol. We then compare several convex solvers for the resulting quadratic program -- projected gradient, Nesterov-accelerated gradient, ADMM, and an interior-point reference implemented in CVXPY -- and evaluate the learned schemes in time-dependent one-dimensional Maxwell simulations using a Crank--Nicolson (CN) time discretization. Our numerical experiments show that (i) energy-constrained learned stencils achieve accuracy comparable to standard central differences while exactly preserving the discrete electromagnetic energy under CN time-stepping, and (ii) ADMM and interior-point methods produce nearly identical operators, with ADMM offering a favorable tradeoff between accuracy, constraint satisfaction, and runtime.
