Application Builder Updates


For users of the Application Builder, COMSOL Multiphysics® version 6.3 provides new functionality to communicate with OpenAI's GPT models, an interactive Java environment, and the ability to inspect and change parameters at any place in the model tree. Learn about these updates and more below.

Chatbot

A new Chatbot window is available, which makes it possible to communicate with OpenAI's GPT models to generate and debug COMSOL API for use with Java code and to prompt modeling questions related to the COMSOL Multiphysics® software. The chatbot functionality has been primed for use with COMSOL Multiphysics® and enables seamless interaction without having to copy-paste messages to and from external AI tools. Instead, methods can easily be attached to be checked for bugs or to run API code suggested by the AI model, with the results immediately visible in the Model Builder and the Graphics window.

The Chatbot window is available in the Windows® version of the software. In order to use it, an OpenAI account and an OpenAI API key are required. Note that obtaining an API key typically requires signing up for an API key payment plan.

The Chatbot window used together with the new Java Shell window to create a function through the COMSOL API for use with Java.

The Application Builder UI showing the Send to Chatbot drop-down menu, with the Find Bugs in compute option highlighted.
Code options in the Application Builder make it easy to prompt a chatbot conversation about a method, for example, to check it for bugs.

Java Shell

The Java Shell window is an interactive environment that provides a command prompt for running Java code, supporting all of the features of the Method Editor, such as code completion, syntax highlighting, and more. This new functionality can be used to quickly modify a model through the COMSOL API for use with Java, without needing to create a model method first. It can be used, for example, to prototype code for methods, bulk create features, inspect properties, or change declaration variables. It is also useful for debugging methods in the Application Builder, making it possible to perform code evaluations while stopped at a breakpoint.

The Java Shell window is available in the Windows® version of the software and can be accessed from the Model Builder, Application Builder, and Model Manager workspaces, where, for instance, it enables interaction with databases using the API.

Using the Java Shell window to set up a geometry programmatically. For outputs that correspond to model nodes, you can jump to the corresponding node in the Model Builder tree by double-clicking the output in the Java Shell window or selecting Go to Node from the toolbar.

The Application Builder UI with the Java Shell window opened and the getBoundingBox() prompt highlighted.
Using the Java Shell window to debug the buildGeometry method in the Transmission Line Calculator tutorial app.

Data Viewer

The Variables window that was previously used while debugging in the Application Builder displayed and allowed the modification of parameters, declarations, and Java variables when stopped at a breakpoint. In version 6.3, the window has been renamed Data Viewer and is now always accessible (including when in the Model Builder workspace), which enables quick viewing and updating of parameters and declarations no matter where you are in the software. The window also shows Java variables from the new Java Shell window.

The Application Builder UI showing the parameter and declaration values as well as variables in the Java Shell window.
The Data Viewer window in the Tuning Fork tutorial app, showing the values of the parameters, declarations, and Java Shell session variables.

Form Toolbars

A Form Toolbar is a new form object that can be added to a form's header area. The display of the toolbar depends on the form's context. For instance, if the form is used in a subwindow or as a settings form, the toolbar will be fixed at the top of the form, even when the content below scrolls out of view. This ensures that the toolbar is always easily accessible. If the form is used in a section within a form collection, the toolbar appears in the section header, offering a convenient location for section-specific commands.

This new feature can be seen in the Circuit Extractor, Image to Curve, Mesh Partition with Ball, and Planar Cut add-ins.

The Application Builder UI with the Form Toolbar header outlined.
The Form Toolbar is added to the header area in the Form Editor using the Image to Curve add-in.

An app of a response spectrum generator showing the acceleration in the Graphics window.
Example of a section toolbar in the Computing Response Spectrum tutorial app: The Message Log section toolbar contains a Clear Message Log button.

Method Editor

  • The Method Editor now supports Java 11, including code completion.
  • Several file-reading utilities have been updated to include support for specifying a delimiter. This includes readCSVFile, readMatrixFromFile, and readStringMatrixFromFile.
  • It is now possible to save a copy of a running app using the new saveApplicationCopyAs method. This option is also available as a command in GUI Commands > File Commands.

General Updates

The new and improved user interface design applies automatically to any simulation apps running on Windows®. For more information, see the COMSOL Desktop® release highlights page.

An app of a thermal actuator model showing the temperature in the Graphics window.
The new user interface, shown in Thermal Actuator Surrogate Model tutorial app.

When choosing icons in the Application Builder, it is now possible to filter the list of images, making it easier to locate the desired icon.

The Application Builder UI showing the settings for the Button icon.
A filtered icon list when choosing an image for a Button form object, as shown in the Transmission Line Calculator tutorial app.

New Tutorial Applications and Add-In

COMSOL Multiphysics® version 6.3 introduces a new add-in and several new example applications.