This page lists some of the diagnostics available to JOREK users. This list is far from complete, and you can help by expanding it.

Diagnostics

There are a lot of diagnostics available for JOREK. Some of the most important:

Program Description
jorek2vtk(_3d) Convert jorek_restart.rst files to VTK files
jorek_read_h5 Python script for reading HDF5 files to VTK objects and files
jorek2vtk_gaussvortterms Calculates the different terms of the vorticity equation integrated in the Gaussian points and creates a VTK file where the different terms can be visualized in the poloidal plane.
jorek2_four Perform a two-dimensional Fourier analysis of the jorek_restart.rst file
jorek2_poincare Create a Poincaré plot for a JOREK restart file
jorek2_postproc The diagnostic program jorek2_postproc is a very flexible diagnostic tool that can be used interactively or using small scripts
jorek2_diagno Extracts some useful data from a JOREK restart file
jorek2_diagno_spi Extracts some useful data from a JOREK restart file, including the SPI fragments position and radius at the time of the restart file
jorek2_connection2 This diagnostic produces a poincaré plot of the magnetic field geometry
jorek2_connection_flux_aligned Calculates connection length to the simulation boundary and the corresponding strike points of field lines on n=0 flux surfaces
jorek2_fields_xyz Calculates B_x, B_y, B_z at given (x,y,z) cartesian coordinates
jorek2_wall_forces Calculates the total wall forces (F_x, F_y, F_z). It needs JOREK-STARWALL
jorek2_fast_camera This diagnostic produces a camera image of the visible plasma (Dalpha)
rst_bin2hdf5 & rst_hdf52bin Convert jorek_restart.rst to jorek_restart.h5 and vice-versa.
plot_live_data.sh Plot several 0D quantities as the simulation runs (gnuplot)
Diagnostic Framework new_diag Allows to evaluate arbitrary physical expressions (current list of expressions) at arbitrary positions in the computational domain either in JOREK units or in SI units. This framework is used by the jorek2_postproc diagnostics for most of its functionality, but even more powerful diagnostics can easily be written on top of the framework.
radiation_function_diagno Output the radiation power function for the hard-coded impurity under hard-coded parameters
jorek2_fieldlines_vtk_newdiag This diagnostic evaluates arbitrary physical expressions (using the new_diag framework) along field lines and writes this information to both vtk and txt files
jorek2_solcurrent This diagnostic postprocesses jorek_restart.h5 to determine scrape-off layer currents (thermo-electric current between target plates) by solving Stangeby eq. 17.29

The diagnostics tools should have been compiled with the same hard-coded parameters as JOREK.

To run diagnostics on Marconi, you may need to book a debug node with a command of the type:

salloc --nodes=1 --time=01:00:00 --exclusive --account=FUA36_MHD --partition=skl_fua_dbg

To run diagnostics on Leonardo DCGP, you may need to book a debug node with a command of the type:

salloc --nodes=1 --time=10:00 --account=FUA38_MHD_0 --partition=dcgp_fua_dbg

and run:

srun jorek2_diagno < jorek_in

Alternatively you can run directly on the login node by first setting the ulimit memory limit to unlimited with:

ulimit -s unlimited

Scripts

A couple of scripts are available in the folder trunk/util/:

Script Description
config.sh List or modify hard-coded parameters
plot_live_data.sh Plot time-traces of energies or growth rates (and more) while a simulation is running or afterwards
plot_grids.sh Plot the grid to a file or the screen
plot_live_data.py Python version of plot_live_data.sh
read_jorek_logfile.py Search JOREK logfile for specific variable
plot_mlog.py Plot memory usage

Output files

During a run some output files are generated. This is a short summary of the different files.

  • macroscopic_vars contains a list of the energies and growth rates in the simulation (and various other quantities)
  • jorek00XXX.rst are snapshots that can be used to restart the simulation
  • boundary.txt
  • equilibrium.txt
  • grid_fluxsurface.dat
  • grid_initial.dat
  • jorek2.ps is generated at the end of the simulation and contains some plots of the energies and magnetic field.
  • qprofile.dat
  • special_equilibrium_points.dat
  • T_rho_profiles.dat