- variableThe variable this initial condition is supposed to provide values for.
C++ Type:VariableName
Unit:(no unit assumed)
Controllable:No
Description:The variable this initial condition is supposed to provide values for.
- x1The x coordinate of the lower left-hand corner of the box
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The x coordinate of the lower left-hand corner of the box
- x2The x coordinate of the upper right-hand corner of the box
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The x coordinate of the upper right-hand corner of the box
- y1The y coordinate of the lower left-hand corner of the box
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The y coordinate of the lower left-hand corner of the box
- y2The y coordinate of the upper right-hand corner of the box
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The y coordinate of the upper right-hand corner of the box
BoundingBoxIC
BoundingBoxIC allows setting the initial condition of a value inside and outside of a specified box. The box is aligned with the x, y, z axes and is specified by passing in the x, y, z coordinates of the bottom left point and the top right point. Each of the coordinates of the "bottom_left" point MUST be less than those coordinates in the "top_right" point.
When setting the initial condition, if bottom_left <= Point <= top_right
then the "inside" value is used. Otherwise the "outside" value is used.
When using this IC, only a single bounding box my be specified within the domain. If multiple bounding boxes are needed, this capability is implemented in the phase_field module as MultiBoundingBoxIC
.
Class Description
BoundingBoxIC allows setting the initial condition of a value inside and outside of a specified box. The box is aligned with the x, y, z axes
Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- inside0The value of the variable inside the box
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The value of the variable inside the box
- int_width0The width of the diffuse interface. Set to 0 for sharp interface.
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The width of the diffuse interface. Set to 0 for sharp interface.
- outside0The value of the variable outside the box
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The value of the variable outside the box
- stateCURRENTThis parameter is used to set old state solutions at the start of simulation. If specifying multiple states at the start of simulation, use one IC object for each state being specified. The states are CURRENT=0 OLD=1 OLDER=2. States older than 2 are not currently supported. When the user only specifies current state, the solution is copied to the old and older states, as expected. This functionality is mainly used for dynamic simulations with explicit time integration schemes, where old solution states are used in the velocity and acceleration approximations.
Default:CURRENT
C++ Type:MooseEnum
Options:CURRENT, OLD, OLDER
Controllable:No
Description:This parameter is used to set old state solutions at the start of simulation. If specifying multiple states at the start of simulation, use one IC object for each state being specified. The states are CURRENT=0 OLD=1 OLDER=2. States older than 2 are not currently supported. When the user only specifies current state, the solution is copied to the old and older states, as expected. This functionality is mainly used for dynamic simulations with explicit time integration schemes, where old solution states are used in the velocity and acceleration approximations.
- z10The z coordinate of the lower left-hand corner of the box
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The z coordinate of the lower left-hand corner of the box
- z20The z coordinate of the upper right-hand corner of the box
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The z coordinate of the upper right-hand corner of the box
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- ignore_uo_dependencyFalseWhen set to true, a UserObject retrieved by this IC will not be executed before the this IC
Default:False
C++ Type:bool
Controllable:No
Description:When set to true, a UserObject retrieved by this IC will not be executed before the this IC
Advanced Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Material Property Retrieval Parameters
Input Files
- (modules/phase_field/test/tests/MultiPhase/switchingfunctionmultiphasematerial.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s1_testmodel.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
- (test/tests/ics/bounding_box_ic/bounding_box_ic_test.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_objects.i)
- (modules/phase_field/test/tests/phase_field_kernels/nonuniform_barrier_coefficient.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
- (modules/phase_field/test/tests/actions/gpm_kernel.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_with_density.i)
- (modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_action.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_objects2.i)
- (modules/porous_flow/test/tests/chemistry/2species_equilibrium_2phase.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/centroid.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
- (modules/combined/test/tests/linear_elasticity/extra_stress.i)
- (modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_plasticity.i)
- (modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
- (modules/porous_flow/test/tests/chemistry/2species_equilibrium.i)
- (test/tests/indicators/value_jump_indicator/value_jump_indicator_fv.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/phase_field_sub.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s2_fasttest.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_motion2.i)
- (test/tests/ics/bounding_box_ic/bounding_box_ic_diffuse_test.i)
- (test/tests/indicators/value_jump_indicator/vec_value_jump_indicator.i)
- (modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_single_material.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_advection_constforce_rect.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
- (test/tests/ics/from_exodus_solution/nodal_part2.i)
- (modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_coupled_test.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
- (modules/phase_field/test/tests/actions/both_direct_2vars.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
- (modules/porous_flow/examples/tutorial/13.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_motion.i)
- (test/tests/mesh/adapt/initial_adaptivity_test.i)
- (modules/phase_field/test/tests/actions/both_split_2vars.i)
- (modules/phase_field/test/tests/rigidbodymotion/update_orientation_verify.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADnonuniform_barrier_coefficient.i)
- (test/tests/indicators/value_jump_indicator/value_jump_indicator_test.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/boundary_intersection.i)
- (modules/porous_flow/examples/lava_lamp/2phase_convection.i)
- (modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_onePhaseMulti.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_split_coupled_test.i)
- (modules/phase_field/test/tests/initial_conditions/BoundingBoxIC.i)
- (modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_small_strain.i)
- (modules/phase_field/test/tests/rigidbodymotion/update_orientation.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_wrong_lib.i)
References
No citations exist within this document.(modules/phase_field/test/tests/MultiPhase/switchingfunctionmultiphasematerial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0
xmax = 30
ymin = 0
ymax = 30
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./eta1]
[../]
[./eta2]
[../]
[./eta3]
[../]
[./eta0]
[../]
[]
[ICs]
[./IC_eta2]
x1 = 0
y1 = 15
x2 = 30
y2 = 30
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta2
int_width = 0
[../]
[./IC_eta3]
x1 = 15
y1 = 0
x2 = 30
y2 = 15
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta3
int_width = 0
[../]
[./IC_eta4]
x1 = 0
y1 = 0
x2 = 15
y2 = 15
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta0
int_width = 0
[../]
[./IC_c]
x1 = 15
y1 = 15
radius = 8.0
outvalue = 0.05
variable = c
invalue = 1.0
type = SmoothCircleIC
int_width = 3.0
[../]
[./IC_eta1]
x1 = 15
y1 = 15
radius = 8.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
int_width = 3.0
[../]
[]
# Not evalulating time evolution to improve test performance, since we are only testing
# the material property. However, the kernel and free energy are left in place to allow
# this test to be easily turned in to a working example
#[Kernels]
# [./c_dot]
# type = CoupledTimeDerivative
# variable = w
# v = c
# [../]
# [./c_res]
# type = SplitCHParsed
# variable = c
# f_name = F
# kappa_name = kappa_c
# w = w
# coupled_variables = 'eta1 eta2 eta3 eta0'
# [../]
# [./w_res]
# # coupled_variables = 'c'
# type = SplitCHWRes
# variable = w
# mob_name = M
# [../]
# [./AC1_bulk]
# type = AllenCahn
# variable = eta1
# f_name = F
# coupled_variables = 'c eta2 eta3 eta0'
# [../]
# [./AC1_int]
# type = ACInterface
# variable = eta1
# kappa_name = kappa_s
# [../]
# [./e1_dot]
# type = TimeDerivative
# variable = eta1
# [../]
# [./AC2_bulk]
# type = AllenCahn
# variable = eta2
# f_name = F
# coupled_variables = 'c eta1 eta3 eta0'
# [../]
# [./AC2_int]
# type = ACInterface
# variable = eta2
# [../]
# [./e2_dot]
# type = TimeDerivative
# variable = eta2
# [../]
# [./AC3_bulk]
# type = AllenCahn
# variable = eta3
# f_name = F
# coupled_variables = 'c eta2 eta1 eta0'
# [../]
# [./AC3_int]
# type = ACInterface
# variable = eta3
# [../]
# [./e3_dot]
# type = TimeDerivative
# variable = eta3
# [../]
# [./AC4_bulk]
# type = AllenCahn
# variable = eta0
# f_name = F
# coupled_variables = 'c eta2 eta3 eta1'
# [../]
# [./AC4_int]
# type = ACInterface
# variable = eta0
# [../]
# [./e4_dot]
# type = TimeDerivative
# variable = eta0
# [../]
#[]
[Materials]
[./ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'eta0 eta1 eta2 eta3'
phase_etas = 'eta1'
outputs = exodus
[../]
[./hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'eta0 eta1 eta2 eta3'
phase_etas = 'eta0 eta2 eta3'
outputs = exodus
[../]
#[./ha]
# type = DerivativeParsedMaterial
# coupled_variables = 'eta1 eta2 eta3 eta0'
# property_name = ha_parsed
# expression = 'eta1^2/(eta1^2+eta2^2+eta3^2+eta0^2)'
# derivative_order = 2
# outputs = exodus
#[../]
#[./hb]
# type = DerivativeParsedMaterial
# coupled_variables = 'eta1 eta2 eta3 eta0'
# property_name = hb_parsed
# expression = '(eta2^2+eta3^2+eta0^2)/(eta1^2+eta2^2+eta3^2+eta0^2)'
# derivative_order = 2
# outputs = exodus
#[../]
#[./FreeEng]
# type = DerivativeParsedMaterial
# coupled_variables = 'c eta1 eta2 eta3 eta0'
# property_name = F
# constant_names = 'c1 c2 s g d e h z'
# constant_expressions = '1.0 0.0 1.5 1.5 1.0 1.0 1 1.0'
# material_property_names = 'ha(eta1,eta2,eta3,eta0) hb(eta1,eta2,eta3,eta0)'
# expression = 'a:=eta1^2/(eta1^2+eta2^2+eta3^2+eta0^2);f1:=ha*(c-c1)^2;b:=(eta2^2+eta3^2+eta0^2)/(eta1^2+eta2^2+eta3^2+eta0^2);f2:=hb*(c-c2)^2
# ;f3:=1/4*eta1^4-1/2*eta1^2+1/4*eta2^4-1/2*eta2^2+1/4*eta3^4-1/2*eta3^2+1/4*eta0^4-1/2*eta0^2
# ;f4:=z*s*(eta1^2*eta2^2+eta1^2*eta3^2+eta1^2*eta0^2)+g*(eta2^2*eta3^2+eta2^2*eta0^2+eta3^2*eta0^2);f:=1/4+e*f1+d*f2+h*(f3+f4);f'
# derivative_order = 2
#[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa_s kappa_op L M'
prop_values = '0 3 3 1.0 1.0'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[./pa2]
[../]
[./pab]
[../]
[]
[AuxKernels]
[./pa2]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
log_k = 2
sto_v = 2
[../]
[./pab]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
log_k = -2
sto_v = '1 1'
[../]
[]
[ICs]
[./a]
type = BoundingBoxIC
variable = a
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./b]
type = BoundingBoxIC
variable = b
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1_eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1_diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1_conv]
type = CoupledConvectionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
p = pressure
[../]
[./a2_eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2_diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2_conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2_eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2_diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2_conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 10
dt = 10
[]
[Outputs]
file_base = equilibrium_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
# Simple equilibrium reaction example.
# This simulation is identical to 1species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 1species.i adds
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1e-2
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
variable = a
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = 1
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./aeq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 1
weight = 2
sto_u = 2
[../]
[./adiff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 1
weight = 2
sto_u = 2
[../]
[./aconv]
type = CoupledConvectionReactionSub
variable = a
log_k = 1
weight = 2
sto_u = 2
p = pressure
[../]
[]
[BCs]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 1species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/phase_field/tutorials/spinodal_decomposition/s1_testmodel.i)
#
# Simulation of an iron-chromium alloy using simplest possible code and a test
# set of initial conditions.
#
[Mesh]
# generate a 2D, 25nm x 25nm mesh
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 100
ny = 100
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
# Use a bounding box IC at equilibrium concentrations to make sure the
# model behaves as expected.
[./testIC]
type = BoundingBoxIC
variable = c
x1 = 5
x2 = 20
y1 = 5
y2 = 20
inside = 0.823
outside = 0.236
[../]
[]
[BCs]
# periodic BC as is usually done on phase-field models
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# See wiki page "Developing Phase Field Models" for more information on Split
# Cahn-Hilliard equation kernels.
# https://mooseframework.inl.gov/wiki/PhysicsModules/PhaseField/DevelopingModels/
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the materials and
# must have the same value in each one.
[./constants]
# Define constant values kappa_c and M. Eventually M will be replaced with
# an equation rather than a constant.
type = GenericFunctionMaterial
prop_names = 'kappa_c M'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27
2.2841e-26*1e+09^2/6.24150934e+18/1e-27'
# kappa_c*eV_J*nm_m^2*d
# M*nm_m^2/eV_J/d
[../]
[./local_energy]
# Defines the function for the local free energy density as given in the
# problem, then converts units and adds scaling factor.
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
[../]
[]
[Preconditioning]
# Preconditioning is required for Newton's method. See wiki page "Solving
# Phase Field Models" for more information.
# https://mooseframework.inl.gov/wiki/PhysicsModules/PhaseField/SolvingModels/
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 86400 # 1 day. We only need to run this long enough to verify
# the model is working properly.
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
dt = 100
[]
[Outputs]
exodus = true
console = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i, and that the equilbrium constants
# are provided by AuxVariables
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[./pab]
[../]
[./pa2_logk]
initial_condition = 2
[../]
[./pab_logk]
initial_condition = -2
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = pa2_logk
[../]
[./pabeq]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
sto_v = '1 1'
log_k = pab_logk
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
p = pressure
[../]
[./a2eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
hide = 'pa2_logk pab_logk'
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(test/tests/ics/bounding_box_ic/bounding_box_ic_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
uniform_refine = 3
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.1
y1 = 0.1
x2 = 0.6
y2 = 0.6
inside = 2.3
outside = 4.6
[../]
[../]
[]
[AuxVariables]
active = 'u_aux'
[./u_aux]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.1
y1 = 0.1
x2 = 0.6
y2 = 0.6
inside = 1.34
outside = 6.67
[../]
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_objects.i)
# This input file contains objects only available in phase_field
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
xmax = 50
ymax = 25
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
block = 0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
[Problem]
register_objects_from = 'PhaseFieldApp'
library_path = '../../../../../phase_field/lib'
[]
(modules/phase_field/test/tests/phase_field_kernels/nonuniform_barrier_coefficient.i)
# This material tests the kernels ACBarrierFunction and ACKappaFunction for a
# multiphase system.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -200
xmax = 200
ymin = -200
ymax = 200
uniform_refine = 0
[]
[Variables]
[./gr0]
[../]
[./gr1]
[../]
[]
[ICs]
[./gr0_IC]
type = BoundingBoxIC
variable = gr0
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 0
outside = 1
[../]
[./gr1_IC]
type = BoundingBoxIC
variable = gr1
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 1
outside = 0
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'L gamma E0 E1'
prop_values = '0.1 1.5 3 1'
[../]
[./h0]
type = DerivativeParsedMaterial
property_name = h0
coupled_variables = 'gr0 gr1'
expression = 'gr0^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./h1]
type = DerivativeParsedMaterial
property_name = h1
coupled_variables = 'gr0 gr1'
expression = 'gr1^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./mu]
type = DerivativeParsedMaterial
property_name = mu
coupled_variables = 'gr0 gr1'
constant_names = 'mag'
constant_expressions = '16'
expression = 'mag * (gr0^2 * gr1^2 + 0.1)'
derivative_order = 2
[../]
[./kappa]
type = DerivativeParsedMaterial
property_name = kappa
coupled_variables = 'gr0 gr1'
material_property_names = 'h0(gr0,gr1) h1(gr0,gr1)'
constant_names = 'mag0 mag1'
constant_expressions = '200 100'
expression = 'h0*mag0 + h1*mag1'
derivative_order = 2
[../]
[]
[Kernels]
[./gr0_time]
type = TimeDerivative
variable = gr0
[../]
[./gr0_interface]
type = ACInterface
variable = gr0
coupled_variables = 'gr1'
mob_name = L
kappa_name = 'kappa'
[../]
[./gr0_switching]
type = ACSwitching
variable = gr0
coupled_variables = 'gr1'
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr0_multi]
type = ACGrGrMulti
variable = gr0
v = 'gr1'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr0_barrier]
type = ACBarrierFunction
variable = gr0
mob_name = L
gamma = gamma
v = 'gr1'
[../]
[./gr0_kappa]
type = ACKappaFunction
variable = gr0
mob_name = L
kappa_name = kappa
v = 'gr1'
[../]
[./gr1_time]
type = TimeDerivative
variable = gr1
[../]
[./gr1_interface]
type = ACInterface
variable = gr1
coupled_variables = 'gr0'
mob_name = L
kappa_name = 'kappa'
[../]
[./gr1_switching]
type = ACSwitching
variable = gr1
coupled_variables = 'gr0'
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr1_multi]
type = ACGrGrMulti
variable = gr1
v = 'gr0'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr1_barrier]
type = ACBarrierFunction
variable = gr1
mob_name = L
gamma = gamma
v = 'gr0'
[../]
[./gr1_kappa]
type = ACKappaFunction
variable = gr1
mob_name = L
kappa_name = kappa
v = 'gr0'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = ' asm ilu 1 31 preonly'
nl_max_its = 20
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
start_time = 0
num_steps = 3
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase.
# This is a revised version of the model that eliminates small variations in mass
# that have been observed with the original formulation. In this version, rather
# than evolving the chemical potential as a field variable, we evolve the composition
# field using a normal Cahn-Hilliard equation, then relate chemical potential to
# composition using Eq. (22) from the paper (this relationship is derived from the
# grand potential functional and is valid only for parabolic free energies).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = -15
xmax = 15
ymin = -15
ymax = 15
[]
[Variables]
[w]
[]
[c]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = BoundingBoxIC
variable = etaa0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 1.0
outside = 0.0
[]
[IC_etad0]
type = BoundingBoxIC
variable = etad0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.0
outside = 1.0
[]
[IC_c]
type = BoundingBoxIC
variable = c
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.1
outside = 0.5
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_w]
type = ConstantFunction
value = 0
[]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[]
[ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[]
[ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[]
[ea0_dot]
type = TimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[]
[ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[]
[ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[]
[eb0_dot]
type = TimeDerivative
variable = etab0
[]
# Order parameter eta_delta0
[ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[]
[ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[]
[ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[]
[ed0_dot]
type = TimeDerivative
variable = etad0
[]
#Concentration
[c_dot]
type = TimeDerivative
variable = c
[]
[Diffusion]
type = MatDiffusion
variable = c
v = w
diffusivity = DchiVm
args = ''
[]
#The following relate chemical potential to composition using Eq. (22)
[w_rxn]
type = MatReaction
variable = w
v = c
reaction_rate = -1
[]
[ca_rxn]
type = MatReaction
variable = w
reaction_rate = 'hoverk_a'
args = 'etaa0 etab0 etad0'
[]
[ca_bodyforce]
type = MaskedBodyForce
variable = w
mask = ha
coupled_variables = 'etaa0 etab0 etad0'
value = 0.1 #caeq
[]
[cb_rxn]
type = MatReaction
variable = w
reaction_rate = 'hoverk_b'
args = 'etaa0 etab0 etad0'
[]
[cb_bodyforce]
type = MaskedBodyForce
variable = w
mask = hb
coupled_variables = 'etaa0 etab0 etad0'
value = 0.9 #cbeq
[]
[cd_rxn]
type = MatReaction
variable = w
reaction_rate = 'hoverk_d'
args = 'etaa0 etab0 etad0'
[]
[cd_bodyforce]
type = MaskedBodyForce
variable = w
mask = hd
coupled_variables = 'etaa0 etab0 etad0'
value = 0.5 #cdeq
[]
[]
[Materials]
[ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[]
[hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[]
[hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[]
[omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[]
[rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[]
[const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[]
[Mobility]
type = DerivativeParsedMaterial
property_name = DchiVm
material_property_names = 'D chi Vm' #Factor of Vm is needed to evolve c instead of rho
expression = 'D*chi*Vm'
derivative_order = 2
[]
[chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[]
[hoverk_a]
type = DerivativeParsedMaterial
material_property_names = 'ha(etaa0,etab0,etad0) Vm ka'
property_name = hoverk_a
expression = 'ha / Vm / ka'
[]
[hoverk_b]
type = DerivativeParsedMaterial
material_property_names = 'hb(etaa0,etab0,etad0) Vm kb'
property_name = hoverk_b
expression = 'hb / Vm / kb'
[]
[hoverk_d]
type = DerivativeParsedMaterial
material_property_names = 'hd(etaa0,etab0,etad0) Vm kd'
property_name = hoverk_d
expression = 'hd / Vm / kd'
[]
[]
[Postprocessors]
[c_total]
type = ElementIntegralVariablePostprocessor
variable = c
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
csv = true
exodus = true
[]
(modules/phase_field/test/tests/actions/gpm_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 300
[]
[GlobalParams]
op_num = 1
var_name_base = eta
[]
[Variables]
[./w]
[../]
[./phi]
[../]
[./eta0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[ICs]
[./IC_w]
type = BoundingBoxIC
variable = w
x1 = 150
x2 = 300
y1 = 0
y2 = 0
inside = 0.1
outside = 0
[../]
[./IC_phi]
type = BoundingBoxIC
variable = phi
x1 = 0
x2 = 150
y1 = 0
y2 = 0
inside = 1
outside = 0
[../]
[./IC_eta0]
type = BoundingBoxIC
variable = eta0
x1 = 150
x2 = 300
y1 = 0
y2 = 0
inside = 1
outside = 0
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
[../]
[]
[Modules]
[./PhaseField]
[./GrandPotential]
switching_function_names = 'hb hm'
chemical_potentials = 'w'
anisotropic = 'false'
mobilities = 'chiD'
susceptibilities = 'chi'
free_energies_w = 'rhob rhom'
gamma_gr = gamma
mobility_name_gr = L
kappa_gr = kappa
free_energies_gr = 'omegab omegam'
additional_ops = 'phi'
gamma_grxop = gamma
mobility_name_op = L_phi
kappa_op = kappa
free_energies_op = 'omegab omegam'
[../]
[../]
[]
[Materials]
#REFERENCES
[./constants]
type = GenericConstantMaterial
prop_names = 'Va cb_eq cm_eq kb km mu gamma L L_phi kappa kB'
prop_values = '0.04092 1.0 1e-5 1400 140 1.5 1.5 5.3e+3 2.3e+4 295.85 8.6173324e-5'
[../]
#SWITCHING FUNCTIONS
[./switchb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'phi eta0'
phase_etas = 'phi'
[../]
[./switchm]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hm
all_etas = 'phi eta0'
phase_etas = 'eta0'
[../]
[./omegab]
type = DerivativeParsedMaterial
property_name = omegab
coupled_variables = 'w phi'
material_property_names = 'Va kb cb_eq'
expression = '-0.5*w^2/Va^2/kb - w/Va*cb_eq'
derivative_order = 2
[../]
[./omegam]
type = DerivativeParsedMaterial
property_name = omegam
coupled_variables = 'w eta0'
material_property_names = 'Va km cm_eq'
expression = '-0.5*w^2/Va^2/km - w/Va*cm_eq'
derivative_order = 2
[../]
[./chi]
type = DerivativeParsedMaterial
property_name = chi
coupled_variables = 'w'
material_property_names = 'Va hb hm kb km'
expression = '(hm/km + hb/kb)/Va^2'
derivative_order = 2
[../]
#DENSITIES/CONCENTRATION
[./rhob]
type = DerivativeParsedMaterial
property_name = rhob
coupled_variables = 'w'
material_property_names = 'Va kb cb_eq'
expression = 'w/Va^2/kb + cb_eq/Va'
derivative_order = 1
[../]
[./rhom]
type = DerivativeParsedMaterial
property_name = rhom
coupled_variables = 'w eta0'
material_property_names = 'Va km cm_eq(eta0)'
expression = 'w/Va^2/km + cm_eq/Va'
derivative_order = 1
[../]
[./concentration]
type = ParsedMaterial
property_name = c
material_property_names = 'rhom hm rhob hb Va'
expression = 'Va*(hm*rhom + hb*rhob)'
outputs = exodus
[../]
[./mobility]
type = DerivativeParsedMaterial
material_property_names = 'chi kB'
constant_names = 'T Em D0'
constant_expressions = '1400 2.4 1.25e2'
property_name = chiD
expression = 'chi*D0*exp(-Em/kB/T)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = ' asm lu 1 31 preonly'
nl_max_its = 20
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-7
nl_abs_tol = 1e-7
start_time = 0
dt = 2e-5
num_steps = 3
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_with_density.i)
# Simple equilibrium reaction example with fluid density and gravity included
# in calculation of the Darcy velocity. For details about reaction network,
# see documentation in 2species.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./pressure]
order = FIRST
family = LAGRANGE
initial_condition = 1
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
a + b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
gravity = '-1 0 0'
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
gravity = '-1 0 0'
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
gravity = '-1 0 0'
[../]
[./p]
type = DarcyFluxPressure
variable = pressure
gravity = '-1 0 0'
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
preset = false
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
preset = false
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[./pleft]
type = DirichletBC
variable = pressure
preset = false
value = 2
boundary = left
[../]
[./pright]
type = DirichletBC
variable = pressure
preset = false
value = 1
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity density'
prop_values = '1e-4 1e-4 0.2 4'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep.i)
# 1x1x1 unit cube with uniform pressure on top face and 2 phases with different materials
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 6
zmax = 1
xmax = 1
ymax = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[ICs]
[phase1IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 1
outside = 0
variable = phase1
int_width=0.01
[]
[phase2IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 0
outside = 1
variable = phase2
int_width=0.01
[]
[]
[AuxVariables]
[phase1]
[]
[phase2]
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = Pressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor1]
type = ComputeIsotropicElasticityTensor
base_name = C1
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[elasticity_tensor2]
type = ComputeIsotropicElasticityTensor
base_name = C2
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[h1]
type = ParsedMaterial
property_name = h1
coupled_variables = phase1
expression = '0.5*tanh(20*(phase1-0.5))+0.5'
[]
[h2]
type = ParsedMaterial
property_name = h2
coupled_variables = phase2
expression = '0.5*tanh(20*(phase2-0.5))+0.5'
[]
[./C]
type = CompositeElasticityTensor
coupled_variables = 'phase1 phase2'
tensors = 'C1 C2'
weights = 'h1 h2'
[../]
[radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
tangent_operator = elastic
[]
[power_law_creep]
type = CompositePowerLawCreepStressUpdate
coefficient = '1.0e-15 2.0e-18'
n_exponent = '4 5'
activation_energy = '3.0e5 3.5e5'
switching_functions = 'h1 h2'
temperature = temp
[]
[]
[VectorPostprocessors]
[./soln]
type = LineValueSampler
warn_discontinuous_face_values = false
sort_by = x
variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz'
start_point = '0 0 0.0'
end_point = '1.0 1.0 1.0'
num_points = 5
outputs = tests
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-9
nl_abs_tol = 1.0e-9
l_tol = 1e-10
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]
[Outputs]
exodus = false
[./tests]
type = CSV
execute_on = final
[../]
[]
(modules/chemical_reactions/test/tests/parser/equilibrium_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[ICs]
[./a]
type = BoundingBoxIC
variable = a
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./b]
type = BoundingBoxIC
variable = b
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
(1.0)a + (1.0)b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 10
dt = 10
[]
[Outputs]
file_base = equilibrium_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_objects2.i)
# This input file contains some objects only available through heat_transfer
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
xmax = 50
ymax = 25
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[c]
order = THIRD
family = HERMITE
[]
[]
[ICs]
[c_IC]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[]
[]
[Kernels]
[ie_c]
type = TimeDerivative
variable = c
[]
[d]
type = Diffusion
variable = c
[]
[s]
type = HeatSource
variable = c
[]
[]
[BCs]
[Periodic]
[all]
auto_direction = 'x y'
[]
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Problem]
register_objects_from = 'HeatTransferApp'
library_path = '../../../../../heat_transfer/lib'
[]
(modules/porous_flow/test/tests/chemistry/2species_equilibrium_2phase.i)
# Using a two-phase system (see 2species_equilibrium for the single-phase)
# The saturations, porosity, mass fractions, tortuosity and diffusion coefficients are chosen so that the results are identical to 2species_equilibrium
#
# PorousFlow analogy of chemical_reactions/test/tests/aqueous_equilibrium/2species.i
#
# Simple equilibrium reaction example to illustrate the use of PorousFlowMassFractionAqueousEquilibriumChemistry
#
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction:
#
# reactions = '2a = pa2 rate = 10^2
# a + b = pab rate = 10^-2'
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[a]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[b]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 1E2
[]
[eqm_k1]
initial_condition = 1E-2
[]
[pressure0]
[]
[saturation1]
initial_condition = 0.25
[]
[a_in_phase0]
initial_condition = 0.0
[]
[b_in_phase0]
initial_condition = 0.0
[]
[pa2]
family = MONOMIAL
order = CONSTANT
[]
[pab]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pa2]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 0
variable = pa2
[]
[pab]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 1
variable = pab
[]
[]
[ICs]
[pressure0]
type = FunctionIC
variable = pressure0
function = 2-x
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Kernels]
[mass_a]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = a
[]
[flux_a]
type = PorousFlowAdvectiveFlux
variable = a
fluid_component = 0
[]
[diff_a]
type = PorousFlowDispersiveFlux
variable = a
fluid_component = 0
disp_trans = '0 0'
disp_long = '0 0'
[]
[mass_b]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = b
[]
[flux_b]
type = PorousFlowAdvectiveFlux
variable = b
fluid_component = 1
[]
[diff_b]
type = PorousFlowDispersiveFlux
variable = b
fluid_component = 1
disp_trans = '0 0'
disp_long = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 2
number_fluid_components = 3
number_aqueous_equilibrium = 2
aqueous_phase_number = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9 # huge, so mimic chemical_reactions
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
capillary_pressure = pc
phase0_porepressure = pressure0
phase1_saturation = saturation1
[]
[massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'a_in_phase0 b_in_phase0 a b'
num_reactions = 2
equilibrium_constants = 'eqm_k0 eqm_k1'
primary_activity_coefficients = '1 1'
secondary_activity_coefficients = '1 1'
reactions = '2 0
1 1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.8
[]
[permeability]
type = PorousFlowPermeabilityConst
# porous_flow permeability / porous_flow viscosity = chemical_reactions conductivity = 1E-4
permeability = '1E-7 0 0 0 1E-7 0 0 0 1E-7'
[]
[relp0]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[relp1]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[diff]
type = PorousFlowDiffusivityConst
# porous_flow diffusion_coeff * tortuousity * porosity = chemical_reactions diffusivity = 1E-4
diffusion_coeff = '5E-4 5E-4 5E-4
5E-4 5E-4 5E-4'
tortuosity = '0.25 0.25'
[]
[]
[BCs]
[a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[]
[b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 10
end_time = 100
[]
[Outputs]
print_linear_residuals = true
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/centroid.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[c]
[]
[w]
[]
[eta]
[]
[]
[ICs]
[rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[]
[rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[]
[]
[Kernels]
[c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[]
[w_res]
type = SplitCHWRes
variable = w
mob_name = M
[]
[time]
type = CoupledTimeDerivative
variable = w
v = c
[]
[eta_dot]
type = TimeDerivative
variable = eta
[]
[acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[]
[acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[]
[]
[Materials]
[pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[]
[free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[]
[]
[Postprocessors]
[grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'timestep_begin'
[]
[]
[VectorPostprocessors]
[grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'timestep_begin'
output_centroids = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.2
num_steps = 4
[]
[Outputs]
csv = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[./pab]
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = 2
[../]
[./pabeq]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
sto_v = '1 1'
log_k = -2
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
p = pressure
[../]
[./a2eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/combined/test/tests/linear_elasticity/extra_stress.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 128
ny = 1
xmax = 3.2
ymax = 0.025
elem_type = QUAD4
[]
[Physics/SolidMechanics/QuasiStatic/All]
add_variables = true
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy'
[]
[AuxVariables]
[./c]
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
variable = c
x1 = -1
y1 = -1
x2 = 1.6
y2 = 1
inside = 0
outside = 1
block = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '104 74 74 104 74 104 47.65 47.65 47.65'
fill_method = symmetric9
base_name = matrix
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
base_name = matrix
[../]
[./strain]
type = ComputeSmallStrain
block = 0
base_name = matrix
[../]
[./elasticity_tensor_ppt]
type = ComputeElasticityTensor
block = 0
C_ijkl = '0.104 0.074 0.074 0.104 0.074 0.104 0.04765 0.04765 0.04765'
fill_method = symmetric9
base_name = ppt
[../]
[./stress_ppt]
type = ComputeLinearElasticStress
block = 0
base_name = ppt
[../]
[./strain_ppt]
type = ComputeSmallStrain
block = 0
base_name = ppt
[../]
[./const_stress]
type = ComputeExtraStressConstant
block = 0
base_name = ppt
extra_stress_tensor = '-0.288 -0.373 -0.2747 0 0 0'
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = ppt
[../]
[./switching]
type = SwitchingFunctionMaterial
eta = c
[../]
[]
[BCs]
active = 'left_x right_x bottom_y top_y'
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_plasticity.i)
# 1x1x1 unit cube with uniform pressure on top face and 2 phases with different materials
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 6
zmax = 1
xmax = 1
ymax = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[ICs]
[phase1IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 1
outside = 0
variable = phase1
int_width=0.01
[]
[phase2IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 0
outside = 1
variable = phase2
int_width=0.01
[]
[]
[AuxVariables]
[phase1]
[]
[phase2]
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = Pressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor1]
type = ComputeIsotropicElasticityTensor
base_name = C1
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[elasticity_tensor2]
type = ComputeIsotropicElasticityTensor
base_name = C2
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[h1]
type = ParsedMaterial
property_name = h1
coupled_variables = phase1
expression = '0.5*tanh(20*(phase1-0.5))+0.5'
[]
[h2]
type = ParsedMaterial
property_name = h2
coupled_variables = phase2
expression = '0.5*tanh(20*(phase2-0.5))+0.5'
[]
[./C]
type = CompositeElasticityTensor
coupled_variables = 'phase1 phase2'
tensors = 'C1 C2'
weights = 'h1 h2'
[../]
[radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'power_law_creep plas'
tangent_operator = elastic
[]
[power_law_creep]
type = CompositePowerLawCreepStressUpdate
coefficient = '1.0e-15 2.0e-18'
n_exponent = '4 5'
activation_energy = '3.0e5 3.5e5'
switching_functions = 'h1 h2'
temperature = temp
[]
[./plas]
type = IsotropicPlasticityStressUpdate
hardening_constant = 1
yield_stress = 1e30
[../]
[]
[VectorPostprocessors]
[./soln]
type = LineValueSampler
warn_discontinuous_face_values = false
sort_by = x
variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz'
start_point = '0 0 0.0'
end_point = '1.0 1.0 1.0'
num_points = 5
outputs = tests
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-9
nl_abs_tol = 1.0e-9
l_tol = 1e-10
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]
[Outputs]
exodus = false
[./tests]
type = CSV
execute_on = final
[../]
[]
(modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
# Example of reactive transport model with precipitation and dissolution.
# Calcium (ca2) and bicarbonate (hco3) reaction to form calcite (CaCO3).
# Models bicarbonate injection following calcium injection, so that a
# moving reaction front forms a calcite precipitation zone. As the front moves,
# the upstream side of the front continues to form calcite via precipitation,
# while at the downstream side, dissolution of the solid calcite occurs.
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a) h+ + hco3- = CO2(aq), Keq = 10^(6.341)
# b) hco3- = h+ + CO23-, Keq = 10^(-10.325)
# c) ca2+ + hco3- = h+ + CaCO3(aq), Keq = 10^(-7.009)
# d) ca2+ + hco3- = cahco3+, Keq = 10^(-0.653)
# e) ca2+ = h+ + CaOh+, Keq = 10^(-12.85)
# f) - h+ = oh-, Keq = 10^(-13.991)
#
# Kinetic reactions
# g) ca2+ + hco3- = h+ + CaCO3(s), A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
# Keq = 10^(1.8487)
#
# The primary chemical species are h+, hco3- and ca2+. The pressure gradient is fixed,
# and a conservative tracer is also included.
#
# This example is taken from:
# Guo et al, A parallel, fully coupled, fully implicit solution to reactive
# transport in porous media using the preconditioned Jacobian-Free Newton-Krylov
# Method, Advances in Water Resources, 53, 101-108 (2013).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
xmax = 1
ymax = 0.25
[]
[Variables]
[./tracer]
[../]
[./ca2+]
[../]
[./h+]
initial_condition = 1.0e-7
scaling = 1e6
[../]
[./hco3-]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure_ic]
type = FunctionIC
variable = pressure
function = pic
[../]
[./hco3_ic]
type = BoundingBoxIC
variable = hco3-
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[../]
[./ca2_ic]
type = BoundingBoxIC
variable = ca2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 1.0e-6
outside = 5.0e-2
[../]
[./tracer_ic]
type = BoundingBoxIC
variable = tracer
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 1.0
outside = 0.0
[../]
[]
[Functions]
[./pic]
type = ParsedFunction
expression = 60-50*x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'ca2+ hco3- h+'
secondary_species = 'co2_aq co32- caco3_aq cahco3+ caoh+ oh-'
pressure = pressure
reactions = 'h+ + hco3- = co2_aq 6.341,
hco3- - h+ = co32- -10.325,
ca2+ + hco3- - h+ = caco3_aq -7.009,
ca2+ + hco3- = cahco3+ -0.653,
ca2+ - h+ = caoh+ -12.85,
- h+ = oh- -13.991'
[../]
[./SolidKineticReactions]
primary_species = 'ca2+ hco3- h+'
kin_reactions = 'ca2+ + hco3- - h+ = caco3_s'
secondary_species = caco3_s
log10_keq = 1.8487
reference_temperature = 298.15
system_temperature = 298.15
gas_constant = 8.314
specific_reactive_surface_area = 4.61e-4
kinetic_rate_constant = 6.456542e-7
activation_energy = 1.5e4
[../]
[]
[Kernels]
[./tracer_ie]
type = PrimaryTimeDerivative
variable = tracer
[../]
[./tracer_pd]
type = PrimaryDiffusion
variable = tracer
[../]
[./tracer_conv]
type = PrimaryConvection
variable = tracer
p = pressure
[../]
[./ca2+_ie]
type = PrimaryTimeDerivative
variable = ca2+
[../]
[./ca2+_pd]
type = PrimaryDiffusion
variable = ca2+
[../]
[./ca2+_conv]
type = PrimaryConvection
variable = ca2+
p = pressure
[../]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[./h+_pd]
type = PrimaryDiffusion
variable = h+
[../]
[./h+_conv]
type = PrimaryConvection
variable = h+
p = pressure
[../]
[./hco3-_ie]
type = PrimaryTimeDerivative
variable = hco3-
[../]
[./hco3-_pd]
type = PrimaryDiffusion
variable = hco3-
[../]
[./hco3-_conv]
type = PrimaryConvection
variable = hco3-
p = pressure
[../]
[]
[BCs]
[./tracer_left]
type = DirichletBC
variable = tracer
boundary = left
value = 1.0
[../]
[./tracer_right]
type = ChemicalOutFlowBC
variable = tracer
boundary = right
[../]
[./ca2+_left]
type = SinDirichletBC
variable = ca2+
boundary = left
initial = 5.0e-2
final = 1.0e-6
duration = 1
[../]
[./ca2+_right]
type = ChemicalOutFlowBC
variable = ca2+
boundary = right
[../]
[./hco3-_left]
type = SinDirichletBC
variable = hco3-
boundary = left
initial = 1.0e-6
final = 5.0e-2
duration = 1
[../]
[./hco3-_right]
type = ChemicalOutFlowBC
variable = hco3-
boundary = right
[../]
[./h+_left]
type = DirichletBC
variable = h+
boundary = left
value = 1.0e-7
[../]
[./h+_right]
type = ChemicalOutFlowBC
variable = h+
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-7 2e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 50
l_tol = 1e-5
nl_max_its = 10
nl_rel_tol = 1e-5
end_time = 10
[./TimeStepper]
type = ConstantDT
dt = 0.1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
perf_graph = true
exodus = true
[]
(modules/porous_flow/test/tests/chemistry/2species_equilibrium.i)
# PorousFlow analogy of chemical_reactions/test/tests/aqueous_equilibrium/2species.i
#
# Simple equilibrium reaction example to illustrate the use of PorousFlowMassFractionAqueousEquilibriumChemistry
#
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction:
#
# reactions = '2a = pa2 rate = 10^2
# a + b = pab rate = 10^-2'
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[a]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[b]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 1E2
[]
[eqm_k1]
initial_condition = 1E-2
[]
[pressure]
[]
[pa2]
family = MONOMIAL
order = CONSTANT
[]
[pab]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pa2]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 0
variable = pa2
[]
[pab]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 1
variable = pab
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 2-x
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Kernels]
[mass_a]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = a
[]
[flux_a]
type = PorousFlowFullySaturatedDarcyFlow
variable = a
fluid_component = 0
[]
[diff_a]
type = PorousFlowDispersiveFlux
variable = a
fluid_component = 0
disp_trans = 0
disp_long = 0
[]
[mass_b]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = b
[]
[flux_b]
type = PorousFlowFullySaturatedDarcyFlow
variable = b
fluid_component = 1
[]
[diff_b]
type = PorousFlowDispersiveFlux
variable = b
fluid_component = 1
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_equilibrium = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9 # huge, so mimic chemical_reactions
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[]
[massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'a b'
num_reactions = 2
equilibrium_constants = 'eqm_k0 eqm_k1'
primary_activity_coefficients = '1 1'
secondary_activity_coefficients = '1 1'
reactions = '2 0
1 1'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
# porous_flow permeability / porous_flow viscosity = chemical_reactions conductivity = 1E-4
permeability = '1E-7 0 0 0 1E-7 0 0 0 1E-7'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[diff]
type = PorousFlowDiffusivityConst
# porous_flow diffusion_coeff * tortuousity * porosity = chemical_reactions diffusivity = 1E-4
diffusion_coeff = '5E-4 5E-4 5E-4'
tortuosity = 1.0
[]
[]
[BCs]
[a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[]
[b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 10
end_time = 100
[]
[Outputs]
print_linear_residuals = true
exodus = true
perf_graph = true
hide = eqm_k0
[]
(test/tests/indicators/value_jump_indicator/value_jump_indicator_fv.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Adaptivity]
[Indicators]
[error]
type = ValueJumpIndicator
variable = something
[]
[]
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[ICs]
[leftright]
type = BoundingBoxIC
variable = something
inside = 1
y2 = 1
y1 = 0
x2 = 0.5
x1 = 0
[]
[]
[AuxVariables]
[something]
order = CONSTANT
family = MONOMIAL
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = coeff
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = FVDirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
exodus = true
[]
(modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/phase_field_sub.i)
# This input file contains objects only available in phase_field
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[./InitialCondition]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[../]
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
block = 0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/tutorials/spinodal_decomposition/s2_fasttest.i)
#
# Simulation of an iron-chromium alloy using simple code and a test set of
# initial conditions.
#
[Mesh]
# generate a 2D, 25nm x 25nm mesh
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 100
ny = 100
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
# Use a bounding box IC at equilibrium concentrations to make sure the
# model behaves as expected.
[./testIC]
type = BoundingBoxIC
variable = c
x1 = 5
x2 = 20
y1 = 5
y2 = 20
inside = 0.823
outside = 0.236
[../]
[]
[BCs]
# periodic BC as is usually done on phase-field models
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# See wiki page "Developing Phase Field Models" for more information on Split
# Cahn-Hilliard equation kernels.
# https://mooseframework.inl.gov/wiki/PhysicsModules/PhaseField/DevelopingModels/
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the materials and
# must have the same value in each one.
[./constants]
# Define constant values kappa_c and M. Eventually M will be replaced with
# an equation rather than a constant.
type = GenericFunctionMaterial
prop_names = 'kappa_c M'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27
2.2841e-26*1e+09^2/6.24150934e+18/1e-27'
# kappa_c*eV_J*nm_m^2*d
# M*nm_m^2/eV_J/d
[../]
[./local_energy]
# Defines the function for the local free energy density as given in the
# problem, then converts units and adds scaling factor.
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[]
[Postprocessors]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
# Preconditioning is required for Newton's method. See wiki page "Solving
# Phase Field Models" for more information.
# https://mooseframework.inl.gov/wiki/PhysicsModules/PhaseField/SolvingModels/
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 86400 # 1 day. We only need to run this long enough to verify
# the model is working properly.
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
# Turn on time stepping
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_motion2.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vadvx]
order = CONSTANT
family = MONOMIAL
[../]
[./vadvy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[AuxKernels]
[./vadv_x]
type = GrainAdvectionAux
component = x
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvx
[../]
[./vadv_y]
type = GrainAdvectionAux
component = y
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvy
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = 'initial timestep_begin'
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = 'initial timestep_begin'
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = FauxGrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'initial linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '0.0 0.0 10.0 '
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
nl_max_its = 30
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.5
num_steps = 1
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(test/tests/ics/bounding_box_ic/bounding_box_ic_diffuse_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
uniform_refine = 3
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.1
y1 = 0.1
x2 = 0.6
y2 = 0.6
inside = 2.3
outside = 4.6
int_width = 0.2
[../]
[../]
[]
[AuxVariables]
active = 'u_aux'
[./u_aux]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.1
y1 = 0.1
x2 = 0.6
y2 = 0.6
inside = 1.34
outside = 6.67
int_width = 0.2
[../]
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/indicators/value_jump_indicator/vec_value_jump_indicator.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[Adaptivity]
[./Indicators]
[./error]
type = VectorValueJumpIndicator
variable = something
[../]
[../]
[]
[ICs]
[./leftright_1]
type = BoundingBoxIC
variable = something_1
inside = 1
y2 = 0.5
y1 = 0
x2 = 0.5
x1 = 0
[../]
[]
[AuxVariables]
[./something]
type = VectorMooseVariable
order = CONSTANT
family = MONOMIAL_VEC
[../]
[./something_1]
order = CONSTANT
family = MONOMIAL
outputs = 'none'
[../]
[]
[AuxKernels]
[something]
type = ParsedVectorAux
variable = something
coupled_variables = 'something_1'
expression_x = 'something_1'
expression_y = '0.0'
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
solve_type = PJFNK
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_single_material.i)
# 1x1x1 unit cube with uniform pressure on top face and 2 phases but the same material
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 6
zmax = 1
xmax = 1
ymax = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[ICs]
[phase1IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 1
outside = 0
variable = phase1
int_width=0.01
[]
[phase2IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 0
outside = 1
variable = phase2
int_width=0.01
[]
[]
[AuxVariables]
[phase1]
[]
[phase2]
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = Pressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor1]
type = ComputeIsotropicElasticityTensor
base_name = C1
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[elasticity_tensor2]
type = ComputeIsotropicElasticityTensor
base_name = C2
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[h1]
type = ParsedMaterial
property_name = h1
coupled_variables = phase1
expression = '0.5*tanh(20*(phase1-0.5))+0.5'
[]
[h2]
type = ParsedMaterial
property_name = h2
coupled_variables = phase2
expression = '0.5*tanh(20*(phase2-0.5))+0.5'
[]
[./C]
type = CompositeElasticityTensor
coupled_variables = 'phase1 phase2'
tensors = 'C1 C2'
weights = 'h1 h2'
[../]
[radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
tangent_operator = elastic
[]
[power_law_creep]
type = CompositePowerLawCreepStressUpdate
coefficient = '1.0e-15 1.0e-15'
n_exponent = '4 4'
activation_energy = '3.0e5 3.0e5'
switching_functions = 'h1 h2'
temperature = temp
[]
[]
[VectorPostprocessors]
[./soln]
type = LineValueSampler
warn_discontinuous_face_values = false
sort_by = x
variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz'
start_point = '0 0 0.0'
end_point = '1.0 1.0 1.0'
num_points = 5
outputs = tests
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-9
nl_abs_tol = 1.0e-9
l_tol = 1e-10
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]
[Outputs]
exodus = false
[./tests]
type = CSV
execute_on = final
[../]
[]
(modules/phase_field/examples/rigidbodymotion/AC_CH_advection_constforce_rect.i)
#
# Tests the Rigid Body Motion of grains due to applied forces.
# Concenterated forces and torques have been applied and corresponding
# advection velocities are calculated.
# Grain motion kernels make the grains translate and rotate as a rigidbody,
# applicable to grain movement in porous media
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 25
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vadvx]
order = CONSTANT
family = MONOMIAL
[../]
[./vadvy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
# advection kernel corrsponding to CH equation
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
# advection kernel corrsponding to AC equation
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[AuxKernels]
[./vadv_x]
type = GrainAdvectionAux
component = x
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvx
[../]
[./vadv_y]
type = GrainAdvectionAux
component = y
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvy
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[VectorPostprocessors]
[./forces]
# VectorPostprocessor for outputting grain forces and torques
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '0.2 0.0 0.0 ' # size should be 3 * no. of grains
torque = '0.0 0.0 5.0 ' # size should be 3 * no. of grains
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
nl_max_its = 30
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.1
end_time = 10
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, a single primary species a is transported by diffusion and convection
# from the left of the porous medium, reacting to form an equilibrium species pa2 according to
# the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 1'
#
# where the 2 is the weight of the equilibrium species, and the 1 refers to the equilibrium
# constant (log10(Keq) = 1).
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for this AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1e-2
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
variable = a
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = a
reactions = '2a = pa2 1'
secondary_species = pa2
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[]
[BCs]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 1species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(test/tests/ics/from_exodus_solution/nodal_part2.i)
# Use the exodus file for restarting the problem:
# - restart one variable
# - and have one extra variable with IC
#
[Mesh]
file = out_nodal_part1.e
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[]
[forcing_fn]
type = ParsedFunction
expression = -4
[]
[]
[Variables]
active = 'u v'
[u]
order = FIRST
family = LAGRANGE
initial_from_file_var = u
initial_from_file_timestep = 6
[]
[v]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
x2 = 1.0
y1 = 0.0
y2 = 1.0
inside = 3.0
outside = 1.0
[]
[]
[]
[Problem]
allow_initial_conditions_with_restart = true
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[left_v]
type = DirichletBC
variable = v
boundary = '3'
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_nodal_var_restart
exodus = true
[]
(modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
xmax = 50
ymin = 25
ymax = 50
[]
[Variables]
[./op]
[../]
[./v]
[../]
[]
[ICs]
[./op_IC]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 15.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
variable = op
[../]
[./v_IC]
type = BoundingBoxIC
x1 = 0.0
x2 = 25.0
y1 = 0.0
y2 = 50.0
inside = 1.0
outside = 0.0
variable = v
[../]
[]
[Kernels]
[./op_dot]
type = TimeDerivative
variable = op
[../]
[./op_bulk]
type = AllenCahn
variable = op
f_name = F
mob_name = L
coupled_variables = v
[../]
[./op_interface]
type = ACInterface
variable = op
kappa_name = 1
mob_name = L
coupled_variables = v
[../]
[./v_dot]
type = TimeDerivative
variable = v
[../]
[./v_diff]
type = MatDiffusion
variable = v
diffusivity = 50.0
[../]
[]
[Materials]
[./consts]
type = DerivativeParsedMaterial
property_name = L
expression = 'l:=0.1+1*(v+op)^2; if(l<0.01, 0.01, l)'
coupled_variables = 'op v'
outputs = exodus
output_properties = 'L dL/dop dL/dv'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'op'
expression = '2*op^2*(1-op)^2 - 0.2*op'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 15
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 0.2
[]
[Outputs]
time_step_interval = 5
print_linear_residuals = false
exodus = true
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -2
xmax = 2
ymin = -2
ymax = 2
uniform_refine = 2
[]
[GlobalParams]
x1 = -2
y1 = -2
x2 = 2
y2 = -1.5
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
#Temperature
[./T]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[./T]
type = FunctionAux
function = 95.0+2.0*(y-1.0*t)
variable = T
execute_on = 'initial timestep_begin'
[../]
[]
[ICs]
[./w]
type = BoundingBoxIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outside = -4.0
inside = 0.0
[../]
[./etaa0]
type = BoundingBoxIC
variable = etaa0
#Solid phase
outside = 0.0
inside = 1.0
[../]
[./etab0]
type = BoundingBoxIC
variable = etab0
#Liquid phase
outside = 1.0
inside = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w T'
property_name = omegab
material_property_names = 'Vm kb cbeq S Tm'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq-S*(T-Tm)'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 100.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
end_time = 2.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 3
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 10
exodus = true
[]
(modules/phase_field/test/tests/actions/both_direct_2vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 9
ny = 6
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = F
mobility = 1.0
kappa = 20.0
coupled_variables = 'eta'
solve_type = direct
[../]
[../]
[./Nonconserved]
[./eta]
free_energy = F
mobility = 1.0
kappa = 20
coupled_variables = 'c'
family = HERMITE
order = THIRD
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
variable = c
x1 = 10
x2 = 25
y1 = 15
y2 = 35
inside = 0.1
outside = 0.9
[../]
[./eta_IC]
type = ConstantIC
variable = eta
value = 0.5
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta c'
expression = '(1 - eta)*10.0*(c - 0.1)^2 + eta*(8.0*(c - 0.9)^2) + 10.0*eta^2*(1-eta)^2'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 5
dt = 0.05
[]
[Outputs]
perf_graph = true
[./out]
type = Exodus
refinements = 2
[../]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * An AuxVariable named 'pab' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for each AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
a + b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/porous_flow/examples/tutorial/13.i)
# Example of reactive transport model with dissolution of dolomite
#
# The equilibrium system has 5 primary species (Variables) and
# 5 secondary species (PorousFlowMassFractionAqueousEquilibrium).
# Some of the equilibrium constants have been chosen rather arbitrarily.
#
# Equilibrium reactions
# H+ + HCO3- = CO2(aq)
# -H+ + HCO3- = CO32-
# HCO3- + Ca2+ = CaHCO3+
# HCO3- + Mg2+ = MgHCO3+
# HCO3- + Fe2+ = FeHCO3+
#
# The kinetic reaction that dissolves dolomite involves all 5 primary species.
#
# -2H+ + 2HCO3- + Ca2+ + 0.8Mg2+ + 0.2Fe2+ = CaMg0.8Fe0.2(CO3)2
#
# The initial concentration of precipitated dolomite is high, so it starts
# to dissolve immediately, increasing the concentrations of the primary species.
#
# Only single-phase, fully saturated physics is used.
# The pressure gradient is fixed, so that the Darcy velocity is 0.1m/s.
#
# Primary species are injected from the left side, and they flow to the right.
# Less dolomite dissolution therefore occurs on the left side (where
# the primary species have higher concentration).
#
# This test is more fully documented in tutorial_13
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
[]
[Variables]
[h+]
[]
[hco3-]
[]
[ca2+]
[]
[mg2+]
[]
[fe2+]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 2.19E6
[]
[eqm_k1]
initial_condition = 4.73E-11
[]
[eqm_k2]
initial_condition = 0.222
[]
[eqm_k3]
initial_condition = 1E-2
[]
[eqm_k4]
initial_condition = 1E-3
[]
[kinetic_k]
initial_condition = 326.2
[]
[pressure]
[]
[dolomite]
family = MONOMIAL
order = CONSTANT
[]
[dolomite_initial]
initial_condition = 1E-7
[]
[]
[AuxKernels]
[dolomite]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = dolomite
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[ICs]
[pressure_ic]
type = FunctionIC
variable = pressure
function = '(1 - x) * 1E6'
[]
[h+_ic]
type = BoundingBoxIC
variable = h+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[hco3_ic]
type = BoundingBoxIC
variable = hco3-
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[ca2_ic]
type = BoundingBoxIC
variable = ca2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[mg2_ic]
type = BoundingBoxIC
variable = mg2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[fe2_ic]
type = BoundingBoxIC
variable = fe2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[]
[Kernels]
[h+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = h+
[]
[h+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = h+
[]
[predis_h+]
type = PorousFlowPreDis
variable = h+
mineral_density = 2875.0
stoichiometry = -2
[]
[hco3-_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = hco3-
[]
[hco3-_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = hco3-
[]
[predis_hco3-]
type = PorousFlowPreDis
variable = hco3-
mineral_density = 2875.0
stoichiometry = 2
[]
[ca2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = ca2+
[]
[ca2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = ca2+
[]
[predis_ca2+]
type = PorousFlowPreDis
variable = ca2+
mineral_density = 2875.0
stoichiometry = 1
[]
[mg2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 3
variable = mg2+
[]
[mg2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 3
variable = mg2+
[]
[predis_mg2+]
type = PorousFlowPreDis
variable = mg2+
mineral_density = 2875.0
stoichiometry = 0.8
[]
[fe2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 4
variable = fe2+
[]
[fe2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 4
variable = fe2+
[]
[predis_fe2+]
type = PorousFlowPreDis
variable = fe2+
mineral_density = 2875.0
stoichiometry = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'h+ hco3- ca2+ mg2+ fe2+'
number_fluid_phases = 1
number_fluid_components = 6
number_aqueous_equilibrium = 5
number_aqueous_kinetic = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
viscosity = 1E-3
[]
[]
[BCs]
[hco3-_left]
type = DirichletBC
variable = hco3-
boundary = left
value = 5E-2
[]
[h+_left]
type = DirichletBC
variable = h+
boundary = left
value = 5E-2
[]
[ca2+_left]
type = DirichletBC
variable = ca2+
boundary = left
value = 5E-2
[]
[mg2+_left]
type = DirichletBC
variable = mg2+
boundary = left
value = 5E-2
[]
[fe2+_left]
type = DirichletBC
variable = fe2+
boundary = left
value = 5E-2
[]
[hco3-_right]
type = DirichletBC
variable = hco3-
boundary = right
value = 1E-6
[]
[h+_right]
type = DirichletBC
variable = h+
boundary = right
value = 1e-6
[]
[ca2+_right]
type = DirichletBC
variable = ca2+
boundary = right
value = 1E-6
[]
[mg2+_right]
type = DirichletBC
variable = mg2+
boundary = right
value = 1E-6
[]
[fe2+_right]
type = DirichletBC
variable = fe2+
boundary = right
value = 1E-6
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 298.15
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[]
[equilibrium_massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'h+ hco3- ca2+ mg2+ fe2+'
num_reactions = 5
equilibrium_constants = 'eqm_k0 eqm_k1 eqm_k2 eqm_k3 eqm_k4'
primary_activity_coefficients = '1 1 1 1 1'
secondary_activity_coefficients = '1 1 1 1 1'
reactions = '1 1 0 0 0
-1 1 0 0 0
0 1 1 0 0
0 1 0 1 0
0 1 0 0 1'
[]
[kinetic]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'h+ hco3- ca2+ mg2+ fe2+'
num_reactions = 1
equilibrium_constants = kinetic_k
primary_activity_coefficients = '1 1 1 1 1'
reactions = '-2 2 1 0.8 0.2'
specific_reactive_surface_area = '1.2E-8'
kinetic_rate_constant = '3E-4'
activation_energy = '1.5e4'
molar_volume = 64365.0
gas_constant = 8.314
reference_temperature = 298.15
[]
[dolomite_conc]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = dolomite_initial
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1
[]
[]
[Preconditioning]
active = basic
[basic]
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 lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_motion.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '0.0 0.0 10.0 '
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
nl_max_its = 30
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.2
num_steps = 1
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(test/tests/mesh/adapt/initial_adaptivity_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = -2
y1 = -2
x2 = 0
y2 = 2
inside = 1
outside = 0
[../]
[../]
[]
[Kernels]
[./udiff]
type = Diffusion
variable = u
[../]
[./forcing_fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Adaptivity]
initial_adaptivity = 5
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/actions/both_split_2vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 28
ny = 20
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = F
mobility = 1.0
kappa = 20.0
coupled_variables = 'eta'
solve_type = REVERSE_SPLIT
[../]
[../]
[./Nonconserved]
[./eta]
free_energy = F
mobility = 1.0
kappa = 20
coupled_variables = 'c'
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
variable = c
x1 = 10
x2 = 25
y1 = 15
y2 = 35
inside = 0.15
outside = 0.85
[../]
[./eta_IC]
type = ConstantIC
variable = eta
value = 0.5
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta c'
expression = '(1 - eta)*10.0*(c - 0.1)^2 + eta*(8.0*(c - 0.9)^2) + 10.0*eta^2*(1-eta)^2'
outputs = exodus
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 10
dt = 0.05
[]
[Outputs]
perf_graph = true
exodus = true
[]
(modules/phase_field/test/tests/rigidbodymotion/update_orientation_verify.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 3
nx = 14
ny = 7
nz = 7
xmax = 40
ymax = 25
zmax = 25
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[AuxVariables]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_x]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_y]
order = CONSTANT
family = MONOMIAL
[../]
[./angle_initial]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[./vadv_x]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = x
variable = vadv_x
[../]
[./vadv_y]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = y
variable = vadv_y
[../]
[./angle_initial]
type = OutputEulerAngles
variable = angle_initial
euler_angle_provider = euler_angle_initial
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[./angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[./angle_check]
type = EulerAngleUpdaterCheck
grain_tracker_object = grain_center
euler_angle_updater = euler_angle
grain_torques_object = grain_force
grain_volumes = grain_volumes
execute_on = timestep_begin
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'initial timestep_begin linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '-200.0 -120.0 1000.0'
[../]
[./euler_angle_initial]
type = RandomEulerAngleProvider
grain_tracker_object = grain_center
seed = 12356
execute_on = 'initial timestep_begin'
[../]
[./euler_angle]
type = EulerAngleUpdater
grain_tracker_object = grain_center
euler_angle_provider = euler_angle_initial
grain_torques_object = grain_force
grain_volumes = grain_volumes
execute_on = timestep_begin
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_max_its = 30
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.2
num_steps = 2
[]
[Outputs]
csv = true
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
z1 = 5.0
z2 = 20.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
z1 = 5.0
z2 = 20.0
type = BoundingBoxIC
[../]
[]
(modules/phase_field/test/tests/phase_field_kernels/ADnonuniform_barrier_coefficient.i)
# This material tests the kernels ACBarrierFunction and ACKappaFunction for a
# multiphase system.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -200
xmax = 200
ymin = -200
ymax = 200
uniform_refine = 0
[]
[Variables]
[./gr0]
[../]
[./gr1]
[../]
[]
[ICs]
[./gr0_IC]
type = BoundingBoxIC
variable = gr0
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 0
outside = 1
[../]
[./gr1_IC]
type = BoundingBoxIC
variable = gr1
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 1
outside = 0
[../]
[]
[Materials]
[./constants]
type = ADGenericConstantMaterial
prop_names = 'L gamma E0 E1'
prop_values = '0.1 1.5 3 1'
[../]
[./h0]
type = ADDerivativeParsedMaterial
f_name = h0
args = 'gr0 gr1'
function = 'gr0^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./h1]
type = ADDerivativeParsedMaterial
f_name = h1
args = 'gr0 gr1'
function = 'gr1^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./mu]
type = ADDerivativeParsedMaterial
f_name = mu
args = 'gr0 gr1'
constant_names = 'mag'
constant_expressions = '16'
function = 'mag * (gr0^2 * gr1^2 + 0.1)'
derivative_order = 2
[../]
[./kappa]
type = ADDerivativeParsedMaterial
f_name = kappa
args = 'gr0 gr1'
material_property_names = 'h0(gr0,gr1) h1(gr0,gr1)'
constant_names = 'mag0 mag1'
constant_expressions = '200 100'
function = 'h0*mag0 + h1*mag1'
derivative_order = 2
[../]
[]
[Kernels]
[./gr0_time]
type = ADTimeDerivative
variable = gr0
[../]
[./gr0_interface]
type = ADACInterface
variable = gr0
args = 'gr1'
mob_name = L
kappa_name = 'kappa'
variable_L = false
[../]
[./gr0_switching]
type = ADACSwitching
variable = gr0
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr0_multi]
type = ADACGrGrMulti
variable = gr0
v = 'gr1'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr0_barrier]
type = ADACBarrierFunction
variable = gr0
mob_name = L
gamma = gamma
v = 'gr1'
[../]
[./gr0_kappa]
type = ADACKappaFunction
variable = gr0
mob_name = L
kappa_name = kappa
v = 'gr1'
[../]
[./gr1_time]
type = ADTimeDerivative
variable = gr1
[../]
[./gr1_interface]
type = ADACInterface
variable = gr1
args = 'gr0'
mob_name = L
kappa_name = 'kappa'
variable_L = false
[../]
[./gr1_switching]
type = ADACSwitching
variable = gr1
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr1_multi]
type = ADACGrGrMulti
variable = gr1
v = 'gr0'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr1_barrier]
type = ADACBarrierFunction
variable = gr1
mob_name = L
gamma = gamma
v = 'gr0'
[../]
[./gr1_kappa]
type = ADACKappaFunction
variable = gr1
mob_name = L
kappa_name = kappa
v = 'gr0'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = ' lu '
nl_max_its = 20
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
start_time = 0
num_steps = 3
dt = 1
[]
[Outputs]
exodus = true
file_base = nonuniform_barrier_coefficient_out
[]
(test/tests/indicators/value_jump_indicator/value_jump_indicator_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Adaptivity]
[./Indicators]
[./error]
type = ValueJumpIndicator
variable = something
[../]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./leftright]
type = BoundingBoxIC
variable = something
inside = 1
y2 = 1
y1 = 0
x2 = 0.5
x1 = 0
[../]
[]
[AuxVariables]
[./something]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
solve_type = PJFNK
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/flood_counter_aux_test/boundary_intersection.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 50
xmax = 10
ymax = 50
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
[]
[pid]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dot]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[intersect]
type = FeatureFloodCountAux
variable = v
flood_counter = intersection
field_display = INTERSECTS_SPECIFIED_BOUNDARY
execute_on = 'initial timestep_end'
[]
[pid]
type = ProcessorIDAux
variable = pid
[]
[]
[ICs]
[v]
type = BoundingBoxIC
variable = u
inside = 1
outside = 0
x1 = 3
x2 = 7
y1 = 0
y2 = 45
[]
[]
[Postprocessors]
[intersection]
type = FeatureFloodCount
variable = u
threshold = 0.3
specified_boundaries = bottom
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[]
[vint]
type = ElementIntegralVariablePostprocessor
variable = v
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/porous_flow/examples/lava_lamp/2phase_convection.i)
# Two phase density-driven convection of dissolved CO2 in brine
#
# Initially, the model has a gas phase at the top with a saturation of 0.29
# (which corresponds to an initial value of zi = 0.2).
# Diffusion of the dissolved CO2
# component from the saturated liquid to the unsaturated liquid below reduces the
# amount of CO2 in the gas phase. As the density of the CO2-saturated brine is greater
# than the unsaturated brine, a gravitational instability arises and density-driven
# convection of CO2-rich fingers descend into the unsaturated brine.
#
# The instability is seeded by a random perturbation to the porosity field.
# Mesh adaptivity is used to refine the mesh as the fingers form.
#
# Note: this model is computationally expensive, so should be run with multiple cores,
# preferably on a cluster.
[GlobalParams]
PorousFlowDictator = 'dictator'
gravity = '0 -9.81 0'
[]
[Adaptivity]
max_h_level = 2
marker = marker
initial_marker = initial
initial_steps = 2
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = zi
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.8
[]
[initial]
type = BoxMarker
bottom_left = '0 1.95 0'
top_right = '2 2 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 2
ymax = 2
xmax = 2
ny = 40
nx = 40
bias_y = 0.95
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pgas
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pgas
disp_long = '0 0'
disp_trans = '0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = zi
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = zi
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = zi
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[AuxVariables]
[xnacl]
initial_condition = 0.01
[]
[saturation_gas]
order = FIRST
family = MONOMIAL
[]
[xco2l]
order = FIRST
family = MONOMIAL
[]
[density_liquid]
order = FIRST
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'timestep_end'
[]
[xco2l]
type = PorousFlowPropertyAux
variable = xco2l
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'timestep_end'
[]
[density_liquid]
type = PorousFlowPropertyAux
variable = density_liquid
property = density
phase = 0
execute_on = 'timestep_end'
[]
[]
[Variables]
[pgas]
[]
[zi]
scaling = 1e4
[]
[]
[ICs]
[pressure]
type = FunctionIC
function = 10e6-9.81*1000*y
variable = pgas
[]
[zi]
type = BoundingBoxIC
variable = zi
x1 = 0
x2 = 2
y1 = 1.95
y2 = 2
inside = 0.2
outside = 0
[]
[porosity]
type = RandomIC
variable = porosity
min = 0.25
max = 0.275
seed = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas zi'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2sw]
type = CO2FluidProperties
[]
[co2]
type = TabulatedBicubicFluidProperties
fp = co2sw
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = '45'
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = 'pgas'
z = 'zi'
temperature_unit = Celsius
xnacl = 'xnacl'
capillary_pressure = pc
fluid_state = fs
[]
[porosity]
type = PorousFlowPorosityConst
porosity = porosity
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-11 0 0 0 1e-11 0 0 0 1e-11'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[diffusivity]
type = PorousFlowDiffusivityConst
diffusion_coeff = '2e-9 2e-9 2e-9 2e-9'
tortuosity = '1 1'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e6
nl_max_its = 25
l_max_its = 100
dtmax = 1e4
nl_abs_tol = 1e-6
[TimeStepper]
type = IterationAdaptiveDT
dt = 10
growth_factor = 2
cutback_factor = 0.5
[]
[]
[Functions]
[flux]
type = ParsedFunction
symbol_values = 'delta_xco2 dt'
symbol_names = 'dx dt'
expression = 'dx/dt'
[]
[]
[Postprocessors]
[total_co2_in_gas]
type = PorousFlowFluidMass
phase = 1
fluid_component = 1
[]
[total_co2_in_liquid]
type = PorousFlowFluidMass
phase = 0
fluid_component = 1
[]
[numdofs]
type = NumDOFs
[]
[delta_xco2]
type = ChangeOverTimePostprocessor
postprocessor = total_co2_in_liquid
[]
[dt]
type = TimestepSize
[]
[flux]
type = FunctionValuePostprocessor
function = flux
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_onePhaseMulti.i)
# 1x1x1 unit cube with uniform pressure on top face and 2 phases with different materials
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 6
zmax = 1
xmax = 1
ymax = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[ICs]
[phase1IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 1
outside = 0
variable = phase1
int_width=0.01
[]
[phase2IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 0
outside = 1
variable = phase2
int_width=0.01
[]
[]
[AuxVariables]
[phase1]
[]
[phase2]
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = Pressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor1]
type = ComputeIsotropicElasticityTensor
base_name = C1
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[elasticity_tensor2]
type = ComputeIsotropicElasticityTensor
base_name = C2
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[h1]
type = ParsedMaterial
property_name = h1
coupled_variables = phase1
expression = '0.5*tanh(20*(phase1-0.5))+0.5'
[]
[h2]
type = ParsedMaterial
property_name = h2
coupled_variables = phase2
expression = '0.5*tanh(20*(phase2-0.5))+0.5'
[]
[./C]
type = CompositeElasticityTensor
coupled_variables = 'phase1 phase2'
tensors = 'C1 C2'
weights = 'h1 h2'
[../]
[radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'power_law_creep plas'
tangent_operator = elastic
[]
[power_law_creep]
type = CompositePowerLawCreepStressUpdate
coefficient = '1e-15 5e-20'
n_exponent = '4 5'
activation_energy = '3.0e5 3.5e5'
switching_functions = 'h1 h1'
temperature = temp
[]
[./plas]
type = IsotropicPlasticityStressUpdate
hardening_constant = 1
yield_stress = 1e30
[../]
[]
[VectorPostprocessors]
[./soln]
type = LineValueSampler
warn_discontinuous_face_values = false
sort_by = x
variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz'
start_point = '0 0 0.0'
end_point = '1.0 1.0 1.0'
num_points = 5
outputs = tests
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-10
l_tol = 1e-10
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]
[Outputs]
exodus = false
[./tests]
type = CSV
execute_on = final
[../]
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_split_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 30.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./d]
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
variable = c
[../]
[./d_IC]
type = BoundingBoxIC
x1 = 0.0
x2 = 15.0
y1 = 0.0
y2 = 30.0
inside = 1.0
outside = 0.0
variable = d
[../]
[]
[Kernels]
[./cres]
type = SplitCHParsed
variable = c
kappa_name = kappa_c
w = w
f_name = F
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
coupled_variables = 'c d'
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./d_dot]
type = TimeDerivative
variable = d
[../]
[./d_diff]
type = MatDiffusion
variable = d
diffusivity = diffusivity
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = 'c d'
expression = 'if(d>0.001,d,0.001)*(1-0.5*c^2)'
outputs = exodus
derivative_order = 1
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[./d_diff]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 0.1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/BoundingBoxIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
xmax = 50
ymax = 25
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_small_strain.i)
# 1x1x1 unit cube with uniform pressure on top face and 2 phases with different materials
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 6
zmax = 1
xmax = 1
ymax = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[ICs]
[phase1IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 1
outside = 0
variable = phase1
int_width=0.01
[]
[phase2IC]
type = BoundingBoxIC
x1 = -1
x2 = 1.5
y1 = -1
y2 = 1.5
z1 = -1
z2 = 1.0
inside = 0
outside = 1
variable = phase2
int_width=0.01
[]
[]
[AuxVariables]
[phase1]
[]
[phase2]
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = Pressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor1]
type = ComputeIsotropicElasticityTensor
base_name = C1
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[elasticity_tensor2]
type = ComputeIsotropicElasticityTensor
base_name = C2
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[h1]
type = ParsedMaterial
property_name = h1
coupled_variables = phase1
expression = '0.5*tanh(20*(phase1-0.5))+0.5'
[]
[h2]
type = ParsedMaterial
property_name = h2
coupled_variables = phase2
expression = '0.5*tanh(20*(phase2-0.5))+0.5'
[]
[./C]
type = CompositeElasticityTensor
coupled_variables = 'phase1 phase2'
tensors = 'C1 C2'
weights = 'h1 h2'
[../]
[radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
tangent_operator = elastic
[]
[power_law_creep]
type = CompositePowerLawCreepStressUpdate
coefficient = '1.0e-15 2.0e-18'
n_exponent = '4 5'
activation_energy = '3.0e5 3.5e5'
switching_functions = 'h1 h2'
temperature = temp
[]
[]
[VectorPostprocessors]
[./soln]
type = LineValueSampler
warn_discontinuous_face_values = false
sort_by = x
variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz'
start_point = '0 0 0.0'
end_point = '1.0 1.0 1.0'
num_points = 5
outputs = tests
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-9
nl_abs_tol = 1.0e-9
l_tol = 1e-10
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]
[Outputs]
exodus = false
[./tests]
type = CSV
execute_on = final
[../]
[]
(modules/phase_field/test/tests/rigidbodymotion/update_orientation.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[AuxVariables]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_x]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_y]
order = CONSTANT
family = MONOMIAL
[../]
[./angle_initial]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[./vadv_x]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = x
variable = vadv_x
[../]
[./vadv_y]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = y
variable = vadv_y
[../]
[./angle_initial]
type = OutputEulerAngles
variable = angle_initial
euler_angle_provider = euler_angle_initial
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[./angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'initial timestep_begin linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '0.0 0.0 10.0'
[../]
[./euler_angle_initial]
type = RandomEulerAngleProvider
grain_tracker_object = grain_center
execute_on = 'initial timestep_begin'
[../]
[./euler_angle]
type = EulerAngleUpdater
grain_tracker_object = grain_center
euler_angle_provider = euler_angle_initial
grain_torques_object = grain_force
grain_volumes = grain_volumes
execute_on = timestep_begin
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_max_its = 30
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.2
num_steps = 5
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 30
ymax = 30
elem_type = QUAD4
[]
[Variables]
[./c]
family = HERMITE
order = THIRD
[../]
[./d]
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 12
variable = c
int_width = 3
invalue = 1
outvalue = 0
[../]
[./d_IC]
type = BoundingBoxIC
x1 = 0
x2 = 15
y1 = 0
y2 = 30
inside = 1.0
outside = 0.0
variable = d
[../]
[]
[Kernels]
[./c_bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
coupled_variables = d
[../]
[./c_int]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
coupled_variables = d
[../]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./d_dot]
type = TimeDerivative
variable = d
[../]
[./d_diff]
type = MatDiffusion
variable = d
diffusivity = diffusivity
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = kappa_c
prop_values = 2.0
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = 'c d'
expression = if(d>0.001,d,0.001)*if(c<0,0.5,if(c>1,0.5,1-0.5*c^2))
derivative_order = 2
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[./d_diff]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 1.0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = BDF2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 0.25
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
refinements = 2
type = Exodus
[../]
[]
(modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_wrong_lib.i)
# This input file contains objects only available in solid_mechanics
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[c]
order = THIRD
family = HERMITE
[InitialCondition]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[]
[]
[]
[Kernels]
[ie_c]
type = TimeDerivative
variable = c
[]
[CHSolid]
type = CHMath
variable = c
mob_name = M
[]
[CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[]
[]
[BCs]
[Periodic]
[all]
auto_direction = 'x y'
[]
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
block = 0
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
# Here we'll load the wrong library and check for the correct error condition
[Problem]
register_objects_from = 'SolidMechanicsApp'
library_path = '../../../../../solid_mechanics/lib'
[]