Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
...
<O T="Unit">
...
...
</O>

Example:

Code Block
languagexml
<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.

Code Block
languagexml
<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.

Image Modified

To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidaapg7ixwv54fcui4dieivp)

Example:

Code Block
languagexml
<O N="Unit_Object2" T="Project" Category="Core Objects">
    <!-- created by ParamML Examples on 30.01.2023 -->
    <O N="Units" T="Group">
        <O N="Internal" T="Unit" Length="Inch" Force="Kip" Angle="Radian" Temperature="Fahrenheit" />
        <O N="US_Route1" T="Unit" Length="Feet" Force="Kip" Angle="Radian" Temperature="Fahrenheit" />
        <O N="US_Route2" T="Unit" Length="Yard" Force="Kip" Angle="Radian" Temperature="Fahrenheit" />
        <O N="US_Route3" T="Unit" Length="Mile" Force="Kip" Angle="Radian" Temperature="Fahrenheit" />
    </O>
    <P N="X1" V="36000" UT="Length" UC="US_Route2" />
    <P N="X2" V="63360" UT="Length" UC="US_Route3" />
    <O N="Check" T="DesignCode">
        <P N="TotalX" V="X1+X2" UT="Length" UC="US_Route1" />
    </O>
</O>
For example, the road unit system defined above can be used in US Highway projects. These unit systems can be added, removed, or modified, except for the 'Internal' unit system. This is because, as the code is executed, it converts all unit systems into a single unit system (internal unit). All other unit systems (Display Units) are units of parameters that the end user sees. As the code runs, all the unit systems that the user sees are converted to the Internal unit system

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.

Image Modified

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 (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidglgw5fxfrq5ojunf8ebkw)

Example:

Code Block
languagexml
<O N="Unit_Object3" T="Project" Category="Core Objects">
    <!-- created by ParamML Examples on 30.01.2023 -->
    <O N="Internal" T="Unit" Length="Inch" Force="Kip" Angle="Degrees" Temperature="Fahrenheit" />
    <O N="GeometryandLoad" T="Unit">
        <P N="Length" V="feet" D="[Inch/Feet/Kilometers/Millimeter/Meter]" Role="Input" />
        <P N="Force" V="Kip" D="[Pound/Kip/Newton/Kilonewton]" Role="Input" />
        <P N="Angle" V="Degree" D="[Degree/Radian]" Role="Input" />
        <P N="Temperature" V="Fahrenheit" D="[Fahrenheit/Celsius]" Role="Input" />
    </O>
    <O N="Properties" T="Unit">
        <P N="Length" V="Millimeter" D="[Inch/Feet/Kilometers/Millimeter/Meter]" Role="Input" />
        <P N="Force" V="Kip" D="[Pound/Kip/Newton/Kilonewton]" Role="Input" />
        <P N="Angle" V="Degree" D="[Degree/Radian]" Role="Input" />
        <P N="Temperature" V="Fahrenheit" D="[Fahrenheit/Celsius]" Role="Input" />
    </O>
    <P N="Redline" V="100" UT="Length" UC="Properties" />
    <P N="Greenline" V="100" UT="Length" UC="GeometryandLoad" />
</O>

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

Image Modified

To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidtrc9xswpf7859xhqiao4nv&folder=Core+Objects)

...

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

Code Block
Length  // in
Area    // in^2               
Volume  // in^3
Inertia // in^4
Warp   // in^6
Frequency //Hz  
Curvature // 1/in
Force // kips
Moment // kip-in
Stress: // kip/in^2
Density: // kip/in³ 
ForcePerLength //kip/in
RadianPerLength // rad/in
MomentPerLength // kip-in/in
MomentPerAngle // kip-in/rad 
MomentPerCurvature // kip-in/in⁻¹
ForcePerAngle // kip/rad
MassRotation // kip-in²
Angle // rad
Temperature // °F
PerTemperature // 1/°F
Velocity // ft/sec 
Acceleration // ft/sec
Time //sec