This weblog publish was initially revealed in my web site : xuechao.net
You possibly can learn the unique article at this address.
## Introduciton
Within the new model of Star-CCM+, a really helpful characteristic referred to as Design Supervisor has been added. It’s primarily used for optimization and parametric sweep simulations.
## Purposes
The event and optimization of most engineering merchandise contain systematic evaluation of the parameters affecting their efficiency. Product efficiency is expounded to its main operational traits, which usually seek advice from measurable portions similar to weight, dimensions, or resistance. Figuring out key parameters and adjusting their values to enhance product efficiency normally requires quite a few design iterations.
Every iteration both improves or worsens the product to some extent. Nonetheless, each design supplies invaluable info on the best way to search the last word aim among the many infinite potential designs. This info additionally displays the working mechanism of all the mannequin. Whereas each bit of knowledge is perhaps like a “blind man touching an elephant,” if sufficient info may be collected and machine studying strategies are used, then though every blind individual sees solely part of the elephant, from the angle of all the knowledge, this group of blind individuals can really “see” what the elephant appears to be like like.
## The problem
Within the present model of Star-CCM+, when performing calculations utilizing the sweep mode, if a single design supervisor is used to brush numerous circumstances, the general computational effectivity decreases.
For instance, contemplate the next sweep case with a complete of 12 variables, every taking 3 values for the sweep. The general computational load is 3¹² = 531,441, that means over 531,000 calculations have to be accomplished! Assuming we’ve the time and {hardware} to run these, as soon as this sweeeeeep begins, we observe a pointy decline in computational effectivity. This may be seen from the CPU utilization, which signifies that the CPUs aren’t absolutely utilized.
Potential cause: It may very well be because of Star-CCM+ itself. For example, if fewer variables are chosen, similar to working calculations for less than 7 variables, the general computation load is 3⁷ = 2,187. In such circumstances, CPU utilization stays persistently excessive all through, resulting in considerably improved computational effectivity.
## Countermeasure
Primarily based on the sooner description, the technique can be to divide a big computation set into a number of smaller units. On this case, Java programming may be utilized. Use a Java program to iterate over a number of variables, whereas iterating over the remaining variables in Star-CCM+. Make sure that the general computation load within the Design Supervisor doesn’t exceed 3000. After every computation set is accomplished, save its end result file as a separate CSV file, which may later be merged with the info information.
## java file
…
public class java1 extends MdxMacro {
double[] W = { 20.0, 25.0, 30.0};
double[] warmth = { 10.0,15.0, 20.0 };
double[] v = { 10.0,15.0, 20.0 };
…
non-public void execute0() {
…
for (int i = 0; i < W.size; i++) {
…
mdxStudyParameter_0.getBaselineQuantity().setValueAndUnits(W[i], units_0);
for (int j = 0; j < warmth.size; j++) {
…
mdxStudyParameter_1.getBaselineQuantity().setValueAndUnits(warmth[j], units_0);
for (int okay = 0; okay < v.size; okay++) {
…
mdxStudyParameter_2.getBaselineQuantity().setValueAndUnits(v[k], units_0);
…
## Conclusion
As a consequence of Star-CCM+’s help for Java, integrating Java code with the Design Supervisor can considerably improve computational effectivity. This integration permits for optimum utilization of time and {hardware} sources, whereas additionally producing intensive datasets for additional analysis functions.