How to use the quantities.unitquantity.UnitQuantity function in quantities

To help you get started, we’ve selected a few quantities examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python-quantities / python-quantities / quantities / units / energy.py View on Github external
'ton_TNT',
    4.184e9*J,
    symbol='tTNT'
)
US_therm = UnitQuantity(
    'US_therm',
    1.054804e8*J,
    aliases=['US_therms']
)
Wh = watthour = watt_hour = UnitQuantity(
    'watt_hour',
    J/s*h,
    symbol='Wh',
    aliases=['watthour', 'watthours', 'watt_hours']
)
kWh = kilowatthour = kilowatt_hour = UnitQuantity(
    'kilowatt_hour',
    1000*Wh,
    symbol='kWh',
    aliases=['kilowatthour', 'kilowatthours', 'kilowatt_hours']
)
MWh = megawatthour = megawatt_hour = UnitQuantity(
    'megawatt_hour',
    1000*kWh,
    symbol='MWh',
    aliases=['megawatthour', 'megawatthours', 'megawatt_hours']
)
GWh = gigawatthour = gigawatt_hour = UnitQuantity(
    'gigawatt_hour',
    1000*MWh,
    symbol='GWh',
    aliases=['gigawatthour', 'gigawatthours', 'gigawatt_hours']
github python-quantities / python-quantities / quantities / units / pressure.py View on Github external
)
inHg = in_Hg = inch_Hg = inch_Hg_32F = UnitQuantity(
    'inHg',
    inch*Hg,
    aliases=['in_Hg', 'inch_Hg', 'inch_Hg_32F']
)
inch_Hg_60F = UnitQuantity(
    'inch_Hg_60F',
    inch*mercury_60F
)

inch_H2O_39F = UnitQuantity(
    'inch_H2O_39F',
    inch*water_39F
)
inch_H2O_60F = UnitQuantity(
    'inch_H2O_60F',
    inch*water_60F
)
footH2O = UnitQuantity(
    'footH2O',
    ft*water
)
cmH2O = UnitQuantity(
    'cmH2O',
    cm*water
)
foot_H2O = ftH2O = UnitQuantity(
    'foot_H2O',
    ft*water,
    aliases=['ftH2O']
)
github python-quantities / python-quantities / quantities / units / electromagnetism.py View on Github external
C/V,
    symbol='F',
    aliases=['farads']
)
mF = UnitQuantity(
    'millifarad',
    F/1000,
    symbol='mF'
)
uF = UnitQuantity(
    'microfarad',
    mF/1000,
    symbol='uF',
    u_symbol='μF'
)
nF = UnitQuantity(
    'nanofarad',
    uF/1000,
    symbol='nF'
)
pF = UnitQuantity(
    'picofarad',
    nF/1000,
    symbol='pF'
)
ohm = Ohm = UnitQuantity(
    'ohm',
    V/A,
    u_symbol='Ω',
    aliases=['ohms', 'Ohm']
)
kOhm = UnitQuantity(
github python-quantities / python-quantities / quantities / units / time.py View on Github external
365.2425*day,
    aliases=['Gregorian_years']
)

millenium = UnitTime(
    'millenium',
    1000*year,
    aliases=['millenia']
)
eon = UnitTime(
    'eon',
    1e9*year,
    aliases=['eons']
)

work_year = UnitQuantity(
    'work_year',
    2056*hour,
    aliases=['work_years']
)
work_month = UnitQuantity(
    'work_month',
    work_year/12,
    aliases=['work_months']
)

