Skip to content
Berguin, Steven Henri edited this page Dec 17, 2017 · 2 revisions

Overview

STAR-ASO stands for STAR-CCM+ Aerodynamic Shape Optimization. It offers four capabilities and the wiki provides instructions for each one:

  • Create: automatically create and run a CFD simulation from scratch
  • Adapt: adaptive mesh refinement to reduce error w.r.t. some functional (e.g. CD or CL)
  • Optimize: use adjoint methods and free-form deformation to perform shape optimization
  • DOE: run parameter sweeps on flight conditions (alpha, M, Re)

Intended application: external transonic flow over airplanes and airfoils.

What is STAR-CCM+

STAR-CCM+ is a commercial CFD package developed by CD-Adapco (now Siemens). It handles multi-physics, steady or unsteady flows, and offers various levels of assumptions, ranging from Euler to Navier-Stokes and more (learn more here). As shown below, STAR-CCM+ offers all the building blocks to perform Aerodynamic Shape Optimization (ASO) and Adaptive Mesh Refinement (AMR). However, it does not have built-in logic to do it on its own; algorithms must be provided through the Java API. The STAR-ASO project therefore adds value by providing such algorithms in the form of a complementary framework written in Java and Python, which holds the advantage that the code is open-source and extensible.

STAR-CCM+ offers different solver schemes and mesh types. However, for all intents and purpose, it can be described as a finite volume approach with implicit time integration and 2nd order upwind spatial discretization (higher order schemes available). The flux at the boundary is reconstructed using Roe flux difference splitting with the Venkatakrishnan limiter (other options available). Optionally, to accelerate convergence, an Algebraic Multi-Grid (AMG) method can be used with 30 V-cycles by default and a Gauss-Seidel relaxation scheme. The volume grid is unstructured, with either hexahedral or polyhedral cells, and can be combined with prism layers to resolve the boundary layer.

STAR-ASO Packages

The file structure (package diagram) is provided below and a summary is as follows:

  • jar contains "zipped" up java packages (needed when running on cluster)
  • rae contains some simple airfoil examples to get you started
  • src contains all source code
    • java
      • framework contains java classes to automate things in STAR-CCM+
      • macros contains main classes that drive STAR-CCM+
    • pbs contains pre-made PBS scripts to run on the cluster
    • python contains scripts that call STAR-CCM+ macros

Optimization Framework

The optimization algorithm is implemented in python, which makes calls to STAR-CCM+ whenever a function evaluation or gradient is needed, as shown below. This communication is accomplished through the Java API, where Java classes were written to read CSV file inputs, update appropriate fields in STAR-CCM+, and write back outputs to CSV file for Python. The Java framework can be thought of as a wrapper that allows Python to treat STAR-CCM+ as any regular function call.

DOE Framework

The logic to run a batch of DOE cases is implemented in python, which makes calls to STAR-CCM+ whenever a function evaluation is needed, as shown below. This communication is accomplished through the Java API, where Java classes were written in such a way to pass flight condition arguments through the command line. The Java framework can be thought of as a wrapper that allows Python to treat STAR-CCM+ as any regular function call.

NOTE: This setup assumes that reports called (CD, CL, CM) already exist with the simulation. If you need the DOE to return anything other than (CL, CD, CM), you will have to create the appropriate report(s) in your simulation and modify the function called "parse_value(filename, header)" in the "RunDOE.py" script on your own.

Java Class Diagram

Finally, the most complicated part of this framework is the Java interface. All python scripts are straight-forward, single-file programs. A class diagram of the Java framework is provided here-under to aid the reader better understand the architecture. In short, there are two types of files which have been color-coded below. Macros are custom classes that used methods contained in the framework classes to accomplish a specific goal (e.g. shape optimization, mesh adaptation, etc.). Note that usually, in Java, every application must contain a main method:

public static void main(String[] args){}

However, you will notice that no such method exists in the Java macros:

public class UserClassName extends StarMacro {}

This is because the main class already exists within the STAR-CCM+ Java API and StarMacro's are "hooks" for the user to implement specific commands to be executed at run-time.

Why not just use the STAR-INNOVATE add-on?

That's actually a valid question. The short answer is that the software was not released until after this project started. STAR-INNOVATE came out with STAR-CCM+ version 12.04 towards the end of 2017, whereas this project started with version 12.02 towards the beginning of the same year.

STAR-INNOVATE is an add-on for STAR-CCM+. According to Siemens, with the "STAR-Innovate add-on, users can [...] perform single and multi-objective optimization studies to intelligently search the design space using the same time-tested and proven technology found in HEEDS."

We recommend giving STAR-INNOVATE a test-drive before deciding to use STAR-ASO because it is commercially supported and probably rigorously tested. However, should it fall short of your expectations, STAR-ASO holds the advantage that it is open-source and extensible.