physics_functions Module

Contains various functions for calculating physically relevant quantities


Used by


Interfaces

interface

  • public pure module function logLee(Te, ne) result(res)

    Calculate Coulomb logarithm for electron-electron collisions (NRL Formulary 2013 page 34 equation a)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: Te

    Electron temperature in eV

    real(kind=rk), intent(in) :: ne

    Electron density in m^{-3}

    Return Value real(kind=rk)

interface

  • public pure module function logLei(Te, ne, Z) result(res)

    Calculate Coulomb logarithm for electron-ion collisions (NRL Formulary 2013 page 34 equation b). Assumes Te > TiZme/mi

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: Te

    Electron temperature in eV

    real(kind=rk), intent(in) :: ne

    Electron density in m^{-3}

    real(kind=rk), intent(in) :: Z

    Ion charge

    Return Value real(kind=rk)

interface

  • public pure module function logLii(Z1, Z2, mRatio, n1, n2, T1, T2) result(res)

    Calculate Coulomb logarithm for ion-ion collisions (NRL Formulary 2013 page 34 equation c).

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: Z1

    Ion charge for first species

    real(kind=rk), intent(in) :: Z2

    Ion charge for second species

    real(kind=rk), intent(in) :: mRatio

    Mass ratio m2/m1

    real(kind=rk), intent(in) :: n1

    First ion species density in m^{-3}

    real(kind=rk), intent(in) :: n2

    Second ion species density in m^{-3}

    real(kind=rk), intent(in) :: T1

    First ion temperature in eV

    real(kind=rk), intent(in) :: T2

    Second ion temperature in eV

    Return Value real(kind=rk)

interface

  • public pure module function shPotDrop(massRatio, tempRatio) result(res)

    Calculate sheath potential drop for 2 component plasma in units of kTe/e

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: massRatio

    Mass ratio me/mi

    real(kind=rk), intent(in) :: tempRatio

    Ion to electron temperature ratio

    Return Value real(kind=rk)

interface

  • public pure module function collTimeei(Te, ne, Z, logL) result(res)

    Calculate electron-ion collision time in seconds. This is not the Braginskii time, which can be calculated as this value multiplied by 4/(3*sqrt(pi)) .

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: Te

    Electron temperature in eV

    real(kind=rk), intent(in) :: ne

    Electron density in m^{-3}

    real(kind=rk), intent(in) :: Z

    Ion charge

    real(kind=rk), intent(in) :: logL

    Coulomb logarithm to be used

    Return Value real(kind=rk)

interface

  • public pure module function elPlasmaOscFreq(ne) result(res)

    Calculate cold electron plasma oscillation frequency in s^{-1}

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: ne

    Electron density in m^{-3}

    Return Value real(kind=rk)

interface

  • public pure module function elVthermal(Te) result(res)

    Mean thermal electron speed

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: Te

    Electron temperature in eV

    Return Value real(kind=rk)

interface

  • public pure module function vSonic(Te, Ti, mi, ePolytropic, iPolytropic) result(res)

    Sonic speed caclulated as sqrt((ePolyTe + iPolyTi)/mi)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: Te

    Electron temperature in eV

    real(kind=rk), intent(in) :: Ti

    Ion temperature in eV

    real(kind=rk), intent(in) :: mi

    Ion mass

    real(kind=rk), intent(in) :: ePolytropic

    Electron polytropic coefficient

    real(kind=rk), intent(in) :: iPolytropic

    Ion polytropic coefficient

    Return Value real(kind=rk)

interface

  • public pure module function normMaxwellian(n, T, vPoints) result(res)

    Returns a normalized stationary Maxwellian evaluated at vPoints. Assumes that velocity and temperature are normalized in such way that m v_0^2/2 = kT_0 , and the returned value is normalized to 1/v_0^(3/2).

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in) :: n

    Density in arbitrary units

    real(kind=rk), intent(in) :: T

    Temperature in units compatible with velocity grid

    real(kind=rk), intent(in), dimension(:) :: vPoints

    Velocity grid

    Return Value real(kind=rk), allocatable, dimension(:)

interface

  • public pure module function simpleMoment(m, f, vPoints, vWidths, g) result(res)

    Returns the m-th moment of passed distribution function harmonic - 4piint(v^(2+m)fdv). Optionally takes moment of f*g where g conforms to f. The integration is a simple Riemann sum.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=ik), intent(in) :: m

    Moment degree

    real(kind=rk), intent(in), dimension(:) :: f

    Distribution function to take the moment of

    real(kind=rk), intent(in), dimension(:) :: vPoints

    Coordinates of cell centres in velocity space

    real(kind=rk), intent(in), dimension(:) :: vWidths

    Widths of velocity space cells

    real(kind=rk), intent(in), optional, dimension(:) :: g

    Optional velocity space array to include in moment integral

    Return Value real(kind=rk)