Introduction to the Model Object
The model object is the data structure that stores the state of the COMSOL Multiphysics model. The model object contents are reflected in the COMSOL Desktop user interface by the structure of the Model Builder and its model tree. The model object is associated with a large number of methods for setting up and running sequences of operations such as geometry sequences, mesh sequences, and study steps. As an alternative to using the Model Builder, you can write programs in the Method Editor that directly access and change the contents of the model object.
The model object methods are structured in a tree-like way, similar to the nodes in the model tree. The top-level methods just return references that support further methods. At a certain level the methods perform actions, such as adding data to the model object, performing computations, or returning data.
For a complete list of methods used to edit the model object, see the
Programming Reference Manual
. For an introduction to using the Model Builder, see the book
Introduction to COMSOL Multiphysics
.
The contents of the application tree in the Application Builder are accessed through the application object, which is an important part of the model object. You can write code using the Method Editor to alter, for example, button text, icons, colors, and fonts in the user interface of a running application.
This section gives an overview of the model object. The section
The Application Object
gives an overview of the application object.