Fokker-Planck Solver¶
-
vlapy.core.collisions.get_batched_array_maker(vax, nv, nx, nu, dt, dv, operator='lb')¶ This method gets the right operator based on the name from the input parameters
- Parameters
vax – (1D float array) - 1D array representing the centers of the velocity grid
nv – (int) the size of the velocity grid
nx – (int) the size of the spatial grid
nu – (float) the collision frequency
dt – (float) the timestep
dv – (float) the velocity grid spacing
operator – (string) the name of the operator to be used
- Returns
function with above arguments initialized as static variables
-
vlapy.core.collisions.get_batched_tridiag_solver(nv)¶ This function returns the broadcasting-based solver for the collision operator. The broadcasting is done over the x-axis because the collision operator is independent along the x-direction
- Parameters
nv – (int) number of v cells
- Returns
new function with above arguments initialized as static variables
-
vlapy.core.collisions.get_dougherty_matrix_maker(vax, nv, nx, nu, dt, dv)¶ This function returns the function for preparing the matrix representing the Dougherty [1] collision operator.
It uses the arguments to create static arrays for the linear operato.
[1] : Dougherty, J. P. (1964). Model Fokker-Planck Equation for a Plasma and Its Solution. Physics of Fluids, 7(11), 1788. https://doi.org/10.1063/1.2746779
- Parameters
vax – (1D float array) - 1D array representing the centers of the velocity grid
nv – (int) the size of the velocity grid
nx – (int) the size of the spatial grid
nu – (float) the collision frequency
dt – (float) the timestep
dv – (float) the velocity grid spacing
- Returns
new function with above arguments initialized as static variables
-
vlapy.core.collisions.get_matrix_solver(nx, nv, solver_name='batched_tridiagonal')¶ This method gets the right solver based on the choice in the input parameters
- Parameters
nx – (int) the number of x cells
nv – (int) the number of v cells
solver_name – (string) The name of the solver
- Returns
function with above arguments initialized as static variables
-
vlapy.core.collisions.get_naive_solver(nx)¶ This function returns the naive solver for the collision operator. Specifically, this is simply a for loop over the all the x-indices where each f(v) is solved for.
- Parameters
nx – (int) number of x cells
- Returns
new function with above arguments initialized as static variables
-
vlapy.core.collisions.get_philharmonic_matrix_maker(vax, nv, nx, nu, dt, dv)¶ This function returns the function for preparing the matrix representing the Lenard-Bernstein [1] collision operator.
It uses the arguments to create static arrays for the linear operato.
- [1]Lenard, A., & Bernstein, I. B. (1958). Plasma oscillations with diffusion in velocity space.
Physical Review, 112(5), 1456–1459. https://doi.org/10.1103/PhysRev.112.1456
- Parameters
vax – (1D float array) - 1D array representing the centers of the velocity grid
nv – (int) the size of the velocity grid
nx – (int) the size of the spatial grid
nu – (float) the collision frequency
dt – (float) the timestep
dv – (float) the velocity grid spacing
- Returns
new function with above arguments initialized as static variables