学习中心

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. Below, 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
    • Changing Events settings
    • Creating command sequences
  • Working in the Command Sequence window
    • Using Convert to Method to create a new method
  • Reviewing code in the Method Editor window

Further Learning


请提交与此页面相关的反馈,或点击此处联系技术支持

Baidu
map