Application Builder Updates

For users of the Application Builder, COMSOL Multiphysics® version 6.2 provides a Timer events feature for executing methods without user interaction, the ability to create ribbon tabs in the Model Builder through the use of add-ins, and new built-in methods for simplifying auxiliary model results. Learn more about these updates below.

Timer Events

A new Timer events feature is available that can trigger the execution of methods at specific intervals, without user interaction. The methods can, for example, contact external servers, run simulations, and update the user interface of a simulation app. This feature is useful when creating digital twins or internet of things (IoT)-connected simulation apps.

The Application Builder UI, showing the timer1 event highlighted in the Application Builder tree, and the corresponding Settings window, showing various commands that can be implemented.
A Timer events node in the Application Builder.

Ribbon Tabs from Add-Ins

Add-ins can now be used to create custom ribbon tabs, menus, and buttons. In previous versions, add-ins included support for adding your own custom nodes in the Model Builder tree through Settings Forms and Method Calls, as well as running methods and showing dialog boxes from the Developer ribbon tab. In version 6.2, this functionality can be combined with new ribbon tab support, making it possible to add nodes, run methods, or show dialog boxes from a custom tab. The Model Builder ribbon tabs can now be created from add-ins made in the Application Builder, allowing custom user-defined options to be easily accessible. Such dedicated ribbon tabs can, for example, contain command and function buttons for specific actions. An example add-in is available in the Add-In Libraries (from the Developer tab in the Model Builder) that can be used to assign randomized colors to all domains or boundaries in a model.

The Model Builder UI with a customized ribbon tab created with add-ins, used to color different domains for the busbar assembly shown in the Graphics window.
An add-in ribbon tab is used to color boundaries in a busbar assembly.

Zoom Controls in Editor Windows

The Form Editor, Method Editor, and Main Window editor have been updated with new zoom controls. This makes it easier to work with large forms, set up a window layout, and increase the font size in the Method Editor. The new functionality can be accessed through the context menu, keyboard shortcuts, the mouse wheel while holding the Ctrl key, or the new zoom box to the left of the scroll bar.

The Application Builder UI showing the new zoom controls within the Form Editor's context menu.
The new zoom box in the lower-left corner of the Form Editor and zoom-related options in the context menu.

Custom File Types

A new File Type declaration has been added that makes it possible to define your own custom file types. Such file types are available to use in File Import or as arguments to methods that open file browsers. These can be created from the More Declarations menu in the ribbon, the Declarations node’s context menu, or the settings of File Import form objects.

Application Builder Tree Filtering

A new text field in the Application Builder enables filtering of all nodes based on their label. This new functionality can be used to quickly navigate to specific methods or forms. The following keyboard shortcuts are available: Ctrl+L to put the focus on the filter text field, the down arrow key to move from the text field to the Application Builder tree, Enter to open the editor of a selected node, and Esc to clear the filter.

The Application Builder UI with the term "models" typed into the Application Builder filter text field and the corresponding model nodes highlighted within the Application Builder tree.
Filtering for the term "models" in the Installation Verification simulation app.

Default User-Defined Add-In Library

A new Add Add-In button and User-Defined Library node are now included in the Add-in Libraries tree. The Add Add-In button offers a streamlined workflow for users who want to import a custom add-in MPH file that has been shared with them. In previous versions, adding your own or shared add-ins required specifying and adding a folder from your computer disk to the Add-in Libraries tree. While this process is still available and recommended for users developing and incorporating their own add-ins, users looking to quickly add a shared add-in can click the Add Add-In button and select the add-in from their computer disk, and the corresponding add-in will automatically appear under the User-Defined Library node.

Model Manager API

For simulation apps running in COMSOL Multiphysics®, the new Model Manager application program interface (API) can be used to communicate with Model Manager databases. This functionality can be used to import or export auxiliary data from a database or to save new versions of an app.

The demo database with the term "battery" in the search text field and the resulting battery-related Model Manager databases shown within the demo database tree.
The Model Manager database in the ribbon and the Demo Database window with an example app selected.

Results Configurations in Apps

The Results node in the Model Builder now offers Graph Plot Style, Multiselect Solution, or Single-Select Solution configurations. These configurations make it possible to share, for example, parameter or time settings between multiple plot groups. In the Application Builder, they can be used together with the Data Access option in the Developer tab, for instance, to create apps that have a single solution setting controlling multiple Graphics form objects.

The plot groups within the busbar model have been set to point to a Single-Select Solution configuration, enabling the Parameter selection within the busbar app to update both plots simultaneously, without the need to write any method code.

Plot from Auxiliary Models

In previous versions, the Method Editor included built-in methods for loading additional models from, for example, the file system or from MPH files embedded in the Files node in the Application Builder. In version 6.2, new functionality makes it possible to display plot groups from extra models in Graphics form objects, making it easier to visualize results in apps that use auxiliary models. Note that this functionality is not supported in compiled standalone apps.

The demo database with a model's plot group highlighted to be added as a Graphics form object within an app.
An app that plots models stored in a Model Manager database.

Miscellaneous Additions

There are several general improvements:

  • The performance of applications with many forms and UI components in the Form Editor has been improved.
  • Support for using standard keyboard shortcuts for cut, copy, and paste (Ctrl+X, Ctrl+C, and Ctrl+V) in the Application Builder tree has been added. In addition, a new Enter keyboard shortcut can be used for forms and methods to open the associated editor.
  • When running apps on Windows®, the Web Page and Video form objects will now use the operating system's Microsoft Edge® WebView2 runtime.
  • The tables in the primitive declaration nodes such as String and Double can now be sorted by clicking the table headers.
  • The appearance of buttons and tables has been improved when running apps in dark theme on macOS.
  • A new Form Wizard template, Subwindows, tabs, and graphics, allows for adding forms to subwindows directly from the wizard. This functionality is also available when making custom layout templates.
  • The Graphics form object toolbar includes options for Direct Shadows, Ambient Occlusion, Fresnel Transmittance, and Enable Tooltip.
  • Methods relating to the graphics environment (environmentReflections, skybox, and rotateEnvironment) can be added to apps. There is now a formattedDateTime method for converting an amount of time given in milliseconds since the epoch to a formatted date-and-time string.
  • Compiled applications now automatically obfuscate the contained model, even if the app does not have an editing password set.

New Applications

COMSOL Multiphysics® version 6.2 introduces the following new example applications.