This example explains the SIUnitsOf function and how it is used to strip the unit of a united variable under the three worksheet Unit Systems - SI, USCS, and CGS.
Prerequisite:
• Define three united variables.
• On the Math Formatting tab, in the Results group, select (Decimal) from the Result Format list.
Important Information:
• Follow the instructions, for each of the following three sections, in the order in which they appear.
• The explanations provided in a particular section are valid only when the Unit System is set as specified in Step#2 of that section.
Unit System: SI (m, kg, s)
1. Select the math regions in Step#3 through Step#5 below and then on the Calculation tab, in the Controls group, click Disable Region.
2. On the Math tab, in the Units group, set the worksheet Unit System to SI.
3. Evaluate the three variables.
Mathcad evaluates each variable by converting its original unit to its counterpart in the current Unit System.
4. Apply the SIUnitsOf function to each variable.
The SIUnitsOf function returns the dimension (magnitude and unit) of each variable's original unit scaled to the default SIUnit System. Since the Unit System is set to SI, the scale factor for all variable units is 1.
5. Divide each variable by its SIUnitsOf value.
The result of the division is always a unitless value that equals the magnitude of the variable when evaluated under the selected Unit System.
In the case of variable a, the division operation divides 0.914 m by 1 m and returns the unitless result of 0.914.
This is the technique that Mathcad provides for stripping the unit of a united variable.
6. Before proceeding to the next section, select the math regions in Step#3 through Step#5 above and then on the Calculation tab, in the Controls group, click Disable Region.
Unit System: USCS (ft, lb, s)
1. Select the math regions in Step#3 through Step#5 below and then on the Calculation tab, in the Controls group, click Disable Region.
2. Set the worksheet Unit System to USCS.
3. Evaluate the three variables.
Mathcad evaluates each variable by converting its original unit to its counterpart in the current Unit System.
4. Apply the SIUnitsOf function to each variable.
The SIUnitsOf function returns the dimensions (magnitude and unit) of the variable's original unit scaled to the current Unit System.
To understand where the above scaled values come from, evaluate the SI units (m, kg, s) under the currently set USCS units (ft, lb, s), as follows:
5. Divide each variable by its SIUnitsOf value.
The results are identical to the previous results under the SIUnit System.
In the case of variable b, the division operation divides 0.331 lb by 2.205 lb and returns the unitless result of 0.15.
6. Before proceeding to the next section, select the math regions in Step#3 through Step#5 above and then on the Calculation tab, in the Controls group, click Disable Region.
Unit System: CGS (cm, gm, s)
1. Select the math regions in Step#3 through Step#5 below and then on the Calculation tab, in the Controls group, click Disable Region.
2. Set the worksheet Unit System to CGS.
3. Evaluate the three variables.
Mathcad evaluates each variable by converting its original unit to its counterpart in the current Unit System.
4. Apply the SIUnitsOf function to each variable.
The SIUnitsOf function returns the dimensions (magnitude and unit) of the variable's original unit scaled to the CGSUnit System.
To understand where the above scaled values come from, evaluate the SI units (m, kg, s) in terms of the CGS units (cm, gm, s), as follows:
5. Divide each variable by its SIUnitsOf value.
The results are identical to the previous results under the SI Unit System.
In the case of variable c, the division operation divides 240 s by 1 s and returns the unitless result of 240.
6. Before starting the example over, select the math regions in Step#3 through Step#5 above and then on the Calculation tab, in the Controls group, click Disable Region.