Device Model
As described in Creating Device Systems, the Device Model () defines a set of variables and equations that corresponds to a certain device characteristic. Typical examples from the field of electrical circuits are capacitors, resistors, voltages sources, and bipolar transistors.
To a device model you can add modifiable inputs, variables, equations, other devices, and ports as child nodes. Right-click the Device Model node to add Device Constants, Device Parameters, Device, Device Variables, Device Equations, Port, Port Connections, Port Model, Usage Condition, Discrete Device States, Explicit Device Events, and Implicit Device Events subnodes. You can also add other Device Model subnodes.
To add a Device Model to Features ():
1
Under the Building Blocks branch click Features.
2
In the Home toolbar, from the Building Blocks group, click to add any of the available features (for example, a Device Model Feature or Domain Condition).
3
Right-click the node (in this example the Device Model Feature or Domain Condition node) and choose Device Model from the Devices submenu.
To add a Device Model to Components ():
1
Under the Building Blocks branch click Components.
2
In the Home toolbar, from the Building Blocks group, click Component ().
3
Right-click the Component node and choose Device Model from the Devices submenu.
To add a Device Model to a Physics Interface () or any physics feature or physics property node, right-click the node and choose Device Model from the Devices submenu. If added under any of these nodes or a Component node, the device item belongs to the device models closest in the hierarchy. For most cases this will be the device model added by the physics interface.
The Settings window has the following sections:
Device Model
In the Type field you define a unique string that identifies the device model. When you create a Device, you must specify a device model for that device. The device then instantiates the device model. A device model type should be unique, but if you declare several device models with the same type, the last one is used. In the Inherited type field, you can enter a parent type that this device model inherits all inputs, ports, variables, and equations from. Leave this field empty to skip inheritance. A device model can also be abstract, meaning that you can only specify this type as an inherited type of another device model. A device cannot instantiate an abstract device model. Select the Abstract model type checkbox to make a device model abstract.
Device Parameters
Fill the table in this section with the device parameters that the device model supports. Each device parameter also needs a default value. You can also define device parameters with the Device Parameters child node. Use the Input Modifier of a device to override the default value of a device parameter.
Device System Options
This section is only available when adding a Device Model node from a Physics Interface node.
The Device system type list only supports the option Normal.
From the Device naming convention list, choose from the options Dot hierarchy and dot-separated array indices, Dot hierarchy and dot-separated array indices, and Underscore hierarchy with no support for arrays. The first option is the default for new interfaces, and the last option is mainly used by interfaces created in a previous version before version 6.4. The setting controls the variable names generated by the device system. For example, a device named R1 containing a variable v will get the full name id.R1.v using a dot-separated hierarchy and id.R1_v using an underscore-separated hierarchy. The latter version is less flexible with variable names because a variable name with an underscore have to be escaped, so using R1_load in the above example leads to the full name id.R1__load_v, while the name using dot-separation will simply be R1_load.v.Therefore, the dot-separated convention is the recommended choice. The dot-separated convention has two variants that controls the naming convention for the scalar component names of array variables. A 3-by-1 array variable v from the above example will get the scalar components id.R1.v.1, id.R1.v.2, and id.R1.v.3, using dot-separated array indices, or id.R1.v_1, id.R1.v_2, and id.R1_3, using underscore-separated array indices.