You are on page 1of 25

U NIT OF M EASURE

P YTHON M ODULE —
C ONVERSION F UNCTION
D OCUMENTATION

Version 6.0
Disclaimer of Warranties and Liability

The information contained in this manual is believed to be accurate and reliable. However, GE Intelligent Platforms, Inc.
assumes no responsibilities for any errors, omissions or inaccuracies whatsoever. Without limiting the foregoing, GE
Intelligent Platforms, Inc. disclaims any and all warranties, expressed or implied, including the warranty of merchantability
and fitness for a particular purpose, with respect to the information contained in this manual and the equipment or software
described herein. The entire risk as to the quality and performance of such information, equipment and software, is upon the
buyer or user. GE Intelligent Platforms, Inc. shall not be liable for any damages, including special or consequential damages,
arising out of the use of such information, equipment and software, even if GE Intelligent Platforms, Inc. has been advised
in advance of the possibility of such damages. The use of the information contained in the manual and the software
described herein is subject to GE Intelligent Platforms, Inc. standard license agreement, which must be executed by the
buyer or user before the use of such information, equipment or software.

Trademark Notices

© 2015, General Electric Company. All rights reserved.


Proficy is a trademark of GE Intelligent Platforms, Inc., a wholly-owned subsidiary of General Electric Company.
* Indicates a trademark of General Electric Company and/or its subsidiaries.
All other trademarks are the property of their respective owners.

All other product names and marks identified throughout this book are trademarks or registered trademarks of their respective
companies. They are used throughout this book in editorial fashion only. No such use, or the use of any trade name, is
intended to convey endorsement or affiliation.

No part of this publication may be reproduced in any form, or stored in a database or retrieval system, or transmitted or
distributed in any form by any means, electronic, mechanical photocopying, recording or otherwise, without the prior written
permission of GE Intelligent Platforms. Information contained herein is subject to change without notice.

We want to hear from you. If you have any comments, questions, or suggestions about our documentation, send them to the
following email address:
doc@ge.com
Table of Contents

Table of Contents
Introduction _____________________________________________________________ 1
Document Coverage ........................................................................................................................1
Available Objects _________________________________________________________ 2
Conversion Functions ______________________________________________________ 3
Generic Function Structure ............................................................................................................3
Signature and Parameters ........................................................................................................3
Return Value ..............................................................................................................................3
Example ......................................................................................................................................3
Electric Current Conversion ...........................................................................................................3
Electric Current Conversion Functions ................................................................................3
Units ............................................................................................................................................4
Example for Conversion of Electric Current .......................................................................4
Electric Potential Conversion .........................................................................................................4
Electric Potential Conversion Functions ..............................................................................4
Units ............................................................................................................................................4
Example for Conversion of Electric Potential .....................................................................5
Mass Flow Rate Conversion ...........................................................................................................5
Mass Flow Rate Conversion Functions.................................................................................5
Units ............................................................................................................................................6
Example for Conversion of Mass Flow Rate .......................................................................7
Volume Flow Rate Conversion ......................................................................................................7
Volume Flow Rate Conversion Functions ...........................................................................7
Units ............................................................................................................................................9
Example for Conversion of Volume Flow Rate ..................................................................11
Frequency Conversion .....................................................................................................................11
Frequency Conversion Functions ..........................................................................................11
Units ............................................................................................................................................11
Example for Conversion of Frequency .................................................................................11
Length Conversion ...........................................................................................................................12
Length Conversion Functions ................................................................................................12
Units ............................................................................................................................................12
Example for Conversion of Length .......................................................................................12
Mass Conversion ..............................................................................................................................13
Mass Conversion Functions ....................................................................................................13
Units ............................................................................................................................................13
Example for Conversion of Mass ..........................................................................................13
Power Conversion ............................................................................................................................14
Power Conversion Functions .................................................................................................14
Units ............................................................................................................................................14
Example for Conversion of Power ........................................................................................15

i
Table of Contents

Pressure Conversion ........................................................................................................................15


