precession Module


Uses

  • module~~precession~~UsesGraph module~precession precession ieee_arithmetic ieee_arithmetic module~precession->ieee_arithmetic module~constants constants module~precession->module~constants module~field_base field_base module~precession->module~field_base module~fieldline_mod fieldline_mod module~precession->module~fieldline_mod module~grid_mod grid_mod module~precession->module~grid_mod module~field_base->module~constants module~fieldline_mod->module~constants module~grid_mod->ieee_arithmetic module~grid_mod->module~constants module~grid_mod->module~field_base module~grid_mod->module~fieldline_mod interpolate interpolate module~grid_mod->interpolate

Used by

  • module~~precession~~UsedByGraph module~precession precession program~electric_rabe electric_rabe program~electric_rabe->module~precession

Variables

Type Visibility Attributes Name Initial
logical, public, parameter :: ignore_magnetic_drift = .true.

Derived Types

type, public ::  bounce_integrals_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: M_pol
real(kind=dp), public :: N_tor
real(kind=dp), public :: nfp
real(kind=dp), public :: iota
real(kind=dp), public, dimension(:), allocatable :: t
real(kind=dp), public, dimension(:), allocatable :: eta
real(kind=dp), public, dimension(:), allocatable :: avg_I_j
real(kind=dp), public, dimension(:), allocatable :: avg_bounce_time_weighted
real(kind=dp), public, dimension(:), allocatable :: avg_magnetic_drift_weighted
real(kind=dp), public, dimension(:, :), allocatable :: radial_drift_sin
integer, public :: n_modes

Functions

public function get_max_valid_l_c(bounce_integrals, Omega_hat) result(l_c_max)

Longest l_c for which the flux modes are resolved by the eta grid (m=1). For large l_c*Omega_hat the solution is confined to a layer at eta_c of width delta^2 = eta_c I_B/(|kappa| tau_b) with kappa = l_c nfp Omega_hat/(2 (M iota - N)); the layer has to contain at least min_points_in_layer grid points (eta - eta_c = k^2 x_1). The weak log dependence of tau_b on delta is neglected.

Arguments

Type IntentOptional Attributes Name
type(bounce_integrals_t), intent(in) :: bounce_integrals
real(kind=dp), intent(in) :: Omega_hat

Return Value real(kind=dp)

public function get_smallest_maximum(fieldlines) result(smallest_maximum)

Arguments

Type IntentOptional Attributes Name
class(fieldline_t), intent(in), dimension(:) :: fieldlines

Return Value real(kind=dp)

public function get_biggest_minimum(fieldlines) result(biggest_minimum)

Arguments

Type IntentOptional Attributes Name
class(fieldline_for_precession_t), intent(in), dimension(:) :: fieldlines

Return Value real(kind=dp)

public function has_cos_modes(sin_coeffs, cos_coeffs)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in), dimension(:) :: sin_coeffs
real(kind=dp), intent(in), dimension(:) :: cos_coeffs

Return Value logical


Subroutines

public subroutine setup_bounce_integrals(field, flock, s_tor, bounce_integrals, n_eta, fieldlines_out)

Arguments

Type IntentOptional Attributes Name
class(field_3D_t), intent(in) :: field
type(flock_of_fieldlines_t), intent(in) :: flock
real(kind=dp), intent(in) :: s_tor
type(bounce_integrals_t), intent(out) :: bounce_integrals
integer, intent(in), optional :: n_eta
type(fieldline_for_precession_t), intent(out), optional, dimension(:), allocatable :: fieldlines_out

public subroutine make_fieldlines_for_precession(field, flock, fieldlines, n_eta)

Arguments

Type IntentOptional Attributes Name
class(field_3D_t), intent(in) :: field
type(flock_of_fieldlines_t), intent(in) :: flock
type(fieldline_for_precession_t), intent(out), dimension(:), allocatable :: fieldlines
integer, intent(in), optional :: n_eta

public subroutine assemble_bounce_integrals(fieldlines, bounce_integrals)

Arguments

Type IntentOptional Attributes Name
type(fieldline_for_precession_t), intent(in), dimension(:) :: fieldlines
type(bounce_integrals_t), intent(out) :: bounce_integrals

public subroutine compute_flux_modes(bounce_integrals, l_c, Omega_hat, flux_modes)

Arguments

Type IntentOptional Attributes Name
type(bounce_integrals_t), intent(in) :: bounce_integrals
real(kind=dp), intent(in) :: l_c
real(kind=dp), intent(in) :: Omega_hat
real(kind=dp), intent(out), dimension(:), allocatable :: flux_modes

public subroutine set_fieldline_minima(field, fieldlines)

Arguments

Type IntentOptional Attributes Name
class(field_t), intent(in) :: field
class(fieldline_for_precession_t), intent(inout), dimension(:) :: fieldlines

public subroutine find_magnetic_well_bottom(field, fieldline, phi_bottom, B_bottom)

Arguments

Type IntentOptional Attributes Name
class(field_t), intent(in) :: field
class(fieldline_t), intent(in) :: fieldline
real(kind=dp), intent(out) :: phi_bottom
real(kind=dp), intent(out) :: B_bottom