CoulombLogDerivation Derived Type

type, public, extends(Derivation) :: CoulombLogDerivation

Returns values of the coulomb log based on electron density and temperature variables (and optionally ionization). The passed indices are assumed to be in T,n,Z order if ee or ei logarithm, or in n1,n2,T1,T2 order if ii logarithm. Assumes that density is normalized to m^{-3} units, and temperature to eV.


Components

Type Visibility Attributes Name Initial
logical, public :: userDefined = .false.

True only if user explicitly sets it to true

logical, private :: electronLog

If true returns the electron-electron Coulomb log instead of the electron-ion log. Default is false

logical, private :: ionLog

If true returns the ion-ion Coulomb log instead of the electron-ion log. Default is false

real(kind=rk), private :: ionZ

The ion Z used if no ionization variable is passed, or if calculating ion-ion logarithm

real(kind=rk), private :: ionZ2

The second ion Z used if calculating ion-ion logarithm (Defaults to ionZ)

real(kind=rk), private :: ionMassRatio

Mass ratio used if calculating ion-ion logarithm (Defaults to 1)

integer(kind=ik), private :: locNumX

Local number of cells (used to avoid dividing by zero in ghost/halo cells)

real(kind=rk), private :: densNorm

Density normalization

real(kind=rk), private :: tempNorm

Temperature normalization


Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject

  • interface

    private pure module function isDefinedObject(this) result(defined)

    Getter for userDefined

    Arguments

    Type IntentOptional Attributes Name
    class(Object), intent(in) :: this

    Return Value logical

procedure, public :: makeDefined => makeDefinedObject

  • interface

    private pure module subroutine makeDefinedObject(this)

    Set userDefined to .true.

    Arguments

    Type IntentOptional Attributes Name
    class(Object), intent(inout) :: this

procedure, public :: makeUndefined => makeUndefinedObject

  • interface

    private pure module subroutine makeUndefinedObject(this)

    Set userDefined to .false.

    Arguments

    Type IntentOptional Attributes Name
    class(Object), intent(inout) :: this

procedure, public :: init => initCoulombLogDeriv

  • interface

    private module subroutine initCoulombLogDeriv(this, ionZ, locNumX, densNorm, tempNorm, electronLog, ionLog, ionZ2, ionMassRatio)

    Initialize Coulomb Log derivation object

    Arguments

    Type IntentOptional Attributes Name
    class(CoulombLogDerivation), intent(inout) :: this
    real(kind=rk), intent(in) :: ionZ
    integer(kind=ik), intent(in) :: locNumX
    real(kind=rk), intent(in) :: densNorm
    real(kind=rk), intent(in) :: tempNorm
    logical, intent(in), optional :: electronLog
    logical, intent(in), optional :: ionLog
    real(kind=rk), intent(in), optional :: ionZ2
    real(kind=rk), intent(in), optional :: ionMassRatio

procedure, public :: calculate => calculateCoulombLog

  • interface

    private module function calculateCoulombLog(this, inputArray, indices) result(output)

    Arguments

    Type IntentOptional Attributes Name
    class(CoulombLogDerivation), intent(inout) :: this
    type(RealArray), intent(in), dimension(:) :: inputArray
    integer(kind=ik), intent(in), dimension(:) :: indices

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