TrappingNodalKernel

Implements a residual describing the trapping of a species in a material.

Overview

This object implements the residual

where is the trapping rate coefficient, which has dimensions of 1/s, is the atomic number density of the host material, is the concentration of empty trapping sites, and is the concentration of the mobile species. is defined as with being the pre-exponential factor in units of 1/s, being the trapping energy in units of Kelvin, and being the temperature in units of Kelvin.

As outlined in Scaling, it is important to scale different specie numerical concentrations to the same order of magnitude in order to have robust (non)linear solves. Unfortunately, incorporation of scaling tends to obfuscate residual-computing objects a bit, including TrappingNodalKernel. Hopefully we can make things clear here, however. Let's imagine that the trapped concentration is 1000 times greater than the mobile concentration. We can bring the trapped concentration to the same numerical level of the mobile concentration by changing the trapped concentration units from #/volume to k#/volume where 'k' denotes kilo. Now let's figure out how this transformation fits into TrappingNodalKernel. TrappingNodalKernel is producing trapped species, so consequently its residual must have units (in our example) of k#/(volume*s). Trapped concentrations have units of k#/volume and the mobile concentration and host density () have units of #/volume. TrappingNodalKernel computes the empty trapping sites concentration, in the following way:


  auto empty_trapping_sites = _Ct0.value(_t, (*_current_node)) * _N;
  for (const auto & trap_conc : _trapped_concentrations)
    empty_trapping_sites -= (*trap_conc)[_qp] * _trap_per_free;

The trapping concentration, in units of k#/volume, is converted to units of #/volume by multiplying by trap_per_free which, in this example of k#/volume trapping concentration and #/volume mobile concentration, has a value of 1000 #/(k#). We then compute the residual with the code


  return -_alpha_t * std::exp(-_detrapping_energy / _temperature[_qp]) * empty_trapping_sites * _mobile_conc[_qp] / (_N * _trap_per_free);

Let's carry through the units: 1/s * #/volume * #/volume / (#/volume * 1000 #/(k#)) -> k#/(s*volume) which is exactly the units that we needed.

Input Parameters

  • Ct0The fraction of host sites that can contribute to trapping as a function (-)

    C++ Type:FunctionName

    Unit:(no unit assumed)

    Controllable:No

    Description:The fraction of host sites that can contribute to trapping as a function (-)

  • NThe atomic number density of the host material (1/m^3)

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:The atomic number density of the host material (1/m^3)

  • alpha_tThe trapping rate coefficient. This has units of 1/s (e.g. no number densities are involved)

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:The trapping rate coefficient. This has units of 1/s (e.g. no number densities are involved)

  • mobile_concentrationThe variable representing the mobile concentration of solute particles (1/m^3)

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The variable representing the mobile concentration of solute particles (1/m^3)

  • temperatureThe temperature (K)

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The temperature (K)

  • variableThe name of the variable that this residual object operates on

    C++ Type:NonlinearVariableName

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of the variable that this residual object operates on

Required Parameters

  • blockThe list of blocks (ids or names) that this object will be applied

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:The list of blocks (ids or names) that this object will be applied

  • boundaryThe list of boundaries (ids or names) from the mesh where this object applies

    C++ Type:std::vector<BoundaryName>

    Controllable:No

    Description:The list of boundaries (ids or names) from the mesh where this object applies

  • matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether this object is only doing assembly to matrices (no vectors)

  • other_trapped_concentration_variablesOther variables representing trapped particle concentrations.

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Other variables representing trapped particle concentrations.

  • trap_per_free1An estimate for the ratio of the concentration magnitude of trapped species to free species. Setting a value for this can be helpful in producing a well-scaled matrix (-)

    Default:1

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:An estimate for the ratio of the concentration magnitude of trapped species to free species. Setting a value for this can be helpful in producing a well-scaled matrix (-)

  • trapping_energy0The trapping energy (K)

    Default:0

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:The trapping energy (K)

Optional Parameters

  • absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution

  • extra_matrix_tagsThe extra tags for the matrices this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the matrices this Kernel should fill

  • extra_vector_tagsThe extra tags for the vectors this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the vectors this Kernel should fill

  • matrix_tagssystemThe tag for the matrices this Kernel should fill

    Default:system

    C++ Type:MultiMooseEnum

    Options:nontime, system

    Controllable:No

    Description:The tag for the matrices this Kernel should fill

  • vector_tagsnontimeThe tag for the vectors this Kernel should fill

    Default:nontime

    C++ Type:MultiMooseEnum

    Options:nontime, time

    Controllable:No

    Description:The tag for the vectors this Kernel should fill

Contribution To Tagged Field Data Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • diag_save_inThe name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

    C++ Type:std::vector<AuxVariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Determines whether this object is calculated using an implicit or explicit form

  • save_inThe name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

    C++ Type:std::vector<AuxVariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

  • seed0The seed for the master random number generator

    Default:0

    C++ Type:unsigned int

    Controllable:No

    Description:The seed for the master random number generator

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

Input Files