ControllableInputTimes

Times set directly from a user parameter in the input file

This object should be used to specify a time sequence dynamically updating during the simulation.

ControllableInputTimes supports two inputs: a controllable real-valued next_time and a non-controllable time sequences input times. If both are provided, they’re merged and kept in sorted order to form a single schedule.

In the example, RealFunctionControl computes the next event time during the run and updates ControllableInputTimes accordingly. You can predefine fixed event times with times, and adjust "next_time" on the fly via the control block.

[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
  [cmg]
    type = CartesianMeshGenerator<<<{"description": "This CartesianMeshGenerator creates a non-uniform Cartesian mesh.", "href": "../meshgenerators/CartesianMeshGenerator.html"}>>>
    dx<<<{"description": "Intervals in the X direction"}>>> = 1
    dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 1
  []
[]

[Times<<<{"href": "../../syntax/Times/index.html"}>>>]
  [external_input]
    type = ControllableInputTimes<<<{"description": "Times set directly from a user parameter in the input file", "href": "ControllableInputTimes.html"}>>>
    next_time<<<{"description": "Time to store in the times vector"}>>> = 0.01
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'initial timestep_end'
  []
[]

[Problem<<<{"href": "../../syntax/Problem/index.html"}>>>]
  solve = false
[]

[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
  type = Transient
  num_steps = 5
 [TimeSteppers<<<{"href": "../../syntax/Executioner/TimeSteppers/index.html"}>>>]
    [external_time]
      type = TimeSequenceFromTimes<<<{"description": "Solves the Transient problem at a sequence of time points taken from a specified Times object.", "href": "../timesteppers/TimeSequenceFromTimes.html"}>>>
      times<<<{"description": "The name of the Times object containing the times to hit during the simulation"}>>> = external_input
    []

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

 []

[]

[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
  [fake_external_time]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = '2*t + 0.5'
  []
[]

[Controls<<<{"href": "../../syntax/Controls/index.html"}>>>]
  [func_control]
    type = RealFunctionControl<<<{"description": "Sets the value of a 'Real' input parameters to the value of a provided function.", "href": "../controls/RealFunctionControl.html"}>>>
    parameter<<<{"description": "The input parameter(s) to control. Specify a single parameter name and all parameters in all objects matching the name will be updated"}>>> = 'Times/external_input/next_time'
    function<<<{"description": "The function to use for controlling the specified parameter."}>>> = 'fake_external_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'initial timestep_end'
  []
[]

[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
  [out]
    type = JSON<<<{"description": "Output for Reporter values using JSON format.", "href": "../outputs/JSONOutput.html"}>>>
    execute_system_information_on<<<{"description": "Control when the output of the simulation information occurs"}>>> = none
  []
[]
(moose/test/tests/times/external_times.i)
commentnote

The controllable times are added to / sorted into the times vector and are never removed, even when the value of the controllable "next_time" parameter is changed.

Input Parameters

  • next_timeTime to store in the times vector

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:Yes

    Description:Time to store in the times vector

Required Parameters

  • dynamic_time_sequenceTrueWhether the time sequence is dynamic and thus needs to be updated

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Whether the time sequence is dynamic and thus needs to be updated

  • timesTimes to store in the times vector

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Times to store in the times vector

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, FINAL, CUSTOM, TRANSFER

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

Execution Scheduling Parameters

  • auto_broadcastFalseWether Times should be broadcasted across all ranks

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Wether Times should be broadcasted across all ranks

  • auto_sortTrueWhether Times should be sorted

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Whether Times should be sorted

  • 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:Yes

    Description:Set the enabled status of the MooseObject.

  • outputsVector of output names where you would like to restrict the output of variables(s) associated with this object

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

    Controllable:No

    Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object

  • unique_timesTrueWhether duplicate values should be removed from the Times vector

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Whether duplicate values should be removed from the Times vector

  • unique_tolerance1e-12Absolute tolerance for removing duplicated times when getting a set of unique times

    Default:1e-12

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Absolute tolerance for removing duplicated times when getting a set of unique times

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters