- time_sequenceThe values of t
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:The values of t
TimeSequenceStepper
This time stepper derives from TimeSequenceStepperBase and provides the sequence of time values from a user-specified list, given by "time_sequence".
See Failed solves for information on the behavior of this time stepper for failed time steps.
Example input syntax
In this example, the numerical problem is solved at four specified points in time using a TimeSequenceStepper.
[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
type = Transient
end_time = 4.0
[./TimeStepper<<<{"href": "../../syntax/Executioner/TimeStepper/index.html"}>>>]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[../]
[](test/tests/time_steppers/timesequence_stepper/timesequence.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)
Range:cutback_factor_at_failure>0 & cutback_factor_at_failure<1
Controllable:No
Description:Factor to apply to timestep if a time step fails to converge.
- reset_dtFalseUse when restarting a calculation to force a change in dt.
Default:False
C++ Type:bool
Controllable:No
Description:Use when restarting a calculation to force a change in dt.
- use_last_dt_after_last_tFalseIf true, uses the final time step size for times after the last time in the sequence, instead of taking a single step directly to the simulation end time
Default:False
C++ Type:bool
Controllable:No
Description:If true, uses the final time step size for times after the last time in the sequence, instead of taking a single step directly to the simulation end time
- use_last_t_for_end_timeFalseUse last time in sequence as 'end_time' in Executioner.
Default:False
C++ Type:bool
Controllable:No
Description:Use last time in sequence as 'end_time' in Executioner.
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.
- enableTruewhether or not to enable the time stepper
Default:True
C++ Type:bool
Controllable:Yes
Description:whether or not to enable the time stepper
Advanced Parameters
Input Files
- (test/tests/time_steppers/time_stepper_system/time_stepper_system.i)
- (modules/optimization/test/tests/executioners/transient_and_adjoint/nonuniform_tstep.i)
- (test/tests/mesh/add_subdomain_ids/add_subdomain_names.i)
- (modules/phase_field/test/tests/misc/timestepmaterial.i)
- (modules/solid_mechanics/test/tests/dynamics/time_integration/direct_central_difference_varied_dt.i)
- (test/tests/time_steppers/timesequence_stepper/restart_from_steady.i)
- (test/tests/mfem/timesteppers/mfem_multiple_timesequences.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence.i)
- (test/tests/kernels/functor_kernel/functor_kernel_target.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
- (test/tests/time_steppers/time_stepper_system/timestepper_input_error.i)
- (test/tests/mfem/timesteppers/mfem_multiple_timesteppers.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
- (test/tests/time_steppers/time_stepper_system/multiple_timesteppers.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/paper-cases/bfs/bfs-2d-root.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart1.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/paper-cases/lid-driven/lid-driven-root.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart_failure.i)
- (test/tests/time_steppers/time_stepper_system/multiple_timesequences.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart3.i)
- (test/tests/time_steppers/time_stepper_system/time_stepper_system_restart.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_last_dt.i)
Child Objects
time_sequence
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:The values of t
(test/tests/time_steppers/timesequence_stepper/timesequence.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 = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/time_stepper_system/time_stepper_system.i)
[Mesh]
file = restart_test_cp/0005-mesh.cpa.gz
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
[]
[]
[Problem]
type = SlowProblem
seconds_to_sleep = '0.0 0.0 0.1 0.1 0.5 0.2 0.2 0.1 0.1 0.1'
kernel_coverage_check = false
restart_file_base = restart_test_cp/0005
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 10
[TimeSteppers]
[LogConstDT]
type = LogConstantDT
log_dt = 0.2
first_dt = 0.1
[]
[Timesequence]
type = TimeSequenceStepper
time_sequence = '0 0.12 0.2 0.5 0.6'
[]
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
[]
[]
[Outputs]
csv = true
file_base='time_stepper_restart'
[]
(modules/optimization/test/tests/executioners/transient_and_adjoint/nonuniform_tstep.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
value = 10
[]
[src_adjoint]
type = BodyForce
variable = u_adjoint
value = 100
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.1 0.2 0.4 0.7 1.1 1.4 1.6 1.7'
[]
end_time = 1.7
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Outputs]
[forward]
type = CSV
[]
[adjoint]
type = CSV
execute_on = 'INITIAL ADJOINT_TIMESTEP_END'
[]
[console]
type = Console
execute_postprocessors_on = 'INITIAL TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[]
(test/tests/mesh/add_subdomain_ids/add_subdomain_names.i)
[Problem]
solve = false
kernel_coverage_check = false
material_coverage_check = false
[]
Box2_inactive_name = 'Box2_inactive'
Box3_inactive_name = 'Box3_inactive'
Box4_inactive_name = 'Box4_inactive'
inactive_domain_block_names = '${Box2_inactive_name} ${Box3_inactive_name} ${Box4_inactive_name}'
[Mesh]
[BaseMesh]
type = GeneratedMeshGenerator
elem_type = TET4
dim = 3
nx = 4
ny = 3
nz = 2
xmin = -10
xmax = +10
ymin = -10
ymax = +10
zmin = -2
zmax = +2
[]
[Box1]
type = SubdomainBoundingBoxGenerator
input = "BaseMesh"
block_id = 1
location = "INSIDE"
bottom_left = "-20 -20 -2"
top_right = "+20 +20 +2"
[]
[Box2]
type = SubdomainBoundingBoxGenerator
input = "Box1"
block_id = 2
location = "INSIDE"
bottom_left = "-4 -3 +3"
top_right = "0 +3 0"
[]
[Box3]
type = SubdomainBoundingBoxGenerator
input = "Box2"
block_id = 3
location = "INSIDE"
bottom_left = "0 -3 +2"
top_right = "+4 +3 0"
[]
add_subdomain_names = ${inactive_domain_block_names}
[]
[AuxVariables]
[dummy]
type = MooseVariableFVReal
[]
[]
# move elements between subdomains back and forth
[UserObjects]
[GlobalSubdomainModifier]
type = TimedSubdomainModifier
times = ' 0.4 0.6 0.4'
blocks_from = '2 Box2_inactive 3'
blocks_to = ' Box2_inactive 2 Box3_inactive'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
end_time = 1.0
[TimeSteppers]
[BlockEventTimeStepper]
type = TimeSequenceStepper
time_sequence = '0.0 0.2 0.4 0.5 0.6 1.0'
[]
[]
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
nl_abs_tol = 1E-3
nl_max_its = 400
l_tol = 1E-3
l_max_its = 200
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/misc/timestepmaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
[]
[Materials]
[./time]
type = TimeStepMaterial
outputs = exodus
[../]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 6
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '4 8 15 16 23 42'
[../]
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/dynamics/time_integration/direct_central_difference_varied_dt.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a central difference with a
# direct calculation of acceleration.
#
# Testing that the first and second time derivatives
# are calculated correctly using the Direct Central Difference
# method
# Testing the accuracy of the timestep averaging method within
# the Direct Central Difference method
###########################################################
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
extra_tag_matrices = 'mass'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 1
ny = 1
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Functions]
#Mid-step velocities
#0 0.00625 0.015 0.0075 0.25 0
#Accelerations
#0.025 0.01944 -0.01 0.48 -2.17
[forcing_fn]
type = PiecewiseLinear
x = '0.0 0.1 0.5 1.0 2.0 2.01 2.23'
y = '0.0 0.0 0.0025 0.01 0.0175 0.02 0.02'
[]
[]
[Kernels]
[DynamicSolidMechanics]
displacements = 'disp_x disp_y'
[]
[massmatrix]
type = MassMatrix
density = density
matrix_tags = 'mass'
variable = disp_x
[]
[massmatrix_y]
type = MassMatrix
density = density
matrix_tags = 'mass'
variable = disp_y
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e1
poissons_ratio = 0.0
[]
[strain_block]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
implicit = false
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = 5
[]
[]
[BCs]
[left_x]
type = ExplicitFunctionDirichletBC
variable = disp_x
boundary = 'left'
function = forcing_fn
[]
[right_x]
type = ExplicitFunctionDirichletBC
variable = disp_x
boundary = 'right'
function = forcing_fn
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ExplicitMixedOrder
mass_matrix_tag = 'mass'
second_order_vars = 'disp_x disp_y'
[]
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0.0 0.1 0.5 1.0 2.0 2.01 2.23'
[]
start_time = 0.0
num_steps = 6
dt = 0.1
[]
[Postprocessors]
[udot]
type = ElementAverageTimeDerivative
variable = disp_x
[]
[udotdot]
type = ElementAverageSecondTimeDerivative
variable = disp_x
[]
[u]
type = ElementAverageValue
variable = disp_x
[]
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/timesequence_stepper/restart_from_steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[Problem]
restart_file_base = steady_for_restart_out_cp/LATEST
[]
[Variables]
[u]
[]
[]
[BCs]
[all]
type = DirichletBC
variable = u
boundary = 'left right top bottom'
value = 0
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 2
[]
[]
[Executioner]
type = Transient
end_time = 2
# By default, will start at
# 1 since the end time from
# the steady executioner is 1
start_time = 0
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 1 2'
[../]
[]
(test/tests/mfem/timesteppers/mfem_multiple_timesequences.i)
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMMesh
file = ../mesh/square.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = u
coefficient = 0.1
[]
[time]
type = MFEMTimeDerivativeMassKernel
variable = u
[]
[]
[BCs]
[left]
type = MFEMScalarDirichletBC
variable = u
boundary = left
coefficient = 0
[]
[right]
type = MFEMScalarDirichletBC
variable = u
boundary = right
coefficient = 1
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 100
[]
[Executioner]
type = MFEMTransient
device = cpu
end_time = 0.8
# 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='mfem_multiple_timesequences'
[]
(test/tests/time_steppers/timesequence_stepper/timesequence.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 = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/functor_kernel/functor_kernel_target.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[PredefinedPorepressure]
type = FunctorKernel
variable = 'u'
mode = 'TARGET'
functor_on_rhs = false
functor = target_u
[]
[]
[Functions]
[target_u]
type = ParsedFunction
expression = 'max(1, 1 + t)'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-15
l_max_its = 50
nl_abs_tol = 1e-16
nl_rel_tol = 1e-16
nl_max_its = 15
start_time = 0.0
end_time = 11
dtmin = 1e-2
[TimeSteppers]
[TimeSequenceStepper1]
type = TimeSequenceStepper
time_sequence = '1 2 3 4 5 6 7 8 9 10 11'
[]
[]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etab1]
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[]
[IC_w]
type = ConstantIC
value = -0.05
variable = w
[]
[]
[Functions]
[ic_func_etaa0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[]
[ic_func_etab1]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ADACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[]
[ACa0_sw]
type = ADACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACa0_int]
type = ADACInterface
variable = etaa0
kappa_name = kappa
variable_L = false
[]
[ea0_dot]
type = ADTimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ADACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[]
[ACb0_sw]
type = ADACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb0_int]
type = ADACInterface
variable = etab0
kappa_name = kappa
variable_L = false
[]
[eb0_dot]
type = ADTimeDerivative
variable = etab0
[]
# Order parameter eta_beta1
[ACb1_bulk]
type = ADACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[]
[ACb1_sw]
type = ADACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb1_int]
type = ADACInterface
variable = etab1
kappa_name = kappa
variable_L = false
[]
[eb1_dot]
type = ADTimeDerivative
variable = etab1
[]
#Chemical potential
[w_dot]
type = ADSusceptibilityTimeDerivative
variable = w
f_name = chi
[]
[Diffusion]
type = ADMatDiffusion
variable = w
diffusivity = Dchi
[]
[coupled_etaa0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[]
[coupled_etab0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[]
[coupled_etab1dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[ha]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[]
[hb]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[]
[omegaa]
type = ADDerivativeParsedMaterial
coupled_variables = 'w'
f_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = ADDerivativeParsedMaterial
coupled_variables = 'w'
f_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[rhoa]
type = ADDerivativeParsedMaterial
coupled_variables = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = ADDerivativeParsedMaterial
coupled_variables = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[const]
type = ADGenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[]
[Mobility]
type = ADDerivativeParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
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_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0.1 0.21'
[]
[]
[Outputs]
exodus = true
file_base = GrandPotentialMultiphase_out
[]
(test/tests/time_steppers/time_stepper_system/timestepper_input_error.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 # Here we use the Transient Executioner
[TimeSteppers]
type = TimeSequenceStepper
time_sequence = '0 43200 86400 172800 432000 864000'
[]
start_time = 0.0
end_time = 864000
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
file_base='multiple_timesequence'
[]
(test/tests/mfem/timesteppers/mfem_multiple_timesteppers.i)
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMMesh
file = ../mesh/square.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = u
coefficient = 0.1
[]
[time]
type = MFEMTimeDerivativeMassKernel
variable = u
[]
[]
[Functions]
[dts]
type = PiecewiseLinear
x = '0 0.85 2'
y = '0.2 0.15 0.2'
[]
[]
[BCs]
[left]
type = MFEMScalarDirichletBC
variable = u
boundary = left
coefficient = 0
[]
[right]
type = MFEMScalarDirichletBC
variable = u
boundary = right
coefficient = 1
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 100
[]
[Executioner]
type = MFEMTransient
device = cpu
end_time = 0.8
# 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'
[]
[]
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
file_base='mfem_multiple_timesteppers'
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etab1]
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[]
[IC_w]
type = ConstantIC
value = -0.05
variable = w
[]
[]
[Functions]
[ic_func_etaa0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[]
[ic_func_etab1]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[]
[ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 etab1 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 etab1'
gamma_names = 'gab gbb'
[]
[ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab1 w'
[]
[ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[]
[eb0_dot]
type = TimeDerivative
variable = etab0
[]
# Order parameter eta_beta1
[ACb1_bulk]
type = ACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[]
[ACb1_sw]
type = ACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 w'
[]
[ACb1_int]
type = ACInterface
variable = etab1
kappa_name = kappa
[]
[eb1_dot]
type = TimeDerivative
variable = etab1
[]
#Chemical potential
[w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[]
[Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[]
[coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[]
[coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[]
[coupled_etab1dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[]
[hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[]
[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
enable_jit = false
[]
[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
enable_jit = false
[]
[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
enable_jit = false
[]
[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
enable_jit = false
[]
[const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[]
[Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
enable_jit = false
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0.1 0.21'
[]
[]
[Outputs]
exodus = true
[]
(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'
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/paper-cases/bfs/bfs-2d-root.i)
gamma = 1e4
degree = 2
alpha = '${fparse 10 * degree^2}'
rho = 1
[Mesh]
[file]
type = FileMeshGenerator
file = coarse12.msh
[]
second_order = true
[]
[Problem]
type = NavierStokesProblem
extra_tag_matrices = 'mass'
mass_matrix = 'mass'
set_schur_pre = A11_AND_MASS
[]
[Variables]
[vel_x]
family = L2_LAGRANGE
order = SECOND
[]
[vel_y]
family = L2_LAGRANGE
order = SECOND
[]
[pressure]
family = L2_LAGRANGE
order = FIRST
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = SECOND
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = SECOND
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = SECOND
[]
[]
[HDGKernels]
[momentum_x_advection]
type = AdvectionIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = ${alpha}
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_advection]
type = AdvectionIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = ${alpha}
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure]
type = MassContinuityIPHDGKernel
variable = pressure
face_variable = pressure_bar
interior_velocity_vars = 'vel_x vel_y'
face_velocity_functors = 'vel_bar_x vel_bar_y'
[]
[u_jump]
type = MassFluxPenaltyIPHDG
variable = vel_x
face_variable = vel_bar_x
face_velocity = face_velocity
u = vel_x
v = vel_y
component = 0
gamma = ${gamma}
[]
[v_jump]
type = MassFluxPenaltyIPHDG
variable = vel_y
face_variable = vel_bar_y
face_velocity = face_velocity
u = vel_x
v = vel_y
component = 1
gamma = ${gamma}
[]
[pb_mass]
type = MassMatrixHDG
variable = pressure_bar
matrix_tags = 'mass'
density = '${fparse -1/gamma}'
[]
[]
[BCs]
#
# inlet
#
[momentum_x_advection_inlet]
type = AdvectionIPHDGDirichletBC
boundary = '1'
face_variable = vel_bar_x
functor = u_inlet
variable = vel_x
velocity = velocity
coeff = ${rho}
[]
[momentum_x_diffusion_inlet]
type = NavierStokesStressIPHDGDirichletBC
boundary = '1'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = ${alpha}
functor = 'u_inlet'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_inlet]
type = NavierStokesStressIPHDGDirichletBC
boundary = '1'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = ${alpha}
functor = 0
diffusivity = 'mu'
component = 1
[]
[mass_inlet]
type = MassContinuityIPHDGBC
face_variable = pressure_bar
variable = pressure
boundary = '1'
face_velocity_functors = 'u_inlet 0'
interior_velocity_vars = 'vel_x vel_y'
[]
#
# walls
#
[momentum_x_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = '2'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = ${alpha}
functor = '0'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = '2'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = ${alpha}
functor = 0
diffusivity = 'mu'
component = 1
[]
[mass_walls]
type = MassContinuityIPHDGBC
face_variable = pressure_bar
variable = pressure
boundary = '2'
face_velocity_functors = '0 0'
interior_velocity_vars = 'vel_x vel_y'
[]
#
# Neumann
#
[momentum_x_advection_neumann]
type = AdvectionIPHDGOutflowBC
boundary = '3'
constrain_lm = false
face_variable = vel_bar_x
variable = vel_x
velocity = velocity
coeff = ${rho}
[]
[momentum_y_advection_neumann]
type = AdvectionIPHDGOutflowBC
boundary = '3'
constrain_lm = false
face_variable = vel_bar_y
variable = vel_y
velocity = velocity
coeff = ${rho}
[]
[momentum_x_diffusion_neumann]
type = NavierStokesStressIPHDGPrescribedTractionBC
boundary = '3'
component = 0
diffusivity = 'mu'
face_variable = vel_bar_x
prescribed_normal_flux = 0
pressure_face_variable = pressure_bar
pressure_variable = pressure
variable = vel_x
alpha = ${alpha}
[]
[momentum_y_diffusion_neumann]
type = NavierStokesStressIPHDGPrescribedTractionBC
boundary = '3'
component = 1
diffusivity = 'mu'
face_variable = vel_bar_y
prescribed_normal_flux = 0
pressure_face_variable = pressure_bar
pressure_variable = pressure
variable = vel_y
alpha = ${alpha}
[]
[mass_neumann]
type = MassContinuityIPHDGBC
face_variable = pressure_bar
variable = pressure
boundary = '3'
face_velocity_functors = 'vel_bar_x vel_bar_y'
interior_velocity_vars = 'vel_x vel_y'
[]
[pb_mass]
type = MassMatrixIntegratedBC
variable = pressure_bar
matrix_tags = 'mass'
boundary = '1 2 3'
density = '${fparse -1/gamma}'
[]
[u_jump_walls]
type = MassFluxPenaltyBC
variable = vel_x
face_variable = vel_bar_x
u = vel_x
v = vel_y
component = 0
boundary = '2'
gamma = ${gamma}
face_velocity = vel_walls
dirichlet_boundary = true
[]
[v_jump_walls]
type = MassFluxPenaltyBC
variable = vel_y
face_variable = vel_bar_y
u = vel_x
v = vel_y
component = 1
boundary = '2'
gamma = ${gamma}
face_velocity = vel_walls
dirichlet_boundary = true
[]
[u_jump_inlet]
type = MassFluxPenaltyBC
variable = vel_x
face_variable = vel_bar_x
u = vel_x
v = vel_y
component = 0
boundary = '1'
gamma = ${gamma}
face_velocity = vel_inlet
dirichlet_boundary = true
[]
[v_jump_inlet]
type = MassFluxPenaltyBC
variable = vel_y
face_variable = vel_bar_y
u = vel_x
v = vel_y
component = 1
boundary = '1'
gamma = ${gamma}
face_velocity = vel_inlet
dirichlet_boundary = true
[]
[u_jump_outlet]
type = MassFluxPenaltyBC
variable = vel_x
face_variable = vel_bar_x
u = vel_x
v = vel_y
component = 0
boundary = '3'
gamma = ${gamma}
face_velocity = face_velocity
dirichlet_boundary = false
[]
[v_jump_outlet]
type = MassFluxPenaltyBC
variable = vel_y
face_variable = vel_bar_y
u = vel_x
v = vel_y
component = 1
boundary = '3'
gamma = ${gamma}
face_velocity = face_velocity
dirichlet_boundary = false
[]
[]
[Materials]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[mu]
type = ADParsedMaterial
functor_names = 'reynolds'
functor_symbols = 'reynolds'
property_name = 'mu'
expression = '1 / reynolds'
[]
[]
[Functions]
[u_inlet]
type = ParsedFunction
expression = '4*(2-y)*(y-1)'
[]
[reynolds]
type = ParsedFunction
expression = 't'
[]
[]
[FunctorMaterials]
[face_velocity]
type = ADGenericVectorFunctorMaterial
prop_names = face_velocity
prop_values = 'vel_bar_x vel_bar_y 0'
[]
[vel_inlet]
type = GenericVectorFunctorMaterial
prop_names = vel_inlet
prop_values = 'u_inlet 0 0'
[]
[vel_walls]
type = GenericVectorFunctorMaterial
prop_names = vel_walls
prop_values = '0 0 0'
[]
[]
[Postprocessors]
[reynolds]
type = FunctionValuePostprocessor
function = reynolds
[]
[vel_mag_avg]
type = ElementAverageValue
variable = vel_mag
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-nl0_condensed_ksp_view'
petsc_options_iname = '-ksp_type'
petsc_options_value = 'preonly'
nl_abs_tol = 1e-7
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '1 10 50 100 150 200 250 350 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800 4000 4200 4400 4600 4800 5000 5200 5400 5600 5800 6000 6200 6400 6600 6800 7000 7200 7400 7600 7800 8000 8200 8400 8600 8800 9000 9200 9400 9600 9800 10000'
use_last_t_for_end_time = true
[]
abort_on_solve_fail = true
[]
[Outputs]
print_linear_residuals = false
exodus = false
checkpoint = true
perf_graph = true
csv = true
[]
[AuxVariables]
[vel_mag]
family = L2_LAGRANGE
order = SECOND
[]
[]
[AuxKernels]
[vel_mag]
type = VectorMagnitudeAux
variable = vel_mag
x = vel_x
y = vel_y
[]
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart1.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 = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[../]
[]
[Outputs]
exodus = true
[./checkpoint]
type = Checkpoint
num_files = 4
[../]
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart2.i)
[Mesh]
file = timesequence_restart1_cp/0002-mesh.cpa.gz
[]
[Problem]
restart_file_base = timesequence_restart1_cp/0002
# There is an initial conditions overwriting the restart on the nonlinear variable u
# As you can see in the gold file, this makes the initial step output be from the
# initial condition
allow_initial_conditions_with_restart = true
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[]
[forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[]
[ICs]
[u_var]
type = FunctionIC
variable = u
function = exact_fn
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[]
[]
[Executioner]
type = Transient
end_time = 4.0
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/paper-cases/lid-driven/lid-driven-root.i)
rho = 1
l = 1
U = 1
n = 32
gamma = 1e4
degree = 2
alpha = '${fparse 10 * degree^2}'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = TRI6
[]
[]
[Problem]
type = NavierStokesProblem
extra_tag_matrices = 'mass'
mass_matrix = 'mass'
set_schur_pre = A11_AND_MASS
[]
[Variables]
[vel_x]
family = L2_LAGRANGE
order = SECOND
[]
[vel_y]
family = L2_LAGRANGE
order = SECOND
[]
[pressure]
family = L2_LAGRANGE
order = FIRST
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = SECOND
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = SECOND
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = SECOND
[]
[]
[HDGKernels]
[momentum_x_convection]
type = AdvectionIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = ${alpha}
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_convection]
type = AdvectionIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = ${alpha}
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure]
type = MassContinuityIPHDGKernel
variable = pressure
face_variable = pressure_bar
interior_velocity_vars = 'vel_x vel_y'
face_velocity_functors = 'vel_bar_x vel_bar_y'
[]
[u_jump]
type = MassFluxPenaltyIPHDG
variable = vel_x
face_variable = vel_bar_x
u = vel_x
v = vel_y
component = 0
gamma = ${gamma}
face_velocity = face_velocity
[]
[v_jump]
type = MassFluxPenaltyIPHDG
variable = vel_y
face_variable = vel_bar_y
u = vel_x
v = vel_y
component = 1
gamma = ${gamma}
face_velocity = face_velocity
[]
[pb_mass]
type = MassMatrixHDG
variable = pressure_bar
matrix_tags = 'mass'
density = '${fparse -1/gamma}'
[]
[]
[BCs]
[momentum_x_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = ${alpha}
functor = '0'
diffusivity = 'mu'
component = 0
[]
[momentum_x_diffusion_top]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = ${alpha}
functor = '${U}'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = ${alpha}
functor = '0'
diffusivity = 'mu'
component = 1
[]
[pressure_walls]
type = MassContinuityIPHDGBC
face_variable = pressure_bar
variable = pressure
boundary = 'left bottom right'
face_velocity_functors = '0 0'
interior_velocity_vars = 'vel_x vel_y'
[]
[pressure_lid]
type = MassContinuityIPHDGBC
face_variable = pressure_bar
variable = pressure
boundary = 'top'
face_velocity_functors = '${U} 0'
interior_velocity_vars = 'vel_x vel_y'
[]
[pb_mass]
type = MassMatrixIntegratedBC
variable = pressure_bar
matrix_tags = 'mass'
boundary = 'left right bottom top'
density = '${fparse -1/gamma}'
[]
[u_jump_walls]
type = MassFluxPenaltyBC
variable = vel_x
face_variable = vel_bar_x
u = vel_x
v = vel_y
component = 0
boundary = 'left right bottom'
gamma = ${gamma}
face_velocity = walls
dirichlet_boundary = true
[]
[v_jump_walls]
type = MassFluxPenaltyBC
variable = vel_y
face_variable = vel_bar_y
u = vel_x
v = vel_y
component = 1
boundary = 'left right bottom'
gamma = ${gamma}
face_velocity = walls
dirichlet_boundary = true
[]
[u_jump_top]
type = MassFluxPenaltyBC
variable = vel_x
face_variable = vel_bar_x
u = vel_x
v = vel_y
component = 0
boundary = 'top'
gamma = ${gamma}
face_velocity = top_vel
dirichlet_boundary = true
[]
[v_jump_top]
type = MassFluxPenaltyBC
variable = vel_y
face_variable = vel_bar_y
u = vel_x
v = vel_y
component = 1
boundary = 'top'
gamma = ${gamma}
face_velocity = top_vel
dirichlet_boundary = true
[]
[]
[Functions]
[reynolds]
type = ParsedFunction
expression = 't'
[]
[]
[FunctorMaterials]
[face_velocity]
type = ADGenericVectorFunctorMaterial
prop_names = face_velocity
prop_values = 'vel_bar_x vel_bar_y 0'
[]
[top]
type = GenericVectorFunctorMaterial
prop_names = top_vel
prop_values = '${U} 0 0'
[]
[walls]
type = GenericVectorFunctorMaterial
prop_names = walls
prop_values = '0 0 0'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[mu]
type = ADParsedMaterial
functor_names = 'reynolds'
functor_symbols = 'reynolds'
property_name = 'mu'
expression = '${U} * ${l} / reynolds'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-nl0_condensed_ksp_view'
petsc_options_iname = '-ksp_type'
petsc_options_value = 'preonly'
nl_abs_tol = 1e-7
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '1 10 50 100 150 200 250 350 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800 4000 4200 4400 4600 4800 5000 5200 5400 5600 5800 6000 6200 6400 6600 6800 7000 7200 7400 7600 7800 8000 8200 8400 8600 8800 9000 9200 9400 9600 9800 10000'
use_last_t_for_end_time = true
[]
abort_on_solve_fail = true
[]
[Outputs]
print_linear_residuals = 'false'
exodus = false
checkpoint = true
perf_graph = true
[csv]
type = CSV
hide = 'pressure_average'
[]
[]
[Postprocessors]
[Re]
type = FunctionValuePostprocessor
function = 'reynolds'
[]
[pressure_average]
type = ElementAverageValue
variable = pressure
[]
[vel_mag_avg]
type = ElementAverageValue
variable = vel_mag
[]
[]
[AuxVariables]
[vel_mag]
family = L2_LAGRANGE
order = SECOND
[]
[]
[AuxKernels]
[vel_mag]
type = VectorMagnitudeAux
variable = vel_mag
x = vel_x
y = vel_y
[]
[]
[Correctors]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = pressure
pressure_average = 'pressure_average'
[]
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart_failure.i)
[Mesh]
file = timesequence_restart_failure1_cp/0002-mesh.cpa.gz
[]
[Problem]
restart_file_base = timesequence_restart_failure1_cp/0002
# There is an initial conditions overwriting the restart on the nonlinear variable u
# As you can see in the gold file, this makes the initial step output be from the
# initial condition
allow_initial_conditions_with_restart = true
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[]
[forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[]
[ICs]
[u_var]
type = FunctionIC
variable = u
function = exact_fn
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[]
[]
[Executioner]
type = Transient
end_time = 4.0
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.2 1.3 2 4'
[]
[]
[Outputs]
exodus = true
[]
(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'
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart3.i)
[Mesh]
file = timesequence_restart1_cp/0002-mesh.cpa.gz
[]
[Problem]
restart_file_base = timesequence_restart1_cp/0002
# There is an initial conditions overwriting the restart on the nonlinear variable u
# As you can see in the gold file, this makes the initial step output be from the
# initial condition
allow_initial_conditions_with_restart = true
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[]
[forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[]
[ICs]
[u_var]
type = FunctionIC
variable = u
function = exact_fn
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[]
[]
[Executioner]
type = Transient
end_time = 4.5
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 1.9 2 4 4.5'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/time_stepper_system/time_stepper_system_restart.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 5
[TimeSteppers]
[SolutionTimeAdaptiveDT]
type = SolutionTimeAdaptiveDTTest
dt = 0.5
fake_wall_time_sequence = '100 100 200 200 600 300'
[]
[LogConstDT]
type = LogConstantDT
log_dt = 0.2
first_dt = 0.1
[]
[Timesequence]
type = TimeSequenceStepper
time_sequence = '0 0.12 0.2 0.5 0.6'
[]
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
[]
[]
[Outputs]
[checkpoint]
type = Checkpoint
num_files = 5
[]
file_base = 'restart_test'
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_last_dt.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 6
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 1 3 4 8'
use_last_dt_after_last_t = true
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
[]
[]
[Outputs]
csv = true
[]
(test/include/timesteppers/TimeSequenceStepperFailTest.h)
// This file is part of the MOOSE framework
// https://mooseframework.inl.gov
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "TimeSequenceStepper.h"
/**
* Exactly the same as TimeSequenceStepper, but fails at predetermined
* timesteps.
*/
class TimeSequenceStepperFailTest : public TimeSequenceStepper
{
public:
static InputParameters validParams();
TimeSequenceStepperFailTest(const InputParameters & parameters);
virtual void step() override;
protected:
/// stores a copy of the original sequence of time points, is not updated due to failures.
std::vector<Real> _original_time_sequence;
};