Creating User Inputs
A User Input is a parameter that shows up in the Settings window of the feature instance in the Model Builder. A user input always represent data storage in a COMSOL Multiphysics model (MPH-file) built with the Model Builder. You can choose to hide a user input from the Settings window, and then the user input only represents a data storage.
The value of a variable, on the other hand, can be read when solving or from result features in the Model Builder. This is not possible with user inputs. If you want to access a value of a user input, you must first declare a variable and define its value equal to the value of the user input. It is possible to add a variable definition to a user input node, which represents a variable declaration and a variable definition. The declaration takes the information from the user input, and the definition gives the declared variable the value of the user input.
Standard User Inputs
There are these types of standard user inputs:
User Input. This is a general user input that supports all settings and sizes. It is a bit more complex to set up due to the number of supported settings.
Selectable Input. A user input that a user only can set to a predefined set of allowed values. It does not support units or array types. The typical GUI component is a combo box (or drop-down menu).
Boolean Input. A user input that only allows two values, 0 and 1 (represents false and true). It does not support units or array types. The typical GUI component is a check box.
Special Versions of User Input
There are also special versions of the user input, which add predefined declarations of one or several user inputs with a special relation, for example. These special user inputs are summarized below:
Material Property. Defines two user inputs: one for selecting the source of the material data and the other for specifying a user-defined value.
Material List. Defines a user input that contains a material selection.
Feature Input. Defines two user inputs: one for selecting the source of the feature input data and the other for specifying a user-defined value.
Selection Input. Defines an extra selection of geometrical entities for the feature to select entities on different domains when coupling them to the feature, for example
GUI Options Settings
A user input also needs information about its appearance in the user interface. It is possible to control how it appears, when it appears, and where it appears in the Settings window of a feature or property. You control these settings from the GUI Options section of each user input node and through a special activation condition node; see Activation Condition.