New to version 5.3: Model Method Feature
To help save time and make analysis more streamlined it is common for us to set up physics with parameterized inputs. Unfortunately, this approach can also mean repeating commands multiple times that can be time consuming and may introduce mistakes. Now you can reduce the time that this process takes and ensure uniformity of implementation by using the Model Methods available in COMSOL Multiphysics® version 5.3. Model Methods allow recording and executing strings of commands, similar to a macro which you can then edit or create custom commands to add functionality to your Modeling.
Here’s a simple method we developed to create a heat transfer node with initialized temperature and convection coefficients, all in a few clicks. Check it out!
Step 1) Start a new method
Under the Task Ribbon, click "Developer>Record Method". Change the Method type from "Application method" to "Model method". A red box appears around the edge of the model window to indicate code is recording.
Step 2) Create Default Parameters
Add a heat transfer physics node and create the following default parameters the same way you normally would. You can view code created at any time by going to the Application Builder Window.
Step 3) Assign Parameter Values to Physics
Under Heat Transfer, create a heat flux node and change the type to “Convective heat flux.” Enter the parameters into the fields as shown. The following code is automatically generated. Click "Stop Recording".
Step 4) Run Model Method
Copy your code into any new or existing model file and click “Run Model Method.” The physics setup is automatically generated.
|Time Saving Summary
|Number of Entries
|Number of Clicks
And there you have it. Repetitive processes that once took up valuable time and introduced possible errors can now be accomplished quickly and easily. We hope this tip is helpful, and as always, we are here to address your modeling needs through our consulting services and/or training.