disprels Module

Dispersion relation function and associated eigenfunction and minimization calculations. Required for fpc.f90 (Consider reducing scope with submodule or other approach- fine for now)

!!

!! !!

!!


Used by

  • module~~disprels~~UsedByGraph module~disprels disprels proc~compute_fpc_cart compute_fpc_cart proc~compute_fpc_cart->module~disprels proc~compute_fpc_gyro compute_fpc_gyro proc~compute_fpc_gyro->module~disprels proc~wparth_from_ratio wparth_from_ratio proc~wparth_from_ratio->module~disprels program~plume plume program~plume->module~disprels

Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: nbrack = 128

Number of Bessel functions to sum

real, private, parameter :: tol = 1.0E-13

Root Search Tolerance

real, private, parameter :: prec = 1.E-7

Root Finding precision


Functions

public function disp(om)

Hot, collisionless dispersion relation Hot plasma dispersion relation with weak neutral-charged collisions

Arguments

Type IntentOptional Attributes Name
complex :: om

Complex Frequency

Return Value complex

private function disp1(om)

Returns Plasma Dispersion Function for input complex frequency and global values of the dimensionless plasma parameters. updated to include weak neutral-charged collision

Arguments

Type IntentOptional Attributes Name
complex :: om

Complex Frequency

Return Value complex

private function disp0(om)

Returns Plasma Dispersion Function for input complex frequency and global values of the dimensionless plasma parameters.

Arguments

Type IntentOptional Attributes Name
complex :: om

Complex Frequency

Return Value complex

public function rtsec(func, x1, x2, xacc, iflag)

Secant routine to find minimum value of dispersion relation function.

Arguments

Type IntentOptional Attributes Name
complex :: func

Function to evaluate.

complex :: x1

Lower bracket value of solution refinement.

complex :: x2

Upper bracket value of solution refinement.

real :: xacc

Solution tolerance.

integer :: iflag

flag for tracking iteration.

Return Value complex

public function zet_in(kpar, zin)

Evaluate Plasma Dispersion Function (Z) for kparallel >/< 0 Calls zetout with appropriate argument.

Arguments

Type IntentOptional Attributes Name
real :: kpar

complex :: zin

Argument of plasma dispersion function.

Return Value complex

Value of plasma dispersion function.

private function zetout(zin)

This is the subroutine used by Linsker to evaluate his Z-function.

Arguments

Type IntentOptional Attributes Name
complex :: zin

Return Value complex

public function bessel(n, x)

Call the correct Numerical Recipes Bessel function bessels is a function which calls the numerical recipes routine of the appropriate order -- this is to avoid to many if - then statements in the program. Note that we are determining I_n(x) e^(-x) to avoid large argument errors.

Arguments

Type IntentOptional Attributes Name
integer :: n

Bessel function order.

real :: x

Bessel function argument.

Return Value real


Subroutines

public subroutine map_search()

Identifies minima in a prescribed region of complex frequency space.

Arguments

None

public subroutine test_disp()

Testing routine for single evaluation of dispersion relation.

Arguments

None

public subroutine refine_guess()

Refine solutions for roots of dispersion relation.

Arguments

None

public subroutine map_scan()

Calculate complex frequency maps for scanned parameters. Intervatively calls map_search over a fixed range of parameters. k_1|=swf k_1|=swf

Arguments

None

public subroutine om_scan(is)

Calculate solutions as a function of the variation of a single parameter. k_1|=swf

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: is

Scan index.

public subroutine om_double_scan()

Calculate solutions as a function of the variation of two parameters, creating a surface in parameter space. k_1|=swf

Read more…

Arguments

None

public subroutine radial_scan()

Calculates normal modes of the system for a specified radial solar wind model (under development) ADD split power calculations here... (KGK)

Arguments

None

private subroutine om_radial(omlast, params, out_unit, fmt, out_type, ir, mod_write)

Scans roots at a given location in parameter space. Used in conjunction with radial_scan.

Arguments

Type IntentOptional Attributes Name
complex, dimension(1:nspec) :: omlast

Arrays with complex frequency for each solution.

