Setting Up a Sequence in Simulation Operations

In this tutorial, you use simulation operations to automate the switch between solving for the fluid and solving for the solid according to their respective time scales.

The final sequence that you define in this topic is shown in the following image. You define a loop counter that records the number of outer loops where one outer loop includes one fluid solution and one solid solution.



To define the simulation operation workflow:
  1. Right-click the Automation > Simulation Operations node and select New.
    A Simulation Operations 1 node appears in the tree.
  2. Rename the Simulation Operations 1 to Multiple Timescale CHT.
  3. Right-click the Multiple Timescale CHT > Operations node and select New > Clear Solution.
In simulation operations, you use a defined scalar parameter LoopCounter to count the loop number.
  1. To initialize the LoopCounter within the operations workflow, use a Set Scalar Parameter as follows:
    1. Right-click the Simulation Operations > Multiple Timescale CHT > Operations node and select New > Set Parameter.
    2. Rename Set Parameter to Reset LoopCounter.
    3. Select the Reset LoopCounter node and set the following properties:
      Property Definition
      Parameter LoopCounter
      Value 0.0
To switch between time scales, you use a loop that includes two Solve Physics operations.
  1. To define a new loop with a stopping criterion predicate:
    1. Right-click the Multiple Timescale CHT > Operations node and select New > Loop.
    2. Select the Loop node and set the following properties:
      Property Option
      Predicate Type Stopping Criterion Predicate
      Stopping Criterion Predicate [Maximum Physical Time]

      The loop ends when the global maximum physical time is reached. This condition is defined in the Stopping Criteria > Maximum Physical Time node.

  2. Define the remaining operations in the loop:
    1. Right-click the Loop > Operations node and select New > Set Parameter.
    2. Rename Set Parameter to Increase LoopCounter and set the following properties:
      Property Definition
      Parameter LoopCounter
      Value ${LoopCounter}+1
    3. Right-click the Loop > Operations node and select New > Solve Physics
    4. Rename Solve Physics to Solve Fluid and set Simulation Objects to Fluid Time Scale.
      This operation ends when the stopping criteria defined within Fluid Time Scale are met.
    5. Right-click the Loop > Operations node and select New > Solve Physics.
    6. Rename Solve Physics to Solve Solid and set Simulation Objects to Solid Time Scale.
  3. Save the simulation.