Optimization Module

Optimize Multiphysics Models

The Optimization Module, an add-on to COMSOL Multiphysics®, provides tools for parameter, shape, and topology optimization, as well as parameter estimation. Used together with other modules from the COMSOL product suite, you can optimize devices and processes that involve phenomena such as electromagnetics, structural mechanics, acoustics, fluid flow, heat transfer, and more. You can optimize geometric dimensions when combined with the CAD Import Module, Design Module, or any of the LiveLink™ products for CAD.

Starting with an objective function to improve and a set of design variables to change, along with an optional set of constraints, the software will search for an optimal design. Any inputs to the model — whether they be geometric dimensions, part shapes, material properties, or material distribution — can be treated as design variables, and any model output can be used as the objective function, which is then minimized or maximized.

Contact COMSOL
An optimized drone model showing the stress and magnitude of the displacement field.

What You Can Optimize with the Optimization Module

Combine the Optimization Module with any of the COMSOL® add-on products to perform optimization within several different physics areas.

A close-up view of two hook geometry models.

Structural Topology Optimization

Topology optimization of a hook, where the material is distributed for optimal compliance for a given total weight.

A close-up view of a model with copper coils showing the magnetic field.

Coil Optimization

Parameter and shape optimization of a ten-turn coil, optimized with respect to the magnetic flux density and power dissipation.

A close-up view of a permanent magnet motor.

Parameter Optimization for Magnets

Parameter optimization of an electric motor to identify the best position and shape of the permanent magnets based on torque.

A close-up view of a magnetic circuit showing the magnetic flux density.

Topology Optimization for Magnetics

Topology optimization of a magnetic circuit used in a loudspeaker driver for reduced large-displacement nonlinear response.

A close-up view of a tweeter dome model showing the acoustic pressure.

Optimization of Loudspeaker Components

Shape optimization of a loudspeaker tweeter dome and waveguide achieves a flatter response curve and improved radiation pattern.

A close-up view of two circular domain models showing the sound-pressure level.

Acoustic Frequency-Response Optimization

Shape optimization of an acoustic demultiplexer; the acoustic energy goes to different output ports for different frequency bands.

A close-up view of a Tesla microvalve model showing the flow field.

Fluid Flow Optimization

Parameter, shape, and topology optimization for a Tesla microvalve maximizing the ratio of the pressure drop for the bidirectional flow.

A close-up view of a pipe network model with two heat producers.

Optimization of Pipeline Networks

Topology optimization of a district heating network layout.

Features and Functionality in the Optimization Module

COMSOL Multiphysics® provides tailored user interfaces with dedicated solvers for the different types of optimization available.

A close-up view of the Optimization study Settings window and an optimized bracket model in the Graphics window.

Parameter Optimization

To set up a parameter optimization in COMSOL Multiphysics®, you only need to add a general-purpose Optimization study. An associated settings window prompts you to add an objective function, control variables and parameters, and constraints. The parameters that you use for parameter optimization can be the same that were used to set up the model in the first place, such as geometry dimensions, material properties, or boundary loads. Whereas a parametric sweep will give you an overview of the design parameter space, a parameter optimization will give you the optimal parameters and objective function values.

When running a parameter optimization with parameters that define geometry dimensions, remeshing is needed at each iteration — a process that is fully automatic with the Optimization Module. The optimal solution is always a true CAD part that can be immediately exported to industry-standard CAD formats. This requires the CAD Import Module, Design Module, or one of the LiveLink™ products for CAD.

A close-up view of the Model Builder with the Topology Optimization node highlighted and a bracket model in the Graphics window.

Topology Optimization

Topology optimization represents even greater freedom in geometry variation than both parameter and shape optimization. This approach allows for material removal and addition during the optimization process, allowing for holes to be created in the geometry not originally present in the design. This method typically results in an organic-looking design, and is a popular method for light-weighting. A dedicated user interface and study are available for topology optimization.

The extreme design freedom associated with topology optimization can result in designs that cannot be manufactured with conventional methods. It is therefore common to introduce manufacturing constraints, because this enables the optimized design to be produced using extrusion or milling.

In addition, just like with shape optimization, remeshing is not required for topology optimization. The optimal and smoothed design is made available in the STL, 3MF, or PLY file formats for further use in another software or for verification analysis within COMSOL Multiphysics®.

A close-up view of the Topology Optimization study Settings window and a hook model in the Graphics window.

Gradient-Based Solvers

Gradient-based optimization methods are used when the derivatives can be computed efficiently using the adjoint method. This is possible for custom objectives or constraints, as long as these are differentiable. This is thanks to the core technology of COMSOL Multiphysics® that features symbolic differentiation, which also provides the flexibility needed for solving custom multiphysics problems.

Gradient-based optimization can be used with thousands, even millions, of design variables. This is often the case for shape or topology optimization, where the design variables represent field quantities that are distributed throughout space and represented by different values in each mesh element.

The gradient-based methods simultaneously compute all analytic derivatives, whereas the derivative-free methods have to approximate each derivative and will take more time as the number of design variables increases.

The gradient-based methods included in the Optimization Module are:

  • Method of moving asymptotes (both MMA and GCMMA)
  • Interior point optimizer (IPOPT)
  • Sparse nonlinear optimizer (SNOPT)
  • Levenberg–Marquardt
A close-up view of the Model Builder with the Shape Optimization node highlighted and an optimized model in the Graphics window.

Shape Optimization

As an alternative to varying a set of CAD parameters, you can allow for the geometry to deform more or less freely by using the built-in features for shape optimization. This approach allows for greater freedom and can sometimes produce even better results than parameter optimization. A set of dedicated user interfaces are available for easily defining the allowed deformations of boundaries in a 2D or 3D model. Additionally, a specialized shell shape optimization feature is available, as well as a shape optimization study type for controlling the solvers.

The tools used for shape optimization in solids are based on methods that deform the mesh in a controlled manner where remeshing is not required. The optimal geometry is available in a faceted surface mesh format, such as STL, 3MF, or PLY. This geometry can then be reused in a separate analysis within COMSOL Multiphysics® or exported for use in another software.

A close-up view of the Model Builder with the Parameter Estimation node highlighted and a 1D plot in the Graphics window.

Parameter Estimation

A model is only as accurate as the input, but it can be difficult to source accurate material parameters from suppliers. To account for nonlinearities, you might need to perform experiments. However, trying to design experiments that allow you to extract the desired parameters with analytical methods can be challenging.

A solution to these problems is to use the parameter estimation functionality of the Optimization Module to find the set of parameters of a model that minimizes the deviation between the physical and the simulated experiment. In addition to the interface for general parameter estimation, a specialized user interface for curve fitting is available for fitting a curve (represented by a model expression) to time-dependent data.

The parameter estimation method is based on least-squares fitting and can be used when the reference data is a function of time or a single parameter. In many cases, you will get an estimate of the variance and confidence of the estimated parameters.

To get started with parameter estimation, a ready-to-use app is available with the capabilities of using built-in tutorial samples or imported measurement data, as well as entering custom model expressions for the curve to be fitted.

A close-up view of the Optimization study Settings window and two brace models in the Graphics window.

Derivative-Free Solvers

Derivative-free optimization methods are used when the search directions needed by the optimization solver can only be computed indirectly. This is often the case for parameter optimization where the control variables represent geometry dimensions and remeshing is needed in each iteration step.

The derivative-free methods included in the Optimization Module are:

  • Trust-region methods
    • Bound optimization by quadratic approximation (BOBYQA)
    • Constraint optimization by linear approximation (COBYLA)
  • Direct search methods
    • Nelder–Mead (the Simplex method)
    • Coordinate search

Optimization and Simulation Apps

Using the Application Builder together with the Optimization Module opens the door for a wider set of users to run optimization studies independently, without the need to consult a simulation expert.

For example, optimization models can include parameter estimation based on experimental data; an app tailored to that particular task would enable a user to input various sets of experimental data without worrying about the details of the optimization model itself.

Using apps also offers a more efficient workflow for optimal control. The Optimization Module can be used to identify which transient input gives a desired transient output. In this case, you might want to adjust the desired output based on experimental results. Creating an app for this task packages the complexity of this process into a custom user interface, allowing various users to run optimal control simulations simply by specifying their desired outputs.

Every business and every simulation need is different.

In order to fully evaluate whether or not the COMSOL Multiphysics® software will meet your requirements, you need to contact us. By talking to one of our sales representatives, you will get personalized recommendations and fully documented examples to help you get the most out of your evaluation and guide you to choose the best license option to suit your needs.

Just click on the "Contact COMSOL" button, fill in your contact details and any specific comments or questions, and submit. You will receive a response from a sales representative within one business day.

Next Step

Request a Software Demonstration