If you did not find a suitable Using Units in the standard libraries (ISO-80000), you can:
If you want to use a different Value Type than our library provides, you can create a custom Value Type and specify a desired unit for it from the ISO-80000 package.
To create a custom Value Type
In the Specification window, specify the Unit property value:
a. Click .
b. In the Select Instance Specification dialog, clear the Apply Filter box.
c. Make sure the ISO-80000 library is loaded in your project.
If the ISO-80000 library is not uploaded in your project, you can load it directly in the Select Instance Specification dialog by clicking the Load button. |
d. Select the required Unit from the ISO-80000 package (e.g.litre).
If you can't find a desired unit you can create a custom Unit. A unit is recommended to be related to a Quantity Kind. Often equations can be expressed in terms of quantities that include Quantity Kinds without specifying Units.
To create a custom Unit
From the Block Definition Diagram palette, expand the Value Type button and select the Unit button.
If you do not see the Unit button, make sure the Expert Mode is turned on. |
Type its name (e.g. mile).
The Quantity Kind property value:
a. Click .
b. In the Select Quantity Kind dialog, clear the Apply Filter box.
c. Make sure the ISO-80000 library is loaded in your project.
If the ISO-80000 library is not uploaded in your project, you can load it directly in the Select Quantity Kind dialog by clicking the Load button. |
d. Select the required quantity from the ISO-80000 package (e.g. distance).
The new Unit is created and can now be specified for the Value Type and then used in your project as a type of Value Property.
Following are the QUDV library Classifiers that support Unit Conversion.
After the classifier is defined, the slot window is available. Slot window is used to define a properties. Following are the properties that support Unit Conversion:
|
Derived units are a combination of several pre-defined units. Creating a Derived Unit follows a different logic than other types of units. Derived Units do not have a referenceUnit slot.
The factor slot is filled with UnitFactors. A UnitFactor is an instance that has a Unit and an Exponent. For example, a DerivedUnit of m/s^2 (acceleration) would have a factor of m^1 (meter with exponent 1) and s^-2 (second with exponent -2).
If required UnitFactor is not found, then you need to create a new UnitFactor and use it to create new derived units.
To create a UnitFactor
To learn more about derived units, refer to OMG SysML Specification. |