|
PB3D [2.47]
Ideal linear high-n MHD stability in 3-D
|
Operations on HELENA variables. More...
Functions/Subroutines | |
| integer function, public | read_hel (n_r_in, use_pol_flux_h) |
| Reads the HELENA equilibrium data. | |
| integer function, public | interp_hel_on_grid (grid_in, grid_out, eq_2, x_1, x_2, eq_2_out, x_1_out, x_2_out, eq_1, grid_name) |
| Interpolate variables resulting from HELENA equilibria to another grid (angularly). | |
| integer function, public | test_metrics_h () |
| Checks whether the metric elements provided by HELENA are consistent with a direct calculation using the coordinate transformations [17]. | |
| integer function, public | test_harm_cont_h () |
| Investaige harmonic content of the HELENA variables. | |
Operations on HELENA variables.
| integer function, public helena_ops::interp_hel_on_grid | ( | type(grid_type), intent(in) | grid_in, |
| type(grid_type), intent(in) | grid_out, | ||
| type(eq_2_type), intent(inout), optional | eq_2, | ||
| type(x_1_type), intent(inout), optional | x_1, | ||
| type(x_2_type), intent(inout), optional | x_2, | ||
| type(eq_2_type), intent(inout), optional | eq_2_out, | ||
| type(x_1_type), intent(inout), optional | x_1_out, | ||
| type(x_2_type), intent(inout), optional | x_2_out, | ||
| type(eq_1_type), intent(in), optional | eq_1, | ||
| character(len=*), intent(in), optional | grid_name ) |
Interpolate variables resulting from HELENA equilibria to another grid (angularly).
The input and output grid to be provided depend on the quantities to be interpolated:
Also, a message can be printed if a grid name is passed.
| [in] | grid_in | input grid |
| [in] | grid_out | output grid |
| [in,out] | eq_2 | general metric equilibrium variables |
| [in,out] | x_1 | general vectorial perturbation variables |
| [in,out] | x_2 | general tensorial perturbation variables |
| [in,out] | eq_2_out | field-aligned metric equilibrium variables |
| [in,out] | x_1_out | field-aligned vectorial perturbation variables |
| [in,out] | x_2_out | field-aligned tensorial perturbation variables |
| [in] | eq_1 | general flux equilibrium variables for metric interpolation |
| [in] | grid_name | name of grid to which to adapt quantities |
Definition at line 548 of file HELENA_ops.f90.
| integer function, public helena_ops::read_hel | ( | integer, intent(inout) | n_r_in, |
| logical, intent(inout) | use_pol_flux_h ) |
Reads the HELENA equilibrium data.
Adapted from HELENA routine IODSK.
The variales in the HELENA mapping file are globalized in two ways:
R_vac and toroidal field at the geometric axis B_vac.The covariant toroidal field F_H, pres_H and poloidal flux are normalized w.r.t magnetic axis R_m and total toroidal field at magnetic axis B_m:
The first normalization type is the HELENA normalization, whereas the second is the MISHKA normalization.
Everything is translated to MISHKA normalization to make comparison with MISHKA simple. This is done using the factors:
Finally, in HELENA, the total current I, the poloidal beta and the density at the geometric axis can be prescribed through:
where a_vac = eps R_vac and B_vac are vacuum quantities, S is the 2-D cross-sectional area and <p> is the 2-D averaged pressure.
radius is in the mapping file (12), as well as in the HELENA output (20).eps is in the mapping file (12), as well as in the HELENA input (10) and output (20).B0 is in the mapping file (12), as well as in the HELENA output (20). ZN0 from HELENA input (10). | [in,out] | n_r_in | nr. of normal points in input grid |
| [in,out] | use_pol_flux_h | .true. if HELENA equilibrium is based on pol. flux |
Definition at line 83 of file HELENA_ops.f90.
| integer function, public helena_ops::test_harm_cont_h |
Investaige harmonic content of the HELENA variables.
Definition at line 1484 of file HELENA_ops.f90.
| integer function, public helena_ops::test_metrics_h |
Checks whether the metric elements provided by HELENA are consistent with a direct calculation using the coordinate transformations [17].
Direct calculations used:
\[\begin{aligned} \left|\nabla \psi\right|^2 &= \frac{1}{\mathcal{J}^2} \left(\left(\frac{\partial Z}{\partial \chi}\right)^2 + \left(\frac{\partial R}{\partial \chi}\right)^2\right) \\ \left|\nabla \psi \cdot \nabla \chi\right| &= \frac{1}{\mathcal{J}^2} \left( \frac{\partial Z}{\partial \chi} \frac{\partial Z}{\partial \psi} - \frac{\partial R}{\partial \chi} \frac{\partial R}{\partial \psi} \right) \\ \left|\nabla \chi\right|^2 &= \frac{1}{\mathcal{J}^2} \left(\left(\frac{\partial Z}{\partial \psi}\right)^2 + \left(\frac{\partial R}{\partial \psi}\right)^2\right) \\ \left|\nabla \phi\right|^2 &= \frac{1}{R^2} \end{aligned}\]
with
\[\mathcal{J} = \frac{\partial Z}{\partial \psi} \frac{\partial R}{\partial \chi} - \frac{\partial R}{\partial \psi} \frac{\partial Z}{\partial \chi}\]
Also, test whether the pressure balance \(\nabla p = \vec{J}\times\vec{B} \) is satisfied.
Definition at line 1288 of file HELENA_ops.f90.