Simcenter STAR-CCM+ Adjoint Topology Optimization: How can I force user-defined cells to be fluid/solid

Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Xcelerator Share Simcenter Cloud HPC Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions


In this article we will discuss an alternative method of defining a customized volume ratio constraint such that the user can mark certain cells to be either fluid or solid.


Topology optimization is a class of generative engineering methods that optimizes material layout within a given design space based on design objectives and constraints. Simcenter STAR-CCM+ provides a topology optimization method that generates flow channels by placing solid material in those parts of the design space that do not contribute to the engineering objective.

A “solid volume ratio” constraint is required for running the adjoint topology optimization. This constraint helps in driving the solution and delivering a desired topology. There is a built-in constraint to define the volume ratio which can be created as shown below. 



Solid material is built in the domain to satisfy this constraint. The spatial location of where the solid is built is defined by the objective function. 

In this article we will discuss an alternative method of defining a customized volume ratio constraint such that the user can mark certain cells to be either fluid or solid. The setup we will discuss is more applicable for cases where we want to fix certain cells to be fluid, that is because if we want cells to be solid, we can modify our starting design space accordingly. 

A specific use case for this application is to fix the interfaces of the design space to be completely fluid. The default setup doesn’t allow the user to control the boundary condition at a fluid/fluid interface. The optimizer is free to build solid on the interface to improve the objective function. This could result in modification of the interface shape which can be undesirable. We can follow the workflow shown below to avoid this issue.   

How to fix user-defined cells to be solid or fluid?
To achieve this task, follow the steps below.
  1. Create a user-defined field function for material indicator. Define it such that we use spatial coordinates to fix the value of the material indicator. E.g. the function below sets the value of field function ”Custom_MaterialIndicator” to “1” for specific cells and returns the built-in material indicator (solved for by the optimizer) for the rest of the domain.
    FF name = Custom_MaterialIndicator
    FF definition = $${Position}("Spherical 1")[0] < <4mm> ? 1 : ${MaterialIndicator}

  2. Create a user-defined field function for solid material indicator as shown below. 
    FF name = Custom_SolidMaterialIndicator
    FF definition = 1-${Custom_MaterialIndicator}

  3. Create a “Volume Average” Report with the design space as input geometry and field function set as Custom_SolidMaterialIndicator. i.e.,
    Report type = Volume Average
    Input Parts = Design Space Region
    FF = Custom_SolidMaterialIndicator

  4. Use the report created in step-3 to create a user-defined constraint for the topology optimization. 

With the setup defined above we are replacing the built-in volume ratio constraint with a customized user-defined volume ratio constraint. 

An example simulation file is attached with the above setup. The example file demonstrates a simple problem statement with a single inlet and outlet. The image below shows the cells that were marked using the user-defined field function to be fixed as fluid. The objective function of the study is to minimize pressure drop.  


The animations below show the optimized topology with and without a user-defined constraint. 

Design Evolution with User-defined constraint:

Design Evolution with User Defined Constraint

Design Evolution without User-defined constraint:

Design Evolution without user-defined constraint

KB Article ID# KB000112584_EN_US



Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+