- dtSize of the time step
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Size of the time step
ConstantDT
Timestepper that takes a constant time step size
Description
The ConstantDT
TimeStepper simply takes a constant time step size throughout the analysis, unless the solver fails to converge on an iteration.
ConstantDT
begins the analysis taking the step specified by the user with the dt
parameter. If the solver fails to obtain a converged solution for a given step, the executioner cuts back the step size and attempts to advance the time from the previous step using a smaller time step. The time step is cut back by multiplying the time step by 0.5.
If the solution with the cut-back time step is still unsuccessful, the time step size is repeatedly cut back until a successful solution is obtained. The user can specify a minimum time step through the dtmin
parameter in the Executioner
block. If the time step must be cut back below the minimum size without obtaining a solution, the problem exits with an error. If the time step is cut back using ConstantDT
, that cut-back step size will be used for the remainder of the analysis.
Example Input Syntax
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_rel_tol = 1e-6
nl_max_its = 10
l_tol = 1e-8
l_max_its = 50
num_steps = 2 # 200
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
nl_abs_step_tol = 1e-10
[./TimeStepper]
type = ConstantDT
dt = 0.001
[../]
dtmin = .001
[]
(test/tests/misc/check_error/wrong_displacement_order.i)Input Parameters
- cutback_factor_at_failure0.5Factor to apply to timestep if a time step fails to converge.
Default:0.5
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Factor to apply to timestep if a time step fails to converge.
- growth_factor2Maximum ratio of new to previous timestep sizes following a step that required the time step to be cut due to a failed solve.
Default:2
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Maximum ratio of new to previous timestep sizes following a step that required the time step to be cut due to a failed solve.
- reset_dtFalseUse when restarting a calculation to force a change in dt.
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Use when restarting a calculation to force a change in dt.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTruewhether or not to enable the time stepper
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:Yes
Description:whether or not to enable the time stepper
Advanced Parameters
Input Files
- (test/tests/postprocessors/num_failed_timesteps/failed_timesteps.i)
- (test/tests/time_steppers/time_stepper_system/lower_bound.i)
- (test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i)
- (modules/solid_mechanics/examples/wave_propagation/cantilever_sweep.i)
- (test/tests/time_steppers/time_stepper_system/active_timesteppers.i)
- (test/tests/time_steppers/time_stepper_system/multiple_timesteppers.i)
- (test/tests/time_steppers/time_stepper_system/multiple_timesequences.i)
- (modules/thermal_hydraulics/test/tests/misc/count_iterations/count_iterations.i)
- (test/tests/time_steppers/constant_dt/constant_dt.i)
- (test/tests/misc/check_error/wrong_displacement_order.i)
- (test/tests/postprocessors/num_failed_timesteps/failed_timesteps_composition.i)
- (modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
- (modules/porous_flow/test/tests/actions/block_restricted.i)
- (test/tests/predictors/simple/predictor_test_skip_after_failed_tstep.i)
- (test/tests/time_steppers/cutback_factor_at_failure/constant_dt_cutback.i)
(test/tests/misc/check_error/wrong_displacement_order.i)
[Mesh]
type = GeneratedMesh
dim = 2
# Mesh uses second-order elements
elem_type = QUAD8
displacements = 'disp_x disp_y'
block_name = pore
block_id = 0
[]
[Variables]
[./temperature]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[]
# We are *not* allowed to use FIRST-order displacement vars!
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = displ
[../]
[../]
[]
[Functions]
[./displ]
type = ParsedFunction
expression = -1/2*x*(y-0.5)
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = temperature
use_displaced_mesh = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 1
use_displaced_mesh = true
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
use_displaced_mesh = true
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = PJFNK
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_rel_tol = 1e-6
nl_max_its = 10
l_tol = 1e-8
l_max_its = 50
num_steps = 2 # 200
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
nl_abs_step_tol = 1e-10
[./TimeStepper]
type = ConstantDT
dt = 0.001
[../]
dtmin = .001
[]
(test/tests/postprocessors/num_failed_timesteps/failed_timesteps.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[TimeStepper]
type = ConstantDT
dt = 0.2
[]
[]
[Problem]
type = FailingProblem
fail_steps = '1 1 1 2 4 5'
[]
[Postprocessors]
[num_failed]
type = NumFailedTimeSteps
[]
[]
(test/tests/time_steppers/time_stepper_system/lower_bound.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 0.8
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[TimeSteppers]
lower_bound = 'LogConstDT'
[ConstDT1]
type = ConstantDT
dt = 0.2
[]
[ConstDT2]
type = ConstantDT
dt = 0.1
[]
[LogConstDT]
type = LogConstantDT
log_dt = 2
first_dt = 0.01
[]
[]
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
file_base='lower_bound'
[]
(test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[u]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
[TimeStepper]
type = ConstantDT
dt = 0.01
[]
start_time = 0.0
num_steps = 2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
[nonlin_it]
type = NumNonlinearIterations
[]
[cumulative_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlin_it
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/examples/wave_propagation/cantilever_sweep.i)
# Frequency Response function for cantilever beam:
# Analytic results: 509Hz and 763Hz
# Simulation results with coarse mesh: 600Hz and 800Hz
[Mesh]
type = GeneratedMesh
elem_type = HEX8
dim = 3
xmin=0
xmax=1
nx=10
ymin=0
ymax=0.1
ny = 1
zmin=0
zmax=0.15
nz = 2
[]
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
group_variables = 'disp_x disp_y disp_z'
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
add_variables = true
new_system = true
formulation = TOTAL
[]
[]
[]
[]
[Kernels]
#reaction terms
[reaction_realx]
type = Reaction
variable = disp_x
rate = 0# filled by controller
extra_vector_tags = 'ref'
[]
[reaction_realy]
type = Reaction
variable = disp_y
rate = 0# filled by controller
extra_vector_tags = 'ref'
[]
[reaction_realz]
type = Reaction
variable = disp_z
rate = 0# filled by controller
extra_vector_tags = 'ref'
[]
[]
[AuxVariables]
[disp_mag]
[]
[]
[AuxKernels]
[disp_mag]
type = ParsedAux
variable = disp_mag
coupled_variables = 'disp_x disp_y disp_z'
expression = 'sqrt(disp_x^2+disp_y^2+disp_z^2)'
[]
[]
[BCs]
#Left
[disp_x_left]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[disp_y_left]
type = DirichletBC
variable = disp_y
boundary = 'left'
value = 0.0
[]
[disp_z_left]
type = DirichletBC
variable = disp_z
boundary = 'left'
value = 0.0
[]
#Right
[BC_right_yreal]
type = NeumannBC
variable = disp_y
boundary = 'right'
value = 1000
[]
[BC_right_zreal]
type = NeumannBC
variable = disp_z
boundary = 'right'
value = 1000
[]
[]
[Materials]
[elastic_tensor_Al]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68e9
poissons_ratio = 0.36
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[]
[Postprocessors]
[dispMag]
type = NodalExtremeValue
value_type = max
variable = disp_mag
[]
[]
[Functions]
[./freq2]
type = ParsedFunction
symbol_names = density
symbol_values = 2.7e3 #Al kg/m3
expression = '-t*t*density'
[../]
[]
[Controls]
[./func_control]
type = RealFunctionControl
parameter = 'Kernels/*/rate'
function = 'freq2'
execute_on = 'initial timestep_begin'
[../]
[]
[Executioner]
type = Transient
solve_type=LINEAR
petsc_options_iname = ' -pc_type'
petsc_options_value = 'lu'
start_time = 300 #starting frequency
end_time = 1200 #ending frequency
nl_abs_tol = 1e-6
[TimeStepper]
type = ConstantDT
dt = 50 #frequency stepsize
[]
[]
[Outputs]
csv=true
exodus=false
console = false
[]
(test/tests/time_steppers/time_stepper_system/active_timesteppers.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 0.8
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[TimeSteppers]
[ConstDT1]
type = ConstantDT
dt = 0.2
[]
[ConstDT2]
type = ConstantDT
dt = 0.1
[]
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'TimeStepper::ConstDT1'
disable_objects = 'TimeStepper::ConstDT2'
start_time = '0.3'
end_time = '0.8'
[]
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
file_base='active_timesteppers'
[]
(test/tests/time_steppers/time_stepper_system/multiple_timesteppers.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[Functions]
[dts]
type = PiecewiseLinear
x = '0 0.85 2'
y = '0.2 0.15 0.2'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 0.8
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
# Use as many different time steppers as we could to test the compositionDT,
# SolutionTimeAdaptiveDT give slightly different dt per run, set rel_err = 1e-2
# to ensure the test won't fail due to the small difference in the high-digit.
[TimeSteppers]
[ConstDT1]
type = ConstantDT
dt = 0.2
[]
[FunctionDT]
type = FunctionDT
function = dts
[]
[LogConstDT]
type = LogConstantDT
log_dt = 0.2
first_dt = 0.1
[]
[IterationAdapDT]
type = IterationAdaptiveDT
dt = 0.5
[]
[Timesequence]
type = TimeSequenceStepper
time_sequence = '0 0.25 0.3 0.5 0.8'
[]
[PPDT]
type = PostprocessorDT
postprocessor = PostDT
dt = 0.1
[]
[]
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[PostDT]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
file_base='multiple_timesteppers'
[]
(test/tests/time_steppers/time_stepper_system/multiple_timesequences.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 0.8
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
# Use as many different time sequence steppers as we could to test the compositionDT
[TimeSteppers]
[ConstDT1]
type = ConstantDT
dt = 0.2
[]
[ConstDT2]
type = ConstantDT
dt = 0.1
[]
[LogConstDT]
type = LogConstantDT
log_dt = 0.2
first_dt = 0.1
[]
[Timesequence1]
type = TimeSequenceStepper
time_sequence = '0 0.25 0.3 0.5 0.8'
[]
[Timesequence2]
type = CSVTimeSequenceStepper
file_name = timesequence.csv
column_name = time
[]
[Timesequence3]
type = ExodusTimeSequenceStepper
mesh = timesequence.e
[]
[]
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
file_base='multiple_timesequences'
[]
(modules/thermal_hydraulics/test/tests/misc/count_iterations/count_iterations.i)
# This tests the "Debug/count_iterations" parameter, which creates
# post-processors for numbers of linear and nonlinear iterations. A dummy
# diffusion solve is performed, and the numbers of iterations are stored in a
# CSV file.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[u]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
[TimeStepper]
type = ConstantDT
dt = 0.01
[]
start_time = 0.0
num_steps = 2
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = true
[]
[Debug]
count_iterations = true
[]
(test/tests/time_steppers/constant_dt/constant_dt.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of the TimeStepper system.
#
# @Requirement F1.20
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
# Pluggable TimeStepper System
[./TimeStepper]
type = ConstantDT
dt = 0.2
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/misc/check_error/wrong_displacement_order.i)
[Mesh]
type = GeneratedMesh
dim = 2
# Mesh uses second-order elements
elem_type = QUAD8
displacements = 'disp_x disp_y'
block_name = pore
block_id = 0
[]
[Variables]
[./temperature]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[]
# We are *not* allowed to use FIRST-order displacement vars!
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = displ
[../]
[../]
[]
[Functions]
[./displ]
type = ParsedFunction
expression = -1/2*x*(y-0.5)
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = temperature
use_displaced_mesh = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 1
use_displaced_mesh = true
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
use_displaced_mesh = true
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = PJFNK
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_rel_tol = 1e-6
nl_max_its = 10
l_tol = 1e-8
l_max_its = 50
num_steps = 2 # 200
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
nl_abs_step_tol = 1e-10
[./TimeStepper]
type = ConstantDT
dt = 0.001
[../]
dtmin = .001
[]
(test/tests/postprocessors/num_failed_timesteps/failed_timesteps_composition.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[TimeSteppers]
[constant_1]
type = ConstantDT
dt = 0.2
[]
[constant_2]
type = ConstantDT
dt = 0.2
[]
[]
[]
[Problem]
type = FailingProblem
fail_steps = '1 1 1 2 4 5'
[]
[Postprocessors]
[num_failed]
type = NumFailedTimeSteps
[]
[]
(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/actions/block_restricted.i)
PorousFlowDictatorName = 'dictator'
[GlobalParams]
time_unit = days
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
active_block_names = 'BaseMesh Box1'
[BaseMesh]
type = GeneratedMeshGenerator
subdomain_name = 'BaseMesh'
elem_type = "TET10"
dim = 3
nx = 6
ny = 6
nz = 2
xmin = -10
xmax = +10
ymin = -10
ymax = +10
zmin = -2
zmax = +2
[]
[Box1]
type = SubdomainBoundingBoxGenerator
input = "BaseMesh"
block_id = 1
block_name = "Box1"
location = "INSIDE"
bottom_left = "-3.3 -3.3 +2"
top_right = "+3.3 +3.3 0"
[]
[Box1Boundary]
type = SideSetsBetweenSubdomainsGenerator
input = Box1
primary_block = 'BaseMesh'
paired_block = 'Box1'
new_boundary = 'Box1Boundary'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
incremental = true
block = ${Mesh/active_block_names}
[]
[]
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
block = 'BaseMesh'
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
block = 'BaseMesh'
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
block = 'BaseMesh'
[]
[]
[PorousFlowFullySaturated]
coupling_type = HydroMechanical
porepressure = porepressure
biot_coefficient = 1
fp = simple_fluid
stabilization = FULL
gravity = '0 0 0'
add_darcy_aux = false
dictator_name = ${PorousFlowDictatorName}
block = 'BaseMesh'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
order = SECOND
family = LAGRANGE
scaling = 1e-5
block = 'BaseMesh'
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '2'
block = 'BaseMesh'
[]
[]
[BCs]
[fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[]
[fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[]
[fix_z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[]
[porepressure_fix]
type = DirichletBC
variable = porepressure
boundary = 'left right bottom top'
value = 2.0
[]
[porepressure_Box1Boundary]
type = FunctionDirichletBC
variable = porepressure
boundary = 'Box1Boundary'
function = porepressure_at_Box1Boundary
[]
[]
[Functions]
[porepressure_at_Box1Boundary]
type = ParsedFunction
expression = '2 + max(0, min(1, t-0.25))'
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 9.0E-10
[]
[]
[Materials]
[porosity_bulk]
type = PorousFlowPorosityConst
block = ${Mesh/active_block_names}
porosity = 0.15
PorousFlowDictator = ${PorousFlowDictatorName}
[]
[undrained_density_0]
type = GenericConstantMaterial
block = ${Mesh/active_block_names}
prop_names = density
prop_values = 2500
[]
[BaseMesh_permeability_bulk]
type = PorousFlowPermeabilityConst
block = 'BaseMesh'
permeability = '1e-5 0 0 0 1e-5 0 0 0 1e-5'
PorousFlowDictator = ${PorousFlowDictatorName}
[]
[BaseMesh_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 'BaseMesh'
youngs_modulus = 2500
poissons_ratio = 0.15
[]
[Box1_permeability_bulk]
type = PorousFlowPermeabilityConst
block = 'Box1'
permeability = '1e-5 0 0 0 1e-5 0 0 0 1e-5'
PorousFlowDictator = ${PorousFlowDictatorName}
[]
[Box1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 'Box1'
youngs_modulus = 2500
poissons_ratio = 0.15
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = ''
perform_finite_strain_rotations = false
tangent_operator = 'nonlinear'
block = ${Mesh/active_block_names}
[]
[]
[Preconditioning]
[.\SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options = '-snes_converged_reason'
# best overall
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
line_search = none
nl_abs_tol = 1e-4
nl_rel_tol = 1e-6
l_max_its = 20
nl_max_its = 8
start_time = 0.0
end_time = 0.5
[TimeSteppers]
[ConstantDT1]
type = ConstantDT
dt = 0.25
[]
[]
[Quadrature]
type = SIMPSON
order = SECOND
[]
[]
[Outputs]
perf_graph = true
exodus = true
[]
(test/tests/predictors/simple/predictor_test_skip_after_failed_tstep.i)
# The purpose of this test is to test the simple predictor.
# The test is adjusted to produce a failed time step.
# The predictor option 'skip_after_failed_timestep' should suppress a prediction
# after the failed time step.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
[]
[Functions]
[ramp1]
type = PiecewiseLinear
x = '0 0.5 1'
y = '0 1 4'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[]
[BCs]
[bot]
type = DirichletBC
variable = u
boundary = bottom
value = 0.0
[]
[ss2_x]
type = FunctionDirichletBC
variable = u
boundary = top
function = ramp1
[]
[]
[Problem]
type = FailingProblem
fail_steps = '6'
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-14
l_tol = 1e-14
start_time = 0.0
end_time = 1.0
[TimeStepper]
type = ConstantDT
dt = 0.1
cutback_factor_at_failure = 0.5
[]
[Predictor]
type = SimplePredictor
scale = 1.0
skip_after_failed_timestep = true
[]
[]
[Postprocessors]
[final_residual]
type = Residual
residual_type = FINAL
[]
[initial_residual]
type = Residual
residual_type = INITIAL
[]
[]
[Outputs]
csv = true
[]
(test/tests/time_steppers/cutback_factor_at_failure/constant_dt_cutback.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Problem]
type = FailingProblem
fail_steps = '3'
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[./TimeStepper]
type = ConstantDT
dt = 0.1
cutback_factor_at_failure = 0.8
[../]
[]
[Outputs]
exodus = true
[]