MILCA is an experimental Fortran laboratory for plasma physics models and algorithms. Models and numerical methods are prototyped, verified with symbolic derivations, error bounds and cross-code benchmarks, and made fast. Current work covers drift-kinetic and neoclassical transport and axisymmetric and three-dimensional MHD equilibria.
This is research software under active development: interfaces, inputs and outputs change frequently. Numerical kernels and their derivatives are generated with FortSym; generated sources are included, so ordinary builds do not require FortSym. Error bounds use interval arithmetic from FortNum. Priorities are in ROADMAP.md, verification cases in the benchmark atlas.
You need GNU Fortran with real128 support (version 13 or newer recommended),
a C compiler, CMake 3.22 or newer, Ninja and SuiteSparse AMD. BLAS and LAPACK
come from FortNum.
The first configure needs network access to fetch pinned dependencies.
cmake --preset cpu
cmake --build --preset cpu
ctest --preset cpu -R '^characteristic_and_steady_oracles$'Select tests by name or model class; do not run the full suite. For example:
ctest --test-dir build -j 32 -L equilibrium -LE slowOpenMP is enabled by default. Build options, per-class development presets and optional CUDA, FFmpeg and Lean support are described in the tooling guide and CMakePresets.json.
Solve a fixed-boundary Grad–Shafranov equilibrium for a circular plasma:
cmake --build --preset cpu --target grad_shafranov_demo
./build/grad_shafranov_demo --config examples/grad_shafranov_circle.inApplications read Fortran namelists and write NetCDF-4 results with resolved configuration and provenance. For the first kinetic laboratory, including free streaming with a continuous error band:
./build/milca_demo --snapshot- Documentation index and figure gallery
- Grad–Shafranov equilibrium and free boundary
- 3D nested equilibrium input, 3D ideal equilibria, 3D free boundary and equilibria with islands
- Linear MHD stability
- First kinetic laboratory and steady Poisson–Fokker–Planck laboratory
- Scope, design principles and roadmap
The numerical libraries are FortFEM, FortSparse, FortIO and FortPlot, alongside FortSym and FortNum. Coil readers and field utilities come from libneo.
MIT license; see LICENSE.
