Skip to main content

A physics quantity calculator with units.

Project description

A physics quantity calculator with units.

Usage

  • Install this module via pip install electronvolt.
  • Recommended to use in an interactive python environment, e.g. jupyter notebook.
  • Recommended to import via from electronvolt import *.

You can also run this module online HERE.

  • This page typically loads within 3 minutes.
  • Use shift+enter to run a block of code.
  • Run the first block to initialize the calculator.
  • Run the second block to feel how it works.

Demo

Rest mass of an electron

>>> from electronvolt import *
>>> me
9.1093837015e-31 * kg

Rest energy of the electron, in SI units

>>> me * c**2
8.187105776823886e-14 * m**2 * s**-2 * kg

In mega electronvolts

>>> me * c**2 / MeV
0.5109989499961642

This matches the electron rest energy on this Wikipedia page.

Rest mass of an electron, with uncertainties

>>> from uncertainties import ufloat
>>> ume = ufloat(9.1093837015, 0.0000000028) * 1e-31 * kg
>>> ume
(9.1093837015+/-0.0000000028)e-31 * kg

Rest energy of the electron, with uncertainties

>>> ume * c**2
(8.1871057768+/-0.0000000025)e-14 * kg * s**-2 * m**2

This matches the electron rest energy on the same Wikipedia page.

Units and Constants

