Introduciton

In the new version of Star-CCM+, a very useful feature called Design Manager has been added. It is mainly used for optimization and parametric sweep simulations.

Applications

The development and optimization of most engineering products involve systematic analysis of the parameters affecting their performance. Product performance is related to its primary operational characteristics, which typically refer to measurable quantities such as weight, dimensions, or resistance. Identifying key parameters and adjusting their values to improve product performance usually requires numerous design iterations.

Each iteration either improves or worsens the product to some extent. However, every design provides valuable information on how to seek the ultimate goal among the infinite potential designs. This information also reflects the operating mechanism of the entire model. While each piece of information might be like a “blind man touching an elephant,” if enough information can be collected and machine learning methods are used, then although each blind person sees only a part of the elephant, from the perspective of all the information, this group of blind people can truly “see” what the elephant looks like.

The issue

In the current version of Star-CCM+, when performing calculations using the sweep mode, if a single design manager is used to sweep a large number of cases, the overall computational efficiency decreases.

For example, consider the following sweep case with a total of 12 variables, each taking 3 values for the sweep. The overall computational load is 3^12 = 531,441, meaning over 531,000 calculations need to be completed! Assuming we have the time and hardware to run these, once this sweeeeeep starts, we observe a sharp decline in computational efficiency. This can be seen from the CPU usage, which indicates that the CPUs are not fully utilized.

sweep size

sweep_design_table

Possible reason: It could be due to Star-CCM+ itself. For instance, if fewer variables are chosen, such as running calculations for only 7 variables, the overall computation load is 3^7 = 2,187. In such cases, CPU utilization remains consistently high throughout, leading to significantly improved computational efficiency.

Countermeasure

Based on the earlier description, the strategy would be to divide a large computation set into several smaller sets. In this case, Java programming can be utilized. Use a Java program to iterate over several variables, while iterating over the remaining variables in Star-CCM+. Ensure that the overall computation load in the Design Manager does not exceed 3000. After each computation set is completed, save its result file as a separate CSV file, which can later be merged with the data files.

java file


...

public class java1 extends MdxMacro {

  double[] W = { 20.0, 25.0, 30.0};
  double[] heat = { 10.0,15.0, 20.0 }; 
  double[] v = { 10.0,15.0, 20.0 }; 

  ...
  }

  private void execute0() {

    ...

    for (int i = 0; i < W.length; i++) {
    ...
      mdxStudyParameter_0.getBaselineQuantity().setValueAndUnits(W[i], units_0);

      for (int j = 0; j < heat.length; j++) {
      ...

        mdxStudyParameter_1.getBaselineQuantity().setValueAndUnits(heat[j], units_0);

        for (int k = 0; k < v.length; k++) {
   ...

          mdxStudyParameter_2.getBaselineQuantity().setValueAndUnits(v[k], units_0);

          ...

Conclusion

Due to Star-CCM+’s support for Java, integrating Java code with the Design Manager can significantly enhance computational efficiency. This integration allows for optimal utilization of time and hardware resources, while also generating extensive datasets for further research purposes.