37 lines
1.8 KiB
Python
37 lines
1.8 KiB
Python
from .backend import base_unit, compound_unit
|
|
from .backend.dimensional_values import Dimension, Scaling
|
|
|
|
A = base_unit("A", "Ampere", "Current", True)
|
|
m = base_unit("m", "meter", "Length", True)
|
|
K = base_unit("K", "Kelvin", "Temperature", True)
|
|
s = base_unit("s", "second", "Time", True)
|
|
kg = base_unit("kg", "kilo grams", "Mass", True)
|
|
cd = base_unit("cd", "candela", "Luminous intensity", True)
|
|
mol = base_unit("mol", "mole", "Amount of substance", True)
|
|
|
|
cm = Dimension(Scaling(10, -2), m)
|
|
km = Dimension(Scaling(10, 3), m)
|
|
|
|
g = Dimension(Scaling(10, -3), kg)
|
|
|
|
|
|
Hz = compound_unit("Hz", "Hertz", "Frequency", [(s, -1)])
|
|
N = compound_unit("N", "Newton", "Force", [(m, 1), (kg, 1), (s, -2)])
|
|
Pa = compound_unit("Pa", "Pascal", "Pressure", [(N, 1), (m, -2)])
|
|
J = compound_unit("J", "Joule", "Energy", [(kg, 1), (m, 2), (s, -2)])
|
|
W = compound_unit("W", "Watt", "Power", [(J, 1), (s, -1)])
|
|
C = compound_unit("C", "Coulomb", "Electric charge", [(A, 1), (s, 1)])
|
|
V = compound_unit("V", "Volt", "Voltage", [(W, 1), (A, -1)])
|
|
F = compound_unit("F", "Farad", "Capacity", [(C, 1), (V, -1)])
|
|
ohm = compound_unit("omega", "Ohm", "Resistance is futile", [(V, 1), (A, -1)])
|
|
omega = ohm
|
|
S = compound_unit("S", "Siemens", "Conductance", [(ohm, -1)])
|
|
Wb = compound_unit("Wb", "Weber", "Magnetic flux", [(V, 1), (s, 1)])
|
|
T = compound_unit("T", "Tesla", "Magnetic flux density", [(Wb, 1), (m, -2)])
|
|
H = compound_unit("H", "Henry", "Inductance", [(Wb, 1), (A, -1)])
|
|
lx = compound_unit("lx", "Lux", "Illuminance", [(cd, 1), (m, -2)])
|
|
Bq = compound_unit("Bq", "Becquerel", "Radioactivity", [(s, -1)])
|
|
Gy = compound_unit("Gy", "Gray", "Absorbed dose (of ionizing radiation)", [(J, 1), (kg, -1)])
|
|
Sv = compound_unit("Sv", "Sievert", "Equivalent dose (of ionizing radiation)", [(J, 1), (kg, -1)])
|
|
kat = compound_unit("kat", "Katal", "Catalytic activity", [(mol, 1), (s, -1)])
|