Setting Up the Simulation Operation Sequence

Simcenter STAR-CCM+ allows you to use simulation operations to automate a complete workflow for this simulation. The sequence of steps for adjoint shape optimization is set with a loop.

For this tutorial, the shape optimization loop consists of a sequence of one flow analysis, followed by one adjoint analysis, and surface mesh morphing. To compute the displacement, you use the DisplacementMultiplier parameter, which is updated with each optimization cycle and multiplied by a decay factor. The decay factor reduces the applied displacement magnitude when approaching the minimum of the cost function, thus ensuring a stable optimization convergence.

The InitialDisplacementMultiplier and DecayFactor parameters are pre-defined in the starting simulation file.

To set up the simulation operation sequence:

  1. Right-click the Automation > Simulation Operations node and select New.
  2. Rename the Simulation Operations 1 node to Shape Optimization.
  3. Create an operation to clear the solution fields and reset the mesh adaption in case of a restart:
    1. Right-click the Shape Optimization > Operations node and select New > Clear Solution.
    2. Select the Clear Solution node and set the following properties:
      Property Setting
      Clear Fields Activated
      Reset Mesh Activated
      Clear Adjoint Activated

    In order to run the sequence in a fully automated manner, the starting volume mesh, and the zero initial displacement multiplier are included in the simulation operations.

  4. Right-click the Operations node and select New > Mesh.
  5. Initialize the displacement multiplier:
    1. Right-click the Operations node and select New > Set Parameter.
    2. Rename the Set Parameter node to Set Initial Displacement Multiplier.
    3. Select the Set Initial Displacement Multiplier node and set the following properties:
      Property Option
      Parameter [Displacement Multiplier]
      Value ${InitialDisplacementMultiplier}
  6. Create the optimization loop:
    1. Right-click the Shape Optimization > Operations node and select New > Loop.
    2. Select the Loop node and set Stopping Criterion Predicate to Maximum Steps.
  7. To update the mesh after each optimization step, right-click the Loop node and select New > Mesh.
  8. Solve the primal flow:
    1. Right-click the Loop > Operations node and select New > Solve Physics.
    2. Select the Solve Physics node and set Simulation Objects to Physics 1.
  9. Solve the adjoint flow:
    1. Right-click the Loop > Operations node and select New > Solve Adjoint.
    2. Select the Solve Adjoint node and set the following properties:
    Property Setting
    Adjoint Cost Functions Mass Flow Difference Indicator
    Compute Surface Sensitivity Activated
  10. Update the displacement multiplier:
    1. Right-click the Loop > Operations node and select New > Set Parameter.
    2. Rename the Set Parameter node to Set Displacement Multiplier.
    3. Edit the Set Displacement Multiplier node and set the following properties:
      Property Option
      Parameter DisplacementMultiplier
      Value ${DisplacementMultiplier}*${DecayFactor}
      The primal and adjoint runs stop when their respective solver-specific stopping criteria are fulfilled.