fpc Module

Perturbed distribution function calculation from eigenfunctions and associated routines to calculate the FPC from it


Used by

  • module~~fpc~~UsedByGraph module~fpc fpc program~plume plume program~plume->module~fpc

Variables

Type Visibility Attributes Name Initial
real, public :: bs_last = 0.0

Last Bessel function argument, used to store repeated calculations for efficiency

real, public, allocatable :: jbess(:)

Regular (i.e. not the modified used elsewhere) Bessel functions, stored for efficiency


Functions

public function fs0hat(vperp, vpar, hatV_s, aleph_s)

Determines dimensionless species equilibrium VDF \hat{fs0} at (vperp,vpar)

Arguments

Type IntentOptional Attributes Name
real :: vperp

normalized velocity space

real :: vpar

normalized velocity space

real :: hatV_s

normalized species drift velocity by wpar_s

real :: aleph_s

T_perp/T_parallel_s

Return Value real

public function wparth_from_ratio(is, ef)

(this is basically just a stray minus sign...)

Arguments

Type IntentOptional Attributes Name
integer :: is

species loop counter

complex, dimension(1:3) :: ef

electric field eigenmode

Return Value complex


Subroutines

public subroutine compute_fpc_cart(wrootindex)

Computes the FPC associated with the linear fs1 and eigenfunction response on a square cartesian grid and writes FPC to file

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: wrootindex

Index of the root to compute fs1 and FPC for

public subroutine compute_fpc_gyro(wrootindex)

Computes the FPC associated with the linear fs1 and eigenfunction response on a square cartesian grid and writes fs1 and FPC to file

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: wrootindex

index of selected root

private subroutine calc_fs1(omega, vperp, vpar, phi, ef, bf, hatV_s, q_s, aleph_s, tau_s, mu_s, aleph_r, elecdircontribution, exbar, fs0, fs1, epsSokhotski_Plemelj)

Determine species perturbed VDF fs1 at given (vperp,vpar,phi)

Arguments

Type IntentOptional Attributes Name
complex, intent(in) :: omega

Complex Frequency

real, intent(in) :: vperp

normalized velocity space

real, intent(in) :: vpar

normalized velocity space

real, intent(in) :: phi

azimuthal angle in velocity space

complex, intent(in), dimension(1:3) :: ef

E, B eigenfunctions in all 3 directions

complex, intent(in), dimension(1:3) :: bf

E, B eigenfunctions in all 3 directions

real, intent(in) :: hatV_s

Drift velocity norm to wpar_s

real, intent(in) :: q_s

normalized species charge

real, intent(in) :: aleph_s

T_perp/T_parallel_s

real, intent(in) :: tau_s

T_ref/T_s|_parallel

real, intent(in) :: mu_s

m_ref/m_s

real, intent(in) :: aleph_r

T_perp/T_parallel_R

real, intent(in) :: elecdircontribution

Sets components of Electric field (0 (DEFAULT) (or any other value) = Do not modify, 1=Keep only Ex(i.e.Eperp1), 2=Keep only Ey(i.e.Eperp2), 3=Keep only Ez(i.e.Epar))

complex, intent(in) :: exbar

normalizaiton factor

real, intent(in) :: fs0

normalized zero order distribution

complex, intent(out) :: fs1

first order distribution

real, intent(in) :: epsSokhotski_Plemelj

Small value for Sokhotski_Plemelj when computing moments of fs1; zero when just computing fs1

private subroutine calc_wparth(omega, wparth, is, ef)

wrapper function to compute dimensional thermal velocity

Arguments

Type IntentOptional Attributes Name
complex, intent(in) :: omega

freq of solution

complex, intent(out) :: wparth

dimensional parallel thermal velocity

integer :: is

Spec conter

complex, dimension(1:3) :: ef

electric eigenmode

public subroutine check_nbesmax(vperpmax, tau_s, mu_s, aleph_r)

We approximate the infitine sums, which include terms like j_n(b), as finite sums from n=-Nlarge to Nlarge. Since j_n(b) is pretty small when b = n/2, we just make sure that n is large enough for all b (which is related to vperp) values

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: vperpmax

max value to be computed in normalized velocity space

real, intent(in) :: tau_s

T_ref/T_s|_parallel

real, intent(in) :: mu_s

m_ref/m_s

real, intent(in) :: aleph_r

T_perp/T_parallel_R