- finite_difference_typecoloringstandard: standard finite differencecoloring: finite difference based on coloring
Default:coloring
C++ Type:MooseEnum
Controllable:No
Description:standard: standard finite differencecoloring: finite difference based on coloring
- fullFalseSet to true if you want the full set of couplings between variables simply for convenience so you don't have to set every off_diag_row and off_diag_column combination.
Default:False
C++ Type:bool
Controllable:No
Description:Set to true if you want the full set of couplings between variables simply for convenience so you don't have to set every off_diag_row and off_diag_column combination.
- implicit_geometric_couplingFalseSet to true if you want to add entries into the matrix for degrees of freedom that might be coupled by inspection of the geometric search objects.
Default:False
C++ Type:bool
Controllable:No
Description:Set to true if you want to add entries into the matrix for degrees of freedom that might be coupled by inspection of the geometric search objects.
- ksp_normunpreconditionedSets the norm that is used for convergence testing
Default:unpreconditioned
C++ Type:MooseEnum
Controllable:No
Description:Sets the norm that is used for convergence testing
- nl_sysThe nonlinear system whose linearization this preconditioner should be applied to.
C++ Type:NonlinearSystemName
Controllable:No
Description:The nonlinear system whose linearization this preconditioner should be applied to.
- off_diag_columnThe variable names for the off-diagonal columns you want to add into the matrix; they will be associated with an off-diagonal row from the same position in off_diag_row.
C++ Type:std::vector<NonlinearVariableName>
Controllable:No
Description:The variable names for the off-diagonal columns you want to add into the matrix; they will be associated with an off-diagonal row from the same position in off_diag_row.
- off_diag_rowThe variable names for the off-diagonal rows you want to add into the matrix; they will be associated with an off-diagonal column from the same position in off_diag_column.
C++ Type:std::vector<NonlinearVariableName>
Controllable:No
Description:The variable names for the off-diagonal rows you want to add into the matrix; they will be associated with an off-diagonal column from the same position in off_diag_column.
- pc_sidedefaultPreconditioning side
Default:default
C++ Type:MooseEnum
Controllable:No
Description:Preconditioning side
FDP
Finite difference preconditioner (FDP) builds a numerical Jacobian for preconditioning, only use for testing and verification.
Overview
The Finite Difference Preconditioner (FDP) forms a "Numerical Jacobian" by doing direct finite differences of residual statements. This is extremely slow and inefficient, but is a great debugging tool because it allows you to form a nearly perfect preconditioner. FDP contains the same options for specifying off-diagonal blocks as SMP. Since FDP builds the perfect approximate Jacobian it can be useful to use it directly to solve instead of using JFNK. The finite differencing is sensitive to the differencing parameter which can be specified using:
petsc_options_iname = '-mat_fd_coloring_err -mat_fd_type'
petsc_options_value = '1e-6 ds'
Example Input File Syntax
[Preconditioning]
active = 'FDP_jfnk'
[./FDP_jfnk]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n_full]
type = FDP
full = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[]
(examples/ex11_prec/fdp.i)Input 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.
Advanced Parameters
- mffd_typewpSpecifies the finite differencing type for Jacobian-free solve types. Note that the default is wp (for Walker and Pernice).
Default:wp
C++ Type:MooseEnum
Options:wp, ds
Controllable:No
Description:Specifies the finite differencing type for Jacobian-free solve types. Note that the default is wp (for Walker and Pernice).
- petsc_optionsSingleton PETSc options
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -ksp_converged_reason, -ksp_gmres_modifiedgramschmidt, -ksp_monitor, -ksp_monitor_snes_lg-snes_ksp_ew, -ksp_snes_ew, -snes_converged_reason, -snes_ksp, -snes_ksp_ew, -snes_linesearch_monitor, -snes_mf, -snes_mf_operator, -snes_monitor, -snes_test_display, -snes_view
Controllable:No
Description:Singleton PETSc options
- petsc_options_inameNames of PETSc name/value pairs
C++ Type:MultiMooseEnum
Options:-ksp_atol, -ksp_gmres_restart, -ksp_max_it, -ksp_pc_side, -ksp_rtol, -ksp_type, -mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -snes_atol, -snes_linesearch_type, -snes_ls, -snes_max_it, -snes_rtol, -snes_divergence_tolerance, -snes_type, -sub_ksp_type, -sub_pc_type
Controllable:No
Description:Names of PETSc name/value pairs
- petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname"
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname"
- solve_typePJFNK: Preconditioned Jacobian-Free Newton Krylov JFNK: Jacobian-Free Newton Krylov NEWTON: Full Newton Solve FD: Use finite differences to compute Jacobian LINEAR: Solving a linear problem
C++ Type:MooseEnum
Options:PJFNK, JFNK, NEWTON, FD, LINEAR
Controllable:No
Description:PJFNK: Preconditioned Jacobian-Free Newton Krylov JFNK: Jacobian-Free Newton Krylov NEWTON: Full Newton Solve FD: Use finite differences to compute Jacobian LINEAR: Solving a linear problem
Petsc Parameters
Input Files
- (modules/phase_field/test/tests/phase_field_crystal/PFCRFF_split/PFCRFF_split_test_parent.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCRFF_split/PFCRFF_split_test_sub.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCTrad/PFCTrad_test.i)
- (modules/combined/examples/publications/rapid_dev/fig6.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_chorin.i)
- (modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
- (modules/combined/test/tests/fdp_geometric_coupling/fdp_geometric_coupling.i)
- (examples/ex11_prec/fdp.i)
- (modules/phase_field/test/tests/KKS_system/kks_phase_concentration.i)
- (test/tests/misc/check_error/multi_precond_test.i)
- (test/tests/kernels/scalar_constraint/scalar_constraint_bc.i)
- (modules/navier_stokes/test/tests/finite_element/pins/expansion-channel/expansion-channel-slip-wall.i)
- (test/tests/preconditioners/fdp/fdp_test.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCRFF/PFCRFF_expansion_test.i)
- (modules/phase_field/test/tests/KKS_system/bug.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_split.i)
- (test/tests/constraints/tied_value_constraint/tied_value_constraint_test.i)
- (modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/err.wrong_end.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCRFF/PFCRFF_tolerance_test.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCEnergyDensity/auxkernel.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCRFF/PFCRFF_cancelation_test.i)
(examples/ex11_prec/fdp.i)
[Mesh]
file = square.e
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
# The Preconditioning block
[Preconditioning]
active = 'FDP_jfnk'
[./FDP_jfnk]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n_full]
type = FDP
full = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[]
[Kernels]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./conv_forced]
type = CoupledForce
variable = forced
v = diffused
[../]
[./diff_forced]
type = Diffusion
variable = forced
[../]
[]
[BCs]
#Note we have active on, and neglect the right_forced BC
active = 'left_diffused right_diffused left_forced'
[./left_diffused]
type = DirichletBC
variable = diffused
boundary = 'left'
value = 0
[../]
[./right_diffused]
type = DirichletBC
variable = diffused
boundary = 'right'
value = 100
[../]
[./left_forced]
type = DirichletBC
variable = forced
boundary = 'left'
value = 0
[../]
[./right_forced]
type = DirichletBC
variable = forced
boundary = 'right'
value = 0
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCRFF_split/PFCRFF_split_test_parent.i)
[GlobalParams]
num_L = 5
L_name_base = L
ymax = 6
xmax = 6
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 12
ny = 12
[]
[Variables]
[./n]
[./InitialCondition]
type = RandomIC
max = 0.8
min = 0.2
seed = 12345
[../]
[../]
[./CHPFCRFFSplitVariables]
sub_filenames = PFCRFF_split_test_sub.i
n_name = n
#sub_file_name = test_sub.i
[../]
[]
[Kernels]
[./CHPFCRFFSplitKernel]
log_approach = expansion
n_name = n
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFC]
type = PFCRFFMaterial
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = true
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
# petsc_options = '-snes_mf_operator -ksp_monitor'
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 31'
# petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
# petsc_options_value = 'asm 101 preonly lu 1'
type = Transient
num_steps = 1
dt = 0.1
l_max_its = 50
nl_max_its = 20
petsc_options = '-pc_factor_shift_nonzero'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1e-04
nl_rel_tol = 1e-9
scheme = bdf2
[]
[Outputs]
exodus = true
[]
[ICs]
active = ''
[./density_IC]
y2 = 10.5
lc = 6
y1 = 1.5
min = .8
max = .2
x2 = 10.5
crystal_structure = FCC
variable = n
x1 = 1.5
type = PFCFreezingIC
[../]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCRFF_split/PFCRFF_split_test_sub.i)
[GlobalParams]
num_L = 5
L_name_base = L
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 12
ny = 12
nz = 8
xmax = 6
ymax = 6
[]
[Variables]
[./HHPFCRFFSplitVariables]
[../]
[]
[AuxVariables]
[./n]
[../]
[]
[Kernels]
[./HHPFCRFFSplitKernel]
log_approach = expansion
n_name = n
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFC]
type = PFCRFFMaterial
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = true
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
l_max_its = 50
nl_max_its = 20
petsc_options = '-pc_factor_shift_nonzero'
petsc_options_iname = -pc_type
petsc_options_value = lu
l_tol = 1e-04
nl_rel_tol = 1e-9
scheme = bdf2
[]
[Outputs]
exodus = true
[]
[ICs]
active = ''
[./density_IC]
y2 = 10.5
lc = 6
y1 = 1.5
min = .8
max = .2
x2 = 10.5
crystal_structure = FCC
variable = n
x1 = 1.5
type = PFCFreezingIC
[../]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCTrad/PFCTrad_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
xmax = 8
ymax = 8
[]
[Variables]
[./n]
[./InitialCondition]
type = RandomIC
min = -1
max = 4
[../]
[../]
[./u]
scaling = 1e2
[../]
[./v]
scaling = 1e1
[../]
[]
[Kernels]
[./ndot]
type = TimeDerivative
variable = n
[../]
[./n_bulk]
type = CHBulkPFCTrad
variable = n
[../]
[./u_term]
type = MatDiffusion
variable = n
v = u
diffusivity = C2
[../]
[./v_term]
type = MatDiffusion
variable = n
v = v
diffusivity = C4
[../]
[./u_rctn]
type = Reaction
variable = u
[../]
[./u_gradn]
type = LaplacianSplit
variable = u
c = n
[../]
[./v_rctn]
type = Reaction
variable = v
[../]
[./v_gradu]
type = LaplacianSplit
variable = v
c = u
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFCTrad]
type = PFCTradMaterial
order = FOURTH
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = false
off_diag_row = 'u n n v'
off_diag_column = 'n u v u'
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 101'
# petsc_options_iname = -pc_type
# petsc_options_value = lu
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly lu 5'
l_max_its = 100
l_tol = 1e-04
nl_rel_tol = 1e-09
nl_abs_tol = 1e-11
num_steps = 2
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/publications/rapid_dev/fig6.i)
#
# Fig. 6 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Three phase interface simulation demonstrating the interfacial stability
# w.r.t. formation of a tspurious third phase
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 120
ny = 120
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
# concentration
[./c]
[../]
# order parameter 1
[./eta1]
[../]
# order parameter 2
[./eta2]
[../]
# order parameter 3
[./eta3]
[../]
# phase concentration 1
[./c1]
initial_condition = 0.4
[../]
# phase concentration 2
[./c2]
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
initial_condition = 0.0
[../]
[]
[AuxVariables]
[./T]
[./InitialCondition]
type = FunctionIC
function = 'x-10'
[../]
[../]
[]
[Functions]
[./ic_func_eta1]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_eta2]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x-10)/sqrt(2.0)))'
[../]
[./ic_func_eta3]
type = ParsedFunction
expression = '1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.5 * 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
+ 0.4 * 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))
+ 0.8 * (1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0))))'
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = FunctionIC
function = ic_func_eta1
[../]
[./eta2]
variable = eta2
type = FunctionIC
function = ic_func_eta2
[../]
[./eta3]
variable = eta3
type = FunctionIC
function = ic_func_eta3
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.4)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2 T'
expression = '20*(c2-0.5)^2 + 0.01*T'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
f_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
f_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
f_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '1.0 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
args = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
args = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
args = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 1000
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.2
optimal_iterations = 10
iteration_window = 2
[../]
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
checkpoint = true
print_linear_residuals = false
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
#[VectorPostprocessors]
# [./c]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = c
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta1]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta1
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta2]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta2
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta3]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta3
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
#[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_chorin.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 40
ny = 40
elem_type = QUAD4
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 99
nodes = '0'
input = gen
[]
[]
[Variables]
# x-velocity
[u]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# y-velocity
[v]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# x-star velocity
[u_star]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# y-star velocity
[v_star]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# Pressure
[p]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[x_chorin_predictor]
type = INSChorinPredictor
variable = u_star
u = u
v = v
u_star = u_star
v_star = v_star
component = 0
predictor_type = 'new'
[]
[y_chorin_predictor]
type = INSChorinPredictor
variable = v_star
u = u
v = v
u_star = u_star
v_star = v_star
component = 1
predictor_type = 'new'
[]
[x_chorin_corrector]
type = INSChorinCorrector
variable = u
u_star = u_star
v_star = v_star
pressure = p
component = 0
[]
[y_chorin_corrector]
type = INSChorinCorrector
variable = v
u_star = u_star
v_star = v_star
pressure = p
component = 1
[]
[chorin_pressure_poisson]
type = INSChorinPressurePoisson
variable = p
u_star = u_star
v_star = v_star
[]
[]
[BCs]
[u_no_slip]
type = DirichletBC
variable = u
preset = false
boundary = 'bottom right left'
value = 0.0
[]
[u_lid]
type = DirichletBC
variable = u
preset = false
boundary = 'top'
value = 100.0
[]
[v_no_slip]
type = DirichletBC
variable = v
preset = false
boundary = 'bottom right top left'
value = 0.0
[]
# Make u_star satsify all the same variables as the real velocity.
[u_star_no_slip]
type = DirichletBC
variable = u_star
preset = false
boundary = 'bottom right left'
value = 0.0
[]
[u_star_lid]
type = DirichletBC
variable = u_star
preset = false
boundary = 'top'
value = 100.0
[]
[v_star_no_slip]
type = DirichletBC
variable = v_star
preset = false
boundary = 'bottom right top left'
value = 0.0
[]
# With solid walls everywhere, we specify dp/dn=0, i.e the
# "natural BC" for pressure. Technically the problem still
# solves without pinning the pressure somewhere, but the pressure
# bounces around a lot during the solve, possibly because of
# the addition of arbitrary constants.
[pressure_pin]
type = DirichletBC
variable = p
preset = false
boundary = '99'
value = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
# rho = 1000 # kg/m^3
# mu = 0.798e-3 # Pa-s at 30C
# cp = 4.179e3 # J/kg-K at 30C
# k = 0.58 # W/m-K at ?C
# Dummy parameters
prop_names = 'rho mu cp k'
prop_values = '1 1 1 1'
[]
[]
[Preconditioning]
#active = 'FDP_Newton'
#active = 'SMP_PJFNK'
active = 'SMP_Newton'
[FDP_Newton]
type = FDP
full = true
solve_type = 'NEWTON'
#petsc_options_iname = '-mat_fd_coloring_err'
#petsc_options_value = '1.e-10'
[]
# For some reason, nonlinear convergence with JFNK is poor, but it
# seems to be OK for SMP_Newton. This may indicate a a scaling issue
# in the JFNK case....
[SMP_PJFNK]
type = SMP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[SMP_Newton]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Transient
# Note: the explicit case with lid velocity = 100 and a 40x40 was unstable
# for dt=1.e-4, even though the restriction should be dt < dx/|u| = 1/4000 = 2.5e-4
#
dt = 1.e-3
dtmin = 1.e-6
petsc_options_iname = '-ksp_gmres_restart '
petsc_options_value = '300 '
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
l_max_its = 300
start_time = 0.0
num_steps = 5
automatic_scaling = true
verbose = true
compute_scaling_once = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
file_base = lid_driven_chorin_out
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
#
# This test is for the 3-phase KKS model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[AuxVariables]
[./Energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# order parameter 1
[./eta1]
order = FIRST
family = LAGRANGE
[../]
# order parameter 2
[./eta2]
order = FIRST
family = LAGRANGE
[../]
# order parameter 3
[./eta3]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# phase concentration 1
[./c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[../]
# phase concentration 2
[./c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
order = FIRST
family = LAGRANGE
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.9
outvalue = 0.1
int_width = 4
[../]
[./eta2]
variable = eta2
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.1
outvalue = 0.9
int_width = 4
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.2
outvalue = 0.5
int_width = 2
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.2)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '20*(c2-0.5)^2'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
property_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
property_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
property_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '0.7 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
coupled_variables = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[AuxKernels]
[./Energy_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gj_names = 'g1 g2 g3'
variable = Energy
w = 1
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa kappa kappa'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 2
dt = 0.5
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/fdp_geometric_coupling/fdp_geometric_coupling.i)
[Mesh]
file = twoBlocksContactDiceSecondary2OffsetGap.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 100.0
[../]
[]
[Functions]
[./pressure]
type = PiecewiseLinear
x = '0 1 2'
y = '0 1 1'
scale_factor = 10.0
[../]
[./tempFunc]
type = PiecewiseLinear
x = '0. 3.'
y = '100.0 440.0'
[../]
[]
[Modules/TensorMechanics/Master]
[./block1]
block = 1
volumetric_locking_correction = true
incremental = true
strain = FINITE
eigenstrain_names = 'thermal_expansion1'
decomposition_method = EigenSolution
temperature = temp
[../]
[./block2]
block = 2
volumetric_locking_correction = true
incremental = true
strain = FINITE
eigenstrain_names = 'thermal_expansion2'
decomposition_method = EigenSolution
temperature = temp
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./left_right_x]
type = DirichletBC
variable = disp_x
boundary = '1 4'
value = 0.0
[../]
[./left_right_y]
type = DirichletBC
variable = disp_y
boundary = '1 4'
value = 0.0
[../]
[./left_right_z]
type = DirichletBC
variable = disp_z
boundary = '1 4'
value = 0.0
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
boundary = '2 3'
function = tempFunc
[../]
[]
[Contact]
[./dummy_name]
primary = 2
secondary = 3
penalty = 1e8
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.0
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[./thermal_expansion1]
type = ComputeThermalExpansionEigenstrain
block = 1
thermal_expansion_coeff = 1e-4
stress_free_temperature = 100.0
temperature = temp
eigenstrain_name = thermal_expansion1
[../]
[./thermal_expansion2]
type = ComputeThermalExpansionEigenstrain
block = 2
thermal_expansion_coeff = 1e-5
stress_free_temperature = 100.0
temperature = temp
eigenstrain_name = thermal_expansion2
[../]
[./heat]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1.0
[../]
[./density]
type = Density
block = '1 2'
density = 1.0
[../]
[]
[Preconditioning]
[./FDP]
type = FDP
full = true
implicit_geometric_coupling = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-8 ds'
nl_rel_tol = 1e-10
l_max_its = 5
nl_max_its = 3
dt = 5.0e-1
num_steps = 2
[]
[Outputs]
file_base = fdp_geometric_coupling_out
exodus = true
[]
(examples/ex11_prec/fdp.i)
[Mesh]
file = square.e
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
# The Preconditioning block
[Preconditioning]
active = 'FDP_jfnk'
[./FDP_jfnk]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n_full]
type = FDP
full = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[]
[Kernels]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./conv_forced]
type = CoupledForce
variable = forced
v = diffused
[../]
[./diff_forced]
type = Diffusion
variable = forced
[../]
[]
[BCs]
#Note we have active on, and neglect the right_forced BC
active = 'left_diffused right_diffused left_forced'
[./left_diffused]
type = DirichletBC
variable = diffused
boundary = 'left'
value = 0
[../]
[./right_diffused]
type = DirichletBC
variable = diffused
boundary = 'right'
value = 100
[../]
[./left_forced]
type = DirichletBC
variable = forced
boundary = 'left'
value = 0
[../]
[./right_forced]
type = DirichletBC
variable = forced
boundary = 'right'
value = 0
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_phase_concentration.i)
#
# This test validates the phase concentration calculation for the KKS system
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 0
elem_type = QUAD4
[]
# We set c and eta...
[BCs]
# (and ca for debugging purposes)
[./left]
type = DirichletBC
variable = c
boundary = 'left'
value = 0.1
[../]
[./right]
type = DirichletBC
variable = c
boundary = 'right'
value = 0.9
[../]
[./top]
type = DirichletBC
variable = eta
boundary = 'top'
value = 0.1
[../]
[./bottom]
type = DirichletBC
variable = eta
boundary = 'bottom'
value = 0.9
[../]
[]
[Variables]
# concentration
[./c]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# phase concentration a
[./ca]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[../]
# phase concentration b
[./cb]
order = FIRST
family = LAGRANGE
initial_condition = 0.3
[../]
[]
[Materials]
# simple toy free energy
[./fa]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'ca'
expression = 'ca^2'
[../]
[./fb]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'cb'
expression = '(1-cb)^2'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
outputs = exodus
[../]
[]
[Kernels]
active = 'cdiff etadiff phaseconcentration chempot'
##active = 'cbdiff cdiff etadiff chempot'
#active = 'cadiff cdiff etadiff phaseconcentration'
##active = 'cadiff cbdiff cdiff etadiff'
[./cadiff]
type = Diffusion
variable = ca
[../]
[./cbdiff]
type = Diffusion
variable = cb
[../]
[./cdiff]
type = Diffusion
variable = c
[../]
[./etadiff]
type = Diffusion
variable = eta
[../]
# ...and solve for ca and cb
[./phaseconcentration]
type = KKSPhaseConcentration
ca = ca
variable = cb
c = c
eta = eta
[../]
[./chempot]
type = KKSPhaseChemicalPotential
variable = ca
cb = cb
fa_name = Fa
fb_namee = Fb
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
#solve_type = 'NEWTON'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero'
[]
[Preconditioning]
active = 'full'
#active = 'mydebug'
#active = ''
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = kks_phase_concentration
exodus = true
[]
(test/tests/misc/check_error/multi_precond_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Preconditioning]
active = 'PBP FDP'
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'LU LU'
off_diag_row = 'v'
off_diag_column = 'u'
[../]
[./FDP]
type = FDP
off_diag_row = 'v'
off_diag_column = 'u'
[../]
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff_u conv_v diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 100
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Steady
l_max_its = 1
nl_max_its = 1
solve_type = JFNK
[]
[Outputs]
file_base = pbp_out
[]
(test/tests/kernels/scalar_constraint/scalar_constraint_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[./alpha]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[ScalarKernels]
[./alpha_ced]
type = AlphaCED
variable = alpha
value = 10
[../]
[]
[BCs]
[./left]
type = ScalarVarBC
variable = u
boundary = '3'
alpha = alpha
[../]
[./right]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[../]
[]
[Preconditioning]
active = 'pc'
[./pc]
type = SMP
full = true
solve_type = 'PJFNK'
[../]
[./FDP_PJFNK]
type = FDP
full = true
solve_type = 'PJFNK'
# These options **together** cause a zero pivot in this problem, even without SUPG terms.
# But using either option alone appears to be OK.
# petsc_options_iname = '-mat_fd_coloring_err -mat_fd_type'
# petsc_options_value = '1.e-10 ds'
petsc_options_iname = '-mat_fd_coloring_err'
petsc_options_value = '1.e-10'
# petsc_options_iname = '-mat_fd_type'
# petsc_options_value = 'ds'
[../]
[] # End preconditioning block
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = alpha
[]
(modules/navier_stokes/test/tests/finite_element/pins/expansion-channel/expansion-channel-slip-wall.i)
# This is an example showing the conservative form with combined velocity inlet condition,
# pressure outlet condition and slip wall boundary condition.
[GlobalParams]
gravity = '0 -9.8 0'
order = FIRST
family = LAGRANGE
u = vel_x
v = vel_y
pressure = p
temperature = T
porosity = porosity
eos = eos
conservative_form = true
p_int_by_parts = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = expansion-channel.e
[]
[add_corners]
type = ExtraNodesetGenerator
input = file
new_boundary = 'corners'
coord = '-0.05 -0.5 0; 0.05 -0.5 0; -0.1 0.5 0; 0.1 0.5 0'
[]
[]
[NodalNormals]
# boundaries 3 (left) and 4 (right) are walls
boundary = '3 4'
corner_boundary = 'corners'
[]
[FluidProperties]
[eos]
type = SimpleFluidProperties
density0 = 100 # kg/m^3
thermal_expansion = 0.001 # K^{-1}
cp = 100
viscosity = 0.1 # Pa-s, Re=rho*u*L/mu = 100*1*0.1/0.1 = 100
thermal_conductivity = 72
[]
[]
[Variables]
# velocities
[vel_x]
scaling = 1e-1
initial_condition = 0
[]
[vel_y]
scaling = 1e-2
initial_condition = 1
[]
# Pressure
[p]
initial_condition = 1.01e5
[]
# Temperature
[T]
scaling = 1e-4
initial_condition = 630
[]
[]
[AuxVariables]
[rho]
initial_condition = 77.0
[]
[porosity]
initial_condition = 0.6
[]
[vol_heat]
initial_condition = 1e3
[]
[]
[Materials]
[mat]
type = PINSFEMaterial
alpha = 1e3
beta = 100
[]
[]
[Kernels]
# mass balance (continuity) equation
[mass_time]
type = PINSFEFluidPressureTimeDerivative
variable = p
[]
[mass_space]
type = INSFEFluidMassKernel
variable = p
[]
# momentum equations for x- and y- velocities
[x_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_x
component = 0
[]
[y_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_y
component = 1
[]
# fluid energy equation
[temperature_time]
type = PINSFEFluidTemperatureTimeDerivative
variable = T
[]
[temperature_space]
type = INSFEFluidEnergyKernel
variable = T
power_density = vol_heat
[]
[]
[AuxKernels]
[rho_aux]
type = FluidDensityAux
variable = rho
p = p
T = T
fp = eos
[]
[]
[BCs]
# BCs for mass equation
# Inlet
[mass_inlet]
type = INSFEFluidMassBC
variable = p
boundary = '1'
[]
# Outlet
[mass_out]
type = INSFEFluidMassBC
variable = p
boundary = '2'
[]
# BCs for x-momentum equation
# Inlet
[vx_in]
type = INSFEFluidMomentumBC
variable = vel_x
boundary = '1'
component = 0
#p_fn = 1.05e5
v_fn = 1
[]
# Outlet
[vx_out]
type = INSFEFluidMomentumBC
variable = vel_x
boundary = '2'
component = 0
p_fn = 1e5
[]
# Walls (left and right walls)
[vx_wall]
type = INSFEFluidWallMomentumBC
variable = vel_x
boundary = '3 4'
component = 0
[]
# BCs for y-momentum equation
# Inlet
[vy_in]
type = INSFEFluidMomentumBC
variable = vel_y
boundary = '1'
component = 1
v_fn = 1
[]
# Outlet
[vy_out]
type = INSFEFluidMomentumBC
variable = vel_y
boundary = '2'
component = 1
p_fn = 1e5
[]
# Walls (left and right walls)
[vy_wall]
type = INSFEFluidWallMomentumBC
variable = vel_y
boundary = '3 4'
component = 1
[]
# Special slip-wall BCs for both x- and y- velocities
[slipwall]
type = INSFEMomentumFreeSlipBC
boundary = '3 4'
variable = vel_x
u = vel_x
v = vel_y
[]
# BCs for fluid energy equation
# Inlet
[T_in]
type = INSFEFluidEnergyBC
variable = T
boundary = '1'
T_fn = 630
[]
# Outlet
[T_out]
type = INSFEFluidEnergyBC
variable = T
boundary = '2'
T_fn = 630
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = FDP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
dt = 0.2
dtmin = 1.e-6
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.25
optimal_iterations = 15
linear_iteration_ratio = 100
dt = 0.1
cutback_factor = 0.5
cutback_factor_at_failure = 0.5
[]
dtmax = 25
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 12
l_tol = 1e-5
l_max_its = 100
start_time = 0.0
end_time = 500
num_steps = 2
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
time_step_interval = 1
execute_on = 'initial timestep_end'
[console]
type = Console
output_linear = false
[]
[out]
type = Exodus
use_displaced = false
[]
[]
(test/tests/preconditioners/fdp/fdp_test.i)
[Mesh]
type = GeneratedMesh
nx = 2
ny = 2
dim = 2
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Preconditioning]
[./FDP]
type = FDP
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = false
[]
[ICs]
[./u]
variable = u
type = RandomIC
min = 0.1
max = 0.9
[../]
[./v]
variable = v
type = RandomIC
min = 0.1
max = 0.9
[../]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCRFF/PFCRFF_expansion_test.i)
[GlobalParams]
num_L = 5
L_name_base = L
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 12
ny = 12
xmax = 6
ymax = 6
[]
[Variables]
[./PFCRFFVariables]
[../]
[./n]
[./InitialCondition]
type = RandomIC
max = 1.00187734619
min = -1.00187734619
seed = 12345
[../]
[../]
[]
[Kernels]
[./PFCRFFKernel]
n_name = n
log_approach = expansion
n_exp_terms = 5
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFC]
type = PFCRFFMaterial
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = true
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
# petsc_options = '-snes_mf_operator -ksp_monitor'
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 31'
# petsc_options_iname = -pc_type
# petsc_options_value = lu
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly lu 5'
type = Transient
num_steps = 1
dt = 0.1
l_max_its = 50
nl_max_its = 20
solve_type = NEWTON
petsc_options = '-pc_factor_shift_nonzero '
l_tol = 1e-04
nl_rel_tol = 1e-6
scheme = bdf2
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/bug.i)
#
# This test validates the phase concentration calculation for the KKS system
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 0
elem_type = QUAD4
[]
# We set u
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0.1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 0.9
[../]
[]
[Variables]
# primary variable
[./u]
order = FIRST
family = LAGRANGE
[../]
# secondary variable
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./udiff]
type = Diffusion
variable = u
[../]
[./valgebra]
type = AlgebraDebug
variable = v
v = u
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
#solve_type = 'NEWTON'
[]
#[Preconditioning]
# [./mydebug]
# type = FDP
# full = true
# [../]
#[]
[Outputs]
execute_on = 'timestep_end'
file_base = bug
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_split.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 40
ny = 40
elem_type = QUAD4
[]
[./corner_node]
type = ExtraNodesetGenerator
boundary = 99
nodes = '0'
input = gen
[../]
[]
[Variables]
# x-velocity
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# y-velocity
[./v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# x-acceleration
[./a1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# y-acceleration
[./a2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# Pressure
[./p]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
# split-momentum, x
[./x_split_momentum]
type = INSSplitMomentum
variable = a1
u = u
v = v
a1 = a1
a2 = a2
component = 0
[../]
# split-momentum, y
[./y_split_momentum]
type = INSSplitMomentum
variable = a2
u = u
v = v
a1 = a1
a2 = a2
component = 1
[../]
# projection-x, space
[./x_proj_space]
type = INSProjection
variable = u
a1 = a1
a2 = a2
pressure = p
component = 0
[../]
# projection-y, space
[./y_proj_space]
type = INSProjection
variable = v
a1 = a1
a2 = a2
pressure = p
component = 1
[../]
# projection-x, time
[./x_proj_time]
type = TimeDerivative
variable = u
[../]
# projection-y, time
[./y_proj_time]
type = TimeDerivative
variable = v
[../]
# Pressure
[./pressure_poisson]
type = INSPressurePoisson
variable = p
a1 = a1
a2 = a2
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = u
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = DirichletBC
variable = u
boundary = 'top'
value = 100.0
[../]
[./y_no_slip]
type = DirichletBC
variable = v
boundary = 'bottom right top left'
value = 0.0
[../]
# Acceleration boundary conditions. What should these
# be on the lid? What should they be in general? I tried pinning
# values of acceleration at one node but that didn't seem to work.
# I also tried setting non-zero acceleration values on the lid but
# that didn't converge.
[./x_no_accel]
type = DirichletBC
variable = a1
boundary = 'bottom right top left'
value = 0.0
[../]
[./y_no_accel]
type = DirichletBC
variable = a2
boundary = 'bottom right top left'
value = 0.0
[../]
# With solid walls everywhere, we specify dp/dn=0, i.e the
# "natural BC" for pressure. Technically the problem still
# solves without pinning the pressure somewhere, but the pressure
# bounces around a lot during the solve, possibly because of
# the addition of arbitrary constants.
[./pressure_pin]
type = DirichletBC
variable = p
boundary = '99'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
# rho = 1000 # kg/m^3
# mu = 0.798e-3 # Pa-s at 30C
# cp = 4.179e3 # J/kg-K at 30C
# k = 0.58 # W/m-K at ?C
# Dummy parameters
prop_names = 'rho mu cp k'
prop_values = '1 1 1 1'
[../]
[]
[Preconditioning]
# [./FDP_Newton]
# type = FDP
# full = true
# petsc_options = '-snes'
# #petsc_options_iname = '-mat_fd_coloring_err'
# #petsc_options_value = '1.e-10'
# [../]
[./SMP_PJFNK]
type = SMP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[../]
[]
[Executioner]
type = Transient
dt = 1.e-4
dtmin = 1.e-6
petsc_options_iname = '-ksp_gmres_restart '
petsc_options_value = '300 '
line_search = 'none'
nl_rel_tol = 1e-5
nl_max_its = 6
l_tol = 1e-6
l_max_its = 100
start_time = 0.0
num_steps = 1000
[]
[Outputs]
file_base = lid_driven_split_out
exodus = true
[]
(test/tests/constraints/tied_value_constraint/tied_value_constraint_test.i)
# [Debug]
# show_top_residuals = 5
# []
[Mesh]
type = FileMesh
file = constraint_test.e
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
# active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 4
value = 1
[../]
[]
[Constraints]
[./value]
type = TiedValueConstraint
variable = u
secondary = 2
primary = 3
primary_variable = u
[../]
[]
[Preconditioning]
# active = 'FDP'
active = ''
[./FDP]
# full = true
# off_diag_row = 'v'
# off_diag_column = 'u'
type = FDP
[../]
[]
[Executioner]
# l_tol = 1e-1
# l_tol = 1e-
# nl_rel_tol = 1e-14
type = Steady
solve_type = NEWTON
l_max_its = 100
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/err.wrong_end.i)
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1. 1e-4'
closures = simple_closures
[]
[FluidProperties]
[barotropic]
type = LinearFluidProperties
p_0 = 1.e5 # Pa
rho_0 = 1.e3 # kg/m^3
a2 = 1.e7 # m^2/s^2
beta = .46e-3 # K^{-1}
cv = 4.18e3 # J/kg-K, could be a global parameter?
e_0 = 1.254e6 # J/kg
T_0 = 300 # K
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = barotropic
# geometry
position = '0 0 0'
orientation = '1 0 0'
A = 1.
D_h = 1.12837916709551
f = 0.01
length = 1
n_elems = 100
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe:asdf' # this is an error we are checking for
p0 = 1e5
T0 = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 9.5e4
[]
[]
[Preconditioning]
[FDP_PJFNK]
type = FDP
full = true
petsc_options_iname = '-mat_fd_coloring_err'
petsc_options_value = '1.e-10'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1e-4
dtmin = 1.e-7
solve_type = 'PJFNK'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-8
l_max_its = 100
start_time = 0.0
num_steps = 10
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCRFF/PFCRFF_tolerance_test.i)
[GlobalParams]
num_L = 5
L_name_base = L
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 12
ny = 12
xmax = 6
ymax = 6
[]
[Variables]
[./PFCRFFVariables]
[../]
[./n]
[./InitialCondition]
type = RandomIC
max = 0.8
min = 0.2
seed = 12345
[../]
[../]
[]
[Kernels]
[./PFCRFFKernel]
n_name = n
log_approach = tolerance
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFC]
type = PFCRFFMaterial
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = true
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
# petsc_options = '-snes_mf_operator -ksp_monitor'
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 31'
# petsc_options = '-pc_factor_shift_nonzero '
# petsc_options_iname = -pc_type
# petsc_options_value = lu
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly lu 5'
type = Transient
num_steps = 1
dt = 0.1
l_max_its = 50
nl_max_its = 20
solve_type = NEWTON
l_tol = 1e-04
nl_rel_tol = 1e-9
scheme = bdf2
[]
[Outputs]
exodus = true
[]
[ICs]
active = ''
[./density_IC]
y2 = 10.5
lc = 6
y1 = 1.5
min = .8
max = .2
x2 = 10.5
crystal_structure = FCC
variable = n
x1 = 1.5
type = PFCFreezingIC
[../]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCEnergyDensity/auxkernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmax = 6
ymax = 6
zmax = 0
[]
[Variables]
[./n]
[./InitialCondition]
type = RandomIC
min = 0.0
max = 0.1
[../]
[../]
[./u]
scaling = 1e2
[../]
[./v]
scaling = 1e1
[../]
[]
[AuxVariables]
[./ed]
order = CONSTANT
family = MONOMIAL
[../]
[./edrff0]
order = CONSTANT
family = MONOMIAL
[../]
[./edrff1]
order = CONSTANT
family = MONOMIAL
[../]
[./edrff2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./ndot]
type = TimeDerivative
variable = n
[../]
[./n_bulk]
type = CHBulkPFCTrad
variable = n
[../]
[./u_term]
type = MatDiffusion
variable = n
v = u
diffusivity = C2
[../]
[./v_term]
type = MatDiffusion
variable = n
v = v
diffusivity = C4
[../]
[./u_rctn]
type = Reaction
variable = u
[../]
[./u_gradn]
type = LaplacianSplit
variable = u
c = n
[../]
[./v_rctn]
type = Reaction
variable = v
[../]
[./v_gradu]
type = LaplacianSplit
variable = v
c = u
[../]
[]
[AuxKernels]
[./Energy_n]
type = PFCEnergyDensity
execute_on = 'initial timestep_end'
variable = ed
v = 'n u v'
[../]
[./Energy_rff0]
type = PFCRFFEnergyDensity
execute_on = 'initial timestep_end'
variable = edrff0
log_approach = tolerance
v = 'n u v'
[../]
[./Energy_rff1]
type = PFCRFFEnergyDensity
execute_on = 'initial timestep_end'
variable = edrff1
log_approach = cancelation
v = 'n u v'
[../]
[./Energy_rff2]
type = PFCRFFEnergyDensity
execute_on = 'initial timestep_end'
variable = edrff2
log_approach = expansion
v = 'n u v'
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFCTrad]
type = PFCTradMaterial
order = FOURTH
[../]
[]
[Postprocessors]
[./Total_free_energy]
type = PFCElementEnergyIntegral
variable = ed
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = false
off_diag_row = 'u n n v'
off_diag_column = 'n u v u'
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 101'
# petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
# petsc_options_value = 'asm 101 preonly lu 1'
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
l_max_its = 100
l_tol = 1e-04
nl_rel_tol = 1e-09
nl_abs_tol = 1e-11
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCRFF/PFCRFF_cancelation_test.i)
[GlobalParams]
num_L = 5
L_name_base = L
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 12
ny = 12
xmax = 6
ymax = 6
[]
[Variables]
[./PFCRFFVariables]
[../]
[./n]
[./InitialCondition]
type = RandomIC
max = 0.8
min = .2
seed = 12345
[../]
[../]
[]
[Kernels]
[./PFCRFFKernel]
n_name = n
log_approach = cancelation
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFC]
type = PFCRFFMaterial
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = true
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
# petsc_options = '-snes_mf_operator -ksp_monitor'
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 31'
# petsc_options_iname = -pc_type
# petsc_options_value = lu
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly lu 5'
type = Transient
num_steps = 1
dt = 0.1
l_max_its = 50
nl_max_its = 20
solve_type = NEWTON
l_tol = 1e-04
nl_rel_tol = 1e-9
scheme = bdf2
[]
[Outputs]
exodus = true
[]
[ICs]
active = ''
[./density_IC]
y2 = 10.5
lc = 6
y1 = 1.5
min = .8
max = .2
x2 = 10.5
crystal_structure = FCC
variable = n
x1 = 1.5
type = PFCFreezingIC
[../]
[]