Skip to content
itpplasmaPublic

About

Design and roadmap for certified full-distribution plasma kinetics in Fortran, with a Lean proof layer.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MILCA

MILCA

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.

Powered by Fortran

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.

Build

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 slow

OpenMP 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.

Run an example

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.in

Applications 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

Models and documentation

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.

About

Design and roadmap for certified full-distribution plasma kinetics in Fortran, with a Lean proof layer.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages