Pore-Scale Simulations of Tritium Transport Using TMAP8
This example demonstrates TMAP8's capability to (1) generate pore structures from input images, and (2) perform pore-scale simulations of tritium transport on these pore structures based on the model described in Simon et al. (2022). Simon et al. (2022) provides additional context and details about this example, including a description of the calibration efforts. Note that this approach can be extended to three-dimensional microstructures.
This example, as stated in Simon et al. (2022), showcases how TMAP8 can simulate complex geometries and help investigate the effects of pore microstructure on tritium absorption.
General Description of the Simulation Case and Corresponding Input Files
Introduction
The sections below describe the simulation details and explain how they translate into the example TMAP8 input files. Not every part of the input file is explained here. If the interested reader has more questions about this example case and how to modify this input file to adapt it to a different case, feel free to reach out to the TMAP8 development team on the TMAP8 GitHub discussion page.
In this example, TMAP8 is used to simulate tritium transport at the pore scale in ceramic breeder materials. The model tracks tritium in three different forms: freely moving in solid solution in the ceramic material (), trapped in the ceramic material (), or in gaseous form in pores and outside the ceramic (). This example is based on the simulations presented in Section V of Simon et al. (2022).
This example is divided into the two steps required to reproduce the results presented in Section V of Simon et al. (2022). First, it describes the simulation used to input an image and automatically generate a usable pore microstructure. Second, it shows how this microstructure can be imported to perform tritium transport calculations on pore microstructure. This process is illustrated in Figure 1.

