spaceChargeSimpleSim

Simple simulation of an random ensemble of charged particles interacting by space charge. The particle ensemble is defined by a random cube with edge length of 3 mm around the origin of the world coordinate system. The cube consists of a set of ions with configurable masses.

Space charge is calculated with a serial version of a Barnes-Hut tree.

Simulation configuration description

integrator_modeKeyword:[verlet, parallel_verlet, full_sum_verlet, RK4, full_sum_RK4], optional: [FMM3D_verlet, ExaFMM_verlet]

Selects the trajectory integrator

  • verlet: Serial (non parallelized) Velocity Verlet integrator with Barnes Hut Tree for space charge calculation

  • parallel_verlet: Parallelized Velocity Verlet integrator with Barnes Hut Tree for space charge calculation

  • full_sum_verlet: Parallelized Velocity Verlet integrator with full sum between all particles for space charge calculation

  • RK4: Parallelized Runge-Kutta 4 integrator with Barnes Hut Tree for space charge calculation

  • full_sum_RK4: Parallelized Runge-Kutta 4 integrator full sum between all particles for space charge calculation

With activated FMM libraries (Exa-FMM and or FMM3D) two FMM integrators are also available:

  • FMM3D_verlet: Velocity Verlet with Fast Multipole space charge calculation with FMM3D library

  • ExaFMM_verlet: Velocity Verlet with Fast Multipole space charge calculation with Exa-FMM library

sim_time_stepsinteger

Number of simulation time steps

trajectory_write_intervalinteger

Interval, in time steps, between writes to the trajectory result file

dtfloat

Time step length in seconds

space_charge_factorfloat

Multiplication factor for particle-particle interaction (space charge)

ion_massesvector of float

a vector of ion masses in u

n_ionsvector of integers

Number of ions with the masses defined in ion_masses