modelbound_CRM_data_class Module

Houses derived modelbound data class responsible for collisional-radiative data


Used by


Interfaces

interface

  • private pure module function getFixedW(this, ind) result(wMat)

    Return fixed mapping matrix with given index if inelastic data component is allocated

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

    Return Value type(SparseRowData)

interface

  • private pure module function getFixedEmissionVector(this, ind) result(emit)

    Return fixed emission vector for mapping matrix with given index if inelastic data component is allocated

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

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

interface

  • private pure module function getInterpolatedEmissionVector(this, E) result(emit)

    Return interpolated emission vector for given input energy E if inelastic data component is allocated

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    real(kind=rk), intent(in) :: E

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

interface

  • private pure module function getTransitionIngoingStates(this, ind) result(inStates)

    Get ingoing states of transition with given index

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

    Return Value integer(kind=ik), allocatable, dimension(:)

interface

  • private pure module function getTransitionOutgoingStates(this, ind) result(outStates)

    Get outgoing states of transition with given index

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

    Return Value integer(kind=ik), allocatable, dimension(:)

interface

  • private pure module function getTransitionRate(this, ind) result(rate)

    Get transition rate from transition with given index

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

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

interface

  • private pure module function getTransitionRateMomentum(this, ind) result(rate)

    Get momentum transfer rate from transition with given index

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

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

interface

  • private pure module function getTransitionRateEnergy(this, ind) result(rate)

    Get energy transfer rate from transition with given index

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

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

interface

  • private pure module function getTransitionCrossSection(this, col, ind) result(crossSection)

    Get cross-section values from column col of the cross-section data of transition with given index

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: col
    integer(kind=ik), intent(in) :: ind

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

interface

  • private pure module function getTransitionEnergy(this, ind) result(energy)

    Get transition energy of transition with given index

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

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

interface

  • private pure module function getNumTransitions(this) result(numTrans)

    Get number of transitions registered in this object

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function ratesIncludeElDensity(this, ind) result(includesElDens)

    Check whether given transition includes electron density in the rate by default

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: ind

    Return Value logical

interface

  • private pure module function getPopulationChangeMatrix(this, ids, transitionIndices) result(popChangeMat)

    For a given set of species indices and transition indices returns a matrix whose entries are the change in particle number of a given species (by index) in transition processes determined by passed indices. Will not provide warnings if any particular ID is not found in any transition.

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in), dimension(:) :: ids
    integer(kind=ik), intent(in), dimension(:) :: transitionIndices

    Return Value integer(kind=ik), dimension(:,:), allocatable

interface

  • private pure module function getRequiredDensityData(this, transitionIndex, removeLastState) result(densDataMat)

    For a given transition index returns ingoingState data as a (:,2) matrix, where the first column is the list of participating states and the second column the number of times that state appears. If an ID is zero (electrons) and the transition includes electron density in the rate, the second column value is reduced by one. If removeLastState is true, the corresponding number in the second column of the result is reduced by one (useful in implicit terms). If any value in the second column drops to 0, the corresponding row will be removed. The result can then be used to determine density variables and their powers required to convert the transitions rate values into a source.

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    integer(kind=ik), intent(in) :: transitionIndex
    logical(kind=ik), intent(in), optional :: removeLastState

    Return Value integer(kind=ik), dimension(:,:), allocatable

interface

  • private module function getDataDimCRM(this, name) result(dim)

    Get data dimensionality - currently always returns 1, assuming that the name is associated with a rate

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    character(len=*), intent(in) :: name

    Name of data

    Return Value integer(kind=ik)

interface

  • private pure module function getElState(this) result(ID)

    Getter for electronStateID

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module subroutine initCRMData(this, numTransitions)

    Collisional-radiative modelbound data initialization

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(inout) :: this
    integer(kind=ik), intent(in) :: numTransitions

    Expected number of transitions

interface

  • private pure module subroutine addTransition(this, tr)

    Add transition to CRM modelbound data

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(inout) :: this
    class(Transition), intent(in) :: tr

interface

interface

  • private pure module subroutine interpolateW(this, E, wRes)

    Interpolate mapping matrices for given energy and store in passed triangular matrix if inelastic data component is allocated. Assumes upper triangular structure for wRes if E is positive and lower if it's negative.

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    real(kind=rk), intent(in) :: E

    Transition energy to interpolate for

    type(SparseRowData), intent(inout) :: wRes

    Lower/upper triangular matrix to store the interpolated weights

interface

  • private module subroutine updateCRMData(this, hostModel, inputVars, updatePriority)

    Update modelbound data based on input variable container

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(inout) :: this
    class(ModelSurrogate), intent(in) :: hostModel

    Host model passed to transitions

    class(VariableContainer), intent(in) :: inputVars

    Variable container used to calculate modelbound data

    integer(kind=ik), intent(in), optional :: updatePriority

    Priority for this update call

interface

  • private module subroutine crmCopy(this, name, container)

    Retrieves data based on name format - assumes name of format "rate"//dataSpec//"index"//transIndex, where dataSpec is 0,1,2 and corresponds to rate type (0-particles,1-momentum,2-energy), and transIndex is the transition index in the data

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(in) :: this
    character(len=*), intent(in) :: name
    real(kind=rk), intent(inout), allocatable, dimension(..) :: container

interface

  • private module subroutine setElState(this, ID)

    Setter for electronStateID

    Arguments

    Type IntentOptional Attributes Name
    class(ModelboundCRMData), intent(inout) :: this
    integer(kind=ik), intent(in) :: ID

Derived Types

type, public ::  TransitionContainer

Container allowing for heterogeneous Transition object arrays

Components

Type Visibility Attributes Name Initial
class(Transition), public, allocatable :: entry

type, public, extends(ModelboundData) ::  ModelboundCRMData

Object responsible for storing and providing centralized access to transition objects and, optionally, inelastic grid data

Components

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

True only if user explicitly sets it to true

type(TransitionContainer), private, allocatable, dimension(:) :: transitions
type(InelasticGridData), private, allocatable :: inelData
integer(kind=ik), private :: numAddedTransitions

Tracker for number of added transitions

logical, private :: allTransitionsAdded

True if all transitions are added and the data can be used

integer(kind=ik), private :: electronStateID = 0

Which state to treat as the electrons

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: addTransition
procedure, public :: setInelData
procedure, public :: getFixedW
procedure, public :: getFixedEmissionVector
procedure, public :: interpolateW
procedure, public :: getInterpolatedEmissionVector
procedure, public :: getTransitionIngoingStates
procedure, public :: getTransitionOutgoingStates
procedure, public :: getTransitionRate
procedure, public :: getTransitionRateMomentum
procedure, public :: getTransitionRateEnergy
procedure, public :: getTransitionCrossSection
procedure, public :: getTransitionEnergy
procedure, public :: getNumTransitions
procedure, public :: ratesIncludeElDensity
procedure, public :: getPopulationChangeMatrix
procedure, public :: getRequiredDensityData
procedure, public :: getElState
procedure, public :: setElState
procedure, public :: update => updateCRMData
procedure, public :: copyData => crmCopy
procedure, public :: getDataDim => getDataDimCRM
procedure, public :: init => initCRMData