Skip to content
Projects

freeofcharge

Neutral beams in tokamak plasmas - where the beam is ionised, how much shines through onto the wall, and where the fast ions heat and drive current. Fast enough to sit inside an optimisation of the injector.

Equilibria

The poloidal flux from G-EQDSK files or the Solov’ev solution: the field, rho = sqrt(psi_n), flux shells with their volumes and aspect ratios, the boundary and the first wall as simgeometry polygons.

Beams

Markers of fast atoms aimed with tangential_injection: Gaussian width and divergence, a halo, energy components.

Deposition

Every marker a straight line attenuated with Suzuki’s stopping cross sections (as in ASCOT5): birth profiles, sampled fast-ion births with their pitch, shine-through and where it hits the wall.

Slowing down

Classical (Stix) slowing down on the birth surface: heating of electrons and ions, fast-ion density and pressure, and the beam-driven current with electron shielding.

CPU, GPU, MPI

Arrays on the cunumpy backend (NumPy or CuPy); with MPI every rank traces its own markers and the profiles are summed once.

xarray output

Profiles convert to xarray datasets with units, ready for plasma-plots.

freeofcharge is the last stage of the max-models chain of a neutral-beam injector, from the ion source to the plasma:

  1. Ion source and extraction - picnic (particle-in-cell) and wellbalanced (global and fluid models).
  2. Neutralizer - plasmacoll, the collisions of the beam with the gas; freeofcharge’s markers are plasmacoll ParticleArrays.
  3. The plasma - freeofcharge: deposition, shine-through, heating and current drive.

The model is deliberately fast: straight lines and local slowing down, without orbit width, prompt losses, charge-exchange losses of fast ions or 3D effects. That is what a design scan over beam energy, aiming and density needs. For orbits and losses, the fast-ion births (positions, velocities and weights) can be the starting points of an orbit-following code.