Functions

GEMPIC.add_charge!Method
add_charge!(pic, position, marker_charge)

Add charge from one particle

  • self : Pic Poisson solver object
  • position : Position of the particle
  • marker_charge : Particle weight times charge
source
GEMPIC.add_charge!Method
add_charge!(pic, position, marker_charge)

Add charge from one particle

  • self : Pic Poisson solver object
  • position : Position of the particle
  • marker_charge : Particle weight times charge
source
ParticleInCell.evaluate_rho!Method
evaluate_rho!(pic, position)

Evaluate charge density at rho at one position

  • self : Pic Poisson solver object
  • position : Position of the particle
  • func_value : Value of rho at given position
source
ParticleInCell.evaluate_rho!Method
evaluate_rho!(pic, position)

Evaluate charge density at rho at one position

  • self : Pic Poisson solver object
  • position : Position of the particle
  • func_value : Value of rho at given position
source
ParticleInCell.evaluate_rhoMethod
evaluate_phi!(pic, position)

Evaluate potential at one position

  • self : Pic Poisson solver object
  • position : Position of the particle
  • func_value : Value of phi at given position
source
ParticleInCell.sample!Method
sample!(d, pg)

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

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

source
ParticleInCell.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
ParticleInCell.sample!Method
sample!(d, pg)

Sampling from a probability distribution to initialize a Landau damping in 2D2V 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})\]

source
ParticleInCell.solve!Method
solve!( ex, ey, poisson, rho )

solves Poisson equation to compute electric fields

\[E(x,y) = -\nabla \phi(x,y) \\ -\Delta \phi(x,y) = \rho(x,y)\]

source
ParticleInCell.solve!Method

poisson!( fields )

Solve the equation Δ Φ = - fields.ρ

fields.ex = ∂ Φ / ∂ x fields.ey = ∂ Φ / ∂ y

source