PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Interfaces and Types | Functions/Subroutines | Variables
eq_vars Module Reference

Variables that have to do with equilibrium quantities and the grid used in the calculations: More...

Interfaces and Types

type  eq_1_type
 flux equilibrium type More...
 
type  eq_2_type
 metric equilibrium type More...
 

Functions/Subroutines

subroutine init_eq_1 (eq, grid, setup_E, setup_F)
 Initializes new flux equilibrium. More...
 
subroutine init_eq_2 (eq, grid, setup_E, setup_F)
 Initializes new metric equilibrium. More...
 
subroutine copy_eq_1 (eq_i, grid_i, eq_o)
 Deep copy of flux equilibrium variables. More...
 
subroutine copy_eq_2 (eq_i, grid_i, eq_o)
 Deep copy of metric equilibrium variables. More...
 
subroutine dealloc_eq_1 (eq)
 Deallocates flux equilibrium quantities. More...
 
subroutine dealloc_eq_2 (eq)
 Deallocates metric equilibrium quantities. More...
 

Variables

real(dp), public r_0
 independent normalization constant for nondimensionalization More...
 
real(dp), public pres_0
 independent normalization constant for nondimensionalization More...
 
real(dp), public rho_0
 independent normalization constant for nondimensionalization More...
 
real(dp), public b_0
 derived normalization constant for nondimensionalization More...
 
real(dp), public psi_0
 derived normalization constant for nondimensionalization More...
 
real(dp), public t_0
 derived normalization constant for nondimensionalization More...
 
real(dp), public vac_perm = mu_0_original
 either usual mu_0 (default) or normalized More...
 
real(dp), public max_flux_e
 max. flux in Equilibrium coordinates, set in calc_norm_range_PB3D_in More...
 
real(dp), public max_flux_f
 max. flux in Flux coordinates, set in calc_norm_range_PB3D_in More...
 
integer, public n_alloc_eq_1s
 nr. of allocated eq_1 variables More...
 
integer, public n_alloc_eq_2s
 nr. of allocated eq_2 variables More...
 

Detailed Description

Variables that have to do with equilibrium quantities and the grid used in the calculations:

Note
In general in PB3D, there are two kinds of variables, differing from one another in the way in which they are tabulated:
  • variables tabulated on the full output grid of the equilibrium code
  • variables tabulated in an internal grid of this code
In many places in the code a range in the normal coordinate is selected for each of the variables on different processes. This selection has to be done correctly and things can get a little bit complicated if trimmed grids are used (grids that have no overlap between processes).
See also
grid_ops()

Function/Subroutine Documentation

◆ copy_eq_1()

subroutine eq_vars::copy_eq_1 ( class(eq_1_type), intent(in)  eq_i,
type(grid_type), intent(in)  grid_i,
type(eq_1_type), intent(inout)  eq_o 
)

Deep copy of flux equilibrium variables.

Parameters
[in]eq_ieq_1 to be copied
[in]grid_igrid of eq_i
[in,out]eq_ocopied eq_1

Definition at line 439 of file eq_vars.f90.

◆ copy_eq_2()

subroutine eq_vars::copy_eq_2 ( class(eq_2_type), intent(in)  eq_i,
type(grid_type), intent(in)  grid_i,
type(eq_2_type), intent(inout)  eq_o 
)

Deep copy of metric equilibrium variables.

Returns
ierr
Parameters
[in]eq_ieq_2 to be copied
[in]grid_igrid of eq_i
[in,out]eq_ocopied eq_1

Definition at line 477 of file eq_vars.f90.

◆ dealloc_eq_1()

subroutine eq_vars::dealloc_eq_1 ( class(eq_1_type), intent(inout)  eq)

Deallocates flux equilibrium quantities.

Parameters
[in,out]eqequilibrium to be deallocated

Definition at line 531 of file eq_vars.f90.

+ Here is the call graph for this function:

◆ dealloc_eq_2()

subroutine eq_vars::dealloc_eq_2 ( class(eq_2_type), intent(inout)  eq)

