Setting Up the Simulation Operation Sequence

Simulation operations allow you to automate tasks, especially complex workflows within Simcenter STAR-CCM+. In this tutorial, a loop is required in which you run the sequence of steps for adjoint shape optimization.

To achieve shape optimization through adjoint surface sensitivity this tutorial consists of three main steps:
  1. Solve the primal flow.
  2. Solve adjoint and compute surface sensitivity.
  3. Deform the mesh according to the surface sensitivity.

In order to run the sequence in the fully automated manner, the mesh quality and the direction of the cost function change are checked before runing the next optimization cycle. The operation sequence is shown as follows:



To set up the operation sequence:
  1. Right-click the Automation > Simulation Operations node and select New.
  2. Rename the Simulation Operations 1 node to Shape Optimization.
  3. To add the Clear Solution operation:
    1. Right-click the Shape Optimization > Operations node and select New > Clear Solution.
    2. Select the Clear Solution node and set the properties as follows:
      Property Setting
      Clear History
      Clear Fields
      Reset Mesh
      Clear Adjoint
  4. To add the Reset LoopCounter operation:
    1. To create the parameter LoopCounter, right-click the Automation > Parameters and select New > Scalar.
    2. Rename the parameter Scalar to LoopCounter and set the Value to 0.0.
    3. Right-click the Shape Optimization > Operations node and select New > Set Parameter.
    4. Rename the Set Parameter node to Reset LoopCounter and set the properties as follows:
      Property Setting
      Parameter LoopCounter
      Value 0.0
  5. To solve the primal flow:
    1. Right-click the Operations node and select New > Solve Physics.
    2. Rename the Solve Physics node to Solve Initial Primal and set Simulation Objects to Physics 1.
  6. To build a loop which runs a number of shape optimization cycles defined by LoopCounter:
    1. Right-click the Shape Optimization > Operations node and select New > Loop.
    2. Select the Loop node and set the properties as follows:
      Property Setting
      Predicate Type Expression Predicate
      Expression Predicate $LoopCounter < 10
      Note10 optimization cycles are executed. The last increment is done within the loop.
  7. You define the following three steps as a sub-sequence under the loop operation:
    • Increase LoopCounter by 1
    • Solve adjoint with surface sensitivity
    • Deform the volume mesh
    • Check the mesh and the change of the total pressure
      • If the mesh quality is acceptable, solve the primal flow with the optimized geometry.
      • If the criteria are not fulfilled, stop the simulation sequence.
    1. Right-click the Loop > Operations node and select New > Set Parameter.
    2. Rename the Set Parameter node to LoopCounter++ and set the properties as follows:
      Property Setting
      Parameter LoopCounter
      Value $LoopCounter+1
    3. Right-click the Loop > Operations and select New > Solve Adjoint
    4. Select the Solve Adjoint node and set the following properties:
      Property Setting
      Adjoint Cost Functions PressureDrop
      Compute Surface Sensitivity
    5. Right-click the Loop > Operations node and select New > Deform Mesh
      NoteThis operation deforms the volume mesh according to the Morpher Displacement defined under the Physics Conditions node of the Wall_Adjoint boundary.
    6. Right-click the Loop > Operations node and select New > Condition.
    7. Rename the Condition node to Check Criteria and set the properties as follows:
      Property Setting
      Predicate Type Expression Predicate
      Expression Predicate ${Max Skewness Angle}<95 && ${Min Face Validity}>0.9
  8. To define what happens when the condition evaluates to true:
    1. Right-click the Check Criteria > True node and select New > Solve Physics.
    2. Rename Solve Physics to Solve Primal and set Simulation Objects to Physics 1.
    3. To build the False sub-sequence, right-click the Check Criteria > False node and select New > Stop Simulation Operations.