File gyro_average.cxx

Functions

Field3D gyroTaylor0(const Field3D &f, const Field3D &rho)

Gyro-average using Taylor series approximation

\( \Gamma(f) = f + \rho^2 \nabla_\perp^2(f)\)

Note: Faster, but less robust than Pade approximations

Parameters
  • f: The field to gyro-average
  • rho: Gyro-radius

Field3D gyroPade0(const Field3D &f, BoutReal rho, int inner_boundary_flags, int outer_boundary_flags)
Field3D gyroPade0(const Field3D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)
Field3D gyroPade0(const Field3D &f, const Field3D &rho, int inner_boundary_flags, int outer_boundary_flags)

Gyro-average using Pade approximation

\( \Gamma_0 = (1 - \rho^2 \nabla_\perp^2)g = f\)

NOTE: Uses Z average of rho for efficient inversion

Parameters
  • f: The field to gyro-average
  • rho: Gyro-radius
  • flags: Flags to be passed to the Laplacian inversion operator

Field3D gyroPade1(const Field3D &f, BoutReal rho, int inner_boundary_flags, int outer_boundary_flags)
Field3D gyroPade1(const Field3D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)
Field3D gyroPade1(const Field3D &f, const Field3D &rho, int inner_boundary_flags, int outer_boundary_flags)

Pade approximation \(Gamma_1 = (1 - \frac{1}{2} \rho^2 \nabla_\perp^2)g = f\)

Note: Have to use Z average of rho for efficient inversion

Parameters
  • f: The field to gyro-average
  • rho: Gyro-radius
  • flags: Flags to be passed to the Laplacian inversion operator

Field2D gyroPade1(const Field2D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)
Field3D gyroPade2(const Field3D &f, BoutReal rho, int inner_boundary_flags, int outer_boundary_flags)
Field3D gyroPade2(const Field3D &f, const Field2D &rho, int inner_boundary_flags, int outer_boundary_flags)
Field3D gyroPade2(const Field3D &f, const Field3D &rho, int inner_boundary_flags, int outer_boundary_flags)

Pade approximation

\[ \Gamma_2(f) = \frac{1}{2}\rho^2 \nabla_\perp^2 ( 1 - \frac{1}{2} \rho^2 \nabla_\perp^2)^{-1}\Gamma_1(f) \]

Note: Have to use Z average of rho for efficient inversion

Parameters
  • f: The field to gyro-average
  • rho: Gyro-radius
  • flags: Flags to be passed to the Laplacian inversion operator

Field3D gyroPade0(const Field3D &f, BoutReal rho, int flags)
Field3D gyroPade0(const Field3D &f, const Field2D &rho, int flags)
Field3D gyroPade0(const Field3D &f, const Field3D &rho, int flags)
Field3D gyroPade1(const Field3D &f, BoutReal rho, int flags)
Field3D gyroPade1(const Field3D &f, const Field2D &rho, int flags)
Field3D gyroPade1(const Field3D &f, const Field3D &rho, int flags)
Field2D gyroPade1(const Field2D &f, const Field2D &rho, int flags)
Field3D gyroPade2(const Field3D &f, BoutReal rho, int flags)
Field3D gyroPade2(const Field3D &f, const Field2D &rho, int flags)
Field3D gyroPade2(const Field3D &f, const Field3D &rho, int flags)