A simple unit converter for chemical engineering
Project description
z-units
A simple unit converter for chemical engineering
install
pip install z-units
Usage
from z_units import quantity as q
# pick a quantity
f = q.MolarFlow(3)
# to base unit
f.to_base()
# convert
f.to('kmol/s')
# list available units
print(f.units)
# get value
unit, value = f.unit, f.value
# gauge pressure
p = q.Pressure(5, 'bar').to('MPag')
# change local atmospheric pressure (default: 101.325 kPa)
from z_units import config
config.set_local_atmospheric_pressure(50)
q.Pressure(100, 'kPa').to('kPag')
# change standard temperature (default: 20 degC)
# affect standard cubic meter "Sm**3"
config.set_standard_temperature(15)
q.Substance(100, 'Nm3').to('Sm3')
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
z_units-0.1.1.tar.gz
(13.3 kB
view hashes)
Built Distribution
z_units-0.1.1-py3-none-any.whl
(11.3 kB
view hashes)