Skip to main content

Chemics

The Chemics package is a collection of Python functions for conducting calculations in the field of chemical and fluidization engineering. Source code for the package is available on GitHub and contributions from the community are encouraged.

Installation

The Anaconda or Miniconda distribution of Python is recommended for scientific computing. After setting up Python, the Chemics package can be downloaded and installed with the pip package manager:

pip install chemics

Usage

The example below imports the Chemics package then uses the rhog() function to calculate the density of a gas based on its molecular weight, pressure, and temperature.

import chemics as cm
cm.rhog(28, 101325, 773)    # returns 0.4414

The ut() function calculates the terminal velocity of a particle according to the Haider and Levenspiel 1989 paper as shown below.

import chemics as cm

# Parameters
dp = 0.00016    # particle diameter [m]
mu = 1.8e-5     # gas viscosity [kg/(m s)]
phi = 0.67      # particle sphericity [-]
rhog = 1.2      # gas density [kg/m^3]
rhos = 2600     # particle density [kg/m^3]

# Haider and Levenspiel terminal velocity [m/s]
# this assigns a value of 0.8857 to `ut_haider`
ut_haider = cm.ut_haider(dp, mu, phi, rhog, rhos)

Use the ChemicalEquation class to get properties of the reactants and products from a given chemical equation.

import chemics as cm

ce = cm.ChemicalEquation('2 HCl + 2 Na -> 2 NaCl + H2')

ce.balance
# returns True for balanced equation

ce.rct_properties
# returns a dataframe of the reactant properties
#                HCl        Na
# moles            2         2
# species        HCl        Na
# molwt       36.458     22.99
# mass        72.916     45.98
# molfrac        0.5       0.5
# massfrac  0.613275  0.386725

More examples are available in the chemics-examples repository.

Documentation

Documentation for the Chemics package is available at chemics.github.io.

Contributing

See the CONTRIBUTING.md document for guidelines on contributing to the Chemics package.

License

Chemics is available under the MIT License - see the LICENSE file for more information.

Metadata

Release files for chemics 20.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chemics 20.7
File Size Uploaded
chemics-20.7.tar.gz 609.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chemics 20.7
File Interpreter ABI Platform
chemics-20.7-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / chemics-20.7.tar.gz

Download URL chemics-20.7.tar.gz
Size 609.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3b12bc5e84e33fe715e250d2af8ed164386231fc1329210ebb4356b76829ad89
BLAKE2b-256 checksum
How to use checksums
b01fe8bd54f3d9b13fbee5386fb3d8d37dfc78a2810bca50abcf61a0c4f7e6d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / chemics-20.7-py3-none-any.whl

Download URL chemics-20.7-py3-none-any.whl
Size 622.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
793bcb716450bdcfe9214228a5170a7646a10cf5ee14ef668a9b27b84b7cb1c4
BLAKE2b-256 checksum
How to use checksums
dad54459ef698d6bcd0054ff491ab41b8711644e75e95aa8c308a578aa1eeacd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release history Release notifications | RSS feed

24.1

2 release files

23.11

2 release files

23.2

2 release files

23.1

2 release files

22.10

2 release files

22.8

2 release files

21.10

2 release files

21.7

2 release files

21.5

2 release files

21.4

2 release files

20.9

2 release files

20.8

2 release files

This release

20.7 This release

2 release files

20.5

2 release files

20.4

2 release files

19.10

2 release files

19.8

2 release files

19.7

2 release files

19.6.1

2 release files

19.6

2 release files

19.5.2

2 release files

19.5.1

2 release files

19.5

2 release files

19.3

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page