Getting Started¶
The chemcat package offers a simplified object-oriented
framework to compute atmospheric chemical compositions in
thermochemical equilibrium. The code enables multiple way to
parameterize the atmospheric composition, including:
Scaling the abundance of all metal elements (everything except H and He) relative to the solar metallicity.
Setting the abundance of individual/custom elements.
Setting the abundance of individual/custom elements as elemental ratios (e.g., C/O, Na/H, etc.).
chemcat also provides an interface to access the NIST-JANAF and
NASA-ThermoBuild databases of thermochemical properties (see section
Database Tutorial).
Take a look at the Quick Example section to get up to speed in
computing chemcat. The Chemistry Tutorial section showcases the
multiple ways in which chemcat enables a parameterization of the
atmospheric composition.
System Requirements¶
chemcat is compatible with Python3.9+ and has been tested
to work in both Linux and OS X.
Install¶
To install bibmanager run the following command from the terminal:
pip install chemcat
Or if you prefer conda:
conda install -c conda-forge chemcat
Alternatively (e.g., for developers), clone the repository to your local machine with the following terminal commands:
git clone https://github.com/atmolib/chemcat
cd chemcat
pip install -e .
Quick Example¶
Once installed, chemcat is ready to use, for example, from the
Python Interpreter.
This example shows how to compute volume mixing ratios in thermochemical equilibrium for an isothermal atmosphere (at \(T=1200\) K) between \(10^{-8}\) and \(10^{2}\) bars:
import chemcat as cat
nlayers = 81
temperature = np.tile(1200.0, nlayers)
pressure = np.logspace(-8, 3, nlayers)
molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH C2H2 C2H4 H He C N O'.split()
net = cat.Network(pressure, temperature, molecules)
vmr = net.thermochemical_equilibrium()
See section Chemistry Tutorial for an in-depth tutorial of the
chemcat capabilities.
Additionally, all low-and mid-level routines can be found in the
package’s API.