PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Calculates the toroidal difference for a magnitude calculated on three toroidal points: two extremities and one in the middle. More...
Public Member Functions | |
integer function | calc_tor_diff_0d (v_mag, theta, norm_disc_prec, absolute, r) |
0-D version More... | |
integer function | calc_tor_diff_2d (v_com, theta, norm_disc_prec, absolute, r) |
2-D version More... | |
Calculates the toroidal difference for a magnitude calculated on three toroidal points: two extremities and one in the middle.
This is done using the formula
\[ \frac{b-a}{b+a} , \]
for the relative difference between \(a\) and \(b\). This is useful when it is used to calculate a toroidal ripple and these are the extreme points.
The procedure also needs the map between the flux poloidal angle and the geometrical poloidal angle.
In a first step the quantity is interpolated on an equidistant grid in the geometrical poloidal angle.
The difference is then calculated for values of constant geometric poloidal angle.
Finally, this result is transformed back to the Flux coordinates.
Definition at line 109 of file grid_utilities.f90.
integer function grid_utilities::calc_tor_diff::calc_tor_diff_0d | ( | real(dp), dimension(:,:,:), intent(inout) | v_mag, |
real(dp), dimension(:,:,:), intent(in) | theta, | ||
integer, intent(in) | norm_disc_prec, | ||
logical, intent(in), optional | absolute, | ||
real(dp), dimension(:), intent(in), optional | r | ||
) |
0-D version
[in,out] | v_mag | magnitude (dim1,dim2,dim3) |
[in] | theta | geometric poloidal angle |
[in] | norm_disc_prec | precision for normal derivatives |
[in] | absolute | calculate absolute, not relative, difference |
[in] | r | normal positions for theta |
Definition at line 746 of file grid_utilities.f90.
integer function grid_utilities::calc_tor_diff::calc_tor_diff_2d | ( | real(dp), dimension(:,:,:,:,:), intent(inout) | v_com, |
real(dp), dimension(:,:,:), intent(in) | theta, | ||
integer, intent(in) | norm_disc_prec, | ||
logical, intent(in), optional | absolute, | ||
real(dp), dimension(:), intent(in), optional | r | ||
) |
2-D version
[in,out] | v_com | covariant and contravariant components (dim1,dim2,dim3,3,2) |
[in] | theta | geometric poloidal angle |
[in] | norm_disc_prec | precision for normal derivatives |
[in] | absolute | calculate absolute, not relative, difference |
[in] | r | normal positions for theta |
Definition at line 633 of file grid_utilities.f90.