moment_constraints

moment_kinetics.moment_constraintsModule

Functions for enforcing integral constraints on the normalised distribution function. Ensures consistency of evolution split into moments and normalised distribution function.

source
moment_kinetics.moment_constraints.electron_implicit_constraint_forcing!Method
electron_implicit_constraint_forcing!(f_out, f_in, constraint_forcing_rate, vpa,
                                      dt, ir)

Add terms to the electron kinetic equation that force the moment constraints to be approximately satisfied. Needed to avoid large errors when taking large, implicit timesteps that do not guarantee accurate time evolution.

source
moment_kinetics.moment_constraints.hard_force_moment_constraints!Method
hard_force_moment_constraints!(f, moments, vpa)

Force the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.

Note this function assumes the input is given at a single spatial position.

source
moment_kinetics.moment_constraints.hard_force_moment_constraints_neutral!Method
hard_force_moment_constraints_neutral!(f, moments, vz)

Force the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.

Notes:

  • this function assumes the input is given at a single spatial position.
  • currently only works with '1V' runs, where vz is the only velocity-space dimension
source
moment_kinetics.moment_constraints.moment_constraints_on_residual!Method
moment_constraints_on_residual!(residual, f, moments, vpa)

A 'residual' (used in implicit timestepping) is an update to the distribution function $f_\mathrm{new} = f_\mathrm{old} + \mathtt{residual}$. $f_\mathrm{new}$ should obey the moment constraints (Constraints on normalized distribution function), and $f_\mathrm{old}$ already obeys the constraints, which means that the first 3 moments of residual should be zero. We impose this constraint by adding corrections proportional to f.

\[r = \hat{r} + (A + B w_{\|} + C w_{\|}^2) f\]

Note this function assumes the input is given at a single spatial position.

source