/
Unit

Unit

Unit objects are used to establish a unit system within a project. A project can have one or more unit systems. If no Unit object is defined, the entire project is assumed to be in a single unit system.

The first Unit object must be named 'Internal' and is used to define the internal unit system of the project. Having a consistent internal unit system makes it easier to write parametric expressions.

Once an internal unit system is defined, it's possible to create additional unit systems to make input easier for the end user. For example, the author of the project can create multiple unit systems named 'Section', 'Coordinate', 'Displacement' etc. Any parameter that has a unit category that matches the name of the Unit object will use that particular Unit system for end-user input. The Unit object named 'Internal' will be used for internal computation.

If a Unit object named 'Default' exists in the project, all parameters that do not have a defined unit category are assumed to be in the 'Default' unit category.

 

Example Syntax

... <O T="Unit"> ... ... </O>

 

Example:

<O N="Unit_Object1" T="Project" Category="Core Objects"> <!-- created by ParamML Examples on 27.01.2023 --> <O N="Internal" T="Unit" Length="Millimeter" Force="Newton" Angle="Radian" Temperature="Fahrenheit" /> <O N="Geometry" T="Unit" Length="Meter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" /> <O N="Property" T="Unit" Length="Centimeter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" />

Once three "Unit" objects have been created in the project as described above, we can assign a specific parameter to a created parameter by specifying its Unit Category (UC) and Unit Type (UT).

The Unit Category (UC) specifies the name that the parameter will be assigned to, while the Unit Type (UT) indicates what the parameter represents.

If the Unit Category (UC) matches the name of one of the "Unit" objects, the parameter will use the unit system that it matches.

<O N="Unit_Object1" T="Project" Category="Core Objects"> <!-- created by ParamML Examples on 27.01.2023 --> <O N="Internal" T="Unit" Length="Millimeter" Force="Newton" Angle="Radian" Temperature="Fahrenheit" /> <O N="Geometry" T="Unit" Length="Meter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" /> <O N="Property" T="Unit" Length="Centimeter" Force="Newton" Angle="Degree" Temperature="Fahrenheit" /> <O N="Inputs" T="Group"> <P N="A" V="-1000" Role="Input" Category="Inputs" UT="Length" UC="Property" /> <P N="B" V="100" Role="Input" Category="Inputs" UT="Length" UC="Geometry" /> <P N="C" V="50" Role="Input" Category="Inputs" UT="Angle" UC="Internal" /> </O> </O>

Parameter A will specify a length (UT) and its unit will be centimeters.


The B parameter will also specify a length (UT) and its unit will be meters.


The C parameter will also specify an angle (UT) and its unit will be radians.

Debug Trace

 

To view this example in the library, see (OpenBrIM Platform)

 

Example:

The internal unit system, also known as the working unit system or modeling unit system, is a standardized set of units that the object uses for performing calculations, simulations, and other internal processes. The internal unit system is primarily used for accurate and efficient computation within the library. It helps avoid rounding errors, improves precision, and ensures consistency in calculations across various operations.

The display unit system, on the other hand, is the system of units in which measurements are presented and visualized to the user. These units are familiar and relatable to the user's real-world context. For instance, in a CAD, the display unit for length might be set to feet or centimeters. However for the above object, the internal calculations will always be in inches.

The purpose of the display unit system is to provide a user-friendly interface that aligns with users' expectations and makes it easier for them to interpret and communicate measurements. It allows users to work in units they are comfortable with, even if the internal calculations are being done in a different unit system.

In summary, the internal unit system is the behind-the-scenes system used for calculations within the software, optimizing accuracy and efficiency, while the display unit system is the user-facing representation that ensures measurements are presented in a way that is meaningful and intuitive to users.

As stated above, the unit systems for the two parameters X1 and X2 are different. The end user sees this as X1=1000 yards and X2=1 mile, and inputs these values accordingly.

Debug Traced named “Check”

 

The entire process is carried out using the Internal unit category. In this example, since the Internal unit system, with a Unit Type of Length, uses millimeters, X1=36000 inches and X2=63360 inches are converted to the units that the user wants to view.

To view this example in the library, see (OpenBrIM Platform)

 

Example:

By defining the internal unit system, user-defined unit systems, and the parameter unit information, the end user can input parameter values and view design and analysis results in the units of their choice.
Internally, however, all calculations and results are kept in the uniform units of the unit system specified by the author in the ParamML document.

 

Redline= 100 inch → 2540 mm

Greenline= 100 inch → 8.3333 feet

 

To view this example in the library, see (OpenBrIM Platform)

 

Parameters of Unit Objects

 

1

Label

Mandatory

Name and Type Attributes

Default Description and Value Attributes

Other Attributes

2

Length

Yes

N="Length"
T="Text"

D="[INCH/FEET/YARD/MILLIMETER/

CENTIMETER/METER]"

V="INCH"

Role="Input"

3

Force

Yes

N="Force"
T="Text"

D="[POUND/KIPS/NEWTON/KILONEWTON/

MEGANEWTON/TON/MT/KGF ]"

V="KIPS"

Role="Input"

4

Angle

Yes

N="Angle"
T="Text"

D="[DEGREES/RADIANS]"

V="DEGREES"

Role="Input"

5

Temperature

Yes

N="Temperature"
T="Text"

D="[FAHRENHEIT/CELSIUS]"

V="FAHRENHEIT"

Role="Input"

 

Unit Types

Related content

Parameters
Parameters
More like this
ParamML Developer Guide
ParamML Developer Guide
More like this
Extends
Extends
More like this
Project
Project
Read with this
Integrating Units into Library Objects
Integrating Units into Library Objects
More like this
Repeat
Repeat
Read with this