Skip to main content

Python Thermodynamic Calculation Engine powered by PyThermoDB.

Project description

PyThermoCalcDB

PyPI Downloads PyPI Python Version License

PyThermoCalcDB — Python Thermodynamic Calculation Engine powered by PyThermoDB

PyThermoCalcDB is a companion package to PyThermoDB, designed to provide a robust set of thermodynamic calculations, utilities, and workflows — using thermodynamic properties, constants, and equations built with PyThermoDB.

🚀 Why PyThermoCalcDB?

  • Seamless integration with PyThermoDB: use the database of thermodynamic data (pure component properties, correlations, etc.) as the foundation.
  • Reusable calculation tools: functions for various calculations.
  • Consistent with your thermodynamic ecosystem: fits with existing packages like PyThermoModels, PyPhaseEQ, PyThermoFlash — offering a central “calculation engine” layer.
  • Minimal dependencies: lean design, using PyThermoDB as core data source; optionally depend on well-known numerical libraries (e.g. NumPy, SciPy) if needed for complex calculations.
  • Flexible use-cases: from quick property lookups to advanced process calculations, or integration in larger workflows or multi-agent systems.

📦 Installation

pip install pyThermoCalcDB

🚀 Usage

PyThermoCalcDB provides high-level thermodynamic calculation routines built on top of PyThermoDB. It is optimized for scripts, notebooks, and pipeline integration — the examples in examples/ show complete, runnable workflows.

  • 🔧 What it does

    • 🧩 Build a ModelSource from ThermoDB files (via pyThermoLinkDB) and access data/equation sources.
    • ♨️ Formation properties
      • 🔥 Enthalpy of formation — calc_enthalpy_of_formation_at_temperature, calc_enthalpy_of_formation_range
      • ⚖️ Gibbs energy of formation — calc_gibbs_energy_of_formation_at_temperature, calc_gibbs_energy_of_formation_range
    • 🌡️ Vapor / phase properties
      • 💧 Vapor pressure at T — calc_vapor_pressure_at_temperature
      • 🔁 Enthalpy of vaporization — calc_enthalpy_of_vaporization_at_temperature
      • 🌡️↔️ Pressure → Saturation T — calc_saturated_temperature_at_pressure
      • 📈 Vapor pressure sensitivity dPvap/dT — calc_vapor_pressure_sensitivity_at_temperature
    • 🧮 Evaluate equation models (e.g., VaPr, Cp_IG) from the equation source (these may be TableEquation or other equation types).
  • ⚙️ Quick notes

    • 📦 Most helper functions accept a Component object, a model_source (from pyThermoLinkDB.load_and_build_model_source), and typed Temperature/Pressure values.
    • 🔁 Modes like 'attach', 'log', and 'silent' control return/log behavior — check the examples for usage patterns.
  • 📘 Examples (runnable)

    • examples/exp-2.py — shows building a ModelSource and computing enthalpy and Gibbs formation properties (single temperature and ranges).
    • examples/exp-3.py — shows vapor/phase calculations: vapor pressure, enthalpy of vaporization, saturated temperature at pressure, sensitivity, and evaluating equation objects such as VaPr and Cp_IG.

Open the example files for complete, runnable workflows that demonstrate loading ThermoDB files, building the model source, and invoking the high-level calculation functions.

🤝 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

pythermocalcdb-0.2.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

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

pythermocalcdb-0.2.0-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file pythermocalcdb-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for pythermocalcdb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4b83a2411c5b0d4c047838ab4d24ae2e623da467a5b5e3b81c75a65e7348e5b0
MD5 3c3236b6d503485800f52852f46dd2c8
BLAKE2b-256 114b3d9917fa84f7944b055045a1fd3a8d195d50438e8b26326923603d8b1e3c

See more details on using hashes here.

File details

Details for the file pythermocalcdb-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pythermocalcdb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4731ee070d04b0d52c1339c6ce9b3e742e5bd4de0b2937851304b402281fee14
MD5 0b4d060b4ce77fdb94970bc88d0029d4
BLAKE2b-256 6d27e32171a48a0688f2c129dd1153d8da9755ced1352fa3d5a1862b87d40bf3

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