Pure Python chemical kinetics and reactor simulation library - No compilation required!
Project description
PyroXa: Chemical Kinetics & Reactor Simulation
A pure Python library for chemical kinetics and reactor simulation. Built for students, researchers, and industry professionals.
Features
- Reaction Kinetics: Elementary reactions, enzyme kinetics, surface reactions, temperature dependencies
- Reactors: Batch, CSTR, PFR, Packed Bed, Fluidized Bed, reactor networks
- Thermodynamics: Heat capacity, enthalpy, equilibrium, equations of state, phase equilibrium
- Transport: Diffusion, heat/mass transfer, dimensionless numbers
- Analysis: Sensitivity analysis, optimization, statistical methods, numerical solvers
- Specialized: Crystallization, catalyst performance, RTD, scale-up, process safety
132+ functions covering all aspects of chemical reaction engineering.
Installation
git clone https://github.com/nikunjagarwal17/pyroxa.git
cd pyroxa/project
pip install -r requirements.txt
pip install -e .
Requirements: Python 3.8+, NumPy, SciPy, Matplotlib (optional), PyYAML
What does pip install -e . do?
It uses setup.py to install PyroXa in "editable" mode, allowing you to modify the source code and see changes immediately without reinstalling.
Alternative installation methods:
- Standard install:
pip install .(uses setup.py for permanent installation) - Direct from setup.py:
python setup.py install(legacy method, not recommended)
See INSTALLATION_GUIDE.md for detailed instructions.
Quick Example
import pyroxa
# Rate constant using Arrhenius equation
k = pyroxa.arrhenius_rate(A=1e10, Ea=50000, T=298.15)
print(f"Rate constant: {k:.2e} 1/s")
# Batch reactor - calculate time for conversion
time = pyroxa.batch_reactor_time(initial_conc=1.0, final_conc=0.2, rate_constant=0.15, order=1)
print(f"Time required: {time:.2f} time units")
# CSTR - calculate volume for target conversion
volume = pyroxa.cstr_volume(flow_rate=10.0, rate_constant=0.5, conversion=0.8, order=1)
print(f"CSTR volume: {volume:.2f} volume units")
# PFR - calculate volume for target conversion
pfr_vol = pyroxa.pfr_volume(flow_rate=10.0, rate_constant=0.5, conversion=0.8, order=1)
print(f"PFR volume: {pfr_vol:.2f} volume units")
# Heat capacity using NASA polynomials
cp = pyroxa.heat_capacity_nasa(T=500.0, coeffs=[3.298677, 0.0014082404, -3.963222e-06, 5.641515e-09, -2.444854e-12])
print(f"Heat capacity: {cp:.2f} J/mol/K")
More examples in examples/ folder.
Documentation
- Installation Guide - Setup and troubleshooting
- Function Documentation - Complete API reference
- Examples - Industrial, pharmaceutical, and transport examples
Testing
PyroXa includes a comprehensive test suite covering all 132+ functions and classes:
# Quick validation (fast)
python tests/quick_test.py
# Run all tests
python -m pytest tests/ -v
# Run specific category
python -m pytest tests/test_basic_kinetics.py -v
Test Coverage:
- 24 test files covering 26 documentation categories
- 200+ individual test methods
- 100% category coverage
- Core classes, exceptions, and utilities tested
- Automatic CI testing on Windows, macOS, Linux
See tests/README.md for complete test documentation.
Project Structure
pyroxa/ # Main library (132 functions)
examples/ # Example scripts
tests/ # Test suite
docs/ # Documentation
Use Cases
- Students: Homework, projects, learning reaction engineering concepts
- Researchers: Mechanism validation, parameter estimation, model development
- Industry: Reactor design, optimization, scale-up, safety analysis
Contributing
Contributions welcome! Fork the repo, make changes, add tests, and submit a PR.
Authors
Nikunj Agarwal (@nikunjagarwal17) - Lead Developer
Contact: nikunjagarwal1704@gmail.com
Issues: GitHub Issues
License
MIT License - see LICENSE file for details.
PyroXa v1.0.0 | Pure Python | Chemical Engineering Made Simple
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyroxa-1.0.0.tar.gz.
File metadata
- Download URL: pyroxa-1.0.0.tar.gz
- Upload date:
- Size: 74.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b77fb51eb7f51e5ea86043fd80ee1d5cca206c32a789dda5ae48b6d706726ae2
|
|
| MD5 |
0659b33b5961adf913a9fbcc54904d1f
|
|
| BLAKE2b-256 |
a386627536c6de32cead7a8595ea90226a467fa0ffe7e8f56aae355489313384
|
File details
Details for the file pyroxa-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyroxa-1.0.0-py3-none-any.whl
- Upload date:
- Size: 72.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
301b9393ebbac44834a2dc555c2c82b75f0a419acfb3ca2b3d7a52c8b9601a87
|
|
| MD5 |
ae5e5744686e48ec6aebbb8101618f62
|
|
| BLAKE2b-256 |
6ffcd1ad88c6d1d27af36cae9eb2da18523e6bafea763cc198e3a982de6cd6e4
|