- boundaryThe list of boundary IDs from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary IDs from the mesh where this object applies
- vThe variable whose value we are to match.
C++ Type:std::vector<VariableName>
Controllable:No
Description:The variable whose value we are to match.
- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Controllable:No
Description:The name of the variable that this residual object operates on
MatchedValueBC
Implements a NodalBC which equates two different Variables' values on a specified boundary.
Description
MatchedValueBC
is a NodalBC
which applies to systems of two or more variables, and can be used to impose equality of two solutions along a given boundary
. This class is appropriate for systems of partial differential equations (PDEs) of the form where is the domain, and is its boundary, , are the unknowns, , are forcing functions (which may depend on both and ), and and are given fluxes. The v
parameter is used to specify the variable whose value is tied to . In the example below, the other variable's name happens to be v
as well.
Example Input Syntax
[./left_u]
type = MatchedValueBC
variable = u
boundary = 3
v = v
[../]
(test/tests/bcs/matched_value_bc/matched_value_bc_test.i)Input Parameters
- diag_save_inThe name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- displacementsThe displacements
C++ Type:std::vector<VariableName>
Controllable:No
Description:The displacements
- save_inThe name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- u_coeff1 A coefficient for primary variable u
Default:1
C++ Type:double
Controllable:No
Description: A coefficient for primary variable u
- v_coeff1 A coefficient for coupled variable v
Default:1
C++ Type:double
Controllable:No
Description: A coefficient for coupled variable v
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystem timeThe tag for the matrices this Kernel should fill
Default:system time
C++ Type:MultiMooseEnum
Options:nontime, system, time
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsresidualThe tag for the vectors this Kernel should fill
Default:residual
C++ Type:MultiMooseEnum
Options:nontime, time, residual
Controllable:No
Description:The tag for the vectors this Kernel should fill
Tagging Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (test/tests/interfacekernels/ad_coupled_gradient/coupled.i)
- (test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux.i)
- (test/tests/interfacekernels/hybrid/interface.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
- (test/tests/misc/boundary_variable_check/test.i)
- (test/tests/misc/boundary_variable_check/three-domains/test.i)
- (test/tests/interfacekernels/ad_coupled_value/coupled.i)
- (test/tests/bcs/matched_value_bc/matched_value_bc_test.i)
- (test/tests/interfacekernels/1d_interface/ik_save_in_test.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
- (test/tests/bcs/ad_matched_value_bc/test.i)
(test/tests/bcs/matched_value_bc/matched_value_bc_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
# Solves a pair of coupled diffusion equations where u=v on the boundary
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 3
[../]
[./v]
order = FIRST
family = LAGRANGE
initial_condition = 2
[../]
[]
[Kernels]
active = 'diff_u diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'right_v left_u'
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 3
[../]
[./left_u]
type = MatchedValueBC
variable = u
boundary = 3
v = v
[../]
[]
[Preconditioning]
[./precond]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-10
l_tol = 1e-12
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/interfacekernels/ad_coupled_gradient/coupled.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[w]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
block = 0
[]
[diff_v]
type = Diffusion
variable = v
block = 1
[]
[diff_w]
type = Diffusion
variable = w
[]
[react_w]
type = Reaction
variable = w
[]
[]
[InterfaceKernels]
[interface]
type = ADCoupledInterfacialSourceGradient
variable = u
neighbor_var = v
var_source = w
boundary = primary0_interface
D = 1
D_neighbor = 1
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 10
[]
[middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[]
[w_left]
type = DirichletBC
variable = w
boundary = 'left'
value = 0
[]
[w_right]
type = DirichletBC
variable = w
boundary = 'right'
value = 4
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[]
[InterfaceKernels]
active = 'interface'
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
active = 'left right middle'
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[./middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[../]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/interfacekernels/hybrid/interface.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
xmax = 2
ny = 40
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1.5 1.5 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
diffusivity = D
block = 0
[]
[diff_v]
type = MatDiffusion
variable = v
diffusivity = D
block = 1
[]
[source_u]
type = BodyForce
variable = u
value = 1
block = 0
[]
[source_v]
type = BodyForce
variable = v
value = 1
block = 1
[]
[]
[BCs]
[u]
type = VacuumBC
variable = u
boundary = 'left bottom right top'
[]
[interface_bc]
type = ADMatchedValueBC
variable = v
v = u
boundary = primary1_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[InterfaceKernels]
active = 'diffusion'
[./diffusion]
type = InterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty]
type = PenaltyInterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
penalty = 1e3
[../]
[]
[Materials]
[mat0]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 0
[]
[mat1]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 1
[]
[]
[AuxVariables]
[c][]
[]
[AuxKernels]
[u]
type = ParsedAux
variable = c
coupled_variables = 'u'
expression = 'u'
block = 0
[]
[v]
type = ParsedAux
variable = c
coupled_variables = 'v'
expression = 'v'
block = 1
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# PorousFlow simulation of injection and production in a simplified GeoTES aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg.s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its 'parent' simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -0.02 # kg/s/m, negative because injection as a source
production_rate = 0.02 # kg/s/m, this is about the maximum that can be sustained by the aquifer, with its fairly low permeability, without porepressure becoming negative
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -75
xmax = 75
ymin = 0
ymax = 40
zmin = -25
zmax = 25
nx = 15
ny = 4
nz = 5
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = gen
block_id = 1
block_name = aquifer
combinatorial_geometry = 'z >= -5 & z <= 5'
[]
[injection_nodes]
input = aquifer
type = ExtraNodesetGenerator
new_boundary = injection_nodes
coord = '-25 0 -5; -25 0 5'
[]
[production_nodes]
input = injection_nodes
type = ExtraNodesetGenerator
new_boundary = production_nodes
coord = '25 0 -5; 25 0 5'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -10'
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_nodes
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
save_component_rate_in = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[Materials]
[porosity_caps]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = 0
porosity = 0.01
[]
[porosity_aquifer]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = aquifer
porosity = 0.063
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = 0
permeability = '1E-18 0 0 0 1E-18 0 0 0 1E-18'
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1.7E-15 0 0 0 1.7E-15 0 0 0 4.1E-16'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[Outputs]
exodus = true
[]
[Variables]
[f_H]
initial_condition = -2.952985071156e-06
[]
[f_Cl]
initial_condition = 0.04870664551708
[]
[f_SO4]
initial_condition = 0.0060359986852517
[]
[f_HCO3]
initial_condition = 5.0897287594019e-05
[]
[f_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[f_Al]
initial_condition = 3.268028901929e-08
[]
[f_Ca]
initial_condition = 0.00082159428184586
[]
[f_Mg]
initial_condition = 1.8546347062146e-05
[]
[f_Fe]
initial_condition = 4.3291908204093e-05
[]
[f_K]
initial_condition = 6.8434768308898e-05
[]
[f_Na]
initial_condition = 0.033298053919671
[]
[f_Sr]
initial_condition = 1.2771866652177e-05
[]
[f_F]
initial_condition = 5.5648860174073e-06
[]
[f_BOH]
initial_condition = 0.0003758574621917
[]
[f_Br]
initial_condition = 9.0315286107068e-05
[]
[f_Ba]
initial_condition = 1.5637460875161e-07
[]
[f_Li]
initial_condition = 8.3017067912701e-05
[]
[f_NO3]
initial_condition = 0.00010958455036169
[]
[f_O2aq]
initial_condition = -7.0806852373351e-05
[]
[porepressure]
initial_condition = 30E6
[]
[temperature]
initial_condition = 92
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[DiracKernels]
[inject_H]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H
point_file = injection.bh
variable = f_H
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f_Cl
[]
[inject_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SO4
point_file = injection.bh
variable = f_SO4
[]
[inject_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_HCO3
point_file = injection.bh
variable = f_HCO3
[]
[inject_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SiO2aq
point_file = injection.bh
variable = f_SiO2aq
[]
[inject_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Al
point_file = injection.bh
variable = f_Al
[]
[inject_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ca
point_file = injection.bh
variable = f_Ca
[]
[inject_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Mg
point_file = injection.bh
variable = f_Mg
[]
[inject_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Fe
point_file = injection.bh
variable = f_Fe
[]
[inject_K]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_K
point_file = injection.bh
variable = f_K
[]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f_Na
[]
[inject_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Sr
point_file = injection.bh
variable = f_Sr
[]
[inject_F]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_F
point_file = injection.bh
variable = f_F
[]
[inject_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_BOH
point_file = injection.bh
variable = f_BOH
[]
[inject_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Br
point_file = injection.bh
variable = f_Br
[]
[inject_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ba
point_file = injection.bh
variable = f_Ba
[]
[inject_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Li
point_file = injection.bh
variable = f_Li
[]
[inject_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_NO3
point_file = injection.bh
variable = f_NO3
[]
[inject_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_O2aq
point_file = injection.bh
variable = f_O2aq
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_H]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 0
point_file = production.bh
variable = f_H
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 1
point_file = production.bh
variable = f_Cl
[]
[produce_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SO4
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 2
point_file = production.bh
variable = f_SO4
[]
[produce_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_HCO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 3
point_file = production.bh
variable = f_HCO3
[]
[produce_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 4
point_file = production.bh
variable = f_SiO2aq
[]
[produce_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Al
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 5
point_file = production.bh
variable = f_Al
[]
[produce_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ca
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 6
point_file = production.bh
variable = f_Ca
[]
[produce_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Mg
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 7
point_file = production.bh
variable = f_Mg
[]
[produce_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Fe
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 8
point_file = production.bh
variable = f_Fe
[]
[produce_K]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_K
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 9
point_file = production.bh
variable = f_K
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 10
point_file = production.bh
variable = f_Na
[]
[produce_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Sr
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 11
point_file = production.bh
variable = f_Sr
[]
[produce_F]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_F
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 12
point_file = production.bh
variable = f_F
[]
[produce_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_BOH
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 13
point_file = production.bh
variable = f_BOH
[]
[produce_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Br
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 14
point_file = production.bh
variable = f_Br
[]
[produce_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ba
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 15
point_file = production.bh
variable = f_Ba
[]
[produce_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Li
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 16
point_file = production.bh
variable = f_Li
[]
[produce_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_NO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 17
point_file = production.bh
variable = f_NO3
[]
[produce_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_O2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 18
point_file = production.bh
variable = f_O2aq
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 19
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_H]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SO4]
type = PorousFlowSumQuantity
[]
[produced_mass_HCO3]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_Al]
type = PorousFlowSumQuantity
[]
[produced_mass_Ca]
type = PorousFlowSumQuantity
[]
[produced_mass_Mg]
type = PorousFlowSumQuantity
[]
[produced_mass_Fe]
type = PorousFlowSumQuantity
[]
[produced_mass_K]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Sr]
type = PorousFlowSumQuantity
[]
[produced_mass_F]
type = PorousFlowSumQuantity
[]
[produced_mass_BOH]
type = PorousFlowSumQuantity
[]
[produced_mass_Br]
type = PorousFlowSumQuantity
[]
[produced_mass_Ba]
type = PorousFlowSumQuantity
[]
[produced_mass_Li]
type = PorousFlowSumQuantity
[]
[produced_mass_NO3]
type = PorousFlowSumQuantity
[]
[produced_mass_O2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_H_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SO4_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SO4
[]
[kg_HCO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_HCO3
[]
[kg_SiO2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2aq
[]
[kg_Al_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Al
[]
[kg_Ca_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ca
[]
[kg_Mg_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Mg
[]
[kg_Fe_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Fe
[]
[kg_K_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_K
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Sr_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Sr
[]
[kg_F_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_F
[]
[kg_BOH_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_BOH
[]
[kg_Br_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Br
[]
[kg_Ba_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ba
[]
[kg_Li_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Li
[]
[kg_NO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_NO3
[]
[kg_O2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_O2aq
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_H_produced]
type = FunctionValuePostprocessor
function = moles_H
indirect_dependencies = 'kg_H_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SO4_produced]
type = FunctionValuePostprocessor
function = moles_SO4
indirect_dependencies = 'kg_SO4_produced_this_timestep dt'
[]
[mole_rate_HCO3_produced]
type = FunctionValuePostprocessor
function = moles_HCO3
indirect_dependencies = 'kg_HCO3_produced_this_timestep dt'
[]
[mole_rate_SiO2aq_produced]
type = FunctionValuePostprocessor
function = moles_SiO2aq
indirect_dependencies = 'kg_SiO2aq_produced_this_timestep dt'
[]
[mole_rate_Al_produced]
type = FunctionValuePostprocessor
function = moles_Al
indirect_dependencies = 'kg_Al_produced_this_timestep dt'
[]
[mole_rate_Ca_produced]
type = FunctionValuePostprocessor
function = moles_Ca
indirect_dependencies = 'kg_Ca_produced_this_timestep dt'
[]
[mole_rate_Mg_produced]
type = FunctionValuePostprocessor
function = moles_Mg
indirect_dependencies = 'kg_Mg_produced_this_timestep dt'
[]
[mole_rate_Fe_produced]
type = FunctionValuePostprocessor
function = moles_Fe
indirect_dependencies = 'kg_Fe_produced_this_timestep dt'
[]
[mole_rate_K_produced]
type = FunctionValuePostprocessor
function = moles_K
indirect_dependencies = 'kg_K_produced_this_timestep dt'
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Sr_produced]
type = FunctionValuePostprocessor
function = moles_Sr
indirect_dependencies = 'kg_Sr_produced_this_timestep dt'
[]
[mole_rate_F_produced]
type = FunctionValuePostprocessor
function = moles_F
indirect_dependencies = 'kg_F_produced_this_timestep dt'
[]
[mole_rate_BOH_produced]
type = FunctionValuePostprocessor
function = moles_BOH
indirect_dependencies = 'kg_BOH_produced_this_timestep dt'
[]
[mole_rate_Br_produced]
type = FunctionValuePostprocessor
function = moles_Br
indirect_dependencies = 'kg_Br_produced_this_timestep dt'
[]
[mole_rate_Ba_produced]
type = FunctionValuePostprocessor
function = moles_Ba
indirect_dependencies = 'kg_Ba_produced_this_timestep dt'
[]
[mole_rate_Li_produced]
type = FunctionValuePostprocessor
function = moles_Li
indirect_dependencies = 'kg_Li_produced_this_timestep dt'
[]
[mole_rate_NO3_produced]
type = FunctionValuePostprocessor
function = moles_NO3
indirect_dependencies = 'kg_NO3_produced_this_timestep dt'
[]
[mole_rate_O2aq_produced]
type = FunctionValuePostprocessor
function = moles_O2aq
indirect_dependencies = 'kg_O2aq_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = AverageNodalVariableValue
boundary = production_nodes
variable = temperature
[]
[]
[Functions]
[moles_H]
type = ParsedFunction
symbol_names = 'kg_H dt'
symbol_values = 'kg_H_produced_this_timestep dt'
expression = 'kg_H * 1000 / 1.0079 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SO4]
type = ParsedFunction
symbol_names = 'kg_SO4 dt'
symbol_values = 'kg_SO4_produced_this_timestep dt'
expression = 'kg_SO4 * 1000 / 96.0576 / dt'
[]
[moles_HCO3]
type = ParsedFunction
symbol_names = 'kg_HCO3 dt'
symbol_values = 'kg_HCO3_produced_this_timestep dt'
expression = 'kg_HCO3 * 1000 / 61.0171 / dt'
[]
[moles_SiO2aq]
type = ParsedFunction
symbol_names = 'kg_SiO2aq dt'
symbol_values = 'kg_SiO2aq_produced_this_timestep dt'
expression = 'kg_SiO2aq * 1000 / 60.0843 / dt'
[]
[moles_Al]
type = ParsedFunction
symbol_names = 'kg_Al dt'
symbol_values = 'kg_Al_produced_this_timestep dt'
expression = 'kg_Al * 1000 / 26.9815 / dt'
[]
[moles_Ca]
type = ParsedFunction
symbol_names = 'kg_Ca dt'
symbol_values = 'kg_Ca_produced_this_timestep dt'
expression = 'kg_Ca * 1000 / 40.08 / dt'
[]
[moles_Mg]
type = ParsedFunction
symbol_names = 'kg_Mg dt'
symbol_values = 'kg_Mg_produced_this_timestep dt'
expression = 'kg_Mg * 1000 / 24.305 / dt'
[]
[moles_Fe]
type = ParsedFunction
symbol_names = 'kg_Fe dt'
symbol_values = 'kg_Fe_produced_this_timestep dt'
expression = 'kg_Fe * 1000 / 55.847 / dt'
[]
[moles_K]
type = ParsedFunction
symbol_names = 'kg_K dt'
symbol_values = 'kg_K_produced_this_timestep dt'
expression = 'kg_K * 1000 / 39.0983 / dt'
[]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Sr]
type = ParsedFunction
symbol_names = 'kg_Sr dt'
symbol_values = 'kg_Sr_produced_this_timestep dt'
expression = 'kg_Sr * 1000 / 87.62 / dt'
[]
[moles_F]
type = ParsedFunction
symbol_names = 'kg_F dt'
symbol_values = 'kg_F_produced_this_timestep dt'
expression = 'kg_F * 1000 / 18.9984 / dt'
[]
[moles_BOH]
type = ParsedFunction
symbol_names = 'kg_BOH dt'
symbol_values = 'kg_BOH_produced_this_timestep dt'
expression = 'kg_BOH * 1000 / 61.8329 / dt'
[]
[moles_Br]
type = ParsedFunction
symbol_names = 'kg_Br dt'
symbol_values = 'kg_Br_produced_this_timestep dt'
expression = 'kg_Br * 1000 / 79.904 / dt'
[]
[moles_Ba]
type = ParsedFunction
symbol_names = 'kg_Ba dt'
symbol_values = 'kg_Ba_produced_this_timestep dt'
expression = 'kg_Ba * 1000 / 137.33 / dt'
[]
[moles_Li]
type = ParsedFunction
symbol_names = 'kg_Li dt'
symbol_values = 'kg_Li_produced_this_timestep dt'
expression = 'kg_Li * 1000 / 6.941 / dt'
[]
[moles_NO3]
type = ParsedFunction
symbol_names = 'kg_NO3 dt'
symbol_values = 'kg_NO3_produced_this_timestep dt'
expression = 'kg_NO3 * 1000 / 62.0049 / dt'
[]
[moles_O2aq]
type = ParsedFunction
symbol_names = 'kg_O2aq dt'
symbol_values = 'kg_O2aq_produced_this_timestep dt'
expression = 'kg_O2aq * 1000 / 31.9988 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.01801802 / dt'
[]
[]
[AuxVariables]
[injection_temperature]
initial_condition = 92
[]
[injection_rate_massfrac_H]
initial_condition = -2.952985071156e-06
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.04870664551708
[]
[injection_rate_massfrac_SO4]
initial_condition = 0.0060359986852517
[]
[injection_rate_massfrac_HCO3]
initial_condition = 5.0897287594019e-05
[]
[injection_rate_massfrac_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[injection_rate_massfrac_Al]
initial_condition = 3.268028901929e-08
[]
[injection_rate_massfrac_Ca]
initial_condition = 0.00082159428184586
[]
[injection_rate_massfrac_Mg]
initial_condition = 1.8546347062146e-05
[]
[injection_rate_massfrac_Fe]
initial_condition = 4.3291908204093e-05
[]
[injection_rate_massfrac_K]
initial_condition = 6.8434768308898e-05
[]
[injection_rate_massfrac_Na]
initial_condition = 0.033298053919671
[]
[injection_rate_massfrac_Sr]
initial_condition = 1.2771866652177e-05
[]
[injection_rate_massfrac_F]
initial_condition = 5.5648860174073e-06
[]
[injection_rate_massfrac_BOH]
initial_condition = 0.0003758574621917
[]
[injection_rate_massfrac_Br]
initial_condition = 9.0315286107068e-05
[]
[injection_rate_massfrac_Ba]
initial_condition = 1.5637460875161e-07
[]
[injection_rate_massfrac_Li]
initial_condition = 8.3017067912701e-05
[]
[injection_rate_massfrac_NO3]
initial_condition = 0.00010958455036169
[]
[injection_rate_massfrac_O2aq]
initial_condition = -7.0806852373351e-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.91032275033842
[]
[rate_H]
[]
[rate_Cl]
[]
[rate_SO4]
[]
[rate_HCO3]
[]
[rate_SiO2aq]
[]
[rate_Al]
[]
[rate_Ca]
[]
[rate_Mg]
[]
[rate_Fe]
[]
[rate_K]
[]
[rate_Na]
[]
[rate_Sr]
[]
[rate_F]
[]
[rate_BOH]
[]
[rate_Br]
[]
[rate_Ba]
[]
[rate_Li]
[]
[rate_NO3]
[]
[rate_O2aq]
[]
[rate_H2O]
[]
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O temperature'
variable = 'pf_rate_H pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_SiO2aq pf_rate_Al pf_rate_Ca pf_rate_Mg pf_rate_Fe pf_rate_K pf_rate_Na pf_rate_Sr pf_rate_F pf_rate_BOH pf_rate_Br pf_rate_Ba pf_rate_Li pf_rate_NO3 pf_rate_O2aq pf_rate_H2O temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_H massfrac_Cl massfrac_SO4 massfrac_HCO3 massfrac_SiO2aq massfrac_Al massfrac_Ca massfrac_Mg massfrac_Fe massfrac_K massfrac_Na massfrac_Sr massfrac_F massfrac_BOH massfrac_Br massfrac_Ba massfrac_Li massfrac_NO3 massfrac_O2aq '
variable = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
from_multi_app = react
[]
[]
(test/tests/misc/boundary_variable_check/test.i)
[Problem]
boundary_restricted_elem_integrity_check = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[AuxVariables]
[dummy][]
[dummy2]
family = MONOMIAL
order = CONSTANT
block = 1
[]
[dummy3]
family = MONOMIAL
order = CONSTANT
block = 0
[]
[]
[AuxKernels]
active = 'bad'
[bad]
type = ProjectionAux
variable = dummy
v = v
boundary = 'left'
[]
[bad_elemental]
type = ProjectionAux
variable = dummy3
v = dummy2
boundary = 'left'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
active = 'interface'
[interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 'D'
D_neighbor = 'D'
[]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
active = 'left right middle'
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[bad]
type = MatchedValueBC
variable = u
boundary = 'left'
v = v
[]
[bad_integrated]
type = CoupledVarNeumannBC
variable = u
boundary = 'left'
v = v
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[]
[middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[]
[]
[Materials]
[stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
[Postprocessors]
active = ''
[bad]
type = NodalExtremeValue
boundary = 'left'
variable = v
[]
[bad_side]
type = SideDiffusiveFluxIntegral
variable = v
diffusivity = 1
boundary = 'left'
[]
[]
(test/tests/misc/boundary_variable_check/three-domains/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 15
xmax = 3
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[subdomain2]
input = subdomain1
type = SubdomainBoundingBoxGenerator
bottom_left = '2.0 0 0'
block_id = 2
top_right = '3.0 1.0 0'
[]
[interface]
input = subdomain2
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0 1'
[]
[v]
block = '2'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = '0 1'
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = '2'
[]
[]
[BCs]
[bad]
type = MatchedValueBC
variable = u
boundary = 'primary0_interface'
v = v
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/ad_coupled_value/coupled.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
block = '0'
[../]
[./v]
block = '1'
[../]
[w][]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
block = 0
[../]
[./diff_v]
type = Diffusion
variable = v
block = 1
[../]
[diff_w]
type = Diffusion
variable = w
[]
[]
[InterfaceKernels]
[./interface]
type = ADCoupledInterfacialSource
variable = u
neighbor_var = v
var_source = w
boundary = primary0_interface
D = 1
D_neighbor = 1
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 10
[../]
[./middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[../]
[w_left]
type = DirichletBC
variable = w
boundary = 'left'
value = 0
[]
[w_right]
type = DirichletBC
variable = w
boundary = 'right'
value = 4
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/matched_value_bc/matched_value_bc_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
# Solves a pair of coupled diffusion equations where u=v on the boundary
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 3
[../]
[./v]
order = FIRST
family = LAGRANGE
initial_condition = 2
[../]
[]
[Kernels]
active = 'diff_u diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'right_v left_u'
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 3
[../]
[./left_u]
type = MatchedValueBC
variable = u
boundary = 3
v = v
[../]
[]
[Preconditioning]
[./precond]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-10
l_tol = 1e-12
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/interfacekernels/1d_interface/ik_save_in_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./interface_again]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[AuxVariables]
[./primary_resid]
[../]
[./secondary_resid]
[../]
[./primary_jac]
[../]
[./secondary_jac]
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
save_in = 'primary_resid'
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
save_in = 'secondary_resid'
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 4
D_neighbor = 2
save_in_var_side = 'm s'
save_in = 'primary_resid secondary_resid'
diag_save_in_var_side = 'm s'
diag_save_in = 'primary_jac secondary_jac'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
save_in = 'primary_resid'
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 1
save_in = 'secondary_resid'
[../]
[./middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
save_in = 'secondary_resid'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
# PorousFlow simulation of injection and production in a 2D aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg/s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its "parent" simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -1.0 # kg/s/m, negative because injection as a source
production_rate = 1.0 # kg/s/m
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 14 # for better resolution, use 56 or 112
ny = 8 # for better resolution, use 32 or 64
xmin = -70
xmax = 70
ymin = -40
ymax = 40
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '-30 0 0'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[f0]
initial_condition = 0.002285946
[]
[f1]
initial_condition = 0.0035252
[]
[f2]
initial_condition = 1.3741E-05
[]
[porepressure]
initial_condition = 2E6
[]
[temperature]
initial_condition = 50
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_node
[]
[]
[DiracKernels]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f0
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f1
[]
[inject_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_SiO2
point_file = injection.bh
variable = f2
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 0
point_file = production.bh
variable = f0
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 1
point_file = production.bh
variable = f1
[]
[produce_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 2
point_file = production.bh
variable = f2
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 3
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SiO2_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SiO2_produced]
type = FunctionValuePostprocessor
function = moles_SiO2
indirect_dependencies = 'kg_SiO2_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = PointValue
point = '30 0 0'
variable = temperature
[]
[]
[Functions]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SiO2]
type = ParsedFunction
symbol_names = 'kg_SiO2 dt'
symbol_values = 'kg_SiO2_produced_this_timestep dt'
expression = 'kg_SiO2 * 1000 / 60.0843 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.0152 / dt'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f0 f1 f2'
save_component_rate_in = 'rate_Na rate_Cl rate_SiO2 rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[AuxVariables]
[injection_temperature]
initial_condition = 200
[]
[injection_rate_massfrac_Na]
initial_condition = 0.002285946
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.0035252
[]
[injection_rate_massfrac_SiO2]
initial_condition = 1.3741E-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.994175112
[]
[rate_H2O]
[]
[rate_Na]
[]
[rate_Cl]
[]
[rate_SiO2]
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
dt = 1E5
[]
[Outputs]
exodus = true
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H2O rate_Na rate_Cl rate_SiO2 temperature'
variable = 'pf_rate_H2O pf_rate_Na pf_rate_Cl pf_rate_SiO2 temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_Na massfrac_Cl massfrac_SiO2'
variable = 'f0 f1 f2'
from_multi_app = react
[]
[]
(test/tests/bcs/ad_matched_value_bc/test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
# Solves a pair of coupled diffusion equations where u=v on the boundary
[Variables]
[u]
order = FIRST
family = LAGRANGE
initial_condition = 3
[]
[v]
order = FIRST
family = LAGRANGE
initial_condition = 2
[]
[]
[Kernels]
[diff_u]
type = ADDiffusion
variable = u
[]
[diff_v]
type = ADDiffusion
variable = v
[]
[]
[BCs]
[right_v]
type = ADDirichletBC
variable = v
boundary = 1
value = 3
[]
[left_u]
type = ADMatchedValueBC
variable = u
boundary = 3
v = v
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
l_tol = 1e-12
[]
[Outputs]
file_base = out
exodus = true
[]