Cactus Code Thorn MaxwellToyCarpetX Author(s) : Erik Schnetter Maintainer(s): Erik Schnetter Licence : LGPL -------------------------------------------------------------------------- 1. Purpose Solve the Maxwell equations. 2. Derivatives, and constraint preservation We store variables and calculate derivatives in a way that is very similar to discrete differential forms. Scalars live on vertices, vectors on edges, fluxes on faces, and densities in cells. This happens in 4D, leading to a staggered evolution scheme. We have the following variables: - electric potential phi: vertex, staggered in time (equivalent to a timelike edge) - magnetic vector potential A^i: (spacelike) edges - electric field E^i: (spacelike) edges, staggered in time - magnetic field B^i: faces - electric charge density rho: vertex (equivalent to dual cell), staggered in time - electric current density j^i: edges (equivalent to dual face) - electric constraint div E: vertices (equivalent to dual cell), staggered in time - magnetic constraint div B: cell When calculating derivatives, we divide by the grid spacing (unlike from differential forms). This is for convenience only. In terms of differential forms, our variables correspond to the following. The notation [phi, A] means that phi and A^i are the time and space components of a 4-vector. - A: [phi, A]: 1-form - F: [E^i, B^i]: 2-form - j: *[rho, j^i]: 3-form living on dual grid - *[div E]: 4-form living on dual grid - *[div B]: 4-form 4d Equations: - F = dA - dF = 0 - d*F = 0 3+1 Equations: - E = dphi - B = dA - *d*E = *rho - *d*B = *j (TODO: Correct and complete equations) 3. How to calculate consistent derivatives with mesh refinement Prolongation opterators need to be conservative in cell centred directions, and interpolating in vertex centred directions. We want linear accuracy for vertex centred and constant accuracy for cell centred directions.