Skip to main content

PyReactSim is a Python package for steady-state chemical reactor simulation, integrating reaction kinetics, thermodynamics, and reactor design tools.

Project description

PyReactSim

PyReactSim

PyPI Downloads PyPI Version Supported Python Versions License

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:

  1. Define reactor options (...ReactorOptions) and heat transfer options.
  2. Build a thermo source with build_thermo_source(...).
  3. Create a reactor using create_..._reactor(...).
  4. Run simulation with .simulate(...).
  • br (Batch Reactor)

    • API: create_batch_reactor(...) and BatchReactor.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.py
      • examples/batch reactor/liquid-batch-exe-1.py
  • cstr (Continuous Stirred-Tank Reactor)

    • API: create_cstr_reactor(...) and CSTRReactor.simulate(time_span=..., solver_options=...)
    • Typical use: dynamic holdup behavior with inlet/outlet streams and mixing assumptions.
    • Examples:
      • examples/cstr/gas-cstr-exp-1.py
      • examples/cstr/liquid-cstr-exp-1.py
  • pfr (Plug Flow Reactor)

    • API: create_pfr_reactor(...) and PFRReactor.simulate(volume_span=..., solver_options=...)
    • Typical use: integration along reactor volume for tubular-reactor behavior.
    • Examples:
      • examples/pfr/gas-pfr-exp-1.py
      • examples/pfr/liquid-pfr-exp-1.py
  • pbr (Packed-Bed Reactor)

    • API: create_pbr_reactor(...) and PBRReactor.simulate(volume_span=..., solver_options=...)
    • Typical use: packed-bed modeling with catalyst-bulk effects (for example, bulk_density in model inputs).
    • Examples:
      • examples/pbr/gas-pbr-exp-1.py
      • examples/pbr/gas-pbr-exp-2.py
      • examples/pbr/liquid-pbr-exp-1.py
      • examples/pbr/liquid-pbr-exp-2.py

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.

🤝 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyreactsim-0.1.0.tar.gz (80.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyreactsim-0.1.0-py3-none-any.whl (120.5 kB view details)

Uploaded Python 3

File details

Details for the file pyreactsim-0.1.0.tar.gz.

File metadata

  • Download URL: pyreactsim-0.1.0.tar.gz
  • Upload date:
  • Size: 80.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for pyreactsim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c24825b51a99b66f0956d78f009fae8c9442624f3b04648b5b71902ba246c26
MD5 58320582aada61f5081ee095e29ea5a3
BLAKE2b-256 00e6274ccb1db2732545ce94e935d70cec37fa0b1531957a2402fa39ee8cb6ed

See more details on using hashes here.

File details

Details for the file pyreactsim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyreactsim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 120.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for pyreactsim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70051c5d4c8967bf27fbca45cf621fe500c87791e9626ad51ac0668ac8fe726e
MD5 327214fa3e8c77a4a4659496c05d3c40
BLAKE2b-256 8cbd898b4e8d063ff86107085a34355a582f936a00d1bbc562c55bdec56103a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page