Sieverts’ Law Boundaries with Chemical Reactions and No Volumetric Source
Case Set Up
This verification problem is taken from Ambrosek and Longhurst (2008).
Unlike the ver-1kc-1 case, which only considers tritium T, this setup describes a diffusion system in which tritium T, dihydrogen H and HT are modeled across a one-dimensional domain split into two enclosures. The total system length is m, divided into 100 segments. The system operates at a constant temperature of 500 Kelvin. Initial tritium T and dihydrogen H pressures are specified as Pa for Enclosure 1 and Pa for Enclosure 2. Initially, there is no HT in either enclosure.
The reaction between the species is described as follows
The kinematic evolutions of the species are given by the following equations
where and represent the reaction rates for the forward and reverse reactions, respectively.
At equilibrium, the time derivatives are zero
From this, we can derive the same equilibrium condition as used in TMAP7:
where the equilibrium constant is defined as
(1)
Similarly to TMAP7, the equilibrium constant has been set to a fixed value of .
The diffusion process for each species in the two enclosures can be expressed by
and
where and represent the concentration fields in enclosures 1 and 2 respectively, is the time, and denotes the diffusivity. Note that the diffusivity may vary across different species and enclosures. However, in this case, it is assumed to be identical for all.
The concentration in Enclosure 1 is related to the partial pressure and concentration in Enclosure 2 via the interface sorption law:
where is the ideal gas constant in J/mol/K, is the temperature in K, is the solubility, and is the exponent of the sorption law. For Sieverts' law, .
(test/tests/ver-1kc-2/ver-1kc-2.i)
nb_segments_TMAP7 = 20
node_size_TMAP7 = '${units 1.25e-5 m}'
long_total = '${units ${fparse nb_segments_TMAP7 * node_size_TMAP7} m}'
nb_segments_TMAP8 = 1e2
simulation_time = '${units 0.25 s}'
temperature = '${units 500 K}'
R = '${units 8.31446261815324 J/mol/K}' # ideal gas constant from PhysicalConstants.h
initial_pressure_1 = '${units 1e5 Pa}'
initial_pressure_2 = '${units 1e-10 Pa}'
initial_concentration_1 = '${units ${fparse initial_pressure_1 / (R*temperature)} mol/m^3}'
initial_concentration_2 = '${units ${fparse initial_pressure_2 / (R*temperature)} mol/m^3}'
solubility = '${units ${fparse 10/sqrt(R*temperature)} mol/m^3/Pa^(1/2)}' # Sieverts' law solubility
diffusivity = '${units ${fparse 4.31e-6 * exp(-2818/temperature)} m^2/s}'
n_sorption = 0.5 # Sieverts' Law
K1 = '${units 4000 mol/m^3/s}' # reaction rate for H2+T2->2HT
equilibrium_constant = 2.0
K2 = '${units ${fparse (2*K1) / (equilibrium_constant)^2} mol/m^3/s}' # reaction rate for 2HT->H2+T2
unit_scale = 1
unit_scale_neighbor = 1
[Mesh]
[generated]
type = GeneratedMeshGenerator
dim = 1
nx = ${nb_segments_TMAP8}
xmax = ${long_total}
[]
[enclosure_1]
type = SubdomainBoundingBoxGenerator
input = generated
block_id = 1
bottom_left = '0 0 0'
top_right = '${fparse 1/3 * long_total} 0 0'
[]
[enclosure_2]
type = SubdomainBoundingBoxGenerator
input = enclosure_1
block_id = 2
bottom_left = '${fparse 1/3 * long_total} 0 0'
top_right = '${fparse long_total} 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = enclosure_2
primary_block = 1
paired_block = 2
new_boundary = interface
[]
[interface2]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = 2
paired_block = 1
new_boundary = interface2
[]
[]
[Variables]
# Variables for H2, T2, and HT in enclosure 1
[concentration_H2_enclosure_1]
block = 1
initial_condition = '${initial_concentration_1}'
[]
[concentration_T2_enclosure_1]
block = 1
initial_condition = '${initial_concentration_1}'
[]
[concentration_HT_enclosure_1]
block = 1
initial_condition = '${initial_concentration_2}'
[]
# Variables for H2, T2, and HT in enclosure 2
[concentration_H2_enclosure_2]
block = 2
initial_condition = '${initial_concentration_2}'
[]
[concentration_T2_enclosure_2]
block = 2
initial_condition = '${initial_concentration_2}'
[]
[concentration_HT_enclosure_2]
block = 2
initial_condition = '${initial_concentration_2}'
[]
[]
[AuxVariables]
# Auxiliary variables for H2, T2, and HT in enclosure 1
[pressure_H2_enclosure_1]
order = CONSTANT
family = MONOMIAL
block = 1
initial_condition = '${initial_pressure_1}'
[]
[pressure_T2_enclosure_1]
order = CONSTANT
family = MONOMIAL
block = 1
initial_condition = '${initial_pressure_1}'
[]
[pressure_HT_enclosure_1]
order = CONSTANT
family = MONOMIAL
block = 1
initial_condition = '${initial_pressure_2}'
[]
# Auxiliary variables for H2, T2, and HT in enclosure 2
[pressure_H2_enclosure_2]
order = CONSTANT
family = MONOMIAL
block = 2
initial_condition = '${initial_pressure_2}'
[]
[pressure_T2_enclosure_2]
order = CONSTANT
family = MONOMIAL
block = 2
initial_condition = '${initial_pressure_2}'
[]
[pressure_HT_enclosure_2]
order = CONSTANT
family = MONOMIAL
block = 2
initial_condition = '${initial_pressure_2}'
[]
[]
[Kernels]
# Diffusion equation for H2
[H2_diffusion_enclosure_1]
type = MatDiffusion
variable = concentration_H2_enclosure_1
diffusivity = ${diffusivity}
block = '1'
[]
[H2_time_derivative_enclosure_1]
type = TimeDerivative
variable = concentration_H2_enclosure_1
block = '1'
[]
[H2_diffusion_enclosure_2]
type = MatDiffusion
variable = concentration_H2_enclosure_2
diffusivity = ${diffusivity}
block = '2'
[]
[H2_time_derivative_enclosure_2]
type = TimeDerivative
variable = concentration_H2_enclosure_2
block = '2'
[]
# Diffusion equation for T2
[T2_diffusion_enclosure_1]
type = MatDiffusion
variable = concentration_T2_enclosure_1
diffusivity = ${diffusivity}
block = '1'
[]
[T2_time_derivative_enclosure_1]
type = TimeDerivative
variable = concentration_T2_enclosure_1
block = '1'
[]
[T2_diffusion_enclosure_2]
type = MatDiffusion
variable = concentration_T2_enclosure_2
diffusivity = ${diffusivity}
block = '2'
[]
[T2_time_derivative_enclosure_2]
type = TimeDerivative
variable = concentration_T2_enclosure_2
block = '2'
[]
# Diffusion equation for HT
[HT_diffusion_enclosure_1]
type = MatDiffusion
variable = concentration_HT_enclosure_1
diffusivity = ${diffusivity}
block = '1'
[]
[HT_time_derivative_enclosure_1]
type = TimeDerivative
variable = concentration_HT_enclosure_1
block = '1'
[]
[HT_diffusion_enclosure_2]
type = MatDiffusion
variable = concentration_HT_enclosure_2
diffusivity = ${diffusivity}
block = '2'
[]
[HT_time_derivative_enclosure_2]
type = TimeDerivative
variable = concentration_HT_enclosure_2
block = '2'
[]
# Reaction H2+T2->2HT in enclosure 1
[reaction_H2_encl_1_1]
type = ADMatReactionFlexible
variable = concentration_H2_enclosure_1
vs = 'concentration_H2_enclosure_1 concentration_T2_enclosure_1'
block = 1
coeff = -1
reaction_rate_name = ${K1}
[]
[reaction_T2_encl_1_1]
type = ADMatReactionFlexible
variable = concentration_T2_enclosure_1
vs = 'concentration_H2_enclosure_1 concentration_T2_enclosure_1'
block = 1
coeff = -1
reaction_rate_name = ${K1}
[]
[reaction_HT_encl_1_1]
type = ADMatReactionFlexible
variable = concentration_HT_enclosure_1
vs = 'concentration_H2_enclosure_1 concentration_T2_enclosure_1'
block = 1
coeff = 2
reaction_rate_name = ${K1}
[]
# Reaction 2HT->H2+T2 in enclosure 1
[reaction_H2_encl_1_2]
type = ADMatReactionFlexible
variable = concentration_H2_enclosure_1
vs = 'concentration_HT_enclosure_1 concentration_HT_enclosure_1'
block = 1
coeff = 0.5
reaction_rate_name = ${K2}
[]
[reaction_T2_encl_1_2]
type = ADMatReactionFlexible
variable = concentration_T2_enclosure_1
vs = 'concentration_HT_enclosure_1 concentration_HT_enclosure_1'
block = 1
coeff = 0.5
reaction_rate_name = ${K2}
[]
[reaction_HT_encl_1_2]
type = ADMatReactionFlexible
variable = concentration_HT_enclosure_1
vs = 'concentration_HT_enclosure_1 concentration_HT_enclosure_1'
block = 1
coeff = -1
reaction_rate_name = ${K2}
[]
# Reaction H2+T2->2HT in enclosure 2
[reaction_H2_encl_2_1]
type = ADMatReactionFlexible
variable = concentration_H2_enclosure_2
vs = 'concentration_H2_enclosure_2 concentration_T2_enclosure_2'
block = 2
coeff = -1
reaction_rate_name = ${K1}
[]
[reaction_T2_encl_2_1]
type = ADMatReactionFlexible
variable = concentration_T2_enclosure_2
vs = 'concentration_H2_enclosure_2 concentration_T2_enclosure_2'
block = 2
coeff = -1
reaction_rate_name = ${K1}
[]
[reaction_HT_encl_2_1]
type = ADMatReactionFlexible
variable = concentration_HT_enclosure_2
vs = 'concentration_H2_enclosure_2 concentration_T2_enclosure_2'
block = 2
coeff = 2
reaction_rate_name = ${K1}
[]
# Reaction 2HT->H2+T2 in enclosure 2
[reaction_H2_encl_2_2]
type = ADMatReactionFlexible
variable = concentration_H2_enclosure_2
vs = 'concentration_HT_enclosure_2 concentration_HT_enclosure_2'
block = 2
coeff = 0.5
reaction_rate_name = ${K2}
[]
[reaction_T2_encl_2_2]
type = ADMatReactionFlexible
variable = concentration_T2_enclosure_2
vs = 'concentration_HT_enclosure_2 concentration_HT_enclosure_2'
block = 2
coeff = 0.5
reaction_rate_name = ${K2}
[]
[reaction_HT_encl_2_2]
type = ADMatReactionFlexible
variable = concentration_HT_enclosure_2
vs = 'concentration_HT_enclosure_2 concentration_HT_enclosure_2'
block = 2
coeff = -1
reaction_rate_name = ${K2}
[]
[]
[AuxKernels]
# Auxiliary kernels for H2, T2, and HT in enclosure 1
[pressure_H2_enclosure_1]
type = ParsedAux
variable = pressure_H2_enclosure_1
coupled_variables = 'concentration_H2_enclosure_1'
expression = '${fparse R*temperature}*concentration_H2_enclosure_1'
block = 1
execute_on = 'initial timestep_end'
[]
[pressure_T2_enclosure_1]
type = ParsedAux
variable = pressure_T2_enclosure_1
coupled_variables = 'concentration_T2_enclosure_1'
expression = '${fparse R*temperature}*concentration_T2_enclosure_1'
block = 1
execute_on = 'initial timestep_end'
[]
[pressure_HT_enclosure_1]
type = ParsedAux
variable = pressure_HT_enclosure_1
coupled_variables = 'concentration_HT_enclosure_1'
expression = '${fparse R*temperature}*concentration_HT_enclosure_1'
block = 1
execute_on = 'initial timestep_end'
[]
# Auxiliary kernels for H2, T2, and HT in enclosure 2
[pressure_H2_enclosure_2]
type = ParsedAux
variable = pressure_H2_enclosure_2
coupled_variables = 'concentration_H2_enclosure_2'
expression = '${fparse R*temperature}*concentration_H2_enclosure_2'
block = 2
execute_on = 'initial timestep_end'
[]
[pressure_T2_enclosure_2]
type = ParsedAux
variable = pressure_T2_enclosure_2
coupled_variables = 'concentration_T2_enclosure_2'
expression = '${fparse R*temperature}*concentration_T2_enclosure_2'
block = 2
execute_on = 'initial timestep_end'
[]
[pressure_HT_enclosure_2]
type = ParsedAux
variable = pressure_HT_enclosure_2
coupled_variables = 'concentration_HT_enclosure_2'
expression = '${fparse R*temperature}*concentration_HT_enclosure_2'
block = 2
execute_on = 'initial timestep_end'
[]
[]
[InterfaceKernels]
[interface_sorption_H2]
type = InterfaceSorption
K0 = ${solubility}
Ea = 0
n_sorption = ${n_sorption}
diffusivity = ${diffusivity}
unit_scale = ${unit_scale}
unit_scale_neighbor = ${unit_scale_neighbor}
temperature = ${temperature}
variable = concentration_H2_enclosure_1
neighbor_var = concentration_H2_enclosure_2
sorption_penalty = 1e1
boundary = interface
[]
[interface_sorption_T2]
type = InterfaceSorption
K0 = ${solubility}
Ea = 0
n_sorption = ${n_sorption}
diffusivity = ${diffusivity}
unit_scale = ${unit_scale}
unit_scale_neighbor = ${unit_scale_neighbor}
temperature = ${temperature}
variable = concentration_T2_enclosure_1
neighbor_var = concentration_T2_enclosure_2
sorption_penalty = 1e1
boundary = interface
[]
[interface_sorption_HT]
type = InterfaceSorption
K0 = ${solubility}
Ea = 0
n_sorption = ${n_sorption}
diffusivity = ${diffusivity}
unit_scale = ${unit_scale}
unit_scale_neighbor = ${unit_scale_neighbor}
temperature = ${temperature}
variable = concentration_HT_enclosure_1
neighbor_var = concentration_HT_enclosure_2
sorption_penalty = 1e1
boundary = interface
[]
[]
[Postprocessors]
# postprocessors for H2
[pressure_H2_enclosure_1]
type = ElementAverageValue
variable = pressure_H2_enclosure_1
block = 1
execute_on = 'initial timestep_end'
[]
[pressure_H2_enclosure_2]
type = ElementAverageValue
variable = pressure_H2_enclosure_2
block = 2
execute_on = 'initial timestep_end'
[]
[concentration_H2_enclosure_1_at_interface]
type = SideAverageValue
boundary = interface
variable = concentration_H2_enclosure_1
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[concentration_H2_enclosure_2_at_interface]
type = SideAverageValue
boundary = interface2
variable = concentration_H2_enclosure_2
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[concentration_ratio_H2]
type = ParsedPostprocessor
expression = 'concentration_H2_enclosure_1_at_interface / sqrt(concentration_H2_enclosure_2_at_interface)'
pp_names = 'concentration_H2_enclosure_1_at_interface concentration_H2_enclosure_2_at_interface'
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[pressure_H2_enclosure_1_at_interface]
type = SideAverageValue
boundary = interface
variable = pressure_H2_enclosure_1
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[pressure_H2_enclosure_2_at_interface]
type = SideAverageValue
boundary = interface2
variable = pressure_H2_enclosure_2
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[concentration_H2_encl_1_inventory]
type = ElementIntegralVariablePostprocessor
variable = concentration_H2_enclosure_1
block = 1
execute_on = 'initial timestep_end'
[]
[concentration_H2_encl_2_inventory]
type = ElementIntegralVariablePostprocessor
variable = concentration_H2_enclosure_2
block = 2
execute_on = 'initial timestep_end'
[]
# postprocessors for T2
[pressure_T2_enclosure_1]
type = ElementAverageValue
variable = pressure_T2_enclosure_1
block = 1
execute_on = 'initial timestep_end'
[]
[pressure_T2_enclosure_2]
type = ElementAverageValue
variable = pressure_T2_enclosure_2
block = 2
execute_on = 'initial timestep_end'
[]
[concentration_T2_enclosure_1_at_interface]
type = SideAverageValue
boundary = interface
variable = concentration_T2_enclosure_1
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[concentration_T2_enclosure_2_at_interface]
type = SideAverageValue
boundary = interface2
variable = concentration_T2_enclosure_2
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[concentration_ratio_T2]
type = ParsedPostprocessor
expression = 'concentration_T2_enclosure_1_at_interface / sqrt(concentration_T2_enclosure_2_at_interface)'
pp_names = 'concentration_T2_enclosure_1_at_interface concentration_T2_enclosure_2_at_interface'
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[concentration_T2_encl_1_inventory]
type = ElementIntegralVariablePostprocessor
variable = concentration_T2_enclosure_1
block = 1
execute_on = 'initial timestep_end'
[]
[concentration_T2_encl_2_inventory]
type = ElementIntegralVariablePostprocessor
variable = concentration_T2_enclosure_2
block = 2
execute_on = 'initial timestep_end'
[]
# postprocessors for HT
[pressure_HT_enclosure_1]
type = ElementAverageValue
variable = pressure_HT_enclosure_1
block = 1
execute_on = 'initial timestep_end'
[]
[pressure_HT_enclosure_2]
type = ElementAverageValue
variable = pressure_HT_enclosure_2
block = 2
execute_on = 'initial timestep_end'
[]
[concentration_HT_enclosure_1_at_interface]
type = SideAverageValue
boundary = interface
variable = concentration_HT_enclosure_1
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[concentration_HT_enclosure_2_at_interface]
type = SideAverageValue
boundary = interface2
variable = concentration_HT_enclosure_2
outputs = 'csv console'
execute_on = 'initial timestep_end'
[]
[concentration_ratio_HT]
type = ParsedPostprocessor
expression = 'concentration_HT_enclosure_1_at_interface / sqrt(concentration_HT_enclosure_2_at_interface)'
pp_names = 'concentration_HT_enclosure_1_at_interface concentration_HT_enclosure_2_at_interface'
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[concentration_HT_encl_1_inventory]
type = ElementIntegralVariablePostprocessor
variable = concentration_HT_enclosure_1
block = 1
execute_on = 'initial timestep_end'
[]
[concentration_HT_encl_2_inventory]
type = ElementIntegralVariablePostprocessor
variable = concentration_HT_enclosure_2
block = 2
execute_on = 'initial timestep_end'
[]
# postprocessors for mass conservation
[mass_conservation_sum_encl1_encl2]
type = LinearCombinationPostprocessor
pp_names = 'concentration_HT_encl_1_inventory concentration_HT_encl_2_inventory concentration_H2_encl_1_inventory concentration_H2_encl_2_inventory concentration_T2_encl_1_inventory concentration_T2_encl_2_inventory'
pp_coefs = '1 1 1 1 1 1'
execute_on = 'initial timestep_end'
[]
# postprocessors for equilibrium constant
[equilibrium_constant_encl_1]
type = ParsedPostprocessor
expression = 'pressure_HT_enclosure_1 / sqrt(pressure_H2_enclosure_1 * pressure_T2_enclosure_1)'
pp_names = 'pressure_HT_enclosure_1 pressure_H2_enclosure_1 pressure_T2_enclosure_1'
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[equilibrium_constant_encl_2]
type = ParsedPostprocessor
expression = 'pressure_HT_enclosure_2 / sqrt(pressure_H2_enclosure_2 * pressure_T2_enclosure_2)'
pp_names = 'pressure_HT_enclosure_2 pressure_H2_enclosure_2 pressure_T2_enclosure_2'
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = ${simulation_time}
dtmax = 1e-2
nl_max_its = 9
l_max_its = 30
scheme = 'bdf2'
solve_type = PJFNK
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-6
optimal_iterations = 7
iteration_window = 1
growth_factor = 1.1
cutback_factor = 0.9
cutback_factor_at_failure = 0.9
[]
[]
[Outputs]
file_base = 'ver-1kc-2_out_k10'
csv = true
exodus = true
execute_on = 'initial timestep_end'
[]