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
Metadata
Release files for pyreactsim 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyreactsim-0.1.2.tar.gz | 80.2 kB | Without provenance | Details for pyreactsim-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyreactsim-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pyreactsim-0.1.2-py3-none-any.whl |
Total release size: 200.8 kB
Release files / pyreactsim-0.1.2.tar.gz
| Download URL | pyreactsim-0.1.2.tar.gz |
|---|---|
| Size | 80.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1a76cda7a57b992667905aa8930df5cd4313989d3cf2f42e3b20cdc8b44f272
|
|
BLAKE2b-256 checksum How to use checksums |
f21fc9edd2624dfd9d438eed877d88fec117e5078c459c5653302591a8c8f572
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / pyreactsim-0.1.2-py3-none-any.whl
| Download URL | pyreactsim-0.1.2-py3-none-any.whl |
|---|---|
| Size | 120.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ab6ebd66de57adf1656eb28a23bd50246553f1a143635b452293cc62efe1b9c
|
|
BLAKE2b-256 checksum How to use checksums |
f4c67e3d4aaf49be5978af902a8554d4fc8ca020dfe8b8bb254f3cc359861cc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for pyreactsim 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.