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.
📦 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) andMOCSolverMLN(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/plotlyplotting and design comparison.
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 kernelssrc/turbo_moc/api.py--design_nozzlesrc/turbo_moc/geometry-- stator blade parametrization + CAD exportsrc/turbo_moc/plotting_mpl.py,src/turbo_moc/plotting_plotly.py-- plottingsrc/turbo_moc/app.py-- Dash appexamples/-- 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)
| File | Size | Uploaded | |
|---|---|---|---|
| turbo_moc-1.0.1.tar.gz | 120.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|