Pressure Conversion Functions ..............................................................................................15
Units ............................................................................................................................................16
Example for Conversion of Pressure ....................................................................................17
Speed Conversion .............................................................................................................................17
Speed Conversion Functions ..................................................................................................17
Units ............................................................................................................................................17
Example for Conversion of Speed .........................................................................................18
Temperature Conversion ................................................................................................................18
Temperature Conversion Functions ......................................................................................18
Units ............................................................................................................................................18
Example for Conversion of Temperature ............................................................................19
Time Conversion ..............................................................................................................................19
Time Conversion Functions....................................................................................................19
Units ............................................................................................................................................19
Example for Conversion of Time ..........................................................................................20
Torque Conversion ..........................................................................................................................20
Torque Conversion Functions ................................................................................................20
Units ............................................................................................................................................20
Example for Conversion of Torque ......................................................................................21

ii
Introduction

Introduction
The Unit of Measure (“uom”) Python Module is a collection of Python classes and utility functions
for converting a value from one unit of measure to another.

The classes can be divided into:

 Conversion functions
o These functions convert a value from one unit of measure to another.
 Enumeration classes
o These classes (such as the Mass class or the Temperature class) enumerate
properties (such as Kilograms or Celsius) representing units of measure for a
particular physical quantity.
o The properties enumerated in those classes are used by the conversion functions in
the uom module.

Document Coverage
This document covers the following:

 It explains how to use the conversion functions.


 For each category of conversion:
 It lists all the available functions for the category.
 It lists the enumeration class properties that are used in the category.
 It gives an example in each category to illustrate usage.

1
Available Objects

Available Objects
The Unit of Measure (“uom”) Python Module has been originally designed for use in either Proficy
Historian or the Proficy Historian Analysis (PHA) suite. The module does not have to be used in
these contexts. However, if you are using it in one of these contexts, then this section will be
helpful to you.

In a Historian or PHA context, you have access to TagSample objects:

 An object of this type represents a single sample.


 The single sample is represented by a number of properties, including these properties:
o is_quality_good

 This boolean indicates whether or not the quality of the sample is good.
o is_quality_bad

 This boolean indicates whether or not the quality of the sample is bad.
o timestamp

 This property represents the UTC timestamp of the sample.


o value

 This property represents the value of the sample.

You can use the conversion functions in the uom Python Module to convert the value of the value
property of a TagSample object, provided that the value property is a float or easily evaluates to
one.

For example, if your values represent temperatures in degrees Celsius and you want to convert the
representation to degrees Fahrenheit, then you can use a function from the uom module to do it in
the following way:
uom.to_Fahrenheit(ExhaustTemperature.value, uom.Temperature.Celsius)
for a declared TagSample instance “ExhaustTemperature”. See the to_Fahrenheit function and the
applicable properties of the Temperature class in the Temperature Conversion section of this
document for further details.

Consult the Historian or PHA documentation for details on the use of TagSample objects.

2
Conversion Functions

Conversion Functions
Generic Function Structure
Signature and Parameters

The function signatures in the uom module are all of the form:
uom.to_<toUnit>(value, fromUnit)

where:

 <toUnit> is the unit to which the value is being converted


 value is any numerical value
 fromUnit is of type int and must be one of the properties in the enumeration class that
matches the physical quantity being converted

Return Value

Each such function returns a float representation of the value passed in, converted to the requested
new unit of measure.

Example
uom.to_Amps(100,ElectricCurrent.Milliamps)

where

 <toUnit> is “Amps”
 value is 100
 fromUnit is ElectricCurrent.Milliamps (where the ElectricCurrent class enumerates )
This returns a float value of 0.1.

Electric Current Conversion


Conversion from one unit of measure of electric current to another can be done with these functions
from the uom module.

Electric Current Conversion Functions

Function Name Action


to_Amps Converts to amps
to_Kiloamps Converts to kiloamps
to_Milliamps Converts to milliamps

3
Conversion Functions

Units

Electric current units are represented by the following properties of the ElectricCurrent
enumeration class:

Property Meaning
Amps Amps
Kiloamps Kiloamps
Milliamps Milliamps

Example for Conversion of Electric Current

Use Case

The user wants to convert an electric current value of 200 milliamps to amps.

Expression
uom.to_Amps(200, uom.ElectricCurrent.Milliamps)

Result

0.2

