PyReactSim is a Python package for steady-state chemical reactor simulation, integrating reaction kinetics, thermodynamics, and reactor design tools.
Project description
PyReactSim
PyReactSim is a Python package for chemical reactor simulation and design. It enables engineers and researchers to model common reactor types such as batch, CSTR, and plug flow reactors, incorporating reaction kinetics, thermodynamics, and transport effects. The initial version focuses on steady-state simulations, allowing users to analyze conversion, selectivity, and temperature profiles under different operating conditions. Designed for flexibility and integration, PyReactSim can be used alongside thermodynamic and phase equilibrium tools to build comprehensive reaction and process models, with dynamic simulation capabilities planned for future releases.
Available Reactor Methods (from examples)
The main reactor workflows follow the same pattern:
- Define reactor options (
...ReactorOptions) and heat transfer options. - Build a thermo source with
build_thermo_source(...). - Create a reactor using
create_..._reactor(...). - Run simulation with
.simulate(...).
-
br(Batch Reactor)- API:
create_batch_reactor(...)andBatchReactor.simulate(time_span=..., solver_options=...) - Typical use: time-domain simulation for closed systems (no inlet/outlet flow during reaction).
- Examples:
examples/batch reactor/gas-batch-exe-1.pyexamples/batch reactor/liquid-batch-exe-1.py
- API:
-
cstr(Continuous Stirred-Tank Reactor)- API:
create_cstr_reactor(...)andCSTRReactor.simulate(time_span=..., solver_options=...) - Typical use: dynamic holdup behavior with inlet/outlet streams and mixing assumptions.
- Examples:
examples/cstr/gas-cstr-exp-1.pyexamples/cstr/liquid-cstr-exp-1.py
- API:
-
pfr(Plug Flow Reactor)- API:
create_pfr_reactor(...)andPFRReactor.simulate(volume_span=..., solver_options=...) - Typical use: integration along reactor volume for tubular-reactor behavior.
- Examples:
examples/pfr/gas-pfr-exp-1.pyexamples/pfr/liquid-pfr-exp-1.py
- API:
-
pbr(Packed-Bed Reactor)- API:
create_pbr_reactor(...)andPBRReactor.simulate(volume_span=..., solver_options=...) - Typical use: packed-bed modeling with catalyst-bulk effects (for example,
bulk_densityin model inputs). - Examples:
examples/pbr/gas-pbr-exp-1.pyexamples/pbr/gas-pbr-exp-2.pyexamples/pbr/liquid-pbr-exp-1.pyexamples/pbr/liquid-pbr-exp-2.py
- API:
If you want to know how each method is configured in practice (options, model inputs, and solver setup), use the example scripts above as the reference.
Examples
You can also run PyReactSim examples in Google Colab:
🤝 Contributing
Contributions are highly welcome — bug fixes, new calculation routines, mixture models, extended unit tests, documentation, etc.
📝 License
This project is distributed under the Apache License, Version 2.0, which grants you broad freedom to use, modify, and integrate the software into your own applications or projects, provided that you comply with the conditions outlined in the license. Although Apache 2.0 does not require users to retain explicit author credit beyond standard copyright and license notices, I kindly request that if you incorporate this work into your own software, you acknowledge Sina Gilassi as the original author. Referencing the original repository or documentation is appreciated, as it helps recognize the effort invested in developing and maintaining this project.
❓ FAQ
For any question, contact me on LinkedIn
👨💻 Authors
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 pyreactsim-0.1.1.tar.gz.
File metadata
- Download URL: pyreactsim-0.1.1.tar.gz
- Upload date:
- Size: 80.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a38426a3bda9b5fbbc6c378d0e21ee6244e11ed3bb385ec390b6657e30a4576f
|
|
| MD5 |
5800dca6c0bc9837ee92df5a6d5b3cd4
|
|
| BLAKE2b-256 |
8b32af312a7b92a1d72f1015ecbe9ee11ace85c9d2cc56f8eab7782de081a56d
|
File details
Details for the file pyreactsim-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyreactsim-0.1.1-py3-none-any.whl
- Upload date:
- Size: 120.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
644808d31528b7e11e885c11531b86246071197a241c7b236a42149011ca2a9c
|
|
| MD5 |
56162a4f6cde8112bf15a12a378fedda
|
|
| BLAKE2b-256 |
30fb99bf66b305c5636f2e07ee521e79a8e2b7c3404bdd0592146eb0701b06af
|