Skip to content
Projects

An implicit, exactly energy-conserving push for N-body plasma: what it costs.

Explicit integrators must resolve the plasma oscillation (dt * omega_pe below about one). An implicit midpoint step can take longer steps; with Gonzalez’s discrete gradient in place of the midpoint force it conserves the energy exactly for any potential, and with a Jacobian-free Newton-Krylov solver each nonlinear iteration costs one force evaluation, i.e. one fast-summation pass in a tree code. This example measures, with direct sums on a small trapped cloud of line charges, how many force evaluations such a step needs as the step grows, and whether the solver converges at all, which is the whole question of whether the scheme can beat explicit subcycling once the force comes from an FMM.

Source: examples/implicit_push.py. Run it yourself with python examples/implicit_push.py [--output examples/output] [--quick] (needs pip install "tree-d-3d[examples]").

relative energy error over the run for explicit Verlet at a small step and for the implicit midpoint and discrete-gradient steps at dt * omega_pe = 0.5; the discrete gradient holds the energy to the solver tolerance.

force (residual) evaluations per step of the two implicit schemes against dt * omega_pe, with the number of explicit steps the same dt covers; the scheme pays only where the evaluations per step fall below that line. Steps on which the unpreconditioned Newton-Krylov solver did not converge are marked.

kinetic energy against time for the explicit reference and the discrete-gradient scheme at the three steps; what a step that does not resolve the plasma oscillation does to the dynamics.

the residual history of one Newton-Krylov solve per step size; why the large steps fail without a preconditioner.

--quick uses a smaller cloud and shorter runs (about a minute instead of several). Needs Plotly (pip install 'tree-d-3d[examples]').