Deallocates metric equilibrium quantities.

Parameters
[in,out]eqequilibrium to be deallocated

Definition at line 578 of file eq_vars.f90.

+ Here is the call graph for this function:

◆ init_eq_1()

subroutine eq_vars::init_eq_1 ( class(eq_1_type), intent(inout)  eq,
type(grid_type), intent(in)  grid,
logical, intent(in), optional  setup_E,
logical, intent(in), optional  setup_F 
)

Initializes new flux equilibrium.

The normal and angular grid can be in any coord. system, as only the grid sizes are used, not the coordinate values.

Optionally, it can be chosen individually whether the E or F(D) quantities are allocated. D means that the derivatives are in F as well. The rationale behind this is that the E quantities are only used in the pre-perturbation phase.

Note
  1. The E quantities are not written in eq_ops.print_output_eq().
  2. The quantities that do not have a derivative are considered F quantities. Alternatively, all quantities that have only one version, are considered F quantities, such as rho, kappa_n, ...
  3. The maximum derivative degree for flux quantities is one higher than max_deriv, because the derivative of some of them appear in the transformation matrices.
Parameters
[in,out]eqequilibrium to be initialized
[in]gridequilibrium grid
[in]setup_ewhether to set up E
[in]setup_fwhether to set up F

Definition at line 174 of file eq_vars.f90.

+ Here is the call graph for this function:

◆ init_eq_2()

subroutine eq_vars::init_eq_2 ( class(eq_2_type), intent(inout)  eq,
type(grid_type), intent(in)  grid,
logical, intent(in), optional  setup_E,
logical, intent(in), optional  setup_F 
)

Initializes new metric equilibrium.

See also
For explanation see init_eq_1().
Note
The maximum derivative degree for R, Z and lambda is one higher than max_deriv, because their first derivative already appears in g_C and h_C.
Parameters
[in,out]eqequilibrium to be initialized
[in]gridequilibrium grid
[in]setup_ewhether to set up E
[in]setup_fwhether to set up F

Definition at line 273 of file eq_vars.f90.

+ Here is the call graph for this function:

Variable Documentation

◆ b_0

real(dp), public eq_vars::b_0

derived normalization constant for nondimensionalization

Definition at line 45 of file eq_vars.f90.

◆ max_flux_e

real(dp), public eq_vars::max_flux_e

max. flux in Equilibrium coordinates, set in calc_norm_range_PB3D_in

Definition at line 49 of file eq_vars.f90.

◆ max_flux_f

real(dp), public eq_vars::max_flux_f

max. flux in Flux coordinates, set in calc_norm_range_PB3D_in

Definition at line 50 of file eq_vars.f90.

◆ n_alloc_eq_1s

integer, public eq_vars::n_alloc_eq_1s

nr. of allocated eq_1 variables

Note
Debug version only

Definition at line 53 of file eq_vars.f90.

◆ n_alloc_eq_2s

integer, public eq_vars::n_alloc_eq_2s

nr. of allocated eq_2 variables

Note
Debug version only

Definition at line 55 of file eq_vars.f90.

◆ pres_0

real(dp), public eq_vars::pres_0

independent normalization constant for nondimensionalization

Definition at line 43 of file eq_vars.f90.

◆ psi_0

real(dp), public eq_vars::psi_0

derived normalization constant for nondimensionalization

Definition at line 46 of file eq_vars.f90.

◆ r_0

real(dp), public eq_vars::r_0

independent normalization constant for nondimensionalization

Definition at line 42 of file eq_vars.f90.

◆ rho_0

real(dp), public eq_vars::rho_0

independent normalization constant for nondimensionalization

Definition at line 44 of file eq_vars.f90.

◆ t_0

real(dp), public eq_vars::t_0

derived normalization constant for nondimensionalization

Definition at line 47 of file eq_vars.f90.

◆ vac_perm

real(dp), public eq_vars::vac_perm = mu_0_original

either usual mu_0 (default) or normalized

Definition at line 48 of file eq_vars.f90.