Skip to content
Snippets Groups Projects
To learn more about this project, read the wiki.
README.md 6.13 KiB
Turbulence in a Z-pinch (the axis (r,z) corresponds to (x,y) in the current version of the code)

GYACOMO (Gyrokinetic Advanced Collision Moment solver, 2021) Copyright (C) 2022 EPFL

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Author: Antoine C.D. Hoffmann

Citing GYACOMO

If you use GYACOMO in your work, please cite the following paper:

Hoffmann, A., Frei, B., & Ricci, P. (2023). Gyrokinetic simulations of plasma turbulence in a Z-pinch using a moment-based approach and advanced collision operators. Journal of Plasma Physics, 89(2), 905890214. doi:10.1017/S0022377823000284

How to compile and run GYACOMO

A tutorial is present on the code's wiki https://gitlab.epfl.ch/ahoffman/gyacomo/-/wikis/home.

(older guideline) To compile and run GYACOMO, follow these steps:

  1. Make sure the correct library paths are set in local/dirs.inc. Refer to INSTALATION.txt for instructions on installing the required libraries.
  2. Go to the /gyacomo directory and run make to compile the code. The resulting binary will be located in /gyacomo/bin. You can also compile a debug version by running make dbg.
  3. The file fort.90 should contain the parameters for a typical CBC. To test the compilation, navigate to the directory where fort.90 is located and run the executable /bin/gyacomo.
  4. GYACOMO can be run in parallel using MPI by running mpirun -np N ./bin/gyacomo Np Ny Nz, where N = Np x Ny x Nz is the number of processes and Np Ny Nz are the parallel dimensions in Hermite polynomials, binormal direction, and parallel direction, respectively.
  5. To stop the simulation without corrupting the output file, create a blank file called "mystop" using touch mystop in the directory where the simulation is running. The file will be removed once it is read.
  6. It is possible to chain simulations by using the parameter "Job2load" in the fort.90 file. For example, to restart a simulation from the latest 5D state saved in outputs_00.h5, create a new fort.90 file called fort_01.90 and set "Job2load" to 0. Then run GYACOMO with the command ./gyacomo 0 or mpirun -np N ./gyacomo Np Ny Nz 0. This will create a new output file called output_01.h5.
  7. To generate plots and gifs using the simulation results, use the script gyacomo/wk/gyacomo_analysis.m and specify the directory where the results are located. Note that this script is not currently a function.

Note: For some collision operators (Sugama and Full Coulomb), you will need to run COSOlver from B.J.Frei to generate the required matrices in the gyacomo/iCa folder before running GYACOMO.

Changelog

4.x GYACOMO

4.1 Miller geometry is added and benchmarked for CBC adiabatic electrons

4.0 new name and opening the code with GNU GPLv3 license

3.x HeLaZ 3D (flux tube s-alpha)

3.9 HeLaZ can now evolve electromagnetic fluctuations by solving Ampere equations (benchmarked linearly)