KINTERA Documentation
Welcome to KINTERA’s documentation!
KINTERA is a high-performance library for atmospheric chemistry and thermodynamics calculations, combining C++ performance with Python accessibility through pybind11 bindings.
Contents:
- Installation
- Quickstart Guide
- User Guide
- API Reference
- Examples
- Example 1: Simple Jupiter Atmosphere
- Example 2: Earth Atmosphere with Water Condensation
- Example 3: Vertical Profile with Adiabatic Extrapolation
- Example 4: Custom Reaction Mechanism
- Example 4a: Falloff and Three-Body Reactions
- Example 5: GPU Acceleration
- Example 6: Type Checking with MyPy
- Example 7: Integration with External Data
- Running the Examples
- Contributing Examples
Overview
KINTERA provides efficient implementations of:
Chemical kinetics calculations - Comprehensive reaction mechanism support
Thermodynamic equation of state - Advanced phase equilibrium computations
Atmospheric chemistry models - Cloud physics with nucleation and condensation modeling
PyTorch Integration - Native tensor operations with GPU acceleration support
Key Features
High Performance: C++17 core with optional CUDA support
Python Interface: Full Python API via pybind11
PyTorch Integration: Native tensor operations using PyTorch
Type Hints: Complete type annotations for IDE support and type checking
Flexible: Support for Earth, Jupiter, and custom atmospheric compositions
Getting Started
Install KINTERA with pip:
pip install numpy 'torch==2.7.1' 'pyharp>=1.7.1'
pip install kintera
For more detailed installation instructions, see the Installation guide.
Quick Example
Here’s a simple example to get you started:
import torch
import kintera
from kintera import ThermoOptions, ThermoX
# Load configuration from YAML
op = ThermoOptions.from_yaml("jupiter.yaml")
thermo = ThermoX(op)
# Set up state variables
temp = torch.tensor([200.], dtype=torch.float64)
pres = torch.tensor([1.e5], dtype=torch.float64)
# Define species composition
species = op.species()
nspecies = len(species)
xfrac = torch.rand((1, 1, nspecies), dtype=torch.float64)
xfrac /= xfrac.sum(dim=-1, keepdim=True)
# Compute equilibrium
thermo.forward(temp, pres, xfrac)
print("Equilibrium composition:", xfrac)
See the Quickstart Guide guide for more examples.
Support and Contributing
Issues: GitHub Issues
Source Code: GitHub Repository
Contact: chengcli@umich.edu
License
See the LICENSE file for details.