Electric Potential Conversion


Conversion from one unit of measure of electric potential to another can be done with these
functions from the uom module.

Electric Potential Conversion Functions

Function Name Action


to_Volts Converts to volts
to_Kilovolts Converts to kilovolts
to_Millivolts Converts to millivolts

Units

Electric current units are represented by the following properties of the


ElectricPotentialCurrent enumeration class:

Property Meaning
Kilovolts Kilovolts
Millivolts Millivolts

4
Conversion Functions

Property Meaning
Volts Volts

Example for Conversion of Electric Potential

Use Case

The user wants to convert an electric potential value of 150 volts to kilovolts.

Expression
uom.to_Kilovolts(150, uom.ElectricPotential.Volts)

Result

0.15

Mass Flow Rate Conversion


Conversion from one unit of measure of mass flow rate to another can be done with these functions
from the uom module.

Mass Flow Rate Conversion Functions

Function Name Action


to_KilogramsOfMassPerDay Converts to kilograms of mass per day
to_KilogramsOfMassPerHour Converts to kilograms of mass per hour
to_KilogramsOfMassPerMinute Converts to kilograms of mass per
minute
to_KilogramsOfMassPerSecond Converts to kilograms of mass per
second
to_MetricTonsPerDay Converts to metric tons of mass per day
to_MetricTonsPerHour Converts to metric tons of mass per hour
to_MetricTonsPerMinute Converts to metric tons of mass per
minute
to_MetricTonsPerSecond Converts to metric tons of mass per
second
to_PoundsOfMassPerDay Converts to pounds of mass per day
to_PoundsOfMassPerHour Converts to pounds of mass per hour
to_PoundsOfMassPerMinute Converts to pounds of mass per minute
to_PoundsOfMassPerSecond Converts to pounds of mass per second
to_ThousandsOfPoundsOfMassPerDay Converts to thousands of pounds of mass
per day

5
Conversion Functions

Function Name Action


to_ThousandsOfPoundsOfMassPerHour Converts to thousands of pounds of mass
per hour
to_ThousandsOfPoundsOfMassPerMinute Converts to thousands of pounds of mass
per minute
to_ThousandsOfPoundsOfMassPerSecond Converts to thousands of pounds of mass
per second
to_MillionsOfPoundsOfMassPerDay Converts to millions of pounds of mass
per day
to_MillionsOfPoundsOfMassPerHour Converts to millions of pounds of mass
per hour
to_MillionsOfPoundsOfMassPerMinute Converts to millions of pounds of mass
per minute
to_MillionsOfPoundsOfMassPerSecond Converts to millions of pounds of mass
per second

Units

Mass flow rate units are represented by the following properties of the FlowRateMass enumeration
class:

Property Meaning
kgPerDay Kilograms per day
kgPerHour Kilograms per hour
kgPerMinute Kilograms per minute
kgPerSecond Kilograms per second
MetricTonPerDay Metric ton per day
MetricTonPerHour Metric ton per hour
MetricTonPerMinute Metric ton per minute
MetricTonPerSecond Metric ton per second
LBMPerDay Pound per day
LBMPerHour Pound per hour
LBMPerMinute Pound per minute
LBMPerSecond Pound per second
kLBMPerDay Kilopound per day
kLBMPerHour Kilopound per hour
kLBMPerMinute Kilopound per minute
kLBMPerSecond Kilopound per second
MLBMPerDay Megapound per day
MLBMPerHour Megapound per hour
MLBMPerMinute Megapound per minute

6
Conversion Functions

Property Meaning
MLBMPerSecond Megapound per second

Example for Conversion of Mass Flow Rate

Use Case

The user wants to convert a mass flow rate value of 2.5 metric ton per minute to kilograms of mass
per day.

Expression
uom.to_KilogramsOfMassPerDay(2.5, uom.FlowRateMass.MetricTonPerMinute)

Result

3599999.999999999

Volume Flow Rate Conversion


Conversion from one unit of measure of volume flow rate to another can be done with these
functions from the uom module.

Volume Flow Rate Conversion Functions

Function Name Action


