CRMElEnergyTermGenerator Derived Type

type, public, extends(TermGenerator) :: CRMElEnergyTermGenerator

TermGenerator object used to generate electronj energy source and sink terms based on associated variables in species list and CRM modelbound data. Assumes rates are normalized so that the resulting source term is normalized to densNorm*eVTemperature/timeNorm.


Components

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

True only if user explicitly sets it to true

type(VarData), private, allocatable, dimension(:) :: vData

Individual term variable data including densities and required modelbound data

type(StringArray), private, allocatable, dimension(:) :: implicitVars

Implicit density names (corresponding to last inState in transitions)

character(len=:), private, allocatable :: electronEnergyVarName

Name of implicit electron energy variable

type(EnvironmentWrapper), private, pointer :: envPointer => null()
integer(kind=ik), private :: numX

Local copy of x-grid size


Finalization Procedures

final :: finalizeCRMElEnergyGenerator


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 :: setImplicitTerms

  • interface

    private module subroutine setImplicitTerms(this, impTerms)

    Move allocation of impTerms to this%implicitTerms

    Arguments

    Type IntentOptional Attributes Name
    class(TermGenerator), intent(inout) :: this
    type(MatTermContainer), intent(inout), allocatable, dimension(:) :: impTerms

procedure, public :: setGeneralTerms

  • interface

    private module subroutine setGeneralTerms(this, genTerms)

    Move allocation of genTerms to this%generalTerms

    Arguments

    Type IntentOptional Attributes Name
    class(TermGenerator), intent(inout) :: this
    type(TermContainer), intent(inout), allocatable, dimension(:) :: genTerms

procedure, public :: setGeneratorPrefix

  • interface

    private module subroutine setGeneratorPrefix(this, prefix)

    Set prefix for added term names

    Arguments

    Type IntentOptional Attributes Name
    class(TermGenerator), intent(inout) :: this
    character(len=*), intent(in) :: prefix

procedure, public :: getNumImplicitTerms

  • interface

    private pure module function getNumImplicitTerms(this) result(numTerms)

    Get size of this%implicitTerms

    Arguments

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

    Return Value integer(kind=ik)

procedure, public :: getNumGeneralTerms

  • interface

    private pure module function getNumGeneralTerms(this) result(numTerms)

    Get size of this%generalTerms

    Arguments

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

    Return Value integer(kind=ik)

procedure, public :: moveTerms

  • interface

    private module subroutine moveTerms(this, modelObj, impTermImpGroups, impTermGenGroups, genTermGroups)

    Move terms to modelObj

    Arguments

    Type IntentOptional Attributes Name
    class(TermGenerator), intent(inout) :: this
    class(Model), intent(inout) :: modelObj
    type(IntArray), intent(in), optional, dimension(:) :: impTermImpGroups
    type(IntArray), intent(in), optional, dimension(:) :: impTermGenGroups
    type(IntArray), intent(in), optional, dimension(:) :: genTermGroups

procedure, public :: init => initCRMElEnergyTermGenerator

  • interface

    private module subroutine initCRMElEnergyTermGenerator(this, envObj, crmData, generatorTag, electronEnergyVarName, includedTransitionIndices)

    Constructor routine for CRM energy source/sink term generator

    Arguments

    Type IntentOptional Attributes Name
    class(CRMElEnergyTermGenerator), intent(inout) :: this
    type(EnvironmentWrapper), intent(in), target :: envObj

    Environment wrapper used to get species data, partition info, etc.

    type(ModelboundCRMData), intent(in) :: crmData

    CRM data object used to get transition data

    character(len=*), intent(in) :: generatorTag
    character(len=*), intent(in) :: electronEnergyVarName

    Name of electron energy variable (used as evolved var)

    integer(kind=ik), intent(in), optional, dimension(:) :: includedTransitionIndices

    Optional list of transitions to be included in source calculations by this generator. Defaults to all transitions that include electrons in ingoingStates

procedure, public :: generate => generateElEnergySourceTerms

  • interface

    private module subroutine generateElEnergySourceTerms(this, mbData)

    Generates and allocates parent implicit energy source terms

    Arguments

    Type IntentOptional Attributes Name
    class(CRMElEnergyTermGenerator), intent(inout) :: this
    class(ModelboundData), intent(in), optional :: mbData