Learning Center

Course:

Getting Started with Building Simulation Apps

Increasing Complexity of Apps Using Command Sequences and Methods


Using the Application Builder in COMSOL Multiphysics®, you can create command sequences and write methods to automate or extend functionality and operations in your simulation app. Examples of this include automating the graphics display to update when a setting (like the mesh density level) is changed or reading from a file and dynamically changing other choices in the app as a result. Learn how to convert command sequences into methods to generate code automatically as well as write code for your app to perform the operations you want it to.

Follow along by downloading the model file here.

Tutorial: More on Using Command Sequences and Methods

The simplified thermal microactuator tutorial model is used for the model example, which a simulation app was developed for previously. The app is extended such that when a user chooses a mesh density level from the menu, the mesh for the model geometry is built and displayed automatically. This is done through changing the Events section of settings for the original form object, from which a command sequence is created and then converted into a new method. Topics covered in the tutorial video include the following:

  • Form object Settings window
    • Change Events settings
    • Create command sequence
  • Working in the Command Sequence window
    • Use Convert to Method to create new method
  • Review code in the Method Editor window

Further Learning


Submit feedback about this page or contact support here.