fourier_field_t Derived Type

type, public, extends(field_t) :: fourier_field_t

Magnetic field from a flat list of Boozer Fourier modes, evaluated via 2D spline interpolation.

The field strength is given by B(theta, phi) = sum_k B_mn(k) * cos(m(k)*theta - nfp*n(k)*phi) where theta and phi are Boozer angles and nfp the number of field periods.


Inherits

type~~fourier_field_t~~InheritsGraph type~fourier_field_t fourier_field_t SplineData2D SplineData2D type~fourier_field_t->SplineData2D spl type~field_t field_t type~fourier_field_t->type~field_t

Components

Type Visibility Attributes Name Initial
logical, public :: initialized = .false.
type(SplineData2D), public :: spl
real(kind=dp), public :: nfp
real(kind=dp), public :: B_theta_covariant
real(kind=dp), public :: B_phi_covariant
integer, public :: n_grid
integer, public :: mn_max

Type-Bound Procedures

procedure, public :: compute_B_sqrtg_dB_dx

  • private subroutine compute_B_sqrtg_dB_dx(self, theta, phi, B_mod, sqrtg, dB_dx)

    Arguments

    Type IntentOptional Attributes Name
    class(fourier_field_t), intent(in) :: self
    real(kind=dp), intent(in) :: theta
    real(kind=dp), intent(in) :: phi
    real(kind=dp), intent(out) :: B_mod
    real(kind=dp), intent(out) :: sqrtg
    real(kind=dp), intent(out) :: dB_dx(3)

procedure, public :: compute_B_and_dB_dx

  • private subroutine compute_B_and_dB_dx(self, theta, phi, B_mod, dB_dx)

    Arguments

    Type IntentOptional Attributes Name
    class(fourier_field_t), intent(in) :: self
    real(kind=dp), intent(in) :: theta
    real(kind=dp), intent(in) :: phi
    real(kind=dp), intent(out) :: B_mod
    real(kind=dp), intent(out) :: dB_dx(3)

procedure, public :: compute_B_mod

  • private subroutine compute_B_mod(self, theta, phi, B_mod)

    Evaluate the spline-interpolated field strength B_mod at Boozer angles.

    Arguments

    Type IntentOptional Attributes Name
    class(fourier_field_t), intent(in) :: self
    real(kind=dp), intent(in) :: theta

    poloidal Boozer angle in radians

    real(kind=dp), intent(in) :: phi

    toroidal Boozer angle in radians

    real(kind=dp), intent(out) :: B_mod

    magnetic field strength in Tesla

procedure, public :: compute_nabla_s

  • private subroutine compute_nabla_s(self, theta, phi, nabla_s)

    Arguments

    Type IntentOptional Attributes Name
    class(fourier_field_t), intent(in) :: self
    real(kind=dp), intent(in) :: theta
    real(kind=dp), intent(in) :: phi
    real(kind=dp), intent(out) :: nabla_s

procedure, public :: rel_accuracy_B

  • private function rel_accuracy_B(self)

    Arguments

    Type IntentOptional Attributes Name
    class(fourier_field_t), intent(in) :: self

    Return Value real(kind=dp)

procedure, public :: get_covariant_components

  • private subroutine get_covariant_components(self, B_theta_covariant, B_phi_covariant)

    Arguments

    Type IntentOptional Attributes Name
    class(fourier_field_t), intent(in) :: self
    real(kind=dp), intent(out) :: B_theta_covariant
    real(kind=dp), intent(out) :: B_phi_covariant