Integrating Units into Library Objects
In ParamML, all parameters may take unit type, abbreviated as UT, and unit category, abbreviated as UC, attributes.
<P N="UnitLength" V="12" UT="Length" UC="Geometry" /> |
<P N="UnitForce" V="10" UT="Force" UC="Geometry" /> |
<P N="UnitStress" V="30" UT="Stress" UC="Geometry" /> |
The unit type refers to what the unit represents, such as length, force, or stress. The unit category indicates the category in which the unit should belong. These categories are defined within 'Base_DesignSubUnits,' and the unit categories from this library object should be used in the library objects to be written.
As can be observed in the examples below, the 'Base_DesignSubUnits' object can be extended and utilized in the developed object. Thanks to this, all the unit categories present in the unit library object can be utilized.
In case of a specific scenario, new Unit Types can be added and their attributes completed by overriding. If the unit category is employed within the object without extending, the added Unit Types will be introduced. This circumstance has the potential to disrupt the architecture of the SI and US unit systems.
In OpenBrIM, calculations are performed through the 'Internal' setting. Therefore, the calculations are based on the US unit system. However, to enable the display of the SI unit system within the app or project, the 'UnitSystem' parameter has been added to projects. Thanks to the 'UnitSystem' parameter, you can convert the project to the SI unit system. For this to work accurately, every parameter with a unit in the app, which is displayed, must have a defined unit type and unit category.
To change the UnitSystem within the project, you can click on the 'Params' button and select the desired unit.
For this concept to work correctly within the project's spreadsheet, document, CADD, and criteria check units, the following considerations should be taken into account:
Description | Incorrect Example | Correct Example | |
---|---|---|---|
1 | The missing UT and UC of parameters related to the units of area and section modulus. |
|
|
2 | If you are using the parameters within a document and the unit is missing, in the 'where' section, it will display the values without showing the unit and will display the result in the default value. |
|
|
3 | The assigned Unit Category to parameters must be defined within the project. Therefore, ensure that the given UC value is within 'Base_DesignSubUnits' to make sure it is valid. | ||
4 | The Internal Unit Category should not be defined at the parameter. Instead, Property should be used. Because in the US unit system, Internal and Property are completely equivalent. However, in the SI unit system, Internal behaves according to the US unit system. For this reason, a different category should be used instead of Internal. |
|
|
5 | Dividing by 12 is not the correct way to convert inches to feet in the US unit system. Instead, the 'convert' function should be used to accurately convert and transform to feet. |
|
|
6 | Creating an interaction diagram by simply dividing by 12 without converting works correctly in the Internal category, but it is definitely incorrect in the SI unit system. To correct this, the data sent to the graph should be converted, and the axis labels of the graph should be provided using the 'unitlabel' to ensure works properly. |
| |
7 | Unit labels commonly used for headings should not be hard-coded. Instead, the 'unitlabel' function should be used. |
|
|
8 | When using CADDDimensionLine to display length in CADD objects, ‘convert' or 'withunits’ functions should also be used. Within CADDDimensionLines, the Label must be defined, and the length should be displayed by converting it. |
|
|
9 | Check objects can also have units. After properly defining the UT and UC of the parameters within the created 'Criteria' parameter, the UT and UC of the result parameter should be defined according to the appropriate result unit. |
|
|
10 | In summary, all parameters containing units must have defined UT and UC. This consideration is essential in CADD representations, graph data within documents, input parameters taken using spreadsheets, and parameters within criteria objects. |