Figure 1: Illustration of the process for pore scale simulation of tritium transport in TMAP8 based on a microstructure image. Step 1 takes an image and creates a corresponding microstructure, and step 2 performs tritium transport calculations on this microstructure (figures are reproduced from Simon et al. (2022)).
TMAP8 can also automatically generate microstructures using the initial condition system, as MOOSE is equipped with the user-friendly, built-in MeshGenerators system for creating meshes based on simple geometries. It can also import EBSD data or import microstructures generated via other means.
Generating the pore microstructure based on an image
In this first step, we use the following input file to import the image and create the smooth microstructure:
# TMAP8 input file
# Written by Pierre-Clément Simon - Idaho National Laboratory
#
# Published with:
# P.-C. A. Simon, P. W. Humrickhouse, A. D. Lindsay,
# "Tritium Transport Modeling at the Pore Scale in Ceramic Breeder Materials Using TMAP8,"
# in IEEE Transactions on Plasma Science, 2022, doi: 10.1109/TPS.2022.3183525.
#
# Info:
# - This simulation predicts phase evolution based on a grain growth phase field model.
# - The pore and the ceramics represent two different phases, and the initial conditions
# are provided with a black and white picture, which is read by ImageFunction.
# - The simulation smoothens the interface between the two phases.
#
#
# Once TMAP8 is installed and built (see instructions on the TMAP8 website), run with
# cd ~/projects/TMAP8/test/tests/pore_scale_transport/
# mpirun -np 8 ~/projects/TMAP8/tmap8-opt -i 2D_microstructure_reader_smoothing_base.i pore_structure_open.params
# mesh information
num_nodes_x = ${fparse 2*120} # (-)
num_nodes_y = ${fparse 2*120} # (-)
domain_start_x = ${units 0 mum}
domain_start_y = ${units 0 mum}
domain_end_x = ${units 5425 mum}
domain_end_y = ${units 5425 mum}
# grain growth parameters (since the point of the simulation is only to get a smooth interface, the model parameters can be selected arbitrarily)
op_num = 2 # Number of grains (-)
mobility_prefactor = ${units 2.5e-6 mum^4/J/s}
GB_energy = ${units 0.7 J/mum^2}
activation_energy = ${units 0.23 eV}
temperature = ${units 700 K}
width_diffuse_GB = ${units 50 mum} # Width of the diffuse GB
# image function option
threshold_image_function = 255.5 # (-)
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
[gen]
type = DistributedRectilinearMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "../../source/meshgenerators/DistributedRectilinearMeshGenerator.html"}>>>
dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 2
nx<<<{"description": "Number of elements in the X direction"}>>> = ${num_nodes_x}
ny<<<{"description": "Number of elements in the Y direction"}>>> = ${num_nodes_y}
xmin<<<{"description": "Lower X Coordinate of the generated mesh"}>>> = ${domain_start_x}
xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = ${domain_end_x}
ymin<<<{"description": "Lower Y Coordinate of the generated mesh"}>>> = ${domain_start_y}
ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = ${domain_end_y}
[]
[]
[GlobalParams<<<{"href": "../../syntax/GlobalParams/index.html"}>>>]
op_num = ${op_num}
var_name_base = gr # Base name of grains
[]
[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
[grain_tracker]
type = GrainTracker<<<{"description": "Grain Tracker object for running reduced order parameter simulations without grain coalescence.", "href": "../../source/postprocessors/GrainTracker.html"}>>>
flood_entity_type<<<{"description": "Determines whether the flood algorithm runs on nodes or elements"}>>> = ELEMENTAL
compute_halo_maps<<<{"description": "Instruct the Postprocessor to communicate proper halo information to all ranks"}>>> = true
[]
[]
[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
[image_func0]
type = ImageFunction<<<{"description": "Function with values sampled from an image or image stack.", "href": "../../source/functions/ImageFunction.html"}>>>
file<<<{"description": "Name of single image file to extract mesh parameters from. If provided, a 2D mesh is created."}>>> = ${input_name}
threshold<<<{"description": "The threshold value"}>>> = ${threshold_image_function}
upper_value<<<{"description": "The value to set for data greater than the threshold value"}>>> = 1
lower_value<<<{"description": "The value to set for data less than the threshold value"}>>> = 0
[]
[image_func1]
type = ImageFunction<<<{"description": "Function with values sampled from an image or image stack.", "href": "../../source/functions/ImageFunction.html"}>>>
file<<<{"description": "Name of single image file to extract mesh parameters from. If provided, a 2D mesh is created."}>>> = ${input_name}
threshold<<<{"description": "The threshold value"}>>> = ${threshold_image_function}
upper_value<<<{"description": "The value to set for data greater than the threshold value"}>>> = 0
lower_value<<<{"description": "The value to set for data less than the threshold value"}>>> = 1
[]
[]
[ICs<<<{"href": "../../syntax/ICs/index.html"}>>>]
[gr0_ic]
type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../../source/ics/FunctionIC.html"}>>>
function<<<{"description": "The initial condition function."}>>> = image_func0
variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = gr0
[]
[gr1_ic]
type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../../source/ics/FunctionIC.html"}>>>
function<<<{"description": "The initial condition function."}>>> = image_func1
variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = gr1
[]
[]
[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
[PolycrystalVariables<<<{"href": "../../syntax/Variables/PolycrystalVariables/index.html"}>>>]
# Custom action that creates all of the phase variables and sets their initial condition
[]
[]
[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
[bnds]
# Variable used to visualize the interfaces in the simulation
[]
[unique_grains]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
[]
[]
[Kernels<<<{"href": "../../syntax/Kernels/index.html"}>>>]
[PolycrystalKernel<<<{"href": "../../syntax/Kernels/PolycrystalKernel/index.html"}>>>]
# Custom action creating all necessary kernels for phase evolution. All input parameters are up in GlobalParams
[]
[]
[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
[bnds_aux]
type = BndsCalcAux<<<{"description": "Calculate location of grain boundaries in a polycrystalline sample", "href": "../../source/auxkernels/BndsCalcAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bnds
execute_on<<<{"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."}>>> = 'initial timestep_end'
[]
[unique_grains]
type = FeatureFloodCountAux<<<{"description": "Feature detection by connectivity analysis", "href": "../../source/auxkernels/FeatureFloodCountAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = unique_grains
execute_on<<<{"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."}>>> = timestep_end
flood_counter<<<{"description": "The FeatureFloodCount UserObject to get values from."}>>> = grain_tracker
field_display<<<{"description": "Determines how the auxilary field should be colored. (UNIQUE_REGION and VARIABLE_COLORING are nodal, CENTROID is elemental, default: UNIQUE_REGION)"}>>> = UNIQUE_REGION
[]
[]
[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
[InterfaceEvolution]
type = GBEvolution<<<{"description": "Computes necessary material properties for the isotropic grain growth model", "href": "../../source/materials/GBEvolution.html"}>>>
GBmob0<<<{"description": "Grain boundary mobility prefactor in m^4/(J*s)"}>>> = ${mobility_prefactor}
GBenergy<<<{"description": "Grain boundary energy in J/m^2"}>>> = ${GB_energy}
Q<<<{"description": "Grain boundary migration activation energy in eV"}>>> = ${activation_energy}
T<<<{"description": "Temperature in Kelvin"}>>> = ${temperature}
wGB<<<{"description": "Diffuse GB width in the length scale of the model"}>>> = ${width_diffuse_GB}
[]
[]
[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 20
nl_max_its = 9
nl_rel_tol = 1e-10
[TimeStepper<<<{"href": "../../syntax/Executioner/TimeStepper/index.html"}>>>]
type = IterationAdaptiveDT
cutback_factor = 0.9
dt = 3e-2
growth_factor = 1.1
optimal_iterations = 7
[]
dtmax = 25
start_time = 0.0
end_time = 100
[]
[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
file_base<<<{"description": "Common file base name to be utilized with all output objects"}>>> = ${output_name}
[exodus]
type = Exodus<<<{"description": "Object for output data in the Exodus format", "href": "../../source/outputs/Exodus.html"}>>>
execute_on<<<{"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."}>>> = 'FINAL'
[]
[]
(test/tests/pore_scale_transport/2D_microstructure_reader_smoothing_base.i)This section describes this input file, what it does, and how to run it to replicate the results from Simon et al. (2022). Note that the input file also contains extensive comments meant to help users.
Import the pore microstructure image
Figure 2 and Figure 3 show the initial images used to generate the microstructures from Fig. 5 in Simon et al. (2022). Although both samples have a density of 80%, they exhibit very different pore interconnectivities, which was demonstrated to affect tritium absorption (Simon et al., 2022).

Figure 2: Initial image used to generate the microstructure with closed pores. This corresponds to the original image to generate Fig. 5.a in Simon et al. (2022).

Figure 3: Initial image used to generate the microstructure with open pores. This corresponds to the original image to generate Fig. 5.b in Simon et al. (2022).
TMAP8 can import these images using the ImageFunction object and, using a threshold, attribute different contrast values to given phases. Here, the bright areas are identified as ceramic material, while dark areas are identified as pores.
The size of the microstructure is not directly provided by the images in Figure 2 and Figure 3. Users can scale, crop, and adjust the image to the desired size. In this example, the sample being 4.5 mm in radius, the domain size is set to 5.425 mm 5.425 mm.
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
[gen]
type = DistributedRectilinearMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "../../source/meshgenerators/DistributedRectilinearMeshGenerator.html"}>>>
dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 2
nx<<<{"description": "Number of elements in the X direction"}>>> = ${num_nodes_x}
ny<<<{"description": "Number of elements in the Y direction"}>>> = ${num_nodes_y}
xmin<<<{"description": "Lower X Coordinate of the generated mesh"}>>> = ${domain_start_x}
xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = ${domain_end_x}
ymin<<<{"description": "Lower Y Coordinate of the generated mesh"}>>> = ${domain_start_y}
ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = ${domain_end_y}
[]
[]
[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
[image_func0]
type = ImageFunction<<<{"description": "Function with values sampled from an image or image stack.", "href": "../../source/functions/ImageFunction.html"}>>>
file<<<{"description": "Name of single image file to extract mesh parameters from. If provided, a 2D mesh is created."}>>> = ${input_name}
threshold<<<{"description": "The threshold value"}>>> = ${threshold_image_function}
upper_value<<<{"description": "The value to set for data greater than the threshold value"}>>> = 1
lower_value<<<{"description": "The value to set for data less than the threshold value"}>>> = 0
[]
[image_func1]
type = ImageFunction<<<{"description": "Function with values sampled from an image or image stack.", "href": "../../source/functions/ImageFunction.html"}>>>
file<<<{"description": "Name of single image file to extract mesh parameters from. If provided, a 2D mesh is created."}>>> = ${input_name}
threshold<<<{"description": "The threshold value"}>>> = ${threshold_image_function}
upper_value<<<{"description": "The value to set for data greater than the threshold value"}>>> = 0
lower_value<<<{"description": "The value to set for data less than the threshold value"}>>> = 1
[]
[]
Perform a phase field simulation to smooth the interfaces
The rest of the input file is set up as a phase field simulation to smoothen the interface between the pore and the ceramic material. As discussed in Simon et al. (2022), using a phase field approach with a continuous interface enables TMAP8 to model arbitrarily complex geometries that cannot be easily meshed. Since TMAP8 inherits the phase field module from MOOSE, it can perform phase field simulations.
In this case, we use a two-phase model with arbitrary parameter values to quickly obtain, from the pore structures illustrated in Figure 2 and Figure 3, corresponding microstructures with the desired interface width, i.e., =50 m in this case. The simulation time is selected to be large enough to obtain a smooth interface, while staying small enough to prevent significant changes in the microstructure.
Run simulations
To run the input file to reproduce the microstructures shown in Fig. 5 in Simon et al. (2022), users need to first install TMAP8. Then, to generate the microstructure with closed pores using 4 CPU cores in parallel with mpirun
, run:
cd ~/projects/TMAP8/test/tests/pore_scale_transport/
mpirun -np 4 ~/projects/TMAP8/tmap8-opt -i 2D_microstructure_reader_smoothing_base.i pore_structure_closed.params
and to generate the microstructure with open pores using 4 CPU cores in parallel with mpirun
, run:
cd ~/projects/TMAP8/test/tests/pore_scale_transport/
mpirun -np 4 ~/projects/TMAP8/tmap8-opt -i 2D_microstructure_reader_smoothing_base.i pore_structure_open.params
Note that the pore_structure_closed.params and pore_structure_open.params files complement the base input file 2D_microstructure_reader_smoothing_base.i by providing input and output names.
Resulting smooth pore microstructures
Figure 4 shows the smooth pore microstructures obtained with the simulation described above. These pore structures correspond to the ones shown in Fig. 5 in Simon et al. (2022) and can be found in ~/projects/TMAP8/test/tests/pore_scale_transport/
as pore_structure_close/pore_structure_close.e
and pore_structure_open/pore_structure_open.e
once the simulations are completed. These can be viewed in a visualization software such as ParaView.

Figure 4: Smooth pore microstructures obtained with the simulation described above. This corresponds Fig. 5 in Simon et al. (2022).
Model tritium transport on pore-scale microstructures
In this second step, we use the following input file to import the smooth microstructures from Figure 4 and model pore scale tritium transport during absorption:
# TMAP8 input file
# Written by Pierre-Clément Simon - Idaho National Laboratory
#
# Published with:
# P.-C. A. Simon, P. W. Humrickhouse, A. D. Lindsay,
# "Tritium Transport Modeling at the Pore Scale in Ceramic Breeder Materials Using TMAP8,"
# in IEEE Transactions on Plasma Science, 2022, doi: 10.1109/TPS.2022.3183525.
#
# Phase Field Model: Isotropic bulk diffusion, pore surface reactions, isotropic pore diffusion
# Type: Transient
# Phase structure: Contains two phases: the bulk of a material, and the pores. An interface separates the two
# Physics: tritium trapping and detrapping, surface reactions, diffusion
# Species variable: tritium_s (Ts), tritium_trap (trapped T), tritium_2g (T2(g))
# Species AuxVariable: --
# Chemistry: at the pore surface: (s) means in the solid, (g) means in gas form
# Diatomic molecule dissolving at surface
# T2(g) -> 2 T(s) rate K [T2] (1-theta)^2
# Diatomic molecule combining at surface
# 2 T(s) -> T2(g) rate K [T]^2
#
# BCs: No flux for tritium and tritium_trap, zero at pore center for gaseous tritium in every form
#
#
# Info:
# - This input file uses the microstructure generated by 2D_microstructure_reader_smoothing_base.i
# and performs tritium transport simulation on this microstructure.
# - Basic 2D non-dimensional input file for the transport of a solute in a microstructure with pores.
# - The goal of this input base and associated parameter files is to have the same simulation with different pore configurations
# to show the effect of microstructure on tritium release.
#
#
# Once TMAP8 is installed and built (see instructions on the TMAP8 website), run with
# cd ~/projects/TMAP8/test/tests/pore_scale_transport/
# mpirun -np 8 ~/projects/TMAP8/tmap8-opt -i 2D_absorption_base.i pore_structure_open_absorption.params
# Scaling factors
scale_quantity = ${units 1e-18 moles}
scale_time = ${units 1 s}
scale_length = ${units 1 mum}
tritium_trap_scaling = 1e3 # (-)
tritium_s_scaling = 1e2 # (-)
# Conditions
tritium_2g_concentration = ${units 0.1121 mol/mum^3}
# Material properties
tritium_trap_0 = ${units 3.472805925e-18 mol/mum^3}
tritium_trap_0_scaled = ${fparse tritium_trap_0*scale_length^3/scale_quantity} # non-dimensional
available_sites_mult = 4.313540691 # (-) should be >1, otherwise there are fewer 'available sites' than 'trapping sites'
Diffusion_min = ${units 0 mum^2/s} # used as diffusion coefficients where I don't want the species to move (more stable than 0)
Diffusion_coefficient_Db_D0 = ${units 1649969.728 mum^2/s}
Diffusion_coefficient_D_pore_D0 = ${units 224767738.6 mum^2/s}
detrapping_rate_0 = ${units -4.065104516 1/s} # should be negative
trapping_rate_0 = ${units 8.333146645e+16 1/s/mol} # should be positive
reactionRateSurface_sXYg_ref_0 = ${units 1549103878000000.0 1/s/mol}
reactionRateSurface_gXYs_ref_0 = ${units 34.69205021 1/s}
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
file = ${input_name}
[]
[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
[initial_microstructure]
type = SolutionUserObject<<<{"description": "Reads a variable from a mesh in one simulation to another", "href": "../../source/userobjects/SolutionUserObject.html"}>>>
mesh<<<{"description": "The name of the mesh file (must be xda/xdr or exodusII file)."}>>> = ${input_name}
timestep<<<{"description": "Index of the single timestep used or \"LATEST\" for the last timestep (exodusII only). If not supplied, time interpolation will occur."}>>> = LATEST
[]
[]
[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
[tritium_s]
scaling<<<{"description": "Specifies a scaling factor to apply to this variable"}>>> = ${tritium_s_scaling}
[]
[tritium_trap]
scaling<<<{"description": "Specifies a scaling factor to apply to this variable"}>>> = ${tritium_trap_scaling}
[]
[tritium_2g]
[]
[]
[ICs<<<{"href": "../../syntax/ICs/index.html"}>>>]
[tritium_2g_ic]
type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../../source/ics/FunctionIC.html"}>>>
variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = tritium_2g
function<<<{"description": "The initial condition function."}>>> = 'gaseous_concentration_1_function_ic'
[]
[]
[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
[pore_position_func]
type = SolutionFunction<<<{"description": "Function for reading a solution from file.", "href": "../../source/functions/SolutionFunction.html"}>>>
solution<<<{"description": "The SolutionUserObject to extract data from."}>>> = initial_microstructure
from_variable<<<{"description": "The name of the variable in the file that is to be extracted"}>>> = gr0
[]
[gaseous_concentration_1_function_ic]
type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../source/functions/MooseParsedFunction.html"}>>>
symbol_names<<<{"description": "Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector."}>>> = 'len_pore position_pore_int'
symbol_values<<<{"description": "Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names."}>>> = '25 4521'
expression<<<{"description": "The user defined function."}>>> = '${tritium_2g_concentration}*0.5*(1.0+tanh((sqrt(x*x+y*y)-position_pore_int)/(len_pore/2.2)))'
[]
[]
[BCs<<<{"href": "../../syntax/BCs/index.html"}>>>]
[tritium_2g_sides_d] # Fix concentration on the sides
type = DirichletBC<<<{"description": "Imposes the essential boundary condition $u=g$, where $g$ is a constant, controllable value.", "href": "../../source/bcs/DirichletBC.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'right top'
value<<<{"description": "Value of the BC"}>>> = ${tritium_2g_concentration}
[]
[]
[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
[pore]
initial_from_file_var<<<{"description": "Gives the name of a variable for which to read an initial condition from a mesh file"}>>> = gr0
initial_from_file_timestep<<<{"description": "Gives the timestep (or \"LATEST\") for which to read a solution from a file for a given variable. (Default: LATEST)"}>>> = LATEST
[]
# Used to prevent negative concentrations
[bounds_dummy_tritium_s]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = FIRST
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = LAGRANGE
[]
[bounds_dummy_tritium_2g]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = FIRST
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = LAGRANGE
[]
[]
[Bounds<<<{"href": "../../syntax/Bounds/index.html"}>>>]
# To prevent negative concentrations
[tritium_s_lower_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy_tritium_s
bounded_variable<<<{"description": "The variable to be bounded"}>>> = tritium_s
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = lower
bound_value<<<{"description": "The value of bound for the variable"}>>> = 0.
[]
[tritium_g_lower_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy_tritium_2g
bounded_variable<<<{"description": "The variable to be bounded"}>>> = tritium_2g
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = lower
bound_value<<<{"description": "The value of bound for the variable"}>>> = 0.
[]
[]
[Kernels<<<{"href": "../../syntax/Kernels/index.html"}>>>]
# ========================================== Time derivative for each variable
[dtritium_sdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_s'
[]
[dtritium_2gdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_2g'
[]
[dtritium_trapdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
[]
# ============================================================= Bulk diffusion
[Diff_tritium]
type = ADMatDiffusion<<<{"description": "Diffusion equation kernel that takes an isotropic diffusivity from a material property", "href": "../../source/kernels/ADMatDiffusion.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
diffusivity<<<{"description": "The diffusivity value or material property"}>>> = D_tritium
[]
# ============================================================= Pore diffusion
[Diff_tritium2g]
type = ADMatDiffusion<<<{"description": "Diffusion equation kernel that takes an isotropic diffusivity from a material property", "href": "../../source/kernels/ADMatDiffusion.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
diffusivity<<<{"description": "The diffusivity value or material property"}>>> = D_pore
[]
# ================================================ Tritium trapping/detrapping
[Trapping]
type = CoupledTimeDerivative<<<{"description": "Time derivative Kernel that acts on a coupled variable. Weak form: $(\\psi_i, \\frac{\\partial v_h}{\\partial t})$.", "href": "../../source/kernels/CoupledTimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
v<<<{"description": "Coupled variable"}>>> = 'tritium_trap'
[]
[Detrapping_trap]
type = ADMatReaction<<<{"description": "Kernel representing the contribution of the PDE term $-L*v$, where $L$ is a reaction rate material property, $v$ is a scalar variable (nonlinear or coupled), and whose Jacobian contribution is calculated using automatic differentiation.", "href": "../../source/kernels/ADMatReaction.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
reaction_rate<<<{"description": "The reaction_rate used with the kernel."}>>> = ${fparse scale_time * detrapping_rate_0} # from 1/s to non-dimensional
[]
[Trapping_trap]
type = ADMatCoupledDefectAnnihilation<<<{"description": "Kernel to add K*v*(u0-u), where K=annihilation rate, u=variable, u0=equilibrium, v=coupled variable", "href": "../../source/kernels/ADMatCoupledDefectAnnihilation.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
eq_concentration<<<{"description": "The equilibrium concentration of the variable used with the kernel"}>>> = ${tritium_trap_0_scaled}
v<<<{"description": "Set this to make v a coupled variable, otherwise it will use the kernel's nonlinear variable for v"}>>> = tritium_s
annihilation_rate<<<{"description": "The annihilation rate used with the kernel"}>>> = ${fparse scale_time*scale_quantity/scale_length^3*trapping_rate_0} # from um^3/s/mol to non-dimensional
[]
# ========================= Surface Reactions ================================
# ======================================= Diatomic molecule dissolve at surface
# T2(g) -> 2 T(s) rate K [T2] (1-theta) ======================================
[Surface_Reaction_dissolution_tritium_2g] # T2(g) -> 2 T(s) rate -K*tritium_2g
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_2g'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = -1
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_gXYs
[]
[Surface_Reaction_dissolution_tritium_2g_tritium_s] # T2(g) -> 2 T(s) rate 2*K*tritium_2g
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_2g'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = 2
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_gXYs
[]
# ======================================= Diatomic molecule combine at surface
# 2 T(s) -> T2(g) rate K [T]^2 ===============================================
[Surface_Reaction_release_tritium_s_tritium_2g] # 2 T(s) -> T2(g) rate -2*K*tritium_s^2
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_s tritium_s'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = -2
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_sXYg
[]
[Surface_Reaction_formation_tritium_2g] # 2 T(s) -> T2(g) rate K*tritium_s^2
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_s tritium_s'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = 1
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_sXYg
[]
[]
[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
[pore_aux]
type = FunctionAux<<<{"description": "Auxiliary Kernel that creates and updates a field variable by sampling a function through space and time.", "href": "../../source/auxkernels/FunctionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = pore
function<<<{"description": "The function to use as the value"}>>> = 'pore_position_func'
execute_on<<<{"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."}>>> = 'INITIAL'
[]
[]
[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
#===================================================== Interpolation functions
[hsurfaceAD] # equal to 1 at pore surface, 0 elsewhere. The values of hsurface should be smaller than the ones for hmat or hpore to allow the diffusion of the species out of the surface
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '16*(1-pore)^2*pore^2'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hsurfaceAD'
[]
[hmatAD] # equal to 1 in material, and 0 in pore.
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '(1-pore)*(1-pore)'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hmatAD'
[]
[hporeAD] # equal to 1 in pore, and 1 in material. # notice that hpore overlaps a bit with hmat to prevent some agglomeration of chemicals on the edges of the surface.
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = 'pore*pore'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hporeAD'
[]
#================================================= Local species concentration
[Tritium_ceramic]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'tritium_ceramic'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_s tritium_trap'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = 'tritium_s+tritium_trap'
[]
[Tritium_pore]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'tritium_pore'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_2g'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '2*tritium_2g'
[]
[Tritium_total]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'tritium_tot'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_s tritium_trap tritium_2g'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = 'tritium_s+tritium_trap+2*tritium_2g'
[]
#=============================================== Occupied sites on the surface
[theta]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'theta'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_s tritium_trap'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '(tritium_s + tritium_trap)/(${available_sites_mult}*${tritium_trap_0_scaled})'
[]
#====================================================== Diffusion coefficients
[Diffusion_coefficient_D] # from um^2/s to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'D_tritium'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hmatAD(pore)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}/${scale_length}^2*(hmatAD*${Diffusion_coefficient_Db_D0} + (1-hmatAD)*${Diffusion_min})'
derivative_order<<<{"description": "Maximum order of derivatives taken"}>>> = 2
[]
[Diffusion_coefficient_D_pore] # from um^2/s to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'D_pore'
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hporeAD(pore)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}/${scale_length}^2*(hporeAD*${Diffusion_coefficient_D_pore_D0} + (1-hporeAD)*${Diffusion_min})'
[]
#============================================ Surface reaction rate of tritium
[ReactionRateSurface_sXYg_ref] # from surface to gaseous for diatomic molecules # from um^3/s/mol to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = ReactionRateSurface_sXYg
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hsurfaceAD(pore)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}*${scale_quantity}/${scale_length}^3*${reactionRateSurface_sXYg_ref_0}*hsurfaceAD'
[]
[ReactionRateSurface_gXYs_ref] # from gaseous to surface for diatomic molecules # from 1/s to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = ReactionRateSurface_gXYs
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore tritium_s tritium_trap'
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hsurfaceAD(pore) theta(tritium_s,tritium_trap)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}*${reactionRateSurface_gXYs_ref_0}*hsurfaceAD*(1-theta)^2'
[]
[]
[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
[Tritium_amount_free]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_s
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_trapped]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_trap
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_ceramic]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_ceramic
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium2g_amount]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_2g
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_pore]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_pore
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_total]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_tot
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Surface_tot]
type = ElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = 1
[]
[dt]
type = TimestepSize<<<{"description": "Reports the timestep size", "href": "../../source/postprocessors/TimestepSize.html"}>>>
[]
[]
[Preconditioning<<<{"href": "../../syntax/Preconditioning/index.html"}>>>]
[Newtonlu]
type = SMP<<<{"description": "Single matrix preconditioner (SMP) builds a preconditioner using user defined off-diagonal parts of the Jacobian.", "href": "../../source/preconditioners/SingleMatrixPreconditioner.html"}>>>
full<<<{"description": "Set to true if you want the full set of couplings between variables simply for convenience so you don't have to set every off_diag_row and off_diag_column combination."}>>> = true
solve_type<<<{"description": "PJFNK: Preconditioned Jacobian-Free Newton Krylov JFNK: Jacobian-Free Newton Krylov NEWTON: Full Newton Solve FD: Use finite differences to compute Jacobian LINEAR: Solving a linear problem"}>>> = 'NEWTON'
petsc_options_iname<<<{"description": "Names of PETSc name/value pairs"}>>> = '-pc_type -sub_pc_type -snes_type'
petsc_options_value<<<{"description": "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\""}>>> = 'asm lu vinewtonrsls' # This petsc option helps prevent negative concentrations'
[]
[]
[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
type = Transient
scheme = bdf2
nl_rel_tol = 1e-10
end_time = 2000
dtmax = 50
nl_max_its = 14
[TimeStepper<<<{"href": "../../syntax/Executioner/TimeStepper/index.html"}>>>]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 1
growth_factor = 1.2
dt = 2.37e-7
cutback_factor = 0.75
cutback_factor_at_failure = 0.75
[]
[]
[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
[exodus]
type = Exodus<<<{"description": "Object for output data in the Exodus format", "href": "../../source/outputs/Exodus.html"}>>>
time_step_interval<<<{"description": "The interval (number of time steps) at which output occurs. Unless explicitly set, the default value of this parameter is set to infinity if the wall_time_interval is explicitly set."}>>> = 5
[]
csv<<<{"description": "Output the scalar variable and postprocessors to a *.csv file using the default CSV output."}>>> = true
file_base<<<{"description": "Common file base name to be utilized with all output objects"}>>> = ${output_name}
[]
(test/tests/pore_scale_transport/2D_absorption_base.i)This section describes this input file, what it does, and how to run it. Note that the input file also contains extensive comments meant to help users.
Background and Governing Equations
In this step, we model tritium transport in the pores, surface reactions at the ceramics interface, and diffusion, trapping, and detrapping within the ceramics.
The evolution of tritium concentration in solid solution within the ceramic material, (mol⋅μm), is governed by the following equation:
(1)
where is time (s), is the diffusion coefficient of tritium in the ceramic material (m/s), is the concentration of trapped tritium (mol/m), and are the reaction rates at the surface (mol/m/s), and and are dimensionless interpolation functions that delimit the ceramic material and pore surface, respectively (see the next section below).
The concentration of trapped tritium is governed by:
(2)
where is the rate constant for trapping (m/s/mol), is the density of available trapping sites (mol/m), and is the rate constant for detrapping (1/s).
The evolution of tritium concentration in pores and outside the ceramic () is defined by:
(3)
where is the diffusion coefficient of in the pores (m/s) and is a dimensionless interpolation function that delimits the pore.
These concentration variables are defined in the input file as:
[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
[tritium_s]
scaling<<<{"description": "Specifies a scaling factor to apply to this variable"}>>> = ${tritium_s_scaling}
[]
[tritium_trap]
scaling<<<{"description": "Specifies a scaling factor to apply to this variable"}>>> = ${tritium_trap_scaling}
[]
[tritium_2g]
[]
[]
The equations are encoded into the input file as kernels, which each implement a specific term from the equations
[Kernels<<<{"href": "../../syntax/Kernels/index.html"}>>>]
# ========================================== Time derivative for each variable
[dtritium_sdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_s'
[]
[dtritium_2gdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_2g'
[]
[dtritium_trapdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
[]
# ============================================================= Bulk diffusion
[Diff_tritium]
type = ADMatDiffusion<<<{"description": "Diffusion equation kernel that takes an isotropic diffusivity from a material property", "href": "../../source/kernels/ADMatDiffusion.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
diffusivity<<<{"description": "The diffusivity value or material property"}>>> = D_tritium
[]
# ============================================================= Pore diffusion
[Diff_tritium2g]
type = ADMatDiffusion<<<{"description": "Diffusion equation kernel that takes an isotropic diffusivity from a material property", "href": "../../source/kernels/ADMatDiffusion.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
diffusivity<<<{"description": "The diffusivity value or material property"}>>> = D_pore
[]
# ================================================ Tritium trapping/detrapping
[Trapping]
type = CoupledTimeDerivative<<<{"description": "Time derivative Kernel that acts on a coupled variable. Weak form: $(\\psi_i, \\frac{\\partial v_h}{\\partial t})$.", "href": "../../source/kernels/CoupledTimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
v<<<{"description": "Coupled variable"}>>> = 'tritium_trap'
[]
[Detrapping_trap]
type = ADMatReaction<<<{"description": "Kernel representing the contribution of the PDE term $-L*v$, where $L$ is a reaction rate material property, $v$ is a scalar variable (nonlinear or coupled), and whose Jacobian contribution is calculated using automatic differentiation.", "href": "../../source/kernels/ADMatReaction.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
reaction_rate<<<{"description": "The reaction_rate used with the kernel."}>>> = '${fparse scale_time * detrapping_rate_0}' # from 1/s to non-dimensional
[]
[Trapping_trap]
type = ADMatCoupledDefectAnnihilation<<<{"description": "Kernel to add K*v*(u0-u), where K=annihilation rate, u=variable, u0=equilibrium, v=coupled variable", "href": "../../source/kernels/ADMatCoupledDefectAnnihilation.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
eq_concentration<<<{"description": "The equilibrium concentration of the variable used with the kernel"}>>> = ${tritium_trap_0_scaled}
v<<<{"description": "Set this to make v a coupled variable, otherwise it will use the kernel's nonlinear variable for v"}>>> = tritium_s
annihilation_rate<<<{"description": "The annihilation rate used with the kernel"}>>> = '${fparse scale_time*scale_quantity/scale_length^3*trapping_rate_0}' # from um^3/s/mol to non-dimensional
[]
# ========================= Surface Reactions ================================
# ======================================= Diatomic molecule dissolve at surface
# T2(g) -> 2 T(s) rate K [T2] (1-theta) ======================================
[Surface_Reaction_dissolution_tritium_2g]
# T2(g) -> 2 T(s) rate -K*tritium_2g
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_2g'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = -1
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_gXYs
[]
[Surface_Reaction_dissolution_tritium_2g_tritium_s]
# T2(g) -> 2 T(s) rate 2*K*tritium_2g
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_2g'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = 2
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_gXYs
[]
# ======================================= Diatomic molecule combine at surface
# 2 T(s) -> T2(g) rate K [T]^2 ===============================================
[Surface_Reaction_release_tritium_s_tritium_2g]
# 2 T(s) -> T2(g) rate -2*K*tritium_s^2
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_s tritium_s'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = -2
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_sXYg
[]
[Surface_Reaction_formation_tritium_2g]
# 2 T(s) -> T2(g) rate K*tritium_s^2
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_s tritium_s'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = 1
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_sXYg
[]
[]
Reaction Rates
The reaction rates for tritium dissociation and formation on the ceramic surface are:
(4) and (5)
where (1/s) and (m/s/mol) are reaction rate constants, and is the fraction of available sites for , defined as:
(6)
where is a dimensionless multiplier that ensures the concentration of available sites for tritium exceeds the concentration of trapping sites.
[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
[ReactionRateSurface_sXYg_ref]
# from surface to gaseous for diatomic molecules # from um^3/s/mol to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = ReactionRateSurface_sXYg
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hsurfaceAD(pore)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}*${scale_quantity}/${scale_length}^3*${reactionRateSurface_sXYg_ref_0}*hsurfaceAD'
[]
[ReactionRateSurface_gXYs_ref]
# from gaseous to surface for diatomic molecules # from 1/s to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = ReactionRateSurface_gXYs
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore tritium_s tritium_trap'
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hsurfaceAD(pore) theta(tritium_s,tritium_trap)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}*${reactionRateSurface_gXYs_ref_0}*hsurfaceAD*(1-theta)^2'
[]
[]
Interpolation Functions
The microstructure is defined by a dimensionless order parameter , which equals 1 in the pores, 0 in the ceramic, and varies continuously at the pore surface. This is commonly used in phase field modeling to describe continuous microstructures. The interpolation functions, which help ensure that diffusion coefficients (or other material properties) are restricted to the appropriate domains, are defined as:
(7)
for the ceramic material,
(8)
for the pore area, and
(9)
to describe the interface between the ceramic material and the pore. Note that the factor 16 ensures that at the middle of the interface, , as desired.
[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
[hmatAD]
# equal to 1 in material, and 0 in pore.
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '(1-pore)*(1-pore)'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hmatAD'
[]
[hporeAD]
# equal to 1 in pore, and 1 in material. # notice that hpore overlaps a bit with hmat to prevent some agglomeration of chemicals on the edges of the surface.
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = 'pore*pore'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hporeAD'
[]
[hsurfaceAD]
# equal to 1 at pore surface, 0 elsewhere. The values of hsurface should be smaller than the ones for hmat or hpore to allow the diffusion of the species out of the surface
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '16*(1-pore)^2*pore^2'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hsurfaceAD'
[]
[]
Dimensionless Modeling
To improve convergence, the model is rendered dimensionless using characteristic time s, length μm, and quantity mol.
Calibration Against Experimental Data
In Simon et al. (2022), the one-dimensional version of this case is used to calibrate the model against experimental data. In this example, like in Section V of Simon et al. (2022), we use this calibrated model on the two-dimensional microstructure.
The resulting model parameter values are summarized in Table 1.
Table 1: Calibrated model’s parameter values from Simon et al. (2022).
Model Parameter | Calibrated Value | Units |
---|---|---|
ms | ||
ms | ||
s | ||
msmol | ||
molm | ||
(-) | ||
msmol | ||
s |
Numerical Method, boundary conditions, and initial condition
As shown in Figure 4, the simulated domain represents a quarter of the sample, whose radius is 4.5 mm.
The same numerical methods as described in Simon et al. (2022) are used here. The numerical methods, including time step, time adaptivity, time integration method, preconditioning, and others are defined in the Preconditioning
and Executioner
blocks, as:
[Preconditioning<<<{"href": "../../syntax/Preconditioning/index.html"}>>>]
[Newtonlu]
type = SMP<<<{"description": "Single matrix preconditioner (SMP) builds a preconditioner using user defined off-diagonal parts of the Jacobian.", "href": "../../source/preconditioners/SingleMatrixPreconditioner.html"}>>>
full<<<{"description": "Set to true if you want the full set of couplings between variables simply for convenience so you don't have to set every off_diag_row and off_diag_column combination."}>>> = true
solve_type<<<{"description": "PJFNK: Preconditioned Jacobian-Free Newton Krylov JFNK: Jacobian-Free Newton Krylov NEWTON: Full Newton Solve FD: Use finite differences to compute Jacobian LINEAR: Solving a linear problem"}>>> = 'NEWTON'
petsc_options_iname<<<{"description": "Names of PETSc name/value pairs"}>>> = '-pc_type -sub_pc_type -snes_type'
petsc_options_value<<<{"description": "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\""}>>> = 'asm lu vinewtonrsls' # This petsc option helps prevent negative concentrations'
[]
[]
[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
type = Transient
scheme = bdf2
nl_rel_tol = 1e-10
end_time = 2000
dtmax = 50
nl_max_its = 14
[TimeStepper<<<{"href": "../../syntax/Executioner/TimeStepper/index.html"}>>>]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 1
growth_factor = 1.2
dt = 2.37e-7
cutback_factor = 0.75
cutback_factor_at_failure = 0.75
[]
[]
Concerning boundary conditions, we apply no-flux boundary conditions except for on the right-hand and top sides, which is fixed as a Dirichlet condition according to:
(10)
where is the tritium pressure (Pa), is the gas constant from PhysicalConstants, and is the temperature (K).
[BCs<<<{"href": "../../syntax/BCs/index.html"}>>>]
[tritium_2g_sides_d]
# Fix concentration on the sides
type = DirichletBC<<<{"description": "Imposes the essential boundary condition $u=g$, where $g$ is a constant, controllable value.", "href": "../../source/bcs/DirichletBC.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'right top'
value<<<{"description": "Value of the BC"}>>> = ${tritium_2g_concentration}
[]
[]
As initial conditions, the ceramic initially contains no tritium, and the pore is filled with with the value from Eq. (10).
[ICs<<<{"href": "../../syntax/ICs/index.html"}>>>]
[tritium_2g_ic]
type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../../source/ics/FunctionIC.html"}>>>
variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = tritium_2g
function<<<{"description": "The initial condition function."}>>> = 'gaseous_concentration_1_function_ic'
[]
[]
[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
[pore_position_func]
type = SolutionFunction<<<{"description": "Function for reading a solution from file.", "href": "../../source/functions/SolutionFunction.html"}>>>
solution<<<{"description": "The SolutionUserObject to extract data from."}>>> = initial_microstructure
from_variable<<<{"description": "The name of the variable in the file that is to be extracted"}>>> = gr0
[]
[gaseous_concentration_1_function_ic]
type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../source/functions/MooseParsedFunction.html"}>>>
symbol_names<<<{"description": "Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector."}>>> = 'len_pore position_pore_int'
symbol_values<<<{"description": "Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names."}>>> = '25 4521'
expression<<<{"description": "The user defined function."}>>> = '${tritium_2g_concentration}*0.5*(1.0+tanh((sqrt(x*x+y*y)-position_pore_int)/(len_pore/2.2)))'
[]
[]
Run simulations
To run the input file to reproduce the absorption results shown in Fig. 6 in Simon et al. (2022), users need to first run the previous simulations from the first step. As a result, TMAP8 will have generated pore_structure_open/pore_structure_open.e
and pore_structure_close/pore_structure_close.e
. Then, to model tritium transport in the microstructure with closed pores, run:
~/projects/TMAP8/test/tests/pore_scale_transport/
mpirun -np 4 ~/projects/TMAP8/tmap8-opt -i 2D_absorption_base.i pore_structure_closed_absorption.params
and to model tritium transport in the microstructure with open pores, run:
~/projects/TMAP8/test/tests/pore_scale_transport/
mpirun -np 4 ~/projects/TMAP8/tmap8-opt -i 2D_absorption_base.i pore_structure_open_absorption.params
Note that pore_structure_closed_absorption.params and pore_structure_open_absorption.params complement the base input file 2D_absorption_base.i by providing input and output names.
Results and Discussion
Figure 6 in Simon et al. (2022) shows the tritium absorption profiles for samples with different pore interconnectivities. The results indicate that higher pore interconnectivity leads to faster tritium transport, which is the type of insight that one-dimensional simulations cannot provide.
These outputs are obtained via the postprocessor blocks:
[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
[Tritium_amount_free]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_s
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_trapped]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_trap
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_ceramic]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_ceramic
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium2g_amount]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_2g
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_pore]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_pore
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_total]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_tot
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Surface_tot]
type = ElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = 1
[]
[dt]
type = TimestepSize<<<{"description": "Reports the timestep size", "href": "../../source/postprocessors/TimestepSize.html"}>>>
[]
[]
Note that these simulations are not run to generate Fig. 6 from Simon et al. (2022) on-the-fly in the documentation like it is custom to do in other examples and V&V cases due to the significant time these simulations can take when using a fine mesh. However, using the instructions and details provided above, users can replicate the results presented in Fig. 6 from Simon et al. (2022) and reproduced in Figure 1. If any challenge arise or if you have a question while working through this example case, feel free to reach out to the TMAP8 development team on the TMAP8 GitHub discussion page.
Complete input file
Below are the complete input files, which can be run reliably with approximately 4 processor cores. Note that this input file has not been optimized to reduce computational costs.
Input file used to import the image and create the smooth microstructure:
# TMAP8 input file
# Written by Pierre-Clément Simon - Idaho National Laboratory
#
# Published with:
# P.-C. A. Simon, P. W. Humrickhouse, A. D. Lindsay,
# "Tritium Transport Modeling at the Pore Scale in Ceramic Breeder Materials Using TMAP8,"
# in IEEE Transactions on Plasma Science, 2022, doi: 10.1109/TPS.2022.3183525.
#
# Info:
# - This simulation predicts phase evolution based on a grain growth phase field model.
# - The pore and the ceramics represent two different phases, and the initial conditions
# are provided with a black and white picture, which is read by ImageFunction.
# - The simulation smoothens the interface between the two phases.
#
#
# Once TMAP8 is installed and built (see instructions on the TMAP8 website), run with
# cd ~/projects/TMAP8/test/tests/pore_scale_transport/
# mpirun -np 8 ~/projects/TMAP8/tmap8-opt -i 2D_microstructure_reader_smoothing_base.i pore_structure_open.params
# mesh information
num_nodes_x = ${fparse 2*120} # (-)
num_nodes_y = ${fparse 2*120} # (-)
domain_start_x = ${units 0 mum}
domain_start_y = ${units 0 mum}
domain_end_x = ${units 5425 mum}
domain_end_y = ${units 5425 mum}
# grain growth parameters (since the point of the simulation is only to get a smooth interface, the model parameters can be selected arbitrarily)
op_num = 2 # Number of grains (-)
mobility_prefactor = ${units 2.5e-6 mum^4/J/s}
GB_energy = ${units 0.7 J/mum^2}
activation_energy = ${units 0.23 eV}
temperature = ${units 700 K}
width_diffuse_GB = ${units 50 mum} # Width of the diffuse GB
# image function option
threshold_image_function = 255.5 # (-)
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
[gen]
type = DistributedRectilinearMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "../../source/meshgenerators/DistributedRectilinearMeshGenerator.html"}>>>
dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 2
nx<<<{"description": "Number of elements in the X direction"}>>> = ${num_nodes_x}
ny<<<{"description": "Number of elements in the Y direction"}>>> = ${num_nodes_y}
xmin<<<{"description": "Lower X Coordinate of the generated mesh"}>>> = ${domain_start_x}
xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = ${domain_end_x}
ymin<<<{"description": "Lower Y Coordinate of the generated mesh"}>>> = ${domain_start_y}
ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = ${domain_end_y}
[]
[]
[GlobalParams<<<{"href": "../../syntax/GlobalParams/index.html"}>>>]
op_num = ${op_num}
var_name_base = gr # Base name of grains
[]
[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
[grain_tracker]
type = GrainTracker<<<{"description": "Grain Tracker object for running reduced order parameter simulations without grain coalescence.", "href": "../../source/postprocessors/GrainTracker.html"}>>>
flood_entity_type<<<{"description": "Determines whether the flood algorithm runs on nodes or elements"}>>> = ELEMENTAL
compute_halo_maps<<<{"description": "Instruct the Postprocessor to communicate proper halo information to all ranks"}>>> = true
[]
[]
[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
[image_func0]
type = ImageFunction<<<{"description": "Function with values sampled from an image or image stack.", "href": "../../source/functions/ImageFunction.html"}>>>
file<<<{"description": "Name of single image file to extract mesh parameters from. If provided, a 2D mesh is created."}>>> = ${input_name}
threshold<<<{"description": "The threshold value"}>>> = ${threshold_image_function}
upper_value<<<{"description": "The value to set for data greater than the threshold value"}>>> = 1
lower_value<<<{"description": "The value to set for data less than the threshold value"}>>> = 0
[]
[image_func1]
type = ImageFunction<<<{"description": "Function with values sampled from an image or image stack.", "href": "../../source/functions/ImageFunction.html"}>>>
file<<<{"description": "Name of single image file to extract mesh parameters from. If provided, a 2D mesh is created."}>>> = ${input_name}
threshold<<<{"description": "The threshold value"}>>> = ${threshold_image_function}
upper_value<<<{"description": "The value to set for data greater than the threshold value"}>>> = 0
lower_value<<<{"description": "The value to set for data less than the threshold value"}>>> = 1
[]
[]
[ICs<<<{"href": "../../syntax/ICs/index.html"}>>>]
[gr0_ic]
type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../../source/ics/FunctionIC.html"}>>>
function<<<{"description": "The initial condition function."}>>> = image_func0
variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = gr0
[]
[gr1_ic]
type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../../source/ics/FunctionIC.html"}>>>
function<<<{"description": "The initial condition function."}>>> = image_func1
variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = gr1
[]
[]
[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
[PolycrystalVariables<<<{"href": "../../syntax/Variables/PolycrystalVariables/index.html"}>>>]
# Custom action that creates all of the phase variables and sets their initial condition
[]
[]
[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
[bnds]
# Variable used to visualize the interfaces in the simulation
[]
[unique_grains]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
[]
[]
[Kernels<<<{"href": "../../syntax/Kernels/index.html"}>>>]
[PolycrystalKernel<<<{"href": "../../syntax/Kernels/PolycrystalKernel/index.html"}>>>]
# Custom action creating all necessary kernels for phase evolution. All input parameters are up in GlobalParams
[]
[]
[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
[bnds_aux]
type = BndsCalcAux<<<{"description": "Calculate location of grain boundaries in a polycrystalline sample", "href": "../../source/auxkernels/BndsCalcAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bnds
execute_on<<<{"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."}>>> = 'initial timestep_end'
[]
[unique_grains]
type = FeatureFloodCountAux<<<{"description": "Feature detection by connectivity analysis", "href": "../../source/auxkernels/FeatureFloodCountAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = unique_grains
execute_on<<<{"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."}>>> = timestep_end
flood_counter<<<{"description": "The FeatureFloodCount UserObject to get values from."}>>> = grain_tracker
field_display<<<{"description": "Determines how the auxilary field should be colored. (UNIQUE_REGION and VARIABLE_COLORING are nodal, CENTROID is elemental, default: UNIQUE_REGION)"}>>> = UNIQUE_REGION
[]
[]
[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
[InterfaceEvolution]
type = GBEvolution<<<{"description": "Computes necessary material properties for the isotropic grain growth model", "href": "../../source/materials/GBEvolution.html"}>>>
GBmob0<<<{"description": "Grain boundary mobility prefactor in m^4/(J*s)"}>>> = ${mobility_prefactor}
GBenergy<<<{"description": "Grain boundary energy in J/m^2"}>>> = ${GB_energy}
Q<<<{"description": "Grain boundary migration activation energy in eV"}>>> = ${activation_energy}
T<<<{"description": "Temperature in Kelvin"}>>> = ${temperature}
wGB<<<{"description": "Diffuse GB width in the length scale of the model"}>>> = ${width_diffuse_GB}
[]
[]
[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 20
nl_max_its = 9
nl_rel_tol = 1e-10
[TimeStepper<<<{"href": "../../syntax/Executioner/TimeStepper/index.html"}>>>]
type = IterationAdaptiveDT
cutback_factor = 0.9
dt = 3e-2
growth_factor = 1.1
optimal_iterations = 7
[]
dtmax = 25
start_time = 0.0
end_time = 100
[]
[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
file_base<<<{"description": "Common file base name to be utilized with all output objects"}>>> = ${output_name}
[exodus]
type = Exodus<<<{"description": "Object for output data in the Exodus format", "href": "../../source/outputs/Exodus.html"}>>>
execute_on<<<{"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."}>>> = 'FINAL'
[]
[]
(test/tests/pore_scale_transport/2D_microstructure_reader_smoothing_base.i)Input file utilizing the smooth microstructure and modeling pore scale tritium transport during absorption:
# TMAP8 input file
# Written by Pierre-Clément Simon - Idaho National Laboratory
#
# Published with:
# P.-C. A. Simon, P. W. Humrickhouse, A. D. Lindsay,
# "Tritium Transport Modeling at the Pore Scale in Ceramic Breeder Materials Using TMAP8,"
# in IEEE Transactions on Plasma Science, 2022, doi: 10.1109/TPS.2022.3183525.
#
# Phase Field Model: Isotropic bulk diffusion, pore surface reactions, isotropic pore diffusion
# Type: Transient
# Phase structure: Contains two phases: the bulk of a material, and the pores. An interface separates the two
# Physics: tritium trapping and detrapping, surface reactions, diffusion
# Species variable: tritium_s (Ts), tritium_trap (trapped T), tritium_2g (T2(g))
# Species AuxVariable: --
# Chemistry: at the pore surface: (s) means in the solid, (g) means in gas form
# Diatomic molecule dissolving at surface
# T2(g) -> 2 T(s) rate K [T2] (1-theta)^2
# Diatomic molecule combining at surface
# 2 T(s) -> T2(g) rate K [T]^2
#
# BCs: No flux for tritium and tritium_trap, zero at pore center for gaseous tritium in every form
#
#
# Info:
# - This input file uses the microstructure generated by 2D_microstructure_reader_smoothing_base.i
# and performs tritium transport simulation on this microstructure.
# - Basic 2D non-dimensional input file for the transport of a solute in a microstructure with pores.
# - The goal of this input base and associated parameter files is to have the same simulation with different pore configurations
# to show the effect of microstructure on tritium release.
#
#
# Once TMAP8 is installed and built (see instructions on the TMAP8 website), run with
# cd ~/projects/TMAP8/test/tests/pore_scale_transport/
# mpirun -np 8 ~/projects/TMAP8/tmap8-opt -i 2D_absorption_base.i pore_structure_open_absorption.params
# Scaling factors
scale_quantity = ${units 1e-18 moles}
scale_time = ${units 1 s}
scale_length = ${units 1 mum}
tritium_trap_scaling = 1e3 # (-)
tritium_s_scaling = 1e2 # (-)
# Conditions
tritium_2g_concentration = ${units 0.1121 mol/mum^3}
# Material properties
tritium_trap_0 = ${units 3.472805925e-18 mol/mum^3}
tritium_trap_0_scaled = ${fparse tritium_trap_0*scale_length^3/scale_quantity} # non-dimensional
available_sites_mult = 4.313540691 # (-) should be >1, otherwise there are fewer 'available sites' than 'trapping sites'
Diffusion_min = ${units 0 mum^2/s} # used as diffusion coefficients where I don't want the species to move (more stable than 0)
Diffusion_coefficient_Db_D0 = ${units 1649969.728 mum^2/s}
Diffusion_coefficient_D_pore_D0 = ${units 224767738.6 mum^2/s}
detrapping_rate_0 = ${units -4.065104516 1/s} # should be negative
trapping_rate_0 = ${units 8.333146645e+16 1/s/mol} # should be positive
reactionRateSurface_sXYg_ref_0 = ${units 1549103878000000.0 1/s/mol}
reactionRateSurface_gXYs_ref_0 = ${units 34.69205021 1/s}
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
file = ${input_name}
[]
[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
[initial_microstructure]
type = SolutionUserObject<<<{"description": "Reads a variable from a mesh in one simulation to another", "href": "../../source/userobjects/SolutionUserObject.html"}>>>
mesh<<<{"description": "The name of the mesh file (must be xda/xdr or exodusII file)."}>>> = ${input_name}
timestep<<<{"description": "Index of the single timestep used or \"LATEST\" for the last timestep (exodusII only). If not supplied, time interpolation will occur."}>>> = LATEST
[]
[]
[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
[tritium_s]
scaling<<<{"description": "Specifies a scaling factor to apply to this variable"}>>> = ${tritium_s_scaling}
[]
[tritium_trap]
scaling<<<{"description": "Specifies a scaling factor to apply to this variable"}>>> = ${tritium_trap_scaling}
[]
[tritium_2g]
[]
[]
[ICs<<<{"href": "../../syntax/ICs/index.html"}>>>]
[tritium_2g_ic]
type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../../source/ics/FunctionIC.html"}>>>
variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = tritium_2g
function<<<{"description": "The initial condition function."}>>> = 'gaseous_concentration_1_function_ic'
[]
[]
[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
[pore_position_func]
type = SolutionFunction<<<{"description": "Function for reading a solution from file.", "href": "../../source/functions/SolutionFunction.html"}>>>
solution<<<{"description": "The SolutionUserObject to extract data from."}>>> = initial_microstructure
from_variable<<<{"description": "The name of the variable in the file that is to be extracted"}>>> = gr0
[]
[gaseous_concentration_1_function_ic]
type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../source/functions/MooseParsedFunction.html"}>>>
symbol_names<<<{"description": "Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector."}>>> = 'len_pore position_pore_int'
symbol_values<<<{"description": "Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names."}>>> = '25 4521'
expression<<<{"description": "The user defined function."}>>> = '${tritium_2g_concentration}*0.5*(1.0+tanh((sqrt(x*x+y*y)-position_pore_int)/(len_pore/2.2)))'
[]
[]
[BCs<<<{"href": "../../syntax/BCs/index.html"}>>>]
[tritium_2g_sides_d] # Fix concentration on the sides
type = DirichletBC<<<{"description": "Imposes the essential boundary condition $u=g$, where $g$ is a constant, controllable value.", "href": "../../source/bcs/DirichletBC.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'right top'
value<<<{"description": "Value of the BC"}>>> = ${tritium_2g_concentration}
[]
[]
[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
[pore]
initial_from_file_var<<<{"description": "Gives the name of a variable for which to read an initial condition from a mesh file"}>>> = gr0
initial_from_file_timestep<<<{"description": "Gives the timestep (or \"LATEST\") for which to read a solution from a file for a given variable. (Default: LATEST)"}>>> = LATEST
[]
# Used to prevent negative concentrations
[bounds_dummy_tritium_s]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = FIRST
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = LAGRANGE
[]
[bounds_dummy_tritium_2g]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = FIRST
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = LAGRANGE
[]
[]
[Bounds<<<{"href": "../../syntax/Bounds/index.html"}>>>]
# To prevent negative concentrations
[tritium_s_lower_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy_tritium_s
bounded_variable<<<{"description": "The variable to be bounded"}>>> = tritium_s
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = lower
bound_value<<<{"description": "The value of bound for the variable"}>>> = 0.
[]
[tritium_g_lower_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy_tritium_2g
bounded_variable<<<{"description": "The variable to be bounded"}>>> = tritium_2g
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = lower
bound_value<<<{"description": "The value of bound for the variable"}>>> = 0.
[]
[]
[Kernels<<<{"href": "../../syntax/Kernels/index.html"}>>>]
# ========================================== Time derivative for each variable
[dtritium_sdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_s'
[]
[dtritium_2gdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_2g'
[]
[dtritium_trapdt]
type = TimeDerivative<<<{"description": "The time derivative operator with the weak form of $(\\psi_i, \\frac{\\partial u_h}{\\partial t})$.", "href": "../../source/kernels/TimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
[]
# ============================================================= Bulk diffusion
[Diff_tritium]
type = ADMatDiffusion<<<{"description": "Diffusion equation kernel that takes an isotropic diffusivity from a material property", "href": "../../source/kernels/ADMatDiffusion.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
diffusivity<<<{"description": "The diffusivity value or material property"}>>> = D_tritium
[]
# ============================================================= Pore diffusion
[Diff_tritium2g]
type = ADMatDiffusion<<<{"description": "Diffusion equation kernel that takes an isotropic diffusivity from a material property", "href": "../../source/kernels/ADMatDiffusion.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
diffusivity<<<{"description": "The diffusivity value or material property"}>>> = D_pore
[]
# ================================================ Tritium trapping/detrapping
[Trapping]
type = CoupledTimeDerivative<<<{"description": "Time derivative Kernel that acts on a coupled variable. Weak form: $(\\psi_i, \\frac{\\partial v_h}{\\partial t})$.", "href": "../../source/kernels/CoupledTimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
v<<<{"description": "Coupled variable"}>>> = 'tritium_trap'
[]
[Detrapping_trap]
type = ADMatReaction<<<{"description": "Kernel representing the contribution of the PDE term $-L*v$, where $L$ is a reaction rate material property, $v$ is a scalar variable (nonlinear or coupled), and whose Jacobian contribution is calculated using automatic differentiation.", "href": "../../source/kernels/ADMatReaction.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
reaction_rate<<<{"description": "The reaction_rate used with the kernel."}>>> = ${fparse scale_time * detrapping_rate_0} # from 1/s to non-dimensional
[]
[Trapping_trap]
type = ADMatCoupledDefectAnnihilation<<<{"description": "Kernel to add K*v*(u0-u), where K=annihilation rate, u=variable, u0=equilibrium, v=coupled variable", "href": "../../source/kernels/ADMatCoupledDefectAnnihilation.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = 'tritium_trap'
eq_concentration<<<{"description": "The equilibrium concentration of the variable used with the kernel"}>>> = ${tritium_trap_0_scaled}
v<<<{"description": "Set this to make v a coupled variable, otherwise it will use the kernel's nonlinear variable for v"}>>> = tritium_s
annihilation_rate<<<{"description": "The annihilation rate used with the kernel"}>>> = ${fparse scale_time*scale_quantity/scale_length^3*trapping_rate_0} # from um^3/s/mol to non-dimensional
[]
# ========================= Surface Reactions ================================
# ======================================= Diatomic molecule dissolve at surface
# T2(g) -> 2 T(s) rate K [T2] (1-theta) ======================================
[Surface_Reaction_dissolution_tritium_2g] # T2(g) -> 2 T(s) rate -K*tritium_2g
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_2g'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = -1
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_gXYs
[]
[Surface_Reaction_dissolution_tritium_2g_tritium_s] # T2(g) -> 2 T(s) rate 2*K*tritium_2g
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_2g'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = 2
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_gXYs
[]
# ======================================= Diatomic molecule combine at surface
# 2 T(s) -> T2(g) rate K [T]^2 ===============================================
[Surface_Reaction_release_tritium_s_tritium_2g] # 2 T(s) -> T2(g) rate -2*K*tritium_s^2
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_s
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_s tritium_s'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = -2
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_sXYg
[]
[Surface_Reaction_formation_tritium_2g] # 2 T(s) -> T2(g) rate K*tritium_s^2
type = ADMatReactionFlexible<<<{"description": "Kernel to add -coeff*K*vs, where coeff=coefficient, K=reaction rate, vs=variables product", "href": "../../source/kernels/ADMatReactionFlexible.html"}>>>
variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = tritium_2g
vs<<<{"description": "Set this to make vs a list of coupled variables, otherwise it will use the kernel's nonlinear variable for v"}>>> = 'tritium_s tritium_s'
coeff<<<{"description": "A coefficient for multiplying the reaction term. It can be used to include the stoichiometry of a reaction for specific species."}>>> = 1
reaction_rate_name<<<{"description": "The reaction rate used with the kernel"}>>> = ReactionRateSurface_sXYg
[]
[]
[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
[pore_aux]
type = FunctionAux<<<{"description": "Auxiliary Kernel that creates and updates a field variable by sampling a function through space and time.", "href": "../../source/auxkernels/FunctionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = pore
function<<<{"description": "The function to use as the value"}>>> = 'pore_position_func'
execute_on<<<{"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."}>>> = 'INITIAL'
[]
[]
[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
#===================================================== Interpolation functions
[hsurfaceAD] # equal to 1 at pore surface, 0 elsewhere. The values of hsurface should be smaller than the ones for hmat or hpore to allow the diffusion of the species out of the surface
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '16*(1-pore)^2*pore^2'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hsurfaceAD'
[]
[hmatAD] # equal to 1 in material, and 0 in pore.
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '(1-pore)*(1-pore)'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hmatAD'
[]
[hporeAD] # equal to 1 in pore, and 1 in material. # notice that hpore overlaps a bit with hmat to prevent some agglomeration of chemicals on the edges of the surface.
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = 'pore*pore'
property_name<<<{"description": "Name of the parsed material property"}>>> = 'hporeAD'
[]
#================================================= Local species concentration
[Tritium_ceramic]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'tritium_ceramic'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_s tritium_trap'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = 'tritium_s+tritium_trap'
[]
[Tritium_pore]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'tritium_pore'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_2g'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '2*tritium_2g'
[]
[Tritium_total]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'tritium_tot'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_s tritium_trap tritium_2g'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = 'tritium_s+tritium_trap+2*tritium_2g'
[]
#=============================================== Occupied sites on the surface
[theta]
type = ADParsedMaterial<<<{"description": "Parsed expression Material.", "href": "../../source/materials/ParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'theta'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'tritium_s tritium_trap'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '(tritium_s + tritium_trap)/(${available_sites_mult}*${tritium_trap_0_scaled})'
[]
#====================================================== Diffusion coefficients
[Diffusion_coefficient_D] # from um^2/s to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'D_tritium'
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore'
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hmatAD(pore)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}/${scale_length}^2*(hmatAD*${Diffusion_coefficient_Db_D0} + (1-hmatAD)*${Diffusion_min})'
derivative_order<<<{"description": "Maximum order of derivatives taken"}>>> = 2
[]
[Diffusion_coefficient_D_pore] # from um^2/s to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = 'D_pore'
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hporeAD(pore)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}/${scale_length}^2*(hporeAD*${Diffusion_coefficient_D_pore_D0} + (1-hporeAD)*${Diffusion_min})'
[]
#============================================ Surface reaction rate of tritium
[ReactionRateSurface_sXYg_ref] # from surface to gaseous for diatomic molecules # from um^3/s/mol to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = ReactionRateSurface_sXYg
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hsurfaceAD(pore)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}*${scale_quantity}/${scale_length}^3*${reactionRateSurface_sXYg_ref_0}*hsurfaceAD'
[]
[ReactionRateSurface_gXYs_ref] # from gaseous to surface for diatomic molecules # from 1/s to non-dimensional
type = ADDerivativeParsedMaterial<<<{"description": "Parsed Function Material with automatic derivatives.", "href": "../../source/materials/DerivativeParsedMaterial.html"}>>>
property_name<<<{"description": "Name of the parsed material property"}>>> = ReactionRateSurface_gXYs
coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'pore tritium_s tritium_trap'
material_property_names<<<{"description": "Vector of material properties used in the parsed function"}>>> = 'hsurfaceAD(pore) theta(tritium_s,tritium_trap)'
expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '${scale_time}*${reactionRateSurface_gXYs_ref_0}*hsurfaceAD*(1-theta)^2'
[]
[]
[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
[Tritium_amount_free]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_s
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_trapped]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_trap
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_ceramic]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_ceramic
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium2g_amount]
type = ElementIntegralVariablePostprocessor<<<{"description": "Computes a volume integral of the specified variable", "href": "../../source/postprocessors/ElementIntegralVariablePostprocessor.html"}>>>
variable<<<{"description": "The name of the variable that this object operates on"}>>> = tritium_2g
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_pore]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_pore
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Tritium_amount_total]
type = ADElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = tritium_tot
execute_on<<<{"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."}>>> = 'INITIAL TIMESTEP_END'
[]
[Surface_tot]
type = ElementIntegralMaterialProperty<<<{"description": "Compute the integral of the material property over the domain", "href": "../../source/postprocessors/ElementIntegralMaterialProperty.html"}>>>
mat_prop<<<{"description": "The name of the material property"}>>> = 1
[]
[dt]
type = TimestepSize<<<{"description": "Reports the timestep size", "href": "../../source/postprocessors/TimestepSize.html"}>>>
[]
[]
[Preconditioning<<<{"href": "../../syntax/Preconditioning/index.html"}>>>]
[Newtonlu]
type = SMP<<<{"description": "Single matrix preconditioner (SMP) builds a preconditioner using user defined off-diagonal parts of the Jacobian.", "href": "../../source/preconditioners/SingleMatrixPreconditioner.html"}>>>
full<<<{"description": "Set to true if you want the full set of couplings between variables simply for convenience so you don't have to set every off_diag_row and off_diag_column combination."}>>> = true
solve_type<<<{"description": "PJFNK: Preconditioned Jacobian-Free Newton Krylov JFNK: Jacobian-Free Newton Krylov NEWTON: Full Newton Solve FD: Use finite differences to compute Jacobian LINEAR: Solving a linear problem"}>>> = 'NEWTON'
petsc_options_iname<<<{"description": "Names of PETSc name/value pairs"}>>> = '-pc_type -sub_pc_type -snes_type'
petsc_options_value<<<{"description": "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\""}>>> = 'asm lu vinewtonrsls' # This petsc option helps prevent negative concentrations'
[]
[]
[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
type = Transient
scheme = bdf2
nl_rel_tol = 1e-10
end_time = 2000
dtmax = 50
nl_max_its = 14
[TimeStepper<<<{"href": "../../syntax/Executioner/TimeStepper/index.html"}>>>]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 1
growth_factor = 1.2
dt = 2.37e-7
cutback_factor = 0.75
cutback_factor_at_failure = 0.75
[]
[]
[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
[exodus]
type = Exodus<<<{"description": "Object for output data in the Exodus format", "href": "../../source/outputs/Exodus.html"}>>>
time_step_interval<<<{"description": "The interval (number of time steps) at which output occurs. Unless explicitly set, the default value of this parameter is set to infinity if the wall_time_interval is explicitly set."}>>> = 5
[]
csv<<<{"description": "Output the scalar variable and postprocessors to a *.csv file using the default CSV output."}>>> = true
file_base<<<{"description": "Common file base name to be utilized with all output objects"}>>> = ${output_name}
[]
(test/tests/pore_scale_transport/2D_absorption_base.i)References
- Pierre-Clément A. Simon, Paul W. Humrickhouse, and Alexander D. Lindsay.
Tritium Transport Modeling at the Pore Scale in Ceramic Breeder Materials Using TMAP8.
IEEE Transactions on Plasma Science, pages 1–7, 2022.
URL: https://ieeexplore.ieee.org/document/9831077/, doi:10.1109/TPS.2022.3183525.[BibTeX]