Name Symbol Value Unit
Math Constants
pi 3.14159265
Euler's number euler 2.71828183
Metric Prefixes
yotta 1.00E+24
zetta 1.00E+21
exa 1.00E+18
peta 1.00E+15
tera 1.00E+12
giga 1.00E+09
mega 1000000
kilo 1000
hecto 100
deca 10
deci 0.1
centi 0.01
milli 0.001
micro 1.00E-06
nano 1.00E-09
pico 1.00E-12
femto 1.00E-15
atto 1.00E-18
zepto 1.00E-21
yocto 1.00E-24
Common Prefixes
hundred 100
thousand 1000
million 1000000
billion 1.00E+09
trillion 1.00E+12
SI Base Units
second s 1 s
meter m 1 m
kilogram kg 1 kg
ampere A 1 A
kelvin K 1 K
mole mol 1 mol
candela cd 1 cd
Time
minute 60 s
hour 3600 s
day 86400 s
week 604800 s
year 31557600 s
millisecond ms 0.001 s
microsecond us 1.00E-06 s
nanosecond ns 1.00E-09 s
Length
kilometer km 1000 m
decimeter dm 0.1 m
centimeter cm 0.01 m
millimeter mm 0.001 m
micrometer um 1.00E-06 m
nanometer nm 1.00E-09 m
picometer pm 1.00E-12 m
femtometer fm 1.00E-15 m
Frequency
hertz Hz 1 s-1
kilohertz kHz 1000 s-1
megahertz MHz 1000000 s-1
gigahertz GHz 1.00E+09 s-1
terahertz THz 1.00E+12 s-1
Classical Mechanics
gravitational acceleration g 9.80665 m s-2
newton N 1 kg m s-2
pascal Pa 1 kg m-1 s-2
joule J 1 kg m2 s-2
watt W 1 kg m2 s-3
Thermodynamics
Planck constant h 6.63E-34 kg m2 s-1
reduced Planck constant hbar 1.05E-34 kg m2 s-1
Avogadro constant NA 6.02E+23 mol-1
Boltzmann constant kB 1.38E-23 kg m2 s-2 K-1
ideal gas constant R 8.31446262 kg mol-1 K-1 m2 s-2
Electromagnetism
coulomb C 1 s A
volt V 1 kg A-1 m2 s-3
farad F 1 kg-1 A2 m-2 s4
Ohm 1 kg A-2 m2 s-3
tesla T 1 kg A-1 s-2
weber Wb 1 kg m2 s-2 A-1
henry H 1 kg A-2 m2 s-2
speed of light c 299792458 m s-1
vacuum magnetic permeability mu0 1.26E-06 kg A-2 m s-2
vacuum electric permittivity epsilon0 8.85E-12 kg-1 m-3 s4 A2
Coulomb constant k 8.99E+09 kg m3 s-4 A-2
elementary charge e 1.60E-19 s A
Imperial Units
inch ('in' is a python keyword) in_ 0.0254 m
foot ft 0.3048 m
yard yd 0.9144 m
mile mi 1609.344 m
acre 4046.85642 m2
nautical mile NM 1852 m
knot kn 0.514444444 m s-1
pound-mass lb 0.45359237 kg
pound-force lbf 4.44822162 kg m s-2
slug 14.5939029 kg
blob 175.126835 kg
Common Units
kilometer per hour kph 0.277777778 m s-1
miles per hour mph 0.44704 m s-1
gram 0.001 kg
liter L 0.001 m3
pound per square inch psi 6894.757 kg m-1 s-2
kilowatt-hour kWh 3600000 kg m2 s-2
hectare ha 10000 m2
Atomic Physics
electron rest mass me 9.11E-31 kg
proton mass mp 1.67E-27 kg
neutron mass mn 1.67E-27 kg
atomic mass unit u 1.66E-27 kg
atomic mass of hydrogen mH 1.67E-27 kg
atomic mass of helium mHe 6.65E-27 kg
Quantum Mechanics
Stefan-Boltzmann constant sigma 5.67E-08 kg K-4 s-3
Bohr radius a0 5.29E-11 m
hydrogen ground state energy hground -2.18E-18 kg m2 s-2
fine-structure constant alpha 0.007297353
Rydberg constant Rydberg 10973731.6 m-1
Radioactive Decays
becquerel Bq 1 s-1
curie Ci 3.70E+10 s-1
millicurie mCi 37000000 s-1
microcurie uCi 37000 s-1
Nuclear Physics
electronvolt eV 1.60E-19 kg m2 s-2
kilo-electronvolt keV 1.60E-16 kg m2 s-2
mega-electronvolt MeV 1.60E-13 kg m2 s-2
giga-electronvolt GeV 1.60E-10 kg m2 s-2
tera-electronvolt TeV 1.60E-07 kg m2 s-2
electronvolt per speed of light eVpc 5.34E-28 kg m s-1
mega-electronvolt per c MeVpc 5.34E-22 kg m s-1
electronvolt per c squared eVpc2 1.78E-36 kg
mega-electronvolt per c squared MeVpc2 1.78E-30 kg
Cosmology
gravitational constant G 6.67E-11 kg-1 m3 s-2
astronomical unit au 1.50E+11 m
light-year ly 9.46E+15 m
parsec pc 3.09E+16 m
megaparsec Mpc 3.09E+22 m
Hubble parameter H0 2.33E-18 s-1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

electronvolt-1.5.6.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

electronvolt-1.5.6-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file electronvolt-1.5.6.tar.gz.

File metadata

  • Download URL: electronvolt-1.5.6.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for electronvolt-1.5.6.tar.gz
Algorithm Hash digest
SHA256 bac0f02b4b8289e464061e9ea33a984bb8e1acf43fcc850ecd652fb2721de106
MD5 752312a7cc4af02e4a7f38db47a53f66
BLAKE2b-256 52ed9c3846389dbb29ad8b877b0fc6d231c8a2e6c4d481940adf03c37cd33e70

See more details on using hashes here.

File details

Details for the file electronvolt-1.5.6-py3-none-any.whl.

File metadata

  • Download URL: electronvolt-1.5.6-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for electronvolt-1.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 540938e4906ffd7bfcaa7798435fe948ff0fc0ecebb615429675ad07f931f4af
MD5 a44c1bb442e574e32bf4e83649e5b0df
BLAKE2b-256 e8760a7b3e9afd4f22f9f9ddaea62d2266654f26b95804f2d8253934ed2deff0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page