Running the Topology Optimization Using Simulation Operations

You define a sequence of simulation operations to run the flow analysis and the adjoint analysis alternately. The simulation operations access the previously defined stopping criteria.

The following flowchart details the simulation operations sequence:

In order to compute the final pressure drop at the end of the simulation, you must run one initial flow solution before entering the optimization loop.

To define and run the simulation operation sequence:
  1. Right-click the Automation > Simulation Operations node and select New.
  2. Rename the Simulation Operations 1 node as Run Topology Optimization.
  3. Create an operation to clear the solution fields and reset the mesh adaption in case of a restart:
    1. Right-click the Run Topology Optimization > Operations node and select New > Clear Solution.
    2. Select the Clear Solution node and set the following properties:
      PropertySetting
      Reset MeshActivated
      Clear AdaptionActivated
      Clear AdjointActivated
  4. Create an operation to set the initial iterations for primal analysis:
    1. Right-click the Run Topology Optimization > Operations node and select New > Set Parameter.
    2. Rename the Set Parameter node to Initial Primal Iterations.
    3. Select the Initial Primal Iterations node and set the following properties:
      PropertySetting
      ParameterPrimalIterations
      Value300
  5. Create an operation to run the primal analysis once before entering the loop:
    1. Right-click the Operations node and select New > Solve Physics.
    2. Rename the Solve Physics node to Solve Initial Primal.
    3. Select the Solve Initial Primal node and set Simulation Objects to Physics 1.
  6. Create an operation that loops through the topology optimization:
    1. Right-click the Operations node and select New > Loop.
    2. Select the Loop node and set Stopping Criterion Predicate to Optimization Iteration Monitor Criterion.
  7. Create an operation within the loop to adjust the iterations for primal analysis:
    1. Right-click the Loop > Operations node and select New > Set Parameter.
    2. Rename the Set Parameter node to Primal Iterations.
    3. Select the Primal Iterations node and set the following:
      PropertySetting
      ParameterPrimalIterations
      Value100
  8. Create an operation within the loop to run the adjoint analysis:
    1. Right-click the Loop > Operations node and select New > Solve Adjoint.
    2. Select the Solve Adjoint node and set Adjoint Cost Functions to Pressure Drop Cost Function.
  9. Create another operation within the loop to run the flow analysis:
    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.
  10. Right-click the Simulation Operations > Run Topology Optimization node and select Activate.
  11. Right-click the Run Topology Optimization node one more time and select Play/Resume Simulation Operations.
  12. When the simulation has finished, save it as adjointTopologyOptimization_TOresults.sim.