Toy model
ToyDrift
Electrostatic drift toy model for a single ion species in a given background magnetic field.
Overview
ToyDrift is a stripped-down guiding-center model used to isolate the
electrostatic drift part of the dynamics. It is intended for algorithm prototyping and reduced verification problems rather than production drift-kinetic studies.
Use cases
This model is appropriate for:
- reduced electrostatic guiding-center benchmarks
- testing the field solve plus pusher
- algorithm prototyping before moving to the full drift-kinetic model
Governing equations
PDEs solved by model:
Drift equation:
Poisson equation:
where is the guiding center distribution and
The control variate method can be activated in the Poisson equation; if enabled, the following Poisson equation is solved:
Normalization
The reference speed is the ion thermal velocity:
Discretization
Time integration is performed by the following propagators (in sequence):
struphy.propagators.poisson_solve.PoissonSolvestruphy.propagators.push_guiding_center_bx_estar.PushGuidingCenterBxEstar
Diagnostics
The following scalars are tracked during simulation:
- Electrostatic field energy:
en_phi - Particle kinetic energy:
en_particles - Total energy:
en_tot
Example
Create and initialize the toy drift model:
from struphy.models import ToyDrift
model = ToyDrift()
model.em_fields.phi model.kinetic_ions.var