FPP-3D

**Name of the code.
**

FPP-3D is abbreviation of **F**okker-**P**lanck **P**ackage **Three-D**imensional.

The development of the code started in 1991.

**Main authors.**

Feodor S. Zaitsev |
Professor, DCS, Moscow State University, Department of Computational Mathematics and Cybernetics, e-mail zaitsev@cs.msu.su |

Martin R. O'Brien |
UKAEA Fusion, Culham Science Centre |

Martin Cox |
UKAEA Fusion, Culham Science Centre |

rChris A. Gardne |
UKAEA Fusion, Culham Science Centre |

Robert J. Akers |
PhD, UKAEA Fusion, Culham Science Centre |

Robert Tanner |
PhD, Department of Theoretical Mechanics, Nottingham University |

**Brief details of the physical model and options.
**

- The code is based on generalised neo-classical theory [1]. It solves three-dimensional (two velocity space, one radial variables and time) drift trajectory averaged kinetic equation for the distribution function of charged fast particles in toroidal plasmas. The equation includes three diffusion and three friction terms, six mixed derivatives, particle sources and losses. The drift trajectory width and inverse aspect ratio need not to be small. The code treats correctly the boundary between trapped and passing particles.
- Calculation of radial particle, momentum and energy fluxes, bootstrap-currents of electrons an ions, neo-classical resistivity, energy balance and etc.
- Non-linear problems, when coefficients in the equation depend on the solution, can be solved.
- Work with strongly non-Maxwellian distribution functions of test and background particles.
- Non-circular cross-section of magnetic flux surfaces. Three parametric approximation of input from equilibrium codes TOPEOL, EFIT or analytical settings.
- Effects of toroidal and radial electric fields.
- Source of alpha-particles: analytical formula, calculation using distribution functions of reacting components, possibility of account of spread of the source over velocities.
- Possibility of usage of time-dependent data from code TRANSP or experimental data.
- Neutral beam injection source: analytical formula or calculated by codes NFREYA or LOCUST.
- Drift trajectory averaged ion cyclotron heating and current drive effects using simplified quasi-linear diffusion coefficients.
- Computation of helium ash as a function of radius and time.
- Ripple diffusion of high energy ions.
- Direct losses of charged particles to the wall due to deviations from the magnetic flux surfaces.
- Drift trajectory averaged effects of nuclear elastic scattering and large angle Coulomb scattering.
- Calculation of fast ion losses to TFTR-like detectors.
- Calculation of signals to JET-like neutral particle analyser.
- Solution of inverse kinetic problems.

**Brief description of numerical techniques employed.**

The approach is based on a method of finite differences. The method includes two-cycle six stage splitting scheme and simultaneous inversion over two dimensions using Gaussian elimination for a sparse matrices. Mixed derivatives are taken implicitly. Details of the method and its justification are presented in [2]. FPP-3D program foundation is organised using modern technology. In particular it includes program generator, which can construct a program for a particular physical problem. Many FPP-3D modules are written using object oriented technology. The code can be relatively easy upgraded for inclusion of different physical effects and for coupling with other codes. The code is parallelised using MPI with the aim to speed up calculations. FPP-3D can also be run on platforms without MPI support.

**Range of applicability, limitations.**

The code is applicable to description of particles in low collisionality plasmas, when the characteristic time of motion over drift trajectories is much less than the characteristic time of Coulomb collisions.

**Software.**

The code FPP-3D was developed using elements of package technology and object-oriented approach. Some ideas of object-oriented techniques were used for programming of difference operators, sources of external current, creating spline approximation of grid functions, etc.

Package technology implemented in FPP-3D includes a program generator, written in JAVA, which can construct a particular program from a cascading menu of options. The generator takes as input modules from the FPP-3D program foundation, tunes them for the particular problem according to the user choice and builds ready-to-run programs. The latest version of FPP-3D includes over 200 subroutines in Fortran-77. It is more than 100000 lines long and contains about 100 variants of physical models and several different numerical algorithms.

**Integrated modelling.**

FPP-3D code has links to codes SCoPE (self-consistent equilibria evolution), TRANSP (transport and kinetics), NFREYA (neutral beam injection), TOPEOL (equilibrium), EFIT (equilibrium reconstruction using experimental measurements), LOCUST (Monte-Carlo kinetics).

**Benchmarking and validation carried out. **

Comparison with analytical results of neo-classical theory and other analytical results. Good agreement with code BANDIT-3D (kinetics of fast electrons) in calculation of neo-classical resistivity and code TRANSP in modelling alpha-particles in TFTR supershots [3]. Good agreement with simple models and in qualitative agreement with experimental measurements in JET DT discharges [4]. Numerical methods used are justified in [2]. The code was successfully tested with different compilers in different operating systems and hardware platforms such as IBM RS, CRAY, VAX, SUN, DEC, HP, Intel and oth.

**Some references where the code's theory, methods and applications are
described.**

- F.S. Zaitsev. Mathematical modelling of toroidal plasma evolution. - Moscow: MAX Press Publishing Co., 2005, 524 p. (in Russian) http://www.zone-x.ru/showtov.asp?fnd=&cat_id=258662
- F.S. Zaitsev, M.R. O'Brien, M. Cox. Three Dimensional Neoclassical Non-linear Kinetic Equation for Low Collisionality Axisymmetric Tokamak Plasmas. Physics of Fluids B. 1993. V. 5, No. 2. P. 509-519.
- F.S. Zaitsev, V.V. Longinov, M.R. O'Brien, R. Tanner. Difference Schemes for the Time Evolution of Three-Dimensional Kinetic Equations. Journal of Comp. Phys. 1998. V. 147, p. 239-264.
- O'Brien M.R., Cox M., Gardner C.A. and Zaitsev F.S. 3D Fokker-Planck Calculation of Alpha-Particle Distributions: a TFTR Simulation. Nucl. Fusion. 1995. V. 35. No. 12. P. 1537-1547.
- Zaitsev F.S., R.J. Akers and O'Brien M.R. Perturbations to deuterium and tritium distributions caused by close collisions with high-energy alpha-particles. Nucl. Fusion. 2002. V. 42. P. 1340-1347.
- O'Brien M.R., Cox M., Gardner C.A. and Zaitsev F.S. 3D Calculations of Fast Ion Distributions in Tokamaks. 22th European Conference on Controlled Fusion and Plasma Physics. July, 1995.
- O'Brien M.R., Cox M., Warrick C.D., Zaitsev F.S. 3D Fokker-Planck Calculations of Electron and Ion Distributions in Tokamak Plasmas. IAEA Technical Committee Meeting on Advances in Simulation and Modelling Thermonuclear Plasmas. Montreal, 1992. P. 527.