esys.escript.unitsSI Package¶
Classes¶
- class esys.escript.unitsSI.Unit(name, longname, a, b)¶
a general class to define a physical unit and convert from this unit to an appropriate SI unit.
Unit
object have a dual purpose: Firstly physical units can be combined through ,/ and * to form new physical units or to add prefixes such as Milli to m to form mm=Milli*m. Moreover, a given floating point number x (or any other arithmetic object) can be converted from the physical unit to the SI system, eg. 10*mm to create the value for 10mm which is the float number 0.01 in the SI system. In addition, a value in the SI unit can be converted back to the given unit, eg. to express 0.01m in physical units of mm use 0.01/mm which will return 10.- __init__(name, longname, a, b)¶
initializes the physical unit
- Parameters:
name (
str
) – short name of the physical unit or prefixlongname (
str
) – long name of the physical unit or prefixa (
float
) – absolute value in transformationb (
float
) – slop in translation
- getLongName()¶
Returns the long name of the physical unit
- Returns:
name of the physical unit
- Return type:
str
- getName()¶
Returns the name of the physical unit
- Returns:
name of the physical unit
- Return type:
str
- setLongName(name)¶
Sets the long name of the physical unit
- Parameters:
name (
str
) – new long name of the physical unit
- setName(name)¶
Sets the name of the physical unit
- Parameters:
name (
str
) – new name of the physical unit
Functions¶
Others¶
A
Atto
Barrel
C
Celsius
Centi
DEG
Darcy
Deca
Deci
Exa
F
Fahrenheit
Femto
Giga
Gravitational_Constant
Gyr
Hecto
Hz
J
K
Kilo
Magnetic_Dipole_Moment_Earth
Mcf
Mega
Micro
Milli
Mol
Mscf
Mu_0
Myr
N
Nano
Ohm
Pa
Peta
Pico
Poise
RAD
R_Earth
R_Earth_equator
R_Earth_poles
T
Tera
Tesla
V
W
Yocto
Yotta
Zepto
Zetta
atm
bar
cPoise
ccm
cm
day
ft
gal
gram
h
hour
kg
km
lb
liter
m
mDarcy
mPoise
mgal
minute
mm
msec
one
pi
psi
sec
ton
v_light
year
yr