real, dimension(1:6,1:nspec) :: params

Species parameters:

integer, dimension(1:nroot_max) :: out_unit

Main output unit.

character(len=100) :: fmt

Output format for dispersion relation.

integer :: out_type

logic for outputing supplementary eigenfunction and heating calculations. 0: Frequency, Eigenfuction, Heating. 1: Frequency, Eigenfuction. 2: Frequency, Heating. 3: Frequency.

integer :: ir

Radial index.

logical :: mod_write

For only writing out every n_scan, not n_scan * n_res steps species parameters: useful for outputing data (INVESTIGATE THIS...)

public subroutine calc_eigen(omega, electric, magnetic, vmean, ns, Ps, Ps_split, eigen_L, heat_L)

Calculates the electric and magnetic fields as well as species velocities and density fluctuations for identified wave as well as the power emission or absorption.

Read more…

Arguments

Type IntentOptional Attributes Name
complex :: omega

Complex Frequency of identified wave.

complex, intent(out), dimension(1:3) :: electric

Complex electric field fluctuations (Ex, Ey, Ez)

complex, intent(out), dimension(1:3) :: magnetic

Complex magnetic field fluctuations (Bx, By, Bz)

complex, intent(out), dimension(1:3,1:nspec) :: vmean

Complex Velocity fluctuations: (Uxs, Uys, Uzs)

complex, intent(out), dimension(1:nspec) :: ns

Complex Density fluctuations.

real, intent(out), dimension(1:nspec) :: Ps

Power into/out of species/components.

real, intent(out), dimension(1:7,1:nspec) :: Ps_split

<<

logical :: eigen_L

Logical for calculating eigenvalues

logical :: heat_L

Logical for calculating heating

private subroutine set_map_pointers(outName, diff, diff2)

Sets step sizes for all classes of parameter scans called in for map_scan. k_1|=swf

Arguments

Type IntentOptional Attributes Name
character(len=150) :: outName

String for I/O identification.

real :: diff

Spacing for scanned parameter.

real :: diff2

Suplemental spacing for scanned parameter.

private subroutine get_out_name(outName, tensorName, fmt, fmt_tnsr, out_type, is, diff, diff2)

Sets I/O strings, step sizes, and formats for om_scan.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=150) :: outName

String for I/O identification.

character(len=150) :: tensorName

String for Susceptability output.

character(len=100) :: fmt

Output format for solution.

character(len=100) :: fmt_tnsr

Output format for susceptibility tensor.

integer :: out_type

logic for outputing supplementary eigenfunction and heating calculations. 0: Frequency, Eigenfuction, Heating. 1: Frequency, Eigenfuction. 2: Frequency, Heating. 3: Frequency.

integer :: is

Scan index

real :: diff

Spacing for scanned parameter.

real :: diff2

Suplemental spacing for scanned parameter.

private subroutine get_double_out_name(outName, tensorName, fmt, fmt_tnsr, out_type, diff)

Sets I/O strings, step sizes, and formats for om_double_scan. k_1|=swf

Arguments

Type IntentOptional Attributes Name
character(len=150) :: outName

String for I/O identification.

character(len=150) :: tensorName

String for Susceptability output.

character(len=100) :: fmt

Output format for solution.

character(len=100) :: fmt_tnsr

Output format for susceptibility tensor.

integer :: out_type

logic for outputing supplementary eigenfunction and heating calculations. 0: Frequency, Eigenfuction, Heating. 1: Frequency, Eigenfuction. 2: Frequency, Heating. 3: Frequency.

real, dimension(1:2,1:2) :: diff

Spacing for scanned parameter.

private subroutine find_minima(val, numroots, iroots, nroots)

Finding minimum values on complex frequency grid.

Arguments

Type IntentOptional Attributes Name
real, dimension(:,:), pointer :: val

Value of Dispersion relation. Covers 0:nr, 0:ni

integer :: numroots

Maximum number of roots.

integer, dimension(1:2,1:numroots) :: iroots

Indices of roots.

integer, intent(out) :: nroots

Number of roots found.