Skip to main content

A Python package for chemical reactor engineering

Project description

Chemics

The Chemics package is a collection of Python functions for performing 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

If you don't have Python installed on your computer, the Anaconda or Miniconda distribution of Python is recommended for scientific computing. After setting up Python, the Chemics package can be downloaded and installed using the pip or conda package managers.

Install Chemics using the pip package manager:

$ pip install chemics

Install Chemics using the conda package manager:

$ conda config --add channels conda-forge
$ conda 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.

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

chemics-21.10.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

chemics-21.10-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file chemics-21.10.tar.gz.

File metadata

  • Download URL: chemics-21.10.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for chemics-21.10.tar.gz
Algorithm Hash digest
SHA256 d2a23e05d55efae0ed9d0af8a26152d52a8a1e781b48033db7f527b3afcf7119
MD5 792c6cbf605b9c04af8952ff466f1cce
BLAKE2b-256 88d8d2e54da36e57004983448ea7f00db815d4e3881ee23dd8bcd4fbe632b6d7

See more details on using hashes here.

File details

Details for the file chemics-21.10-py3-none-any.whl.

File metadata

  • Download URL: chemics-21.10-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for chemics-21.10-py3-none-any.whl
Algorithm Hash digest
SHA256 cd645ca028d5088e9054c3eee0abee5474ac739eddaa435e6068e5d50f296bb8
MD5 a91d9e73b3a9a733f96397379d688d91
BLAKE2b-256 93a29b32f0dce1e6cbcef7edd6fcf5edbb52326c4d877c4cdc6b1060aa9372ab

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