Skip to main content

A Python tool for barotropic fluid property modeling.

Project description

Barotropy

Enhance your two-phase turbomachinery CFD simulations with barotropy, a Python package designed to create barotropic fluid property models. The barotropic approximation assumes that fluid properties (e.g., density, viscosity, speed of sound) depend solely on pressure, which is a very accurate assumption for most turbomachinery flows. This simplification reduces computational costs while improving convergence reliability in simulations involving complex fluid property variations, such as supercritical CO₂ compressors or two-phase flows in nozzles and turbines.

Key Features

  • Simplified Fluid Modeling: Generate barotropic models to lower computational cost and enhance solver robustness compared to real-gas fluid property tables.
  • Optimized for Two-Phase Flows: Simulate two-phase flows with one or two-components using the Homogeneous Equilibrium Model (HEM) or the Delayed Equilibrium Model (DEM) assumptions..
  • Seamless Integration with Commercial CFD Solvers: Easily export barotropic models as simple expressions ready to be copy-pasted into ANSYS Fluent or ANSYS CFX.

🚀 User installation (via PyPI)

To begin using barotropy, install it via pip:

pip install barotropy

After installation, verify that everything is set up correctly by running the following command in your terminal:

python -c "import barotropy; barotropy.print_package_info()"

For detailed information and examples, visit the documentation page.

🛠️ Developer installation (from source with Poetry)

This guide walks you through installation for development using Poetry, which manages both dependencies and virtual environments automatically.

  1. Install Poetry
    Follow the official guide: Poetry Installation
    Then verify the installation:

    poetry --version
    
  2. Clone the repository

    git clone https://github.com/turbo-sim/barotropy
    cd barotropy
    
  3. Install dependencies and create a virtual environment
    This installs all required packages listed in pyproject.toml:

    poetry install
    
  4. Activate the virtual environment

    poetry shell
    

    To deactivate:

    exit
    
  5. Verify the installation
    Run the following inside the Poetry shell or with poetry run:

    poetry run python -c "import barotropy; barotropy.print_package_info()"
    
  6. Install additional packages
    To add a runtime dependency:

    poetry add <package-name>
    

    To add a development-only dependency:

    poetry add --dev <package-name>
    

License

The code in this repository is licensed under the terms of the MIT license. See the license file for more information.

Contact Information

The code in this repository was developed by the Sustainable Thermal Power group at DTU Construct. Drop us an email at roagr@dtu.dk if you have questions about the code or have a bug to report!

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

barotropy-0.2.2.tar.gz (120.1 kB view details)

Uploaded Source

Built Distribution

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

barotropy-0.2.2-py3-none-any.whl (137.1 kB view details)

Uploaded Python 3

File details

Details for the file barotropy-0.2.2.tar.gz.

File metadata

  • Download URL: barotropy-0.2.2.tar.gz
  • Upload date:
  • Size: 120.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for barotropy-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3c77b45442f0a663ef4f96155071a772468cc976fb75ef12da896f038c3b15e4
MD5 1c0adf9897dee12d4361540a0d22e7b2
BLAKE2b-256 2d59f07c8eed6aa07063a4535cb1bec90caebf9bd721bef2008ca33690f7db7b

See more details on using hashes here.

File details

Details for the file barotropy-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: barotropy-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 137.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for barotropy-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dea914c400655c6a4705d50173898d0371a93306fc735f2e4cff6221e7a4e4c9
MD5 84a603378266cd83a8b1cd5b89e6c81c
BLAKE2b-256 84f463890388eabe29ff5e839ca273cadf05560c226bfa1242290c8a6e8a9667

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