Particle sampling

GEMPIC.ParticleSamplerType
ParticleSampler{D,V}( sampling_type, symmetric, dims, n_particles)

Particle initializer class with various functions to initialize a particle.

  • sampling_type : :random or :sobol
  • symmetric : true or false
  • n_particles : number of particles
source
GEMPIC.sample!Method
sample!( pg, ps, df, mesh)

Sample from a Particle sampler

  • pg : Particle group
  • ps : Particle sampler
  • df : Distribution function
  • xmin : lower bound of the domain
  • dimx : length of the domain.
source

Special case of the Landau Damping

GEMPIC.LandauDampingType
Landau( α, kx)

Test structure to initialize a particles distribtion for Landau damping test case in 1D1V and 1D2V

source
GEMPIC.sample!Method
sample!(d, pg)

Sampling from a probability distribution to initialize a Landau damping in 1D2V space.

\[f_0(x,v,t) = \frac{n_0}{2π v_{th}^2} ( 1 + \alpha cos(k_x x)) exp( - \frac{v_x^2+v_y^2}{2 v_{th}^2})\]

The newton function solves the equation $P(x)-r=0$ with Newton’s method

\[x^{n+1} = x^n – (P(x)-(2\pi r / k)/f(x) \]

with

\[P(x) = \int_0^x (1 + \alpha cos(k_x y)) dy = x + \frac{\alpha}{k_x} sin(k_x x)\]

source

Spin version

GEMPIC.sample!Method
sample!( pg, ps, df, mesh)

Sample from a Particle sampler

  • pg : Particle group
  • ps : Particle sampler
  • df : Distribution function
  • xmin : lower bound of the domain
  • Lx : length of the domain.
source