M-Star Optimizer

The Optimizer GUI uses advanced optimization algorithms to optimize a given quantity by changing an input property. For example, with a proper setup, this utility can be used to minimize blend time of a system by varying the impeller location.

If additional customizations are needed beyond what is provided in this GUI, you may be interested in using the Python Pre API and leverage the many options available in external python libraries. See Optimize Blend Time

How to use

1 - Create your case in M-Star Pre

Prepare your msb file.

  • Since many simulations will be run, it is recommended to use the coarsest resolution you can use for your system without sacrificing result quality.

  • If your minimized quantity is going to be the simulation run time, be sure to setup a Stop Condition on the Simulation Parameters to stop the simulation based on your criteria.

2 - Define a global variable for minimation

If you have not done so already, define a new global variable that will be used for minimization. See Global Variable for more information.

It is usually recommended to apply a time filtering to the global variable. Depending on how they are setup they can show some noise due to inherit nature of transient simulations. Use the filtering capability to filter the global variable value at runtime in order to use a more stable value in your convergence criteria.

3 - Save your work and start the Auto-Optimizer

In the Run dropdown menu in the pre-processor, click “Run Auto-Optimizer”. Note that auto-optimizer works with the original msb file, so no files are exported at this time. The auto-optimizer will open up, and prepopulate with your M-Star File name and show you the working directory. The working directory is placed in the same folder as the msb file and named using the msb file itself.

4 - Setup the Auto-Optimizer

If this is the first time running the auto optimizer, click Setup. Select the GPUs you want to use for processing. Note that one simulation is run at a time, so the GPUs selected will be used to run a single simulation at a time.

Select the optimization algorithm to use. The following algorithms are available:

Make your selection and click OK.

  • Input Property - Use this dropdown box to select the parameter that will be changed by the optimizer.

  • Minimum/Maximum input value - This defines the allowable range for values of the Input Property. The optimizer will use this bounded range in its optimization routine.

  • Minimized Variable - This is the global variable that will be minimized. The last value reported by the solver is returned to the optimization routine.

5 - Click Run

Click Run! The optimization process will start. The current best result is highlighted with an icon in the listing.

How it works

The input variable is changed by the selected optimization algorithm in order to setup new simulations. The optimization algorithm then responds to the result and either runs another simulation or stops, based on whatever criteria has been setup or implemented. The implementation details of the algorithms themselves are beyond the scope of this document.

Example

Coming soon