TimeStepper System

This system is in charge of determining the time steps in a transient simulation using either the [TimeStepper] block or the [TimeSteppers] block. The [TimeStepper] block takes only one time stepper while [TimeSteppers] block keeps the features of [TimeStepper] and also supports the composed time step size with multiple time steps inputs.

When more than one time steppers are provided, the time stepper system will add a Composition TimeStepper as the final time stepper of the transient simulation. The Composition TimeStepper takes all input time steppers except the ones used for "lower_bound" and compute the maximum time step size within "lower_bound" as the output time step size. There are a number of types of TimeStepper available. They control the time stepping in different ways, including using fixed time stepping, time stepping based on a function, or adaptive time stepping.

The time stepper system is controllable via Controls block. The user can turn on/off the time steppers to control the usage of time steppers like make time stepper(s) only active at certain time period.

Example input syntax

Below are two examples for multiple time steppers input and the control feature of time stepper system:

This example shows the use of multiple time steppers to compose a final time step size. The time stepper system will always choose the minimum value of all input time step.

[Executioner<<<{"href": "../index.html"}>>>]
  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<<<{"href": "index.html"}>>>]
    [ConstDT1]
      type = ConstantDT<<<{"description": "Timestepper that takes a constant time step size", "href": "../../../source/timesteppers/ConstantDT.html"}>>>
      dt<<<{"description": "Size of the time step"}>>> = 0.2
    []

    [FunctionDT]
      type = FunctionDT<<<{"description": "Timestepper whose steps vary over time according to a user-defined function", "href": "../../../source/timesteppers/FunctionDT.html"}>>>
      function<<<{"description": "The name of the time-dependent function that prescribes the time step size."}>>> = dts
    []

    [LogConstDT]
      type = LogConstantDT<<<{"description": "TimeStepper which imposes a time step constant in the logarithmic space", "href": "../../../source/timesteppers/LogConstantDT.html"}>>>
      log_dt<<<{"description": "Time step in log10(time)"}>>> = 0.2
      first_dt<<<{"description": "Initial time step (in absolute time)"}>>> = 0.1
    []

    [IterationAdapDT]
      type = IterationAdaptiveDT<<<{"description": "Adjust the timestep based on the number of iterations", "href": "../../../source/timesteppers/IterationAdaptiveDT.html"}>>>
      dt<<<{"description": "The default timestep size between solves"}>>> = 0.5
    []

    [Timesequence]
      type = TimeSequenceStepper<<<{"description": "Solves the Transient problem at a sequence of given time points.", "href": "../../../source/timesteppers/TimeSequenceStepper.html"}>>>
      time_sequence<<<{"description": "The values of t"}>>> = '0  0.25 0.3 0.5 0.8'
    []

    [PPDT]
      type = PostprocessorDT<<<{"description": "Computes timestep based on a Postprocessor value.", "href": "../../../source/timesteppers/PostprocessorDT.html"}>>>
      postprocessor<<<{"description": "The name of the postprocessor that computes the dt"}>>> = PostDT
      dt<<<{"description": "Initial value of dt"}>>> = 0.1
    []
  []
[]
(moose/test/tests/time_steppers/time_stepper_system/multiple_timesteppers.i)

This example shows the control feature of the time stepper system. The TimePeriod control is used to specify a time period for only ConstDT1 to be active.

[Executioner<<<{"href": "../index.html"}>>>]
  type = Transient
  end_time = 0.8
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'

  [TimeSteppers<<<{"href": "index.html"}>>>]
    [ConstDT1]
      type = ConstantDT<<<{"description": "Timestepper that takes a constant time step size", "href": "../../../source/timesteppers/ConstantDT.html"}>>>
      dt<<<{"description": "Size of the time step"}>>> = 0.2
    []

    [ConstDT2]
      type = ConstantDT<<<{"description": "Timestepper that takes a constant time step size", "href": "../../../source/timesteppers/ConstantDT.html"}>>>
      dt<<<{"description": "Size of the time step"}>>> = 0.1
    []
  []
[]

[Controls<<<{"href": "../../Controls/index.html"}>>>]
  [c1]
    type = TimePeriod<<<{"description": "Control the enabled/disabled state of objects with time.", "href": "../../../source/controls/TimePeriod.html"}>>>
    enable_objects<<<{"description": "A list of object tags to enable."}>>> = 'TimeStepper::ConstDT1'
    disable_objects<<<{"description": "A list of object tags to disable."}>>> = 'TimeStepper::ConstDT2'
    start_time<<<{"description": "The time at which the objects are to be enabled/disabled."}>>> = '0.3'
    end_time<<<{"description": "The time at which the objects are to be enable/disabled."}>>> = '0.8'
  []
[]
(moose/test/tests/time_steppers/time_stepper_system/active_timesteppers.i)

The difference between [TimeSteppers]and [TimeStepper] input file

warningwarning

The [TimeSteppers] block requires one hierarchy of block for input time stepper(s).

Below are two examples show the differences in the block hierarchy between [TimeSteppers] and [TimeStepper]:

An input with [TimeStepper] block:


[Executioner]
  type = Transient
  [TimeStepper]
     type = TimeSequenceStepper
     time_sequence  = '0 43200 86400 172800 432000 864000'
  []
  start_time = 0.0
  end_time = 864000
[]

An input with [TimeSteppers] block:


[Executioner]
  type = Transient
  [TimeSteppers]
    [my_timestepper]
     type = TimeSequenceStepper
     time_sequence  = '0 43200 86400 172800 432000 864000'
    []
  []
  start_time = 0.0
  end_time = 864000
[]

Available Objects

Available Actions

Input Parameters

  • active__all__ If specified only the blocks named will be visited and made active

    Default:__all__

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:If specified only the blocks named will be visited and made active

  • inactiveIf specified blocks matching these identifiers will be skipped.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:If specified blocks matching these identifiers will be skipped.

  • initial_dtInitial value of dt

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Initial value of dt

  • lower_boundThe maximum of these TimeSteppers will form the lower bound on the time step size. A single or multiple time steppers may be specified.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:The maximum of these TimeSteppers will form the lower bound on the time step size. A single or multiple time steppers may be specified.

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.

Advanced Parameters