Particles

Trajectory Models

In DESC, particle tracing can be performed using various trajectory models. These models are designed to simulate the motion of charged particles in magnetic fields either from Equilibrium or _MagneticField classes. The available trajectory models include:

desc.particles.VacuumGuidingCenterTrajectory(frame)

Guiding center trajectories in vacuum, conserving energy and mu.

Particle Initializers

Particle initializers are used to define the initial conditions for particle tracing. One can manually initialize particles or use random particle generation on given geometry.

desc.particles.CurveParticleInitializer(curve, N)

Randomly sample particles starting on a curve.

desc.particles.ManualParticleInitializerFlux(...)

Manually specify particle starting positions and energy in flux coordinates.

desc.particles.ManualParticleInitializerLab(R0, ...)

Manually specify particle starting positions and energy in lab coordinates.

desc.particles.SurfaceParticleInitializer(...)

Randomly sample particles starting on a surface.

Particle Tracing

The main function to use for particle tracing is desc.particles.trace_particles. This function takes a field/equilibrium object, as well as particle initializer and trajectory model, and returns the particle trajectories.

desc.particles.trace_particles(field, ...[, ...])

Trace charged particles in an equilibrium or external magnetic field.