boundary_conditions
moment_kinetics.boundary_conditions — Module
Functions for applying boundary conditions
sourcemoment_kinetics.boundary_conditions.enforce_boundary_conditions! — Method
enforce boundary conditions in vpa and z on the evolved pdf; also enforce boundary conditions in z on all separately evolved velocity space moments of the pdf
sourcemoment_kinetics.boundary_conditions.enforce_electron_r_boundary_condition! — Method
enforce boundary conditions on electrons in r
sourcemoment_kinetics.boundary_conditions.enforce_initial_tapered_zero_incoming! — Method
Set up an initial condition that tries to be smoothly compatible with the sheath boundary condition for ions, by setting f(±(v_parallel-u0)<0) where u0=0 at the sheath boundaries and for z<0 increases linearly to u0=vpa.L at z=0, while for z>0 increases from u0=-vpa.L at z=0 to zero at the z=z.L/2 sheath.
To be applied to 'full-f' distribution function on vparallel grid (not wparallel grid).
sourcemoment_kinetics.boundary_conditions.enforce_neutral_boundary_conditions! — Method
enforce boundary conditions on neutral particle distribution function
sourcemoment_kinetics.boundary_conditions.enforce_neutral_r_boundary_condition! — Method
enforce boundary conditions on neutrals in r
sourcemoment_kinetics.boundary_conditions.enforce_neutral_wall_bc! — Method
enforce the wall boundary condition on neutrals; i.e., the incoming flux of neutrals equals the sum of the ion/neutral outgoing fluxes
sourcemoment_kinetics.boundary_conditions.enforce_neutral_z_boundary_condition! — Method
enforce boundary conditions on neutral particle f in z
sourcemoment_kinetics.boundary_conditions.enforce_r_boundary_condition! — Method
enforce boundary conditions on ions in r
sourcemoment_kinetics.boundary_conditions.enforce_vperp_boundary_condition! — Function
enforce zero boundary condition at vperp -> infinity
sourcemoment_kinetics.boundary_conditions.enforce_z_boundary_condition! — Method
enforce boundary conditions on ion particle f in z
vpavperp_buffer should be an unshared array, as it is used inside a shared-memory-parallelised loop.
moment_kinetics.boundary_conditions.enforce_z_boundary_condition_moments! — Method
enforce the z boundary condition on the evolved velocity space moments of f
sourcemoment_kinetics.boundary_conditions.enforce_zero_incoming_bc! — Method
enforce a zero incoming BC in z for given species pdf at each radial location
sourcemoment_kinetics.boundary_conditions.skip_f_electron_bc_points_in_Jacobian — Method
skip_f_electron_bc_points_in_Jacobian(z_speed, ivpa, ivperp, iz, vpa, vperp, z)This function returns true when the grid point specified by iz, ivperp, ivpa would be set by the boundary conditions on the electron distribution function. When this happens, the corresponding row should be skipped when adding contributions to the Jacobian matrix, so that the row remains the same as a row of the identity matrix, so that the Jacobian matrix does not modify those points. Returns false otherwise.
moment_kinetics.boundary_conditions.vpa_to_wpa — Method
create an array of w_∥ values corresponding to the given vpa values
sourcemoment_kinetics.boundary_conditions.vpagrid_to_vpa — Method
create an array of v_∥ values corresponding to the given vpagrid values
source