initial_conditions
moment_kinetics.initial_conditions
— Modulemoment_kinetics.initial_conditions.allocate_pdf_and_moments
— MethodCreates the structs for the pdf and the velocity-space moments
moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!
— MethodTake 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)
moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!
— MethodTake 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)
moment_kinetics.initial_conditions.create_boundary_distributions
— MethodAllocate arrays for distributions to be applied as boundary conditions to the pdf at various boundaries. Also initialise the Knudsen cosine distribution here so it can be used when initialising the neutral pdf.
moment_kinetics.initial_conditions.create_pdf
— MethodAllocate arrays for pdfs
moment_kinetics.initial_conditions.init_density!
— Methodmoment_kinetics.initial_conditions.init_electron_density!
— Methodinitialise the electron density
moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!
— Methodinitelectronpdfoverdensityandboundaryphi 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
moment_kinetics.initial_conditions.init_electron_upar!
— Methodinitialise the electron parallel flow density
moment_kinetics.initial_conditions.init_electron_vth!
— Methodinitialise the electron thermal speed profile. for now the only initialisation option for the temperature is constant in z. returns vth0 = sqrt(2*Ts/Te)
moment_kinetics.initial_conditions.init_ion_pdf_over_density!
— Methodmoment_kinetics.initial_conditions.init_neutral_pdf_over_density!
— Methodmoment_kinetics.initial_conditions.init_pdf_and_moments!
— Methodcreates the normalised pdfs and the velocity-space moments and populates them with a self-consistent initial condition
moment_kinetics.initial_conditions.init_upar!
— Methodmoment_kinetics.initial_conditions.init_uz!
— Methodmoment_kinetics.initial_conditions.init_vth!
— Methodfor now the only initialisation option for the temperature is constant in z returns vth0 = sqrt(2Ts/ms) / sqrt(2Te/ms) = sqrt(Ts/Te)
moment_kinetics.initial_conditions.initialize_pdf!
— Method