Diagnostics

GEMPIC.TimeHistoryDiagnosticsType
TimeHistoryDiagnostics( particle_group, maxwell_solver, 
                        kernel_smoother_0, kernel_smoother_1 )

Context to save and plot diagnostics

  • particle_group : Particles data
  • maxwell_solver : Maxwell solver
  • kernel_smoother_0 : Mesh coupling operator
  • kernel_smoother_1 : Mesh coupling operator
  • data : DataFrame containing time history values
GEMPIC.eval_derivative_splineMethod
eval_derivative_spline( position, xmin, delta_x, n_grid, 
                        field_dofs, degree, derivative )

Compute the spline coefficient of the derivative of some given spline expansion

  • position : particle position
  • xmin : lower boundary of the domain
  • delta_x : step
  • n_grid : number of grid points
  • field_dofs : coefficients of spline representation of the field
  • degree : degree of spline
  • derivative : value of the derivative
GEMPIC.evaluateMethod
evaluate( kernel_smoother, field_dofs,  xi, n_dofs )

Evaluate the field at points xi

  • field_dofs : field value on dofs
  • xi : positions where the field is evaluated
GEMPIC.pic_diagnostics_hpiMethod
pic_diagnostics_hpi( particle_group,  index, kinetic )

compute v(index)-part of kinetic energy

  • particle_group
  • index : velocity component
  • kinetic : value of index part of kinetic energy
GEMPIC.pic_diagnostics_poyntingMethod
pic_diagnostics_poynting( maxwell_solver, degree, efield_dofs, bfield_dofs, 
                          rho )

Compute $e^T M_0^{-1} R^T b$

  • maxwell_solver : maxwell solver object
  • degree : degree of finite element
  • efield_dofs : coefficients of efield
  • bfield_dofs : coefficients of bfield
GEMPIC.pic_diagnostics_transferMethod
pic_diagnostics_transfer( particle_group, kernel_smoother_0, 
                        kernel_smoother_1, efield_dofs, transfer)

Compute $\sum_{particles} w_p ( v_1,p e_1(x_p) + v_2,p e_2(x_p))$

  • particle_group
  • kernel_smoother_0 : Kernel smoother (order p+1)
  • kernel_smoother_1 : Kernel smoother (order p)
  • efield_dofs : coefficients of efield
GEMPIC.pic_diagnostics_vvbMethod
pic_diagnostics_vvb( particle_group, kernel_smoother_1, bfield_dofs )

Compute $\sum_{particles} ( w_p v_1, p b(x_p) v_2, p )$

  • particle_group : particle group object
  • kernel_smoother_1 : Kernel smoother (order p)
  • bfield_dofs : coefficients of bfield
GEMPIC.solve_poisson!Method

solvepoisson!( efield, particlegroup, kernelsmoother, maxwellsolver, rho )

Accumulate rho and solve Poisson

  • particle_group : Particles
  • maxwell_solver : Maxwell solver (FEM 1D)
  • kernel_smoother_0 : Particle-Mesh method
  • rho : preallocated array for Charge density
  • efield_dofs : spline coefficients of electric field (1D)
GEMPIC.write_step!Method
write_step!( thdiag, time, degree, efield_dofs, bfield_dofs,
             efield_dofs_n, efield_poisson)

write diagnostics for PIC

  • time : Time
  • efield_dofs : Electric field
  • efield_dofs_n : Electric field at half step
  • efield_poisson : Electric field compute from Poisson equation
  • bfield_dofs : Magnetic field
  • degree : Spline degree