Setting Up the Simulation Operation Sequence

Simulation operations allow you to automate steps, in a Simcenter STAR-CCM+ workflow. 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 mesh sensitivity three main steps are required:
  1. Solve the primal flow.
  2. Solve the adjoint and compute mesh sensitivity.
  3. Deform the mesh according to the mesh sensitivity on the control points.

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 Mesh Sensitivity.
  3. To add the Clear Solution operation:
    1. Right-click the Shape Optimization Mesh Sensitivity > 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 node and select New > Scalar.
    2. Rename the parameter Scalar to LoopCounter and set the Value to 0.0.
    3. Right-click the Shape Optimization Mesh Sensitivity > 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 initial 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 Mesh Sensitivity > 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 < 4
      Note4 optimization cycles are executed. The last increment is done within the loop.
  7. You define the following steps as a sub-sequence under the loop operation:
    • Increase LoopCounter by 1
    • Solve adjoint with mesh sensitivity
    • Deform the volume mesh
    • Solve Primal
    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 Downforce
      Compute Mesh Sensitivity
    5. Right-click the Loop > Operations node and select New > Deform Mesh

      This option invokes the Adjoint Mesh Deformation model, which deforms the volume mesh using the displaced positions of the control points.

  8. To define a new primal run after the mesh deformation:
    1. Right-click the Loop > Operations node and select New > Solve Physics.
    2. Rename Solve Physics to Solve Primal and set Simulation Objects to Physics 1.
    The primal and adjoint runs stop when their respective solver-specific stopping criteria are fulfilled.