-
Notifications
You must be signed in to change notification settings - Fork 2
Divergence cleaning
Faraday's law is given by,
where the last equality is true in ideal MHD. Taking divergence of the equation above we obtain,
where the second equality is true because the divergence of the curl of a quantity is zero. This tells us that if we start of with a divergence-free magnetic field, it must continue to remain zero. In practice however, the HLL solver is diffusive and produces a non-zero divB. iharm
employs the flux-interpolated constrained transport (CT) of Toth 2000 to ensure divB reset to zero up to machine precision. Let's continue with this non-relativistic notation to understand the scheme. From the second equation above we see that maintaining divB to 0 is equivalent to replacing the magnetic fluxes as computed by the Riemann solver with which ensures zero divergence. iharm
does this in two steps,
- Compute the emf,
where FXii,j(Bj) denotes the HLL flux of Bj along Xi at zone (i,j).
- Reset the magnetic fluxes based on the corner-centered emf,