- 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)
- trapped_concentration_variablesVariables representing trapped particle concentrations.
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:Variables representing trapped particle concentrations.
- variableThe name of the variable that this object applies to
C++ Type:AuxVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this object applies to
EmptySitesAux
Calculates the concentration of empty trapping sites.
Overview
This class calculates the concentration of empty trapping sites, , as
where is the fraction of host sites that can contribute to trapping (provided as a constant or a Function), is the atomic number density of the host material (atoms/volume), and is the concentration of trapped species of type .
This calculation is similar to what is described in TrappingNodalKernel.
Input 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
- check_boundary_restrictedTrueWhether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
Default:True
C++ Type:bool
Controllable:No
Description:Whether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
- execute_onLINEAR TIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:LINEAR TIMESTEP_END
C++ Type:ExecFlagEnum
Options:XFEM_MARK, NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, MULTISYSTEM_FIXED_POINT_CONVERGENCE, FINAL, CUSTOM, PRE_DISPLACE
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- 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
Optional 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.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
Default:nearest_node_connected_sides
C++ Type:MooseEnum
Options:nearest_node_connected_sides, all_proximate_sides
Controllable:No
Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
- 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
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Material Property Retrieval Parameters
Input Files
- (test/tests/divertor_monoblock/divertor_monoblock_multi_variable_base.i)
- (test/tests/divertor_monoblock/divertor_monoblock_single_variable_base.i)
- (test/tests/ver-1d/ver-1d-trapping_profile.i)
- (test/tests/ver-1dc/ver-1dc.i)
- (test/tests/ver-1dc/ver-1dc-components.i)
- (test/tests/ver-1jb/ver-1jb.i)
- (test/tests/ver-1d/ver-1d-trapping.i)
(test/tests/divertor_monoblock/divertor_monoblock_multi_variable_base.i)
# This input file contains key pieces for the divertor monoblock case that includes multiple
# variables.
# It cannot be run on its own and is included in the main input files for two cases, namely:
# - divertor_monoblock.i
# - divertor_monoblock_physics.i
[AuxKernels]
############################## AuxKernels for W (block = 4)
[Scaled_mobile_W]
variable = Sc_C_mobile_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_mobile_W
[]
[Scaled_trapped_W]
variable = Sc_C_trapped_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_trapped_W
[]
[total_W]
variable = C_total_W
type = ParsedAux
expression = 'C_mobile_W + C_trapped_W'
coupled_variables = 'C_mobile_W C_trapped_W'
[]
[Scaled_total_W]
variable = Sc_C_total_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_total_W
[]
[empty_sites_W]
variable = S_empty_W
type = EmptySitesAux
N = ${N_W}
Ct0 = ${Ct0_W}
trap_per_free = ${trap_per_free_W}
trapped_concentration_variables = C_trapped_W
[]
[scaled_empty_W]
variable = Sc_S_empty_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_empty_W
[]
[trapped_sites_W]
variable = S_trapped_W
type = NormalizationAux
normal_factor = 1e0
source_variable = C_trapped_W
[]
[scaled_trapped_W]
variable = Sc_S_trapped_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_trapped_W
[]
[total_sites_W]
variable = S_total_W
type = ParsedAux
expression = 'S_trapped_W + S_empty_W'
coupled_variables = 'S_trapped_W S_empty_W'
[]
[scaled_total_W]
variable = Sc_S_total_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_total_W
[]
############################## AuxKernels for Cu (block = 3)
[Scaled_mobile_Cu]
variable = Sc_C_mobile_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_mobile_Cu
[]
[Scaled_trapped_Cu]
variable = Sc_C_trapped_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_trapped_Cu
[]
[total_Cu]
variable = C_total_Cu
type = ParsedAux
expression = 'C_mobile_Cu + C_trapped_Cu'
coupled_variables = 'C_mobile_Cu C_trapped_Cu'
[]
[Scaled_total_Cu]
variable = Sc_C_total_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_total_Cu
[]
[empty_sites_Cu]
variable = S_empty_Cu
type = EmptySitesAux
N = ${N_Cu}
Ct0 = ${Ct0_Cu}
trap_per_free = ${trap_per_free_Cu}
trapped_concentration_variables = C_trapped_Cu
[]
[scaled_empty_Cu]
variable = Sc_S_empty_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_empty_Cu
[]
[trapped_sites_Cu]
variable = S_trapped_Cu
type = NormalizationAux
normal_factor = 1e0
source_variable = C_trapped_Cu
[]
[scaled_trapped_Cu]
variable = Sc_S_trapped_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_trapped_Cu
[]
[total_sites_Cu]
variable = S_total_Cu
type = ParsedAux
expression = 'S_trapped_Cu + S_empty_Cu'
coupled_variables = 'S_trapped_Cu S_empty_Cu'
[]
[scaled_total_Cu]
variable = Sc_S_total_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_total_Cu
[]
############################## AuxKernels for CuCrZr (block = 2)
[Scaled_mobile_CuCrZr]
variable = Sc_C_mobile_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_mobile_CuCrZr
[]
[Scaled_trapped_CuCrZr]
variable = Sc_C_trapped_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_trapped_CuCrZr
[]
[total_CuCrZr]
variable = C_total_CuCrZr
type = ParsedAux
expression = 'C_mobile_CuCrZr + C_trapped_CuCrZr'
coupled_variables = 'C_mobile_CuCrZr C_trapped_CuCrZr'
[]
[Scaled_total_CuCrZr]
variable = Sc_C_total_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_total_CuCrZr
[]
[empty_sites_CuCrZr]
variable = S_empty_CuCrZr
type = EmptySitesAux
N = ${N_CuCrZr}
Ct0 = ${Ct0_CuCrZr}
trap_per_free = ${trap_per_free_CuCrZr}
trapped_concentration_variables = C_trapped_CuCrZr
[]
[scaled_empty_CuCrZr]
variable = Sc_S_empty_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_empty_CuCrZr
[]
[trapped_sites_CuCrZr]
variable = S_trapped_CuCrZr
type = NormalizationAux
normal_factor = 1e0
source_variable = C_trapped_CuCrZr
[]
[scaled_trapped_CuCrZr]
variable = Sc_S_trapped_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_trapped_CuCrZr
[]
[total_sites_CuCrZr]
variable = S_total_CuCrZr
type = ParsedAux
expression = 'S_trapped_CuCrZr + S_empty_CuCrZr'
coupled_variables = 'S_trapped_CuCrZr S_empty_CuCrZr'
[]
[scaled_total_CuCrZr]
variable = Sc_S_total_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_total_CuCrZr
[]
[flux_y_W]
type = DiffusionFluxAux
diffusivity = diffusivity_W
variable = flux_y
diffusion_variable = C_mobile_W
component = y
block = 4
[]
[flux_y_Cu]
type = DiffusionFluxAux
diffusivity = diffusivity_Cu
variable = flux_y
diffusion_variable = C_mobile_Cu
component = y
block = 3
[]
[flux_y_CuCrZr]
type = DiffusionFluxAux
diffusivity = diffusivity_CuCrZr
variable = flux_y
diffusion_variable = C_mobile_CuCrZr
component = y
block = 2
[]
[]
[Postprocessors]
############################################################ Postprocessors for W (block = 4)
[F_recombination]
type = SideDiffusiveFluxAverage
boundary = 'top'
diffusivity = ${diffusivity_fixed}
variable = Sc_C_total_W
[]
[F_permeation]
type = SideDiffusiveFluxAverage
boundary = '2to1'
diffusivity = ${diffusivity_fixed}
variable = Sc_C_total_CuCrZr
[]
[Int_C_mobile_W]
type = ElementIntegralVariablePostprocessor
variable = C_mobile_W
block = 4
[]
[ScInt_C_mobile_W]
type = ScalePostprocessor
value = Int_C_mobile_W
scaling_factor = ${scaling_factor}
[]
[Int_C_trapped_W]
type = ElementIntegralVariablePostprocessor
variable = C_trapped_W
block = 4
[]
[ScInt_C_trapped_W]
type = ScalePostprocessor
value = Int_C_trapped_W
scaling_factor = ${scaling_factor}
[]
[Int_C_total_W]
type = ElementIntegralVariablePostprocessor
variable = C_total_W
block = 4
[]
[ScInt_C_total_W]
type = ScalePostprocessor
value = Int_C_total_W
scaling_factor = ${scaling_factor}
[]
# ############################################################ Postprocessors for Cu (block = 3)
[Int_C_mobile_Cu]
type = ElementIntegralVariablePostprocessor
variable = C_mobile_Cu
block = 3
[]
[ScInt_C_mobile_Cu]
type = ScalePostprocessor
value = Int_C_mobile_Cu
scaling_factor = ${scaling_factor}
[]
[Int_C_trapped_Cu]
type = ElementIntegralVariablePostprocessor
variable = C_trapped_Cu
block = 3
[]
[ScInt_C_trapped_Cu]
type = ScalePostprocessor
value = Int_C_trapped_Cu
scaling_factor = ${scaling_factor_2}
[]
[Int_C_total_Cu]
type = ElementIntegralVariablePostprocessor
variable = C_total_Cu
block = 3
[]
[ScInt_C_total_Cu]
type = ScalePostprocessor
value = Int_C_total_Cu
scaling_factor = ${scaling_factor}
[]
# ############################################################ Postprocessors for CuCrZr (block = 2)
[Int_C_mobile_CuCrZr]
type = ElementIntegralVariablePostprocessor
variable = C_mobile_CuCrZr
block = 2
[]
[ScInt_C_mobile_CuCrZr]
type = ScalePostprocessor
value = Int_C_mobile_CuCrZr
scaling_factor = ${scaling_factor}
[]
[Int_C_trapped_CuCrZr]
type = ElementIntegralVariablePostprocessor
variable = C_trapped_CuCrZr
block = 2
[]
[ScInt_C_trapped_CuCrZr]
type = ScalePostprocessor
value = Int_C_trapped_CuCrZr
scaling_factor = ${scaling_factor_2}
[]
[Int_C_total_CuCrZr]
type = ElementIntegralVariablePostprocessor
variable = C_total_CuCrZr
block = 2
[]
[ScInt_C_total_CuCrZr]
type = ScalePostprocessor
value = Int_C_total_CuCrZr
scaling_factor = ${scaling_factor}
[]
############################################################ Postprocessors for others
[dt]
type = TimestepSize
[]
[temperature_top]
type = PointValue
variable = temperature
point = '0 ${fparse block_size / 2} 0'
[]
[temperature_tube]
type = PointValue
variable = temperature
point = '0 ${radius_coolant} 0'
[]
# Limit timestep
[timestep_max_pp]
# s
type = FunctionValuePostprocessor
function = timestep_function
[]
[]
[VectorPostprocessors]
[line]
type = LineValueSampler
start_point = '0 ${fparse block_size / 2} 0'
end_point = '0 ${radius_coolant} 0'
num_points = 100
sort_by = 'y'
variable = 'C_total_W C_total_Cu C_total_CuCrZr C_mobile_W C_mobile_Cu C_mobile_CuCrZr C_trapped_W C_trapped_Cu C_trapped_CuCrZr flux_y temperature'
execute_on = timestep_end
[]
[]
(test/tests/divertor_monoblock/divertor_monoblock_single_variable_base.i)
# This input file contains key pieces for the divertor monoblock case that includes a single
# variable.
# It cannot be run on its own and is included in the main input file for this case, namely:
# - divertor_monoblock_physics-single-variable.i
[AuxKernels]
############################## AuxKernels for W (block = 4)
[Scaled_mobile_W]
variable = Sc_C_mobile_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_mobile
[]
[Scaled_trapped_W]
variable = Sc_C_trapped_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_trapped
[]
[total_W]
variable = C_total_W
type = ParsedAux
expression = 'C_mobile + C_trapped'
coupled_variables = 'C_mobile C_trapped'
[]
[Scaled_total_W]
variable = Sc_C_total_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_total_W
[]
[empty_sites_W]
variable = S_empty_W
type = EmptySitesAux
N = ${N_W}
Ct0 = ${Ct0_W}
trap_per_free = ${trap_per_free_W}
trapped_concentration_variables = C_trapped
[]
[scaled_empty_W]
variable = Sc_S_empty_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_empty_W
[]
[trapped_sites_W]
variable = S_trapped_W
type = NormalizationAux
normal_factor = 1e0
source_variable = C_trapped
[]
[scaled_trapped_W]
variable = Sc_S_trapped_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_trapped_W
[]
[total_sites_W]
variable = S_total_W
type = ParsedAux
expression = 'S_trapped_W + S_empty_W'
coupled_variables = 'S_trapped_W S_empty_W'
[]
[scaled_total_W]
variable = Sc_S_total_W
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_total_W
[]
############################## AuxKernels for Cu (block = 3)
[Scaled_mobile_Cu]
variable = Sc_C_mobile_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_mobile
[]
[Scaled_trapped_Cu]
variable = Sc_C_trapped_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_trapped
[]
[total_Cu]
variable = C_total_Cu
type = ParsedAux
expression = 'C_mobile + C_trapped'
coupled_variables = 'C_mobile C_trapped'
[]
[Scaled_total_Cu]
variable = Sc_C_total_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_total_Cu
[]
[empty_sites_Cu]
variable = S_empty_Cu
type = EmptySitesAux
N = ${N_Cu}
Ct0 = ${Ct0_Cu}
trap_per_free = ${trap_per_free_Cu}
trapped_concentration_variables = C_trapped
[]
[scaled_empty_Cu]
variable = Sc_S_empty_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_empty_Cu
[]
[trapped_sites_Cu]
variable = S_trapped_Cu
type = NormalizationAux
normal_factor = 1e0
source_variable = C_trapped
[]
[scaled_trapped_Cu]
variable = Sc_S_trapped_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_trapped_Cu
[]
[total_sites_Cu]
variable = S_total_Cu
type = ParsedAux
expression = 'S_trapped_Cu + S_empty_Cu'
coupled_variables = 'S_trapped_Cu S_empty_Cu'
[]
[scaled_total_Cu]
variable = Sc_S_total_Cu
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_total_Cu
[]
############################## AuxKernels for CuCrZr (block = 2)
[Scaled_mobile_CuCrZr]
variable = Sc_C_mobile_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_mobile
[]
[Scaled_trapped_CuCrZr]
variable = Sc_C_trapped_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_trapped
[]
[total_CuCrZr]
variable = C_total_CuCrZr
type = ParsedAux
expression = 'C_mobile + C_trapped'
coupled_variables = 'C_mobile C_trapped'
[]
[Scaled_total_CuCrZr]
variable = Sc_C_total_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = C_total_CuCrZr
[]
[empty_sites_CuCrZr]
variable = S_empty_CuCrZr
type = EmptySitesAux
N = ${N_CuCrZr}
Ct0 = ${Ct0_CuCrZr}
trap_per_free = ${trap_per_free_CuCrZr}
trapped_concentration_variables = C_trapped
[]
[scaled_empty_CuCrZr]
variable = Sc_S_empty_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_empty_CuCrZr
[]
[trapped_sites_CuCrZr]
variable = S_trapped_CuCrZr
type = NormalizationAux
normal_factor = 1e0
source_variable = C_trapped
[]
[scaled_trapped_CuCrZr]
variable = Sc_S_trapped_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_trapped_CuCrZr
[]
[total_sites_CuCrZr]
variable = S_total_CuCrZr
type = ParsedAux
expression = 'S_trapped_CuCrZr + S_empty_CuCrZr'
coupled_variables = 'S_trapped_CuCrZr S_empty_CuCrZr'
[]
[scaled_total_CuCrZr]
variable = Sc_S_total_CuCrZr
type = NormalizationAux
normal_factor = ${tungsten_atomic_density}
source_variable = S_total_CuCrZr
[]
[flux_y_W]
type = DiffusionFluxAux
diffusivity = diffusivity
variable = flux_y
diffusion_variable = C_mobile
component = y
block = 4
[]
[flux_y_Cu]
type = DiffusionFluxAux
diffusivity = diffusivity
variable = flux_y
diffusion_variable = C_mobile
component = y
block = 3
[]
[flux_y_CuCrZr]
type = DiffusionFluxAux
diffusivity = diffusivity
variable = flux_y
diffusion_variable = C_mobile
component = y
block = 2
[]
[]
[Postprocessors]
############################################################ Postprocessors for W (block = 4)
[F_recombination]
type = SideDiffusiveFluxAverage
boundary = 'top'
diffusivity = ${diffusivity_fixed}
variable = Sc_C_total_W
[]
[F_permeation]
type = SideDiffusiveFluxAverage
boundary = '2to1'
diffusivity = ${diffusivity_fixed}
variable = Sc_C_total_CuCrZr
[]
[Int_C_mobile_W]
type = ElementIntegralVariablePostprocessor
variable = C_mobile
block = 4
[]
[ScInt_C_mobile_W]
type = ScalePostprocessor
value = Int_C_mobile_W
scaling_factor = ${scaling_factor}
[]
[Int_C_trapped_W]
type = ElementIntegralVariablePostprocessor
variable = C_trapped
block = 4
[]
[ScInt_C_trapped_W]
type = ScalePostprocessor
value = Int_C_trapped_W
scaling_factor = ${scaling_factor}
[]
[Int_C_total_W]
type = ElementIntegralVariablePostprocessor
variable = C_total_W
block = 4
[]
[ScInt_C_total_W]
type = ScalePostprocessor
value = Int_C_total_W
scaling_factor = ${scaling_factor}
[]
# ############################################################ Postprocessors for Cu (block = 3)
[Int_C_mobile_Cu]
type = ElementIntegralVariablePostprocessor
variable = C_mobile
block = 3
[]
[ScInt_C_mobile_Cu]
type = ScalePostprocessor
value = Int_C_mobile_Cu
scaling_factor = ${scaling_factor}
[]
[Int_C_trapped_Cu]
type = ElementIntegralVariablePostprocessor
variable = C_trapped
block = 3
[]
[ScInt_C_trapped_Cu]
type = ScalePostprocessor
value = Int_C_trapped_Cu
scaling_factor = ${scaling_factor_2}
[]
[Int_C_total_Cu]
type = ElementIntegralVariablePostprocessor
variable = C_total_Cu
block = 3
[]
[ScInt_C_total_Cu]
type = ScalePostprocessor
value = Int_C_total_Cu
scaling_factor = ${scaling_factor}
[]
# ############################################################ Postprocessors for CuCrZr (block = 2)
[Int_C_mobile_CuCrZr]
type = ElementIntegralVariablePostprocessor
variable = C_mobile
block = 2
[]
[ScInt_C_mobile_CuCrZr]
type = ScalePostprocessor
value = Int_C_mobile_CuCrZr
scaling_factor = ${scaling_factor}
[]
[Int_C_trapped_CuCrZr]
type = ElementIntegralVariablePostprocessor
variable = C_trapped
block = 2
[]
[ScInt_C_trapped_CuCrZr]
type = ScalePostprocessor
value = Int_C_trapped_CuCrZr
scaling_factor = ${scaling_factor_2}
[]
[Int_C_total_CuCrZr]
type = ElementIntegralVariablePostprocessor
variable = C_total_CuCrZr
block = 2
[]
[ScInt_C_total_CuCrZr]
type = ScalePostprocessor
value = Int_C_total_CuCrZr
scaling_factor = ${scaling_factor}
[]
############################################################ Postprocessors for others
[dt]
type = TimestepSize
[]
[temperature_top]
type = PointValue
variable = temperature
point = '0 ${fparse block_size / 2} 0'
[]
[temperature_tube]
type = PointValue
variable = temperature
point = '0 ${radius_coolant} 0'
[]
# limit timestep
[timestep_max_pp]
# s
type = FunctionValuePostprocessor
function = timestep_function
[]
[]
[VectorPostprocessors]
[line]
type = LineValueSampler
start_point = '0 ${fparse block_size / 2} 0'
end_point = '0 ${radius_coolant} 0'
num_points = 100
sort_by = 'y'
variable = 'C_total_W C_total_Cu C_total_CuCrZr C_mobile C_trapped flux_y temperature'
execute_on = timestep_end
[]
[]
(test/tests/ver-1d/ver-1d-trapping_profile.i)
# This input file is slightly adapted from ver-1d-trapping.i to include a spatially-dependent trap site density
# Modeling parameters
node_num = 20
thickness = '${units 1 m}'
end_time = '${units 1000 s}'
time_scaling = 1
temperature = '${units 1000 K}'
diffusivity = '${fparse ${units 1 m^2/s} / time_scaling}'
# Trapping parameters
cl = '${units 3.1622e18 at/m^3}'
N = '${units 3.1622e22 at/m^3}'
trapping_prefactor = '${fparse ${units 1e15 1/s} / time_scaling}'
release_prefactor = '${fparse ${units 1e13 1/s} / time_scaling}'
epsilon = '${units 10000 K}'
trap_per_free = 1e3
Ct0_surface = 0.1 # trapping site density close to the sample surface
Ct0_bulk = .01 # trapping site density in the sample bulk
trap_profile_depth = 0.2 # position of the transition from Ct0_surface to Ct0_bulk
[Mesh]
type = GeneratedMesh
dim = 1
nx = ${node_num}
xmax = ${thickness}
[]
[Functions]
# Assign different trapping site density in the sample
[trapping_sites_density_function]
type = ParsedFunction
expression = 'if(x<${trap_profile_depth}, ${Ct0_surface}, ${Ct0_bulk})'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_END'
[]
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[mobile][]
[trapped][]
[]
[AuxVariables]
[empty_sites][]
[scaled_empty_sites][]
[trapped_sites][]
[total_sites][]
[]
[AuxKernels]
[empty_sites]
variable = empty_sites
type = EmptySitesAux
N = ${fparse N / cl}
Ct0 = trapping_sites_density_function
trap_per_free = ${trap_per_free}
trapped_concentration_variables = trapped
[]
[scaled_empty]
variable = scaled_empty_sites
type = NormalizationAux
normal_factor = ${cl}
source_variable = empty_sites
[]
[trapped_sites]
variable = trapped_sites
type = NormalizationAux
normal_factor = ${trap_per_free}
source_variable = trapped
[]
[total_sites]
variable = total_sites
type = ParsedAux
expression = 'trapped_sites + empty_sites'
coupled_variables = 'trapped_sites empty_sites'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = mobile
diffusivity = ${diffusivity}
extra_vector_tags = ref
[]
[time]
type = TimeDerivative
variable = mobile
extra_vector_tags = ref
[]
[coupled_time]
type = ScaledCoupledTimeDerivative
variable = mobile
v = trapped
factor = ${trap_per_free}
extra_vector_tags = ref
[]
[]
[NodalKernels]
[time]
type = TimeDerivativeNodalKernel
variable = trapped
[]
[trapping]
type = TrappingNodalKernel
variable = trapped
alpha_t = ${trapping_prefactor}
N = ${fparse N / cl}
Ct0 = trapping_sites_density_function
mobile_concentration = 'mobile'
temperature = ${temperature}
trap_per_free = ${trap_per_free}
extra_vector_tags = ref
[]
[release]
type = ReleasingNodalKernel
alpha_r = ${release_prefactor}
temperature = ${temperature}
detrapping_energy = ${epsilon}
variable = trapped
[]
[]
[BCs]
[left]
type = DirichletBC
variable = mobile
value = ${fparse cl / cl}
boundary = left
[]
[right]
type = DirichletBC
variable = mobile
value = 0
boundary = right
[]
[]
[Postprocessors]
[outflux]
type = SideDiffusiveFluxAverage
boundary = 'right'
diffusivity = 1
variable = mobile
[]
[scaled_outflux]
type = ScalePostprocessor
value = outflux
scaling_factor = ${cl}
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = ${end_time}
dt = 1
solve_type = NEWTON
line_search = 'none'
automatic_scaling = true
verbose = true
compute_scaling_once = false
l_tol = 1e-11
[]
[Outputs]
exodus = true
csv = true
[dof]
type = DOFMap
execute_on = initial
[]
perf_graph = true
[]
(test/tests/ver-1dc/ver-1dc.i)
# Verification Problem #1dc from TMAP7 V&V document
# Permeation Problem with Three Trapping sites
# No Soret effect or solubility included.
# It leverages ver-1dc_base.i to form a complete input file.
# Modeling parameters
nx_num = 1000 # (-)
simulation_time = ${units 60 s}
time_interval_max = ${units 0.3 s}
time_step = ${units 1e-6 s}
scheme = BDF2
# Trapping parameters
cl = ${units 3.1622e18 atom/m^3}
N = ${units 3.1622e22 atom/m^3}
trapping_rate_coefficient = ${units 1e15 1/s}
release_rate_coefficient = ${units 1e13 1/s}
!include ver-1dc_base.i
[AuxVariables]
[empty_sites_1]
[]
[scaled_empty_sites_1]
[]
[empty_sites_2]
[]
[scaled_empty_sites_2]
[]
[empty_sites_3]
[]
[scaled_empty_sites_3]
[]
[trapped_sites_1]
[]
[trapped_sites_2]
[]
[trapped_sites_3]
[]
[total_sites]
[]
[]
[AuxKernels]
[empty_sites_1]
variable = empty_sites_1
type = EmptySitesAux
N = '${fparse N / cl}'
Ct0 = '${trapping_site_fraction_1}'
trapped_concentration_variables = trapped_1
[]
[scaled_empty_1]
variable = scaled_empty_sites_1
type = NormalizationAux
normal_factor = '${cl}'
source_variable = empty_sites_1
[]
[empty_sites_2]
variable = empty_sites_2
type = EmptySitesAux
N = '${fparse N / cl}'
Ct0 = '${trapping_site_fraction_2}'
trapped_concentration_variables = trapped_2
[]
[scaled_empty_2]
variable = scaled_empty_sites_2
type = NormalizationAux
normal_factor = '${cl}'
source_variable = empty_sites_2
[]
[empty_sites_3]
variable = empty_sites_3
type = EmptySitesAux
N = '${fparse N / cl}'
Ct0 = '${trapping_site_fraction_3}'
trapped_concentration_variables = trapped_3
[]
[scaled_empty_3]
variable = scaled_empty_sites_3
type = NormalizationAux
normal_factor = '${cl}'
source_variable = empty_sites_3
[]
[trapped_sites_1]
variable = trapped_sites_1
type = NormalizationAux
source_variable = trapped_1
[]
[trapped_sites_2]
variable = trapped_sites_2
type = NormalizationAux
source_variable = trapped_2
[]
[trapped_sites_3]
variable = trapped_sites_3
type = NormalizationAux
source_variable = trapped_3
[]
[total_sites]
variable = total_sites
type = ParsedAux
expression = 'trapped_sites_1 + trapped_sites_2 + trapped_sites_3 + empty_sites_1 + empty_sites_2 + empty_sites_3'
coupled_variables = 'trapped_sites_1 trapped_sites_2 trapped_sites_3 empty_sites_1 empty_sites_2 empty_sites_3'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = mobile
value = '${fparse cl / cl}'
boundary = left
[]
[right]
type = DirichletBC
variable = mobile
value = 0
boundary = right
[]
[]
[Postprocessors]
[outflux]
type = SideDiffusiveFluxAverage
boundary = 'right'
diffusivity = '${diffusivity}'
variable = mobile
[]
[scaled_outflux]
type = ScalePostprocessor
value = outflux
scaling_factor = '${cl}'
[]
[]
[Executioner]
[TimeStepper]
type = IterationAdaptiveDT
dt = ${time_step}
optimal_iterations = 9
growth_factor = 1.1
cutback_factor = 0.909
[]
[]
[Outputs]
exodus = true
csv = true
[dof]
type = DOFMap
execute_on = initial
[]
perf_graph = true
[]
(test/tests/ver-1dc/ver-1dc-components.i)
# Verification Problem #1dc from TMAP7 V&V document
# Permeation Problem with Three Trapping sites using Component-Physics syntax
# The ver-1dc case is formed without this syntax by combining ver-1dc_base.i and ver-1dc.i
# modeling parameters
nx_num = 1000 # (-)
temperature = ${units 1000 K}
diffusivity = ${units 1 m^2/s}
simulation_time = ${units 60 s}
time_interval_max = ${units 0.3 s}
time_step = ${units 1e-6 s}
scheme = BDF2
# Trapping parameters
epsilon_1 = ${units 100 K}
epsilon_2 = ${units 500 K}
epsilon_3 = ${units 800 K}
trapping_site_fraction_1 = 0.10 # (-)
trapping_site_fraction_2 = 0.15 # (-)
trapping_site_fraction_3 = 0.20 # (-)
cl = ${units 3.1622e18 atom/m^3}
N = ${units 3.1622e22 atom/m^3}
trapping_rate_coefficient = ${units 1e15 1/s}
release_rate_coefficient = ${units 1e13 1/s}
[ActionComponents]
[structure]
type = Structure1D
species = 'mobile trapped_1 trapped_2 trapped_3'
physics = 'multi-D trapping'
# Boundary conditions
fixed_value_bc_variables = 'mobile'
fixed_value_bc_boundaries = 'structure_left structure_right'
fixed_value_bc_values = '${fparse cl / cl} 0'
# Geometry
nx = ${nx_num}
xmax = 1
length_unit_scaling = 1
[]
[]
[Physics]
[Diffusion]
[multi-D]
variable_name = 'mobile'
diffusivity_matprop = '1'
# Does not work for the species trapping
preconditioning = 'defer'
[]
[]
[SpeciesTrapping]
[trapping]
species = 'trapped_1 trapped_2 trapped_3'
mobile = 'mobile mobile mobile'
species_initial_concentrations = '0 0 0' #'${units 1.0e-15 m^-3} ${units 1.0e-15 m^-3} ${units 1.0e-15 m^-3}'
separate_variables_per_component = false
temperature = '${temperature}'
alpha_t = '${trapping_rate_coefficient} ${trapping_rate_coefficient} ${trapping_rate_coefficient}'
trapping_energy = '0 0 0'
N = '${fparse N / cl}'
Ct0 = '${trapping_site_fraction_1} ${trapping_site_fraction_2} ${trapping_site_fraction_3}'
trap_per_free = 1.0e0
different_traps_for_each_species = true
alpha_r = '${release_rate_coefficient} ${release_rate_coefficient} ${release_rate_coefficient}'
detrapping_energy = '${epsilon_1} ${epsilon_2} ${epsilon_3}'
[]
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = ${simulation_time}
dtmax = ${time_interval_max}
solve_type = NEWTON
scheme = ${scheme}
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
automatic_scaling = true
nl_abs_tol = 5e-8
[]
[Postprocessors]
[outflux]
type = SideDiffusiveFluxAverage
boundary = 'structure_right'
diffusivity = '${diffusivity}'
variable = mobile
[]
[scaled_outflux]
type = ScalePostprocessor
value = outflux
scaling_factor = '${cl}'
[]
[]
[Executioner]
[TimeStepper]
type = IterationAdaptiveDT
dt = ${time_step}
optimal_iterations = 9
growth_factor = 1.1
cutback_factor = 0.909
[]
[]
[Outputs]
exodus = true
csv = true
[dof]
type = DOFMap
execute_on = initial
[]
perf_graph = true
[]
[AuxVariables]
[empty_sites_1]
[]
[scaled_empty_sites_1]
[]
[empty_sites_2]
[]
[scaled_empty_sites_2]
[]
[empty_sites_3]
[]
[scaled_empty_sites_3]
[]
[trapped_sites_1]
[]
[trapped_sites_2]
[]
[trapped_sites_3]
[]
[total_sites]
[]
[]
[AuxKernels]
[empty_sites_1]
variable = empty_sites_1
type = EmptySitesAux
N = '${fparse N / cl}'
Ct0 = '${trapping_site_fraction_1}'
trapped_concentration_variables = trapped_1
[]
[scaled_empty_1]
variable = scaled_empty_sites_1
type = NormalizationAux
normal_factor = '${cl}'
source_variable = empty_sites_1
[]
[empty_sites_2]
variable = empty_sites_2
type = EmptySitesAux
N = '${fparse N / cl}'
Ct0 = '${trapping_site_fraction_2}'
trapped_concentration_variables = trapped_2
[]
[scaled_empty_2]
variable = scaled_empty_sites_2
type = NormalizationAux
normal_factor = '${cl}'
source_variable = empty_sites_2
[]
[empty_sites_3]
variable = empty_sites_3
type = EmptySitesAux
N = '${fparse N / cl}'
Ct0 = '${trapping_site_fraction_3}'
trapped_concentration_variables = trapped_3
[]
[scaled_empty_3]
variable = scaled_empty_sites_3
type = NormalizationAux
normal_factor = '${cl}'
source_variable = empty_sites_3
[]
[trapped_sites_1]
variable = trapped_sites_1
type = NormalizationAux
source_variable = trapped_1
[]
[trapped_sites_2]
variable = trapped_sites_2
type = NormalizationAux
source_variable = trapped_2
[]
[trapped_sites_3]
variable = trapped_sites_3
type = NormalizationAux
source_variable = trapped_3
[]
[total_sites]
variable = total_sites
type = ParsedAux
expression = 'trapped_sites_1 + trapped_sites_2 + trapped_sites_3 + empty_sites_1 + empty_sites_2 + empty_sites_3'
coupled_variables = 'trapped_sites_1 trapped_sites_2 trapped_sites_3 empty_sites_1 empty_sites_2 empty_sites_3'
[]
[]
(test/tests/ver-1jb/ver-1jb.i)
# Verification Problem #1jb from TMAP7 V&V document
# Radioactive Decay of Tritium in a Distributed Trap
# Physical Constants
ideal_gas_constant = ${units 8.31446261815324 J/K/mol} # from PhysicalConstants.h
boltzmann_constant = ${units 1.380649e-23 J/K -> eV/K } # from PhysicalConstants.h
# Case and model parameters (adapted from TMAP7)
slab_length = ${units 1.5 m }
tritium_mobile_concentration_initial = ${units 1 atoms/m3}
trapping_sites_atomic_fraction_max = 0.001 # (-)
trapping_sites_fraction_occupied_initial = 0.5 # (-)
normal_center_position = ${fparse slab_length/2} # m
normal_standard_deviation = ${fparse slab_length/4} # m
density_material = ${units 6.34e28 atoms/m^3} # for tungsten
density_scalar = ${units 1e25 atoms/m^3} # used to scale variables and use a dimensionless system
temperature = ${units 300 K} # assumed (TMAP7's input file lists 273 K)
tritium_diffusivity_prefactor = ${units 1.58e-4 m^2/s} # from TMAP7 V&V input file
tritium_diffusivity_energy = ${units 308000.0 J/K} # from TMAP7 V&V input file
tritium_release_prefactor = ${units 1.0e13 1/s} # from TMAP7 V&V input file
tritium_release_energy = ${units 4.2 eV}
tritium_trapping_prefactor = ${units 2.096e15 1/s} # from TMAP7 V&V input file
tritium_trapping_energy = ${tritium_diffusivity_energy} # J/K - from TMAP7 V&V input file
trap_per_free = 1.e-25 # (-)
half_life_s = ${units 12.3232 year -> s}
decay_rate_constant = ${fparse 0.693/half_life_s} # 1/s
# Simulation parameters
num_mesh_element = 50
end_time = ${units 100 year -> s} # s
dt_start = ${fparse end_time/250} # s
dt_max = ${fparse end_time/100} # s
[Mesh]
type = GeneratedMesh
dim = 1
nx = ${num_mesh_element}
xmax = ${slab_length}
[]
[Variables]
# tritium mobile concentration in atoms/m^3 / density_scalar = (-)
[tritium_mobile_concentration_scaled]
initial_condition = ${fparse tritium_mobile_concentration_initial / density_scalar}
[]
# tritium trapped concentration in (atoms/m^3) / density_scalar = (-)
[tritium_trapped_concentration_scaled]
[]
# helium concentration in (atoms/m^3) / density_scalar = (-)
[helium_concentration_scaled]
[]
[]
[Functions]
[trapping_sites_fraction_function] # (atomic fraction)
type = ParsedFunction
expression = '${trapping_sites_atomic_fraction_max} * exp(-1/2*((x-${normal_center_position})/${normal_standard_deviation})^2)'
[]
[density_material_function] # (atoms/m^3)
type = ConstantFunction
value = ${density_material}
[]
[trapping_sites_concentration_function] # (atoms/m^3)
type = CompositeFunction
functions = 'density_material_function trapping_sites_fraction_function'
[]
[initial_trapping_sites_occupied_function] # (-)
type = ConstantFunction
value = ${trapping_sites_fraction_occupied_initial}
[]
[tritium_trapped_concentration_initial_function] # (atoms/m^3)
type = CompositeFunction
functions = 'initial_trapping_sites_occupied_function trapping_sites_concentration_function'
[]
[density_scalar_inverse_function] # (atoms/m^3)^(-1)
type = ConstantFunction
value = ${fparse 1/density_scalar}
[]
[tritium_trapped_concentration_initial_function_scaled] # (-)
type = CompositeFunction
functions = 'density_scalar_inverse_function tritium_trapped_concentration_initial_function'
[]
[]
[ICs]
[tritium_trapped_concentration_IC]
type = FunctionIC
variable = tritium_trapped_concentration_scaled
function = 'tritium_trapped_concentration_initial_function_scaled'
[]
[]
[AuxVariables]
[empty_sites] # (-)
[]
[scaled_empty_sites] # atoms/m^3
[]
[trapped_sites] # (atoms/m^3)
[]
[total_sites] # (atoms/m^3)
[]
[temperature] # (K)
initial_condition = ${temperature}
[]
[tritium_mobile_concentration] # (atoms/m^3)
[]
[tritium_trapped_concentration] # (atoms/m^3)
[]
[helium_concentration] # (atoms/m^3)
[]
[]
[AuxKernels]
[empty_sites]
variable = empty_sites
type = EmptySitesAux
N = ${fparse density_material / density_scalar} # (-)
Ct0 = 'trapping_sites_fraction_function' # atomic fraction
trap_per_free = ${trap_per_free}
trapped_concentration_variables = tritium_trapped_concentration_scaled
[]
[scaled_empty_sites]
variable = scaled_empty_sites
type = NormalizationAux
normal_factor = ${density_scalar}
source_variable = empty_sites
[]
[trapped_sites]
variable = trapped_sites
type = NormalizationAux
normal_factor = ${density_scalar}
source_variable = tritium_trapped_concentration_scaled
[]
[total_sites]
variable = total_sites
type = ParsedAux
coupled_variables = 'trapped_sites scaled_empty_sites'
expression = 'trapped_sites + scaled_empty_sites'
[]
[tritium_mobile_concentration]
type = NormalizationAux
variable = tritium_mobile_concentration
normal_factor = ${density_scalar}
source_variable = tritium_mobile_concentration_scaled
[]
[tritium_trapped_concentration]
type = NormalizationAux
variable = tritium_trapped_concentration
normal_factor = ${density_scalar}
source_variable = tritium_trapped_concentration_scaled
[]
[helium_concentration]
type = NormalizationAux
variable = helium_concentration
normal_factor = ${density_scalar}
source_variable = helium_concentration_scaled
[]
[]
[Kernels]
# kernels for the tritium concentration equation
[time_tritium]
type = TimeDerivative
variable = tritium_mobile_concentration_scaled
[]
[diffusion]
type = MatDiffusion
variable = tritium_mobile_concentration_scaled
diffusivity = diffusivity
[]
[decay_tritium]
type = MatReaction
variable = tritium_mobile_concentration_scaled
reaction_rate = '${fparse -decay_rate_constant}'
[]
[coupled_time_tritium]
type = ScaledCoupledTimeDerivative
variable = tritium_mobile_concentration_scaled
v = tritium_trapped_concentration_scaled
factor = ${trap_per_free}
[]
# re-adding it to the equation of mobile tritium because it is accounted for in coupled_time_tritium, and needs to be removed
[decay_tritium_trapped]
type = MatReaction
variable = tritium_mobile_concentration_scaled
v = tritium_trapped_concentration_scaled
reaction_rate = '${fparse - decay_rate_constant * trap_per_free}'
[]
# kernels for the helium concentration equation
[time_helium]
type = TimeDerivative
variable = helium_concentration_scaled
[]
[decay_helium_mobile]
type = MatReaction
variable = helium_concentration_scaled
v = tritium_mobile_concentration_scaled
reaction_rate = '${fparse decay_rate_constant}'
[]
[decay_helium_trapped]
type = MatReaction
variable = helium_concentration_scaled
v = tritium_trapped_concentration_scaled
reaction_rate = '${fparse decay_rate_constant}'
[]
[]
[NodalKernels]
[time]
type = TimeDerivativeNodalKernel
variable = tritium_trapped_concentration_scaled # (atoms/m^3) / density_scalar = (-)
[]
[trapping]
type = TrappingNodalKernel
variable = tritium_trapped_concentration_scaled # (-)
alpha_t = ${tritium_trapping_prefactor} # (1/s)
trapping_energy = ${fparse tritium_trapping_energy/ideal_gas_constant} # (K)
N = ${fparse density_material / density_scalar} # (-)
Ct0 = 'trapping_sites_fraction_function' # (atomic fraction)
mobile_concentration = 'tritium_mobile_concentration_scaled' # (-)
temperature = temperature # (K)
trap_per_free = ${trap_per_free}
[]
[release]
type = ReleasingNodalKernel
variable = tritium_trapped_concentration_scaled # (atoms/m^3) / density_scalar = (-)
alpha_r = ${fparse tritium_release_prefactor} # (1/s)
detrapping_energy = ${fparse tritium_release_energy / boltzmann_constant} # (K)
temperature = temperature # (K)
[]
[decay]
type = ReleasingNodalKernel
variable = tritium_trapped_concentration_scaled # (atoms/m^3) / density_scalar = (-)
alpha_r = ${decay_rate_constant} # (1/s) - decay rate
detrapping_energy = 0 # (K) - The decay rate is independent of temperature
temperature = temperature # (K)
[]
[]
[Materials]
[diffusivity] # (m2/s) tritium diffusivity
type = DerivativeParsedMaterial
property_name = 'diffusivity'
coupled_variables = 'temperature'
expression = '${tritium_diffusivity_prefactor}*exp(-${tritium_diffusivity_energy}/${ideal_gas_constant}/temperature)'
[]
[alpha_t_tot] # (1/s) - trapping rate
type = ParsedMaterial
property_name = 'alpha_t_tot'
coupled_variables = 'temperature'
expression = '${tritium_trapping_prefactor} * exp(- ${tritium_trapping_energy}/${ideal_gas_constant}/temperature)'
outputs = 'all'
[]
[alpha_r_tot] # (1/s) - detrapping rate
type = ParsedMaterial
property_name = 'alpha_r_tot'
coupled_variables = 'temperature'
expression = '${tritium_release_prefactor} * exp(- ${tritium_release_energy} / ${boltzmann_constant}/temperature)'
outputs = 'all'
[]
[]
[Postprocessors]
# Amount of mobile tritium in the sample in (atoms/m^3) / density_scalar * m = (m)
[tritium_mobile_inventory_scaled]
type = ElementIntegralVariablePostprocessor
variable = tritium_mobile_concentration_scaled
execute_on = 'INITIAL TIMESTEP_END'
[]
[tritium_mobile_inventory] # (atoms/m^2)
type = ScalePostprocessor
value = tritium_mobile_inventory_scaled
scaling_factor = ${density_scalar}
execute_on = 'INITIAL TIMESTEP_END'
[]
# Amount of trapped tritium in the sample (atoms/m^3) / density_scalar * m = (m)
[tritium_trapped_inventory_scaled]
type = ElementIntegralVariablePostprocessor
variable = tritium_trapped_concentration_scaled
execute_on = 'INITIAL TIMESTEP_END'
[]
[tritium_trapped_inventory] # (atoms/m^2)
type = ScalePostprocessor
value = tritium_trapped_inventory_scaled
scaling_factor = ${density_scalar}
execute_on = 'INITIAL TIMESTEP_END'
[]
# Amount of helium in the sample in atoms/m^3 / density_scalar * m = (m)
[helium_inventory_scaled]
type = ElementIntegralVariablePostprocessor
variable = helium_concentration_scaled
execute_on = 'INITIAL TIMESTEP_END'
[]
[helium_inventory] # (atoms/m^2)
type = ScalePostprocessor
value = helium_inventory_scaled
scaling_factor = ${density_scalar}
execute_on = 'INITIAL TIMESTEP_END'
[]
# check mass conservation - this should remain constant - (atoms/m^2)
[total_inventory] # (atoms/m^2)
type = SumPostprocessor
values = 'tritium_mobile_inventory tritium_trapped_inventory helium_inventory'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[VectorPostprocessors]
[line]
type = LineValueSampler
start_point = '0 0 0'
end_point = '${slab_length} 0 0'
num_points = ${num_mesh_element}
sort_by = 'x'
variable = 'tritium_mobile_concentration tritium_trapped_concentration helium_concentration'
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = ${end_time}
solve_type = NEWTON
scheme = 'bdf2'
dtmin = 1
dtmax = ${dt_max}
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[TimeStepper]
type = IterationAdaptiveDT
dt = ${dt_start}
optimal_iterations = 9
growth_factor = 1.2
cutback_factor = 0.9
[]
[]
[Outputs]
perf_graph = true
file_base = ver-1jb_out
[time_dependent_out]
type = CSV
execute_vector_postprocessors_on = NONE
file_base = ver-1jb_time_dependent_out
[]
[profile_out]
type = CSV
sync_only = true
sync_times = '${units 45 year -> s}'
execute_postprocessors_on = NONE
file_base=ver-1jb_profile_out
[]
[]
(test/tests/ver-1d/ver-1d-trapping.i)
# Verification Problem #1d from TMAP4/TMAP7 V&V document
# Permeation Problem with Trapping in Trapping-limited Case
# No Soret effect, or solubility included.
# Modeling parameters
node_num = 1000
thickness = '${units 1 m}'
end_time = '${units 1000 s}'
time_scaling = 1
temperature = '${units 1000 K}'
diffusivity = '${fparse ${units 1 m^2/s} / time_scaling}'
# Trapping parameters
cl = '${units 3.1622e18 at/m^3}'
N = '${units 3.1622e22 at/m^3}'
trapping_prefactor = '${fparse ${units 1e15 1/s} / time_scaling}'
release_prefactor = '${fparse ${units 1e13 1/s} / time_scaling}'
epsilon=${units 10000 K}
trapping_fraction = 0.1 # -
trap_per_free = 1e3
[Mesh]
type = GeneratedMesh
dim = 1
nx = ${node_num}
xmax = ${thickness}
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[mobile]
[]
[trapped]
[]
[]
[AuxVariables]
[empty_sites]
[]
[scaled_empty_sites]
[]
[trapped_sites]
[]
[total_sites]
[]
[]
[AuxKernels]
[empty_sites]
variable = empty_sites
type = EmptySitesAux
N = '${fparse N / cl}'
Ct0 = ${trapping_fraction}
trap_per_free = ${trap_per_free}
trapped_concentration_variables = trapped
[]
[scaled_empty]
variable = scaled_empty_sites
type = NormalizationAux
normal_factor = ${cl}
source_variable = empty_sites
[]
[trapped_sites]
variable = trapped_sites
type = NormalizationAux
normal_factor = ${trap_per_free}
source_variable = trapped
[]
[total_sites]
variable = total_sites
type = ParsedAux
expression = 'trapped_sites + empty_sites'
coupled_variables = 'trapped_sites empty_sites'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = mobile
diffusivity = ${diffusivity}
extra_vector_tags = ref
[]
[time]
type = TimeDerivative
variable = mobile
extra_vector_tags = ref
[]
[coupled_time]
type = ScaledCoupledTimeDerivative
variable = mobile
v = trapped
factor = ${trap_per_free}
extra_vector_tags = ref
[]
[]
[NodalKernels]
[time]
type = TimeDerivativeNodalKernel
variable = trapped
[]
[trapping]
type = TrappingNodalKernel
variable = trapped
alpha_t = ${trapping_prefactor}
N = '${fparse N / cl}'
Ct0 = ${trapping_fraction}
mobile_concentration = 'mobile'
temperature = ${temperature}
trap_per_free = ${trap_per_free}
extra_vector_tags = ref
[]
[release]
type = ReleasingNodalKernel
alpha_r = ${release_prefactor}
temperature = ${temperature}
detrapping_energy = ${epsilon}
variable = trapped
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = mobile
function = 'BC_func'
boundary = left
[]
[right]
type = DirichletBC
variable = mobile
value = 0
boundary = right
[]
[]
[Functions]
[BC_func]
type = ParsedFunction
expression = '${fparse cl / cl}*tanh( 3 * t )'
[]
[]
[Postprocessors]
[outflux]
type = SideDiffusiveFluxAverage
boundary = 'right'
diffusivity = 1
variable = mobile
[]
[scaled_outflux]
type = ScalePostprocessor
value = outflux
scaling_factor = ${cl}
[]
[min_trapped]
type = NodalExtremeValue
value_type = MIN
variable = trapped
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = ${end_time}
dtmax = 5
solve_type = NEWTON
scheme = BDF2
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-6
optimal_iterations = 9
growth_factor = 1.1
cutback_factor = 0.909
[]
[]
[Outputs]
exodus = true
csv = true
[dof]
type = DOFMap
execute_on = initial
[]
perf_graph = true
[]