|
WarpX
|
#include "FieldSolver/ImplicitSolvers/WarpXSolverVec.H"#include <AMReX_Array.H>#include <AMReX_MultiFab.H>#include <AMReX_REAL.H>#include "ImplicitSolver.H"Go to the source code of this file.
Classes | |
| class | StrangImplicitSpectralEM |
Implicit spectral electromagnetic time solver class. This is a fully implicit algorithm where both the fields and particles are treated implicitly.
The time stencil is Advance (Eg^n, Bg^n) -> (Eg^{n+1/2}, Bg^{n+1/2}) source free // E transverse Iterate: Eg^{n+1} = Eg^n + c^2*dt*( - mu0*Jg^{n+1/2} ) // E longitudinal xp^{n+1} = xp^n + dt*up^{n+1/2}/(0.5*(gammap^n + gammap^{n+1})) up^{n+1} = up^n + dt*qp/mp*(Ep^{n+1/2} + up^{n+1/2}/gammap^{n+1/2} x Bp^{n+1/2}) Advance (Eg^n+1/2, Bg^n+1/2) -> (Eg^{n+1}, Bg^{n+1}) source free // E transverse
The algorithm is exactly energy conserving only with a single box, periodic fft (psatd.periodic_single_box_fft = 1). With multiple boxes, energy is not conserved since the ffts in each box assumes periodic in the box which is not consistent with the current. The algorithm is numerially stable for any time step. I.e., the CFL condition for light waves does not have to be satisifed and the time step is not limited by the plasma period. However, how efficiently the algorithm can use large time steps depends strongly on the nonlinear solver. Furthermore, the time step should always be such that particles do not travel outside the ghost region of the box they live in, which is an MPI-related limitation. The time step is always limited by the need to resolve the appropriate physics.