PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
This page describes the various outputs that PB3D and POST can produce.
On the one hand, there are various text output files, which are discussed in section Output Files.
Furthermore, a multitude of plots can be produced. This is the topic of section Output Plots.
Some of these files are opened in open_output(), but others are opened afterwards.
Both PB3D and POST produce a log file, in addition to what is produced on the screen.
These log files are called PB3D_out.txt
and POST_out.txt
and they contain the same information as the output on the screen, but without the special formatting provided by the foul library (see Introduction).
Some output routines make use of use_execute_command_line() in order to execute shell commands. This can be, for example, the creation of a plot by calling GnuPlot, among other things.
However, this often does not work well by default (see 30 in Input variables). In PB3D and POST, therefore, by default, these commands are not executed, but written to an output file. After execution of PB3D and POST has finished, this file can be made executed.
This behavior can be changed using the –do_execute_command_line
flag (see Input variables).
PB3D writes variables to an HDF5 output file during execution, as shown in table 1. Note that there is a difference between the equilibrium styles because of the way how the equilibrium codes provide output:
eq_style = 1
) produces double Fourier series:eq_style = 2
) produces 2-D tables for the poloidal cross-section.variable type | VMEC (eq_style = 1 ) | HELENA (eq_style = 2 ) |
---|---|---|
inputs | in preliminary phase | |
grids of grid_vars.grid_type | equilibrium | |
field-aligned-grid at every Richardson level | ||
also output HELENA grid at first Richardson level | ||
used later for interpolation to field-aligned grid | ||
perturbation | ||
field-aligned-grid at every Richardson level | ||
also output HELENA grid at first Richardson level | ||
used later for interpolation to field-aligned grid | ||
solution | ||
only at first Richardson level | ||
flux equilibria of eq_vars.eq_1_type | only at first Richardson level | |
metric equilibria of eq_vars.eq_2_type | only at first Richardson level | |
also output HELENA grid at first Richardson level | ||
used later for interpolation to field-aligned grid | ||
vacuums of vac_vars.vac_type | at every Richardson level | only at first Richardson level |
solutions of sol_vars.sol_type | at every Richardson level |
This data is used for Richardson restart (see variable rich_restart_lvl
in Input variables).
In the post-processing phase, POST reads this data as well.
In each Richardson extrapolation level, after the solution of the eigenvalue system of equations, eigenvalues are stored in PB3D.
option
retain_all_sol in Input file.If energy reconstruction is performed by POST (see plot_E_rec
in Input variables), the individual terms that make up the perturbed potential energy as well as the kinetic energy of the perturbation are calculated and plot. (3) Furthermore, the integration of these quantities over the whole volume, is returned in an output file.
In table 2, an overview is given of the different terms. Here, \(\rho\) is the density, \(\sigma = \frac{\vec{B}\cdot\vec{J}}{B^2}\) is the parallel current and \(\kappa = \frac{\vec{B}}{B} \cdot \nabla \frac{\vec{B}}{B}\) is the magnetic curvature. See calc_e().
potential energy \(E_\text{pot}\) | kinetic energy \(E_\text{kin}\) |
---|---|
|
|
The memory usage of PB3D and POST can be monitored using the optional input argument –mem_info
(see Command-line inputs).
This is a rather crude implementation and more advance profiling methods should be used, such as Scalasca on top of Score-P.
A multitude of plots can be produced by PB3D and POST.
POST can produce all the plots that PB3D can, and some more.
The plots themselves fall in two categories:
ex_plot_style
(see Input variables).eq_style
. See 19 and 20 in Input variables.An overview of possible plots is now given in table 3. The name of the respective input parameter is provided as well. See Input variables.
plot type | external plot | HDF5 plot |
---|---|---|
flux quantities (plot_flux_q ) |
|
|
resonance (plot_resonance ) | safety factor \(q\) (poloidal flux) or rotational transform \(\iota\) (toroidal flux) with the indication of the resonant flux surfaces (1) | surfaces of resonant values for safety factor \(q\) (poloidal flux) or rotational transform \(\iota\) (toroidal flux) (1) |
magnetic grid (plot_magn_grid ) | magnetic grid lines in the magnetic flux surfaces, as a time collection | |
magnetic field \(\vec{B}\) (plot_B ) | co- and contravariant components of magnetic field, as well as magnitude and vector plot | |
current density \(\vec{J}\) (plot_J ) | co- and contravariant components of current density, as well as magnitude and vector plot | |
magnetic curvature \(\vec{\kappa}\) (plot_kappa ) | co- and contravariant components of magnetic curvature, as well as magnitude and vector plot | |
solution normal mode \(\vec{\xi}\) (plot_sol_xi ) | real and imaginary part and phase of perturbation of position, as well as vector plot | |
perturbated magnetic field due to solution normal mode \(\vec{Q}\) (plot_sol_Q ) | real and imaginary part and phase of perturbation of magnetic field, as well as vector plot | |
energy reconstruction (plot_E_rec ) | different components of energy reconstruction, integrated as well as profiles (2) |
use_pol_flux_F
in Input variables. POST_style = 2
is used, i.e. when the same grid is used as for PB3D.