del UnitQuantity
github python-quantities / python-quantities / quantities / units / electromagnetism.py View on Github external
1.112650e-12*F,
    symbol='stF',
    aliases=['statfarads', 'statF']
)
stathenry = statH = stH = UnitQuantity(
    'stathenry',
    8.987554e11*H,
    symbol='stH',
    aliases=['statH']
)
statmho = statS = stS = UnitQuantity(
    'statmho',
    1.112650e-12*S,
    symbol='stS'
)
statohm = UnitQuantity(
    'statohm',
    8.987554e11*ohm,
    u_symbol='stΩ',
    aliases=['statohms']
)
statvolt = statV = stV = UnitQuantity(
    'statvolt',
    2.997925e2*V,
    symbol='stV',
    aliases=['statvolts', 'statV']
)
unit_pole = UnitQuantity(
    'unit_pole',
    1.256637e-7*Wb
)
vacuum_permeability = mu_0 = magnetic_constant = UnitQuantity(
github python-quantities / python-quantities / quantities / units / volume.py View on Github external
Imperial_bushel = UnitQuantity(
    'Imperial_bushel',
    36.36872*liter,
    doc='exact'
)
UK_liquid_gallon = Canadian_liquid_gallon = UnitQuantity(
    'UK_liquid_gallon',
    4.54609*liter,
    aliases=[
        'UK_liquid_gallons', 'Canadian_liquid_gallon',
        'Canadian_liquid_gallons'
    ],
    doc='exact'
)
UK_liquid_quart = UnitQuantity(
    'UK_liquid_quart',
    UK_liquid_gallon/4,
    aliases=['UK_liquid_quarts']
)
UK_liquid_pint = UnitQuantity(
    'UK_liquid_pint',
    UK_liquid_quart/2,
    aliases=['UK_liquid_pints']
)
UK_liquid_cup = UnitQuantity(
    'UK_liquid_cup',
    UK_liquid_pint/2,
    aliases=['UK_liquid_cups']
)
UK_liquid_gill = UnitQuantity(
    'UK_liquid_gill',
github python-quantities / python-quantities / quantities / units / volume.py View on Github external
'US_dry_quart',
    US_dry_gallon/4,
    aliases=['dry_quart', 'dry_quarts', 'US_dry_quarts']
)
dry_pint = US_dry_pint = UnitQuantity(
    'US_dry_pint',
    US_dry_quart/2,
    aliases=['dry_pint', 'dry_pints', 'US_dry_pints']
)
quart = liquid_quart = US_liquid_quart = UnitQuantity(
    'US_liquid_quart',
    US_liquid_gallon/4,
    symbol='quart',
    aliases=['quarts', 'liquid_quart', 'liquid_quarts', 'US_liquid_quarts']
)
pt = pint = liquid_pint = US_liquid_pint = UnitQuantity(
    'US_liquid_pint',
    US_liquid_quart/2,
    symbol='pt',
    aliases=[
        'pint', 'pints', 'liquid_pint', 'liquid_pints', 'US_liquid_pints'
    ],
)
cup = US_liquid_cup = UnitQuantity(
    'cup',
    US_liquid_pint/2,
    aliases=['cups', 'US_liquid_cup', 'US_liquid_cups']
)
gill = US_liquid_gill = UnitQuantity(
    'US_liquid_gill',
    US_liquid_cup/2,
    symbol='gill',
github python-quantities / python-quantities / quantities / units / pressure.py View on Github external
)

mmHg = mm_Hg = millimeter_Hg = millimeter_Hg_0C = UnitQuantity(
    'millimeter_Hg',
    mm*mercury,
    symbol='mmHg',
    aliases=['mm_Hg', 'millimeter_Hg_0C'],
    doc="""
    The pressure exerted at the base of a column of fluid exactly 1 mm high,
    when the density of the fluid is exactly 13.5951 g/cm^3, at a place where
    the acceleration of gravity is exactly 9.80665 m/s^2.

    http://en.wikipedia.org/wiki/Conventional_millimeter_of_mercury
    """
)
cmHg = cm_Hg = centimeter_Hg = UnitQuantity(
    'cmHg',
    cm*Hg,
    aliases=['cm_Hg', 'centimeter_Hg']
)
inHg = in_Hg = inch_Hg = inch_Hg_32F = UnitQuantity(
    'inHg',
    inch*Hg,
    aliases=['in_Hg', 'inch_Hg', 'inch_Hg_32F']
)
inch_Hg_60F = UnitQuantity(
    'inch_Hg_60F',
    inch*mercury_60F
)

inch_H2O_39F = UnitQuantity(
    'inch_H2O_39F',
github python-quantities / python-quantities / quantities / units / volume.py View on Github external
bushel/8,
)
gallon = liquid_gallon = US_liquid_gallon = UnitQuantity(
    'US_liquid_gallon',
    231*inch**3,
    aliases=[
        'gallon', 'gallons', 'liquid_gallon', 'liquid_gallons',
        'US_liquid_gallons'
    ],
)
dry_quart = US_dry_quart = UnitQuantity(
    'US_dry_quart',
    US_dry_gallon/4,
    aliases=['dry_quart', 'dry_quarts', 'US_dry_quarts']
)
dry_pint = US_dry_pint = UnitQuantity(
    'US_dry_pint',
    US_dry_quart/2,
    aliases=['dry_pint', 'dry_pints', 'US_dry_pints']
)
quart = liquid_quart = US_liquid_quart = UnitQuantity(
    'US_liquid_quart',
    US_liquid_gallon/4,
    symbol='quart',
    aliases=['quarts', 'liquid_quart', 'liquid_quarts', 'US_liquid_quarts']
)
pt = pint = liquid_pint = US_liquid_pint = UnitQuantity(
    'US_liquid_pint',
    US_liquid_quart/2,
    symbol='pt',
    aliases=[
        'pint', 'pints', 'liquid_pint', 'liquid_pints', 'US_liquid_pints'
github python-quantities / python-quantities / quantities / units / pressure.py View on Github external
1000*kPa,
    symbol='MPa',
    aliases=['megapascals']
)
GPa = gigapascal = UnitQuantity(
    'gigapascal',
    1000*MPa,
    symbol='GPa',
    aliases=['gigapascals']
)
bar = UnitQuantity(
    'bar',
    100000*pascal,
    aliases=['bars']
)
mb = mbar = millibar = UnitQuantity(
    'millibar',
    0.001*bar,
    symbol='mb',
    aliases=['mbar']
)
kbar = kilobar = UnitQuantity(
    'kilobar',
    1000*bar,
    symbol='kbar',
    aliases=['kilobars']
)
Mbar = megabar = UnitQuantity(
    'megabar',
    1000*kbar,
    symbol='Mbar',
    aliases=['megabars']