convertUnit()

Convert among physical units.

Usage

newValue = convertUnit( quantity, fromUnit, toUnit )

Parameters

quantity (real)
Physical quantity.
fromUnit (string)
Source unit.
toUnit (string)
Destination unit.

Return Value

newValue (real)
The converted value.

Description

This routine converts a physical quantity from fromUnit to toUnit. For example,
nodeElm = ROOT + RS +'Model'+ RS +'Volumes'+ RS +'impeller' + RS + 'ELEMENT_SET'
rffName = acs.getRef( 'reference_frame', nodeElm )
nodeRff = ROOT + RS + 'REFERENCE_FRAME' + RS + rffName
rot = acs.getArray( 'angular_velocity', nodeRff )
rotz = abs( rot[2] )
rotz = rep.convertUnit( rotz, "rad/sec", "RPM" )