to_BarrelsOfOilPerDay Converts to barrels of oil per day
to_BarrelsOfOilPerHour Converts to barrels of oil per hour
to_BarrelsOfOilPerMinute Converts to barrels of oil per minute
to_BarrelsOfOilPerSecond Converts to barrels of oil per second
to_ThousandsOfBarrelsOfOilPerDay Converts to thousands of barrels of oil
per day
to_ThousandsOfBarrelsOfOilPerHour Converts to thousands of barrels of oil
per hour
to_ThousandsOfBarrelsOfOilPerMinute Converts to thousands of barrels of oil
per minute
to_ThousandsOfBarrelsOfOilPerSecond Converts to thousands of barrels of oil
per second
to_MillionsOfBarrelsOfOilPerDay Converts to millions of barrels of oil per
day
to_MillionsOfBarrelsOfOilPerHour Converts to millions of barrels of oil per
hour
to_MillionsOfBarrelsOfOilPerMinute Converts to millions of barrels of oil per
minute

7
Conversion Functions

Function Name Action


to_MillionsOfBarrelsOfOilPerSecond Converts to millions of barrels of oil per
second
to_GallonsPerDay Converts to gallons per day
to_GallonsPerHour Converts to gallons per hour
to_GallonsPerMinute Converts to gallons per minute
to_GallonsPerSecond Converts to gallons per second
to_LitersPerDay Converts to liters per day
to_LitersPerHour Converts to liters per hour
to_LitersPerMinute Converts to liters per minute
to_LitersPerSecond Converts to liters per second
to_CubicInchesPerDay Converts to cubic inches per day
to_CubicInchesPerHour Converts to cubic inches per hour
to_CubicInchesPerMinute Converts to cubic inches per minute
to_CubicInchesPerSecond Converts to cubic inches per second
to_CubicFeetPerDay Converts to cubic feet per day
to_CubicFeetPerHour Converts to cubic feet per hour
to_CubicFeetPerMinute Converts to cubic feet per minute
to_CubicFeetPerSecond Converts to cubic feet per second
to_ThousandsOfCubicFeetPerDay Converts to thousands of cubic feet per
day
to_ThousandsOfCubicFeetPerHour Converts to thousands of cubic feet per
hour
to_ThousandsOfCubicFeetPerMinute Converts to thousands of cubic feet per
minute
to_ThousandsOfCubicFeetPerSecond Converts to thousands of cubic feet per
second
to_MillionsOfCubicFeetPerDay Converts to millions of cubic feet per day
to_MillionsOfCubicFeetPerHour Converts to millions of cubic feet per
hour
to_MillionsOfCubicFeetPerMinute Converts to millions of cubic feet per
minute
to_MillionsOfCubicFeetPerSecond Converts to millions of cubic feet per
second
to_CubicCentimetersPerDay Converts to cubic centimeters per day
to_CubicCentimetersPerHour Converts to cubic centimeters per hour
to_CubicCentimetersPerMinute Converts to cubic centimeters per minute
to_CubicCentimetersPerSecond Converts to cubic centimeters per second
to_CubicMetersPerDay Converts to cubic meters per day
to_CubicMetersPerHour Converts to cubic meters per hour
to_CubicMetersPerMinute Converts to cubic meters per minute

8
Conversion Functions

Function Name Action


to_CubicMetersPerSecond Converts to cubic meters per second
to_ThousandsOfCubicMetersPerDay Converts to thousands of cubic meters
per day
to_ThousandsOfCubicMetersPerHour Converts to thousands of cubic meters
per hour
to_ThousandsOfCubicMetersPerMinute Converts to thousands of cubic meters
per minute
to_ThousandsOfCubicMetersPerSecond Converts to thousands of cubic meters
per second
to_MillionsOfCubicMetersPerDay Converts to millions of cubic meters per
day
to_MillionsOfCubicMetersPerHour Converts to millions of cubic meters per
hour
to_MillionsOfCubicMetersPerMinute Converts to millions of cubic meters per
minute
to_MillionsOfCubicMetersPerSecond Converts to millions of cubic meters per
second

Units

Volume flow rate units are represented by the following properties of the FlowRateVolume
enumeration class:

Property Meaning
BBD Barrels of oil per day
BBH Barrels of oil per hour
BBM Barrels of oil per minute
BBS Barrels of oil per second
kBBD Thousands of barrels of oil per day
kBBH Thousands of barrels of oil per hour
kBBM Thousands of barrels of oil per minute
kBBS Thousands of barrels of oil per second
MBBD Millions of barrels of oil per day
MBBH Millions of barrels of oil per hour
MBBM Millions of barrels of oil per minute
MBBS Millions of barrels of oil per second
GPD Gallons per day
GPH Gallons per hour
GPM Gallons per minute
GPS Gallons per second

9
Conversion Functions

Property Meaning
LPD Liters per day
LPH Liters per hour
LPM Liters per minute
LPS Liters per second
in3PerDay Cubic inches per day
in3PerHour Cubic inches per hour
in3PerMinute Cubic inches per minute
in3PerSecond Cubic inches per second
CFD Cubic feet per day
CFH Cubic feet per hour
CFM Cubic feet per minute
CFS Cubic feet per second
kCFD Thousands of cubic feet per day
kCFH Thousands of cubic feet per hour
kCFM Thousands of cubic feet per minute
kCFS Thousands of cubic feet per second
MCFD Millions of cubic feet per day
MCFH Millions of cubic feet per hour
MCFM Millions of cubic feet per minute
MCFS Millions of cubic feet per second
ccPerDay Cubic centimeters per day
ccPerHour Cubic centimeters per hour
ccPerMinute Cubic centimeters per minute
ccPerSecond Cubic centimeters per second
m3PerDay Cubic meters per day
m3PerHour Cubic meters per hour
m3PerMinute Cubic meters per minute
m3PerSecond Cubic meters per second
ThousandsOfCubicMetersPerDay Thousands of cubic meters per day
ThousandsOfCubicMetersPerHour Thousands of cubic meters per hour
ThousandsOfCubicMetersPerMinute Thousands of cubic meters per minute
ThousandsOfCubicMetersPerSecond Thousands of cubic meters per second
MillionsOfCubicMetersPerDay Millions of cubic meters per day
MillionsOfCubicMetersPerHour Millions of cubic meters per hour
MillionsOfCubicMetersPerMinute Millions of cubic meters per minute
MillionsOfCubicMetersPerSecond Millions of cubic meters per second

10
Conversion Functions

Example for Conversion of Volume Flow Rate

Use Case

The user wants to convert a volume flow rate value of 70 thousands of barrels of oil per minute to
barrels of oil per day.

Expression
uom.to_BarrelsOfOilPerDay(2.5, uom.FlowRateVolume.kBBM)

Result

3599999.9999999963

Frequency Conversion
Conversion from one unit of measure of frequency to another can be done with these functions
from the uom module.

Frequency Conversion Functions

Function Name Action


to_CyclesPerMinute Converts to cycles per minute
to_CyclesPerSecond Converts to cycles per second
to_Hertz Converts to hertz
to_RevolutionsPerMinute Converts to revolutions per minute

Units

Frequency units are represented by the following properties of the Frequency enumeration class:

Property Meaning
CPM Cycles per minute
CPS Cycles per second
Hertz Hertz
RPM Revolutions per minute

Example for Conversion of Frequency

Use Case

The user wants to convert a frequency value of 5000 revolutions per minute to hertz.

11
Conversion Functions

Expression
uom.to_Hertz(5000, uom.Frequency.RPM)

Result

83.33333333333333

Length Conversion
Conversion from one unit of measure of length to another can be done with these functions from
the uom module.

Length Conversion Functions

Function Name Action


to_MilliInches Converts to milliinches
to_Inches Converts to inches
to_Feet Converts to feet
to_Meters Converts to meters
to_Centimeters Converts to centimeters
to_Millimeters Converts to millimeters
to_Micrometers Converts to micrometers

Units

Length units are represented by the following properties of the Length enumeration class:

Property Meaning
cm Centimeters
ft Feet
In Inches
m Meters
mils Milliinches
mm Millimeters
um Micrometers

Example for Conversion of Length

Use Case

The user wants to convert a length value of 800 inches to feet.

12
Conversion Functions

Expression
uom.to_Feet(800, uom.Length.In)

Result

63.166666666666664

Mass Conversion
Conversion from one unit of measure of mass to another can be done with these functions from the
uom module.

Mass Conversion Functions

Function Name Action


to_Kilograms Converts to kilograms
to_Kilopounds Converts to kilopounds
to_Pounds Converts to pounds

Units

Mass units are represented by the following properties of the Mass enumeration class:

Property Meaning
Kilograms Kilogram
Kilopounds Kilopound
Pounds Pound

Example for Conversion of Mass

Use Case

The user wants to convert a mass value of 100 pounds to kilograms.

Expression
uom.to_Kilograms(100, uom.Mass.Pounds)

Result

45.359236999999915

13
Conversion Functions

Power Conversion
Conversion from one unit of measure of power to another can be done with these functions from
the uom module.

Power Conversion Functions

Function Name Action


to_BtuPerHour Converts to British Thermal Units (BTU)
per hour
to_MillionsOfBtuPerHour Converts to millions of British Thermal
Units (BTU) per hour
to_Horsepower Converts to horsepower
to_Watts Converts to watts
to_Kilowatts Converts to kilowatts
to_Megawatts Converts to megawatts
to_NewtonMetersPerSecond Converts to newton meters per second
to_Millivar Converts to millivar
to_Var Converts to var
to_Kilovar Converts to kilovar
to_Megavar Converts to megavar

Units

Power units are represented by the following properties of the Power enumeration class:

Property Meaning
BTU per hour, where
BTUPerHour
BTU = British Thermal Unit
MBTUPerHR Millions of BTU per hour
HP Horsepower
W Watt
kW Kilowatt
MW Megawatt
NmPerSecond Newton meters per second
Millivar Millivar
Var Var
Kilovar Kilovar
Megavar Megavar

14
Conversion Functions

Example for Conversion of Power

Use Case

The user wants to convert a power value of 350 watts to horsepower.

Expression
uom.to_Horsepower(350, uom.Power.W)

Result

0.4693577313582599

Pressure Conversion
Conversion from one unit of measure of pressure to another can be done with these functions from
the uom module.

Pressure Conversion Functions

Function Name Action


to_Atmospheres Converts to atmospheres
to_Bars Converts to bars
to_BarsGauge Converts to bars gauge
to_Millibars Converts to millibars
to_MillibarsGauge Converts to millibars gauge
to_Micropascals Converts to micropascals
to_Millipascals Converts to millipascals
to_Centipascals Converts to centipascals
to_Decipascals Converts to decipascals
to_Pascals Converts to pascals
to_Dekapascals Converts to dekapascals
to_Hectopascals Converts to hectopascals
to_Kilopascals Converts to kilopascals
to_Megapascals Converts to megapascals
to_FeetOfH2O Converts to feet of water
to_FeetOfH2OGauge Converts to feet of water gauge
to_InchesOfH2O Converts to inches of water
to_InchesOfH2OGauge Converts to inches of water gauge
to_MillimetersOfH2O Converts to millimeters of water
to_MillimetersOfH2OGauge Converts to millimeters of water gauge
to_InchesOfMercury Converts to inches of mercury
to_InchesOfMercuryGauge Converts to inches of mercury gauge

15
Conversion Functions

Function Name Action


to_MillimetersOfMercury Converts to millimeters of mercury
to_MillimetersOfMercuryGauge Converts to millimeters of mercury gauge
to_KilogramsPerSquareCentimeterAbsolute Converts to kilograms per square
centimeter
to_KilogramsPerSquareCentimeterGauge Converts to kilograms per square
centimeter gauge
to_PoundsPerSquareInchAbsolute Converts to pounds per square inch
to_PoundsPerSquareInchGauge Converts to pounds per square inch
gauge
to_Torrs Converts to torrs

Units

Pressure units are represented by the following properties of the Pressure enumeration class:

Property Meaning
Atm Standard atmosphere
Bar Bar
BarG Bar - gauge
mBar Millibar
mBarG Millibar - gauge
uPa Micropascal
milliPa Millipascal
cPa Centipascal
dPa Decipascal
Pa Pascal
daPa Decapascals
hPa Hectopascal
KPa Kilopascal
MPa Megapascal
ftH2O Feet of H2O
ftH2OG Feet of H2O - gauge
inH2O Inches of H2O
inH2OG Inches of H2O - gauge
mmH2O Millimeters of H2O
mmH2OG Millimeters of H2O - gauge
inHg Inches of mercury
inHgG Inches of mercury - gauge
mmHg Millimeters of mercury

16
Conversion Functions

Property Meaning
mmHgG Millimeters of mercury - gauge
Kilograms per square centimeter -
KilogramsPerSquareCentimeterAbsolute
absolute
KilogramsPerSquareCentimeterGauge Kilograms per square centimeter - gauge
PSIA Pounds per square inch - absolute
PSIG Pounds per square inch - gauge
Torr Torr

Example for Conversion of Pressure

Use Case

The user wants to convert a pressure value of 2.5 atmospheres to torrs.

Expression
uom.to_Torrs(2.5, uom.Pressure.Atm)

Result

1899.9999738262197

Speed Conversion
Conversion from one unit of measure of speed to another can be done with these functions from the
uom module.

Speed Conversion Functions

Function Name Action


to_FeetPerMinute Converts to feet per minute
to_FeetPerSecond Converts to feet per second
to_InchesPerSecond Converts to inches per second
to_MetersPerMinute Converts to meters per minute
to_MetersPerSecond Converts to meters per second
to_MillimetersPerSecond Converts to millimeters per second
to_MicrometersPerSecond Converts to micrometers per second

Units

Speed units are represented by the following properties of the Speed enumeration class:

17
Conversion Functions

Property Meaning
FPM Feet per minute
FeetPerSecond Feet per second
IPS Inches per second
MPM Miles per minute
MetersPerSecond Meters per second
MillimetersPerSecond Millimeters per second
MicrometersPerSecond Micrometers per second

Example for Conversion of Speed

Use Case

The user wants to convert a speed value of 20 feet per second to inches per second.

Expression
uom.to_InchesPerSecond(20, uom.Speed.FeetPerSecond)

Result

240

Temperature Conversion
Conversion from one unit of measure of temperature to another can be done with these functions
from the uom module.

Temperature Conversion Functions

Function Name Action


to_Celsius Converts to Celsius
to_Fahrenheit Converts to Fahrenheit
to_Kelvin Converts to Kelvin
to_Rankine Converts to Rankine

Units

Temperature units are represented by the following properties of the Temperature enumeration
class:

Property Meaning
Celsius Celsius

18
Conversion Functions

Property Meaning
Fahrenheit Fahrenheit
Kelvin Kelvin
Rankine Rankine

Example for Conversion of Temperature

Use Case

The user wants to convert a temperature value of 25 degrees Celsius to Fahrenheit.

Expression
uom.to_Fahrenheit(25, uom.Temperature.Celsius)

Result

76.99999999999949

Time Conversion
Conversion from one unit of measure of time to another can be done with these functions from the
uom module.

Time Conversion Functions

Function Name Action


to_Years Converts to Years
to_Days Converts to Days
to_Hours Converts to Hours
to_Minutes Converts to Minutes
to_Seconds Converts to Seconds

Units

Time units are represented by the following properties of the Time enumeration class:

Property Meaning
Years Years
Days Days
Hours Hours
Minutes Minutes
Seconds Seconds

19
Conversion Functions

Example for Conversion of Time

Use Case

The user wants to convert a temperature value of 1.5 years to days.

Expression
uom.to_Days(1.5, uom.Time.Years)

Result

547.86375

Torque Conversion
Conversion from one unit of measure of torque to another can be done with these functions from
the uom module.

Torque Conversion Functions

Function Name Action


to_PoundsOfForce Converts to pounds of force
to_NewtonMeters Converts to newton meters

Units

Torque units are represented by the following properties of the Torque enumeration class:

Property Meaning
FtLBF Foot pounds of force
Nm Newton meters

20
Conversion Functions

Example for Conversion of Torque

Use Case

The user wants to convert a torque value of 100 foot pounds of force to newton meters.

Expression
uom.to_NewtonMeters(100, uom.Torque.FtLBF)

Result

135.5817948331401

21

You might also like