
GRILLIX is a 3D edge and scrape-off layer turbulence code for magnetic fusion devices (tokamaks and stellarators). It is built on on the drift-reduced Braginskii model with trans-collisonal extensions, and includes a three-moment fluid neutrals model. It is based on the Flux-Coordinate Independent approach, with the corresponding methods/functions provided by the PARALLAX library. You may find a list of publications related with GRILLIX on the Publications page.
For more comprehensive high-level documentation -currently in its early stages of development- please refer to the gitlab pages.
After cloning this repository (or a fork of it), you need to download PARALLAX and ConfiX as submodules. For more details on Git submodules, see the Git documentation.
git submodule init
git submodule update
To load the required modules and set up the build environment, ConfiX provides scripts for various machine backends:
source confix/load_modules.sh <preset_name>
If <preset_name> is omitted, the script prints the available presets. You can also view them directly in confix/modules.json.
Configure the code using CMake:
cmake --preset <grillix_cmake_preset> -B build <custom_options>
Multiple <grillix_cmake_preset> options are available for different machines (see tools/cmake-presets/<machine>.json). These presets provide reasonable default CMake parameters. You can override or extend them by adding <custom_options> (e.g., -DENABLE_UTESTS=ON).
During configuration, the ConfiX CMake scripts automatically detect several common HPC systems. With minor adjustments, you should be able to customize the configuration for additional machines or personal setups.
Compile the code with:
cmake --build build -- -j<number_of_cores_for_build>
After a successful build, the grillix executable will be located in the build/bin directory.
The repository contains tests and a few (slightly outdated) examples. More detailed instructions will be provided soon. In the meantime, you are strongly encouraged to reach out to one of the developers -such as Andreas Stegmeir (Andreas[dot]Stegmeir[at]ipp[dot]mpg[dot]de)- who will be happy to assist you in getting started with running simulations.
GRILLIX is developed at the Max Planck Institute for Plasma Physics, located at Boltzmannstraße 2, 85748 Garching, Germany.
For a complete list of contributors, please refer to the Contributors page.
GRILLIX is licensed under version 3 of the GNU General Public License (GPLv3). See LICENSE file.