TerminateControl

Terminates the simulation when a THMControl boolean data becomes true

The boolean that determines when to terminate is a ControlData. This is only used in the THM control logic to keep track of states of control objects.

The boolean can be examined in the console using a BoolControlDataValuePostprocessor.

commentnote

Another way to control when to terminate a simulation is to use the Terminator user object. The Terminator works with postprocessors for the criterion instead of a controlled boolean.

Example input

In this example, the TerminateControl examines the state of the UnitTripControl. Once its state is nonzero, it stop the simulation and prints Threshold exceeded.

[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
  [dt_pp]
    type = TimestepSize<<<{"description": "Reports the timestep size", "href": "../postprocessors/TimestepSize.html"}>>>
  []
[]

[ControlLogic<<<{"href": "../../syntax/ControlLogic/index.html"}>>>]
  [threshold]
    type = UnitTripControl<<<{"description": "Trips a boolean based on the evaluation of a parsed condition expression", "href": "UnitTripControl.html"}>>>
    condition<<<{"description": "The condition that this trip unit uses to determine its state."}>>> = 'dt_pp > 3'
    symbol_names<<<{"description": "Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector."}>>> = 'dt_pp'
    symbol_values<<<{"description": "Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names."}>>> = 'dt_pp'
  []

  [terminate]
    type = TerminateControl<<<{"description": "Terminates the simulation when a THMControl boolean data becomes true", "href": "TerminateControl.html"}>>>
    input<<<{"description": "The name of boolean control data indicating if simulation should be terminated."}>>> = threshold:state
    termination_message<<<{"description": "Message to use if termination occurs"}>>> = 'Threshold exceeded'
  []
[]
(contrib/moose/modules/thermal_hydraulics/test/tests/controls/terminate/terminate.i)

Input Parameters

  • inputThe name of boolean control data indicating if simulation should be terminated.

    C++ Type:std::string

    Controllable:No

    Description:The name of boolean control data indicating if simulation should be terminated.

  • termination_messageMessage to use if termination occurs

    C++ Type:std::string

    Controllable:No

    Description:Message to use if termination occurs

Required Parameters

  • depends_onThe Controls that this control relies upon (i.e. must execute before this one)

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

    Controllable:No

    Description:The Controls that this control relies upon (i.e. must execute before this one)

  • throw_errorFalseFlag to throw an error on termination

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Flag to throw an error on termination

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.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Determines whether this object is calculated using an implicit or explicit form

Advanced Parameters