Skip to main content

PyThermoFlash is a Python package for performing thermodynamic flash calculations and property estimations for various fluid systems.

Project description

🧪 PyThermoFlash

PyThermoFlash

Downloads PyPI Python Version License Read the Docs

PyThermoFlash is a powerful and user-friendly computational tool tailored for engineers, researchers, and scientists working with thermodynamic systems. It specializes in performing bubble-point, dew-point, and flash calculations, which are essential for determining the equilibrium state of mixtures under specified conditions. With support for various thermodynamic models, PyThermoFlash ensures accurate predictions of phase behavior and properties for complex fluid systems.

🔎 Thermodynamic Calculations in PyThermoFlash

🔵 Bubble-Point Pressure

The bubble-point pressure is the pressure at which the first bubble of vapor forms when heating a liquid mixture at constant temperature. It represents the equilibrium pressure where the liquid starts to vaporize at a given temperature and composition.

🔵 Bubble-Point Temperature

The bubble-point temperature is the temperature at which the first bubble of vapor appears when heating a liquid mixture at constant pressure. It marks the onset of vaporization under the specified pressure and composition.

🟠 Dew-Point Pressure

The dew-point pressure is the pressure at which the first drop of liquid condenses from a vapor mixture at a constant temperature. It defines the equilibrium pressure where condensation begins at the given temperature and vapor composition.

🟠 Dew-Point Temperature

The dew-point temperature is the temperature at which the first droplet of liquid forms when cooling a vapor mixture at constant pressure. It indicates the onset of condensation under the specified pressure and composition.

⚡ Isothermal Flash Calculation

The isothermal flash calculation determines the amounts and compositions of the vapor and liquid phases when a mixture partially vaporizes or condenses at a fixed temperature and pressure. This calculation is fundamental in process simulation, as it models phase equilibrium and phase splits for complex mixtures.

📚 Thermodynamic Models Supported

PyThermoFlash supports a variety of thermodynamic models to calculate phase equilibria, ranging from ideal to non-ideal mixtures.

Supported Models:

  • 📏 Raoult’s Law: For ideal mixtures, Raoult’s law is used to calculate the vapor pressure of each component.

  • 🔗 NRTL (Non-Random Two-Liquid Model): Suitable for non-ideal mixtures, especially those with strong intermolecular interactions.

  • 🧪 UNIQUAC (Universal Quasi-Chemical Model): Ideal for systems with significant differences in molecular size or polarity.

📥 Installation

Install PyThermoFlash via pip:

pip install PyThermoFlash



import pyThermoFlash as ptf

🔗 Dependencies

PyThermoFlash depends on the PyThermoModels library for thermodynamic calculations. Ensure you have it installed:

Additionally, PyThermoFlash uses PyThermoDB as a reference for thermodynamic data. Make sure the required data files are available in your environment.

pip install PyThermoModels

pip install PyThermoDB

🧪 Examples

To get started with PyThermoFlash, you can explore the tests folder in the project directory. It contains various test scripts and configurations that demonstrate how to use the library for different thermodynamic calculations.

Additionally, visit the Read the Docs page to familiarize yourself with the detailed documentation and calculation methods.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request to improve the project.

📝 License

This project is licensed under the MIT License. You are free to use, modify, and distribute this software in your own applications or projects. However, if you choose to use this app in another app or software, please ensure that my name, Sina Gilassi, remains credited as the original author. This includes retaining any references to the original repository or documentation where applicable. By doing so, you help acknowledge the effort and time invested in creating this project.

❓ FAQ

For any questions, 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

pythermoflash-0.1.4.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

pythermoflash-0.1.4-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file pythermoflash-0.1.4.tar.gz.

File metadata

  • Download URL: pythermoflash-0.1.4.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for pythermoflash-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cfdeaadf375a5d36b3b316071bd71fc368e21671fa3b5981c324a5622a9f490c
MD5 7392c19a38b3c7a0746b3c1ab0183bfa
BLAKE2b-256 410f7f97d9e28b24ded667d10cf64cf27aade9b7b1585ded8c1541dbeb50f28d

See more details on using hashes here.

File details

Details for the file pythermoflash-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pythermoflash-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for pythermoflash-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 762c1cb6be47de022612b9fa35719ab3ba8ee4b77980cbaf8f1e54f1045c6436
MD5 2f3e2ca1205d11d739909048f177a42b
BLAKE2b-256 5674493dbe4cb68cf5b1b8c5a538dd6417a06e03790a79f320f6805b44fcf0cd

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