Sizing and analysis tools for flashing (two-phase) nozzles and turbine expanders in partial-evaporation Rankine cycle (ORC) power systems.
The package covers the calculations needed to size a preliminary ORC system around a flashing nozzle or turbine: thermodynamic cycle evaluation, choked (sonic) flow conditions, droplet size and slip velocity estimation at the nozzle throat, and rig sizing across candidate working fluids.
flashing_nozzle_design/
├── src/
│ └── flashing_nozzle_design/ # installable package (import as `import flashing_nozzle_design`)
│ ├── __init__.py
│ ├── functions.py # cycle, choking, droplet-size and rig sizing calculations
│ └── graphics.py # matplotlib styling and plotting helpers
├── cases/ # runnable scripts + input configuration files, one folder per case
└── pyproject.toml # Poetry project and dependency configuration
This project uses Poetry for dependency management and packaging. If it is not already installed, install it with the official installer:
Linux / macOS:
curl -sSL https://install.python-poetry.org | python3 -Windows (PowerShell):
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -After installation, restart your terminal and verify it worked:
poetry --versionSee the official installation guide if you encounter problems.
git clone https://github.com/turbo-sim/flashing_nozzle_design.git
cd flashing_nozzle_designpoetry installThis creates an isolated virtual environment, installs all runtime and development dependencies declared in pyproject.toml, and installs the project itself in editable mode so that import flashing_nozzle_design works everywhere.
The quickest way to check everything is working is to run the minimal example in cases/demo. Run the case through Poetry to make sure it uses the project's virtual environment:
poetry run python cases/demo/run_flashing_nozzle_sizing.pyIf the installation succeeded, this will:
- print a report of the thermodynamic states and sizing results
- opens a plot window with the fluid's temperature-entropy (T-s) diagram