Electric Field Solver

vlapy.core.field.compute_charges(f, dv)

Computes a simple moment of the distribution function along the velocity axis using the trapezoidal rule

Parameters
  • f – (2D float array) (nx, nv) the distribution function

  • dv – (float) velocity-axis spacing

Returns

vlapy.core.field.get_field_solver(stuff_for_time_loop, field_solver_implementation='spectral')

This method gets the field solver based on the choice in the input parameters.

Parameters
  • stuff_for_time_loop – dictionary of parameters for the simulation

  • field_solver_implementation – (string) the name of the field solver chosen in the input parameters

Returns

vlapy.core.field.get_spectral_solver(dv, one_over_kx)

This function gets the spectral field solver that uses Fourier transforms to solve the periodic system

Parameters
  • dv – (float) grid spacing in v

  • one_over_kx – (1D float array (nx,)) one over real-space wavenumber axis

Returns

the function with the above arguments initialized as static variables

vlapy.core.field.solve_for_field(charge_density, one_over_kx)

Solves for the net electric field after subtracting ion charge

Parameters
  • charge_density – (1D float array (nx,)) charge-density

  • one_over_kx – (1D float array (nx,)) one over real-space wavenumber axis

Returns