Adding Model Expressions
The Model Expressions window includes COMSOL Multiphysics expressions that you can insert into a method editor window for use with results or equation features in a method. For example, you can insert x (the x-coordinate) in model.result().numerical("gev1").set("expr", "x"). Double-click an expression to insert it, or right-click and choose Insert Expression. The program inserts the expression at the cursor in the method editor window.
Figure 4-4: The full view of the available model expressions.
Use the search field at the top of the window to filter the list of expressions. For example, the following figure shows the list of expressions where si occurs:
Figure 4-5: A filtered view of the available model expressions.
The inserted expressions and functions are strings enclosed within quotation marks (for example, "sigma_const"), unless the insertion point is already within a string. The reason for the string format is to make it clear that the inserted expressions are model expressions and not code.