initial_conditions

moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!Function

Take the full ion distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.

Uses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.

Inputs/outputs depend on z, vperp, and vpa (should be inside loops over species, r).

The velocity grid that the input f is defined on can be scaled by vgrid_scale_factor: f is given on a velocity grid vperp.grid .* vgrid_scale_factor and vpa.grid .* vgrid_scale_factor.

source
moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!Function

Take the full neutral-particle distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.

Uses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.

Inputs/outputs depend on z, vzeta, vr and vz (should be inside loops over species, r).

The velocity grid that the input f is defined on can be scaled by vgrid_scale_factor: f is given on a velocity grid vzeta.grid .* vgrid_scale_factor, vr.grid .* vgrid_scale_factor, and vz.grid .* vgrid_scale_factor.

source
moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!Method

initelectronpdfoverdensityandboundaryphi initialises the normalised electron pdf = pdfe * vthe / dense and the boundary values of the electrostatic potential phi; care is taken to ensure that the parallel boundary condition is satisfied; NB: as the electron pdf is obtained via a time-independent equation, this 'initital' value for the electron will just be the first guess in an iterative solution

source