Application Builder Updates

For users of the Application Builder, COMSOL Multiphysics® version 5.5 brings add-ins to the software as well as Form Editor and Method Editor improvements. Read about these Application Builder updates in detail below.

Add-Ins to COMSOL Multiphysics®

Model methods, introduced in version 5.3, enable you to perform complex operations directly on the model you are working on, such as setting up geometry sequences from data in a text file, changing solver settings based on specific criteria, or creating template plot groups. With version 5.5, you can define these methods as Add-Ins and save them as separate MPH-files. Add-ins can also include Application Builder forms, allowing you to create your own Model Builder tree nodes with associated Settings windows, as well as standalone dialog boxes. Both support custom-made user interfaces. By saving these model methods and forms as individual files, you are able to add them into any MPH-file that you are working on.

Add-ins can be created in the Application Builder, available in the version for the Windows® operating system, but can be accessed on all platforms, including macOS and the Linux® operating system.

A mountain bike fork model is split in half using the Planar Cut add-in in COMSOL Multiphysics version 5.5 and the original geometry is shown next to the updated geometry.
The Planar Cut add-in can be used in any COMSOL Multiphysics® model to remove half of a symmetric geometry, by adding and running multiple geometry operations.

Form Editor

In the Application Builder toolbar, there is a new Link with Editor button. When enabled, selecting a Form or Method in the Application Builder tree brings its editor to the top, if open. The Graphics form object has been improved such that you can control which of the standard toolbar groups to show in your application. You can also change the background color of the toolbar. For the Line form object, you can set the line thickness and line color.

Method Editor

For the Method Editor, you can run methods from the context menu, useful when developing model methods. Additionally, a new method, clearDebugLog, has been added for programmatically clearing the debug log windows. Finally, there are new toDouble conversion methods from floats, float arrays, and float matrices.

The Method Editor is shown for a simulation application and the Run option is highlighted in the Application Builder tree.
Run methods from the context menu in the Application Builder tree.

File Declarations in Command Line Arguments

Application input arguments now support file declarations. This is useful, for example, when you want to let users supply input files, as shown here:

comsol.exe -run file_arguments.mph -appargnames interpfile -appargvalues 'C:\data\functions\simpleinterp.txt' This example uses an application argument interpfile linked to a file declaration to read the interpolation file simpleinterp.txt when launching the application. This file is then used in an interpolation function in the application's embedded model.