Skip to main content

TurboMoC

Method of Characteristics solver for supersonic nozzle and stator blade design, built on a real-gas (CoolProp, via jaxprop) thermodynamic core. Handles single-phase, saturated two-phase, and subcooled-liquid flashing / wet-to-dry inlets under the Homogeneous Equilibrium Model (HEM) assumption, on the same solver.

MOC characteristics mesh

📦 PyPI package: https://pypi.org/project/barotropy/

📚 Documentation: https://turbo-sim.github.io/TurboMoC/

Features

  • Two solver kernels: ConventionalSolver (rounded-arc, supports the flashing flat post-jump throat front) and MOCSolverMLN (minimum-length, sharp-corner) nozzles.
  • design_nozzle(...): one function, plain arguments in, flat JSON-safe dict out.
  • Stator blade parametrization: fit a closed B-spline blade profile from the nozzle wall and export to STEP (turbo_moc.geometry) -- two variants, full (pressure side mirrors the wall) and semi (pressure side is a single arc).
  • Interactive Dash app for nozzle design and blade parametrization, with matplotlib/plotly plotting and design comparison.

Stator blade parametrization

Install

With Poetry, install the package and optional CadQuery support using:

poetry install --extras cad

Alternatively, install CadQuery through Conda Forge and let Poetry install the package and its other runtime dependencies:

conda env create -f environment.yaml
conda activate turbo_moc_env
poetry install

Quick start

from turbo_moc import design_nozzle

data = design_nozzle(
    fluid_name="nitrogen",
    P0=20e5, T0=113.0,      # subcooled-liquid (flashing) inlet
    p_back=2e5,
    solver="conventional",   # or "mln"
    y_t=0.01, rho_t=0.2, rho_d=0.1,
)

wall = data["wall_final"]    # {"x": [...], "y": [...], "p": [...], "M": [...], ...}
import turbo_moc

fig, ax = turbo_moc.mpl.plot_characteristics_mesh(data, mirror=True)
fig = turbo_moc.plotly.plot_nozzle_contour(data)

Interactive app

python examples/run_app_local.py

Two tabs: nozzle design (Phase 1) and stator blade parametrization (Phase 2, consuming Phase 1's result), each with interactive plots, design comparison ("pin as reference"), and plot/STEP export.

Repo layout

  • src/turbo_moc/core, src/turbo_moc/solvers -- solver kernels
  • src/turbo_moc/api.py -- design_nozzle
  • src/turbo_moc/geometry -- stator blade parametrization + CAD export
  • src/turbo_moc/plotting_mpl.py, src/turbo_moc/plotting_plotly.py -- plotting
  • src/turbo_moc/app.py -- Dash app
  • examples/ -- runnable scripts

Metadata

Release files for turbo_moc 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for turbo_moc 1.0.1
File Size Uploaded
turbo_moc-1.0.1.tar.gz 120.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for turbo_moc 1.0.1
File Interpreter ABI Platform
turbo_moc-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 249.6 kB

Release files / turbo_moc-1.0.1.tar.gz

Download URL turbo_moc-1.0.1.tar.gz
Size 120.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4a39b007896e7ed81adb709bc20588b376d3ca7e428907f6d5f3a8cf56329307
BLAKE2b-256 checksum
How to use checksums
a978ba89172bdb00810c4bf99d49873ff4196acd68170d4f28be77d627ee21a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.14 Linux/6.17.0-1022-azure

Release files / turbo_moc-1.0.1-py3-none-any.whl

Download URL turbo_moc-1.0.1-py3-none-any.whl
Size 128.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce94c5a9a3321558a1130e3784ceef75a2d45f2a0b806d3de750cd180baba066
BLAKE2b-256 checksum
How to use checksums
668566d7dbf7b7fd4a11d9511e74eb62292804c1ab45cf2d7e1a2fe677b91c51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.14 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

1.1.1

2 release files

This release

1.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page