aeroprop-x 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AeroProp-X contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,211 @@
1
+ Metadata-Version: 2.4
2
+ Name: aeroprop-x
3
+ Version: 0.1.0
4
+ Summary: Open-source rocket nozzle design, Method-of-Characteristics solver, and aerothermodynamic performance analysis.
5
+ Author: Aryuemaan Chowdhury
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/aryuemaan/aeroprop_X
8
+ Project-URL: Documentation, https://github.com/aryuemaan/aeroprop_X
9
+ Project-URL: Issues, https://github.com/aryuemaan/aeroprop_X/issues
10
+ Keywords: rocket,nozzle,method-of-characteristics,aerospace,gas-dynamics,propulsion,cfd
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Intended Audience :: Education
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering :: Physics
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: numpy>=1.22
25
+ Requires-Dist: scipy>=1.8
26
+ Provides-Extra: plot
27
+ Requires-Dist: matplotlib>=3.5; extra == "plot"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0; extra == "dev"
30
+ Requires-Dist: matplotlib>=3.5; extra == "dev"
31
+ Provides-Extra: all
32
+ Requires-Dist: matplotlib>=3.5; extra == "all"
33
+ Dynamic: license-file
34
+
35
+ # AeroProp-X
36
+
37
+ **Open-source rocket nozzle design, Method-of-Characteristics (MOC) solver, and
38
+ aerothermodynamic performance analysis — in pure Python.**
39
+
40
+ AeroProp-X turns chamber conditions and a target expansion into a
41
+ mathematically-grounded converging–diverging (de Laval) nozzle contour. It
42
+ generates minimum-length MOC bells, Rao thrust-optimised bells, and conical
43
+ baselines; maps the supersonic flow field; analyses over/under-expansion and
44
+ flow separation; and exports CAD (CSV / DXF / FreeCAD-STEP) you can open in
45
+ Fusion 360, SolidWorks, or FreeCAD. No paywalled toolbox required.
46
+
47
+ > **Scope and honesty.** AeroProp-X models steady, inviscid, adiabatic,
48
+ > shock-free flow of a calorically-perfect gas. Results are **ideal
49
+ > preliminary-design estimates** — excellent for learning, sizing, and early
50
+ > trade studies, but not a replacement for CFD or hot-fire testing. Every
51
+ > approximation is documented in [`docs/theory.md`](docs/theory.md).
52
+
53
+ ---
54
+
55
+ ## Architecture
56
+
57
+ ```
58
+ ┌─────────────────────────────────────────────┐
59
+ │ High-pressure combustion chamber (p0,T0) │
60
+ └───────────────────────┬─────────────────────┘
61
+
62
+ Converging section
63
+ (subsonic acceleration)
64
+
65
+
66
+ Throat (M = 1, sonic)
67
+
68
+
69
+ ┌──────────────── Diverging section ───────────────┐
70
+ │ supersonic expansion, M > 1 │
71
+ │ │
72
+ │ gasdynamics ──► moc ──► nozzle ──► flowfield │
73
+ │ (isentropic + (char. (MOC/Rao/ (Mach/p/T │
74
+ │ Prandtl-Meyer) mesh) conical) field) │
75
+ └──────────────────────┬───────────────────────────┘
76
+
77
+ performance ──► cad_export / plotting
78
+ (C_F, c*, Isp, thrust, (CSV / DXF / FreeCAD-STEP,
79
+ expansion regime) contour & flow-field figures)
80
+
81
+
82
+ Optimal contour: max thrust, shock-free,
83
+ uniform axial exit
84
+ ```
85
+
86
+ > **Note on the original project brief.** The brief that seeded this repo
87
+ > contained pipeline labels copied from an unrelated speech/NLP template —
88
+ > "Linguistic & Acoustic Decomposition", "Neural Synthesis Module",
89
+ > "Linguistic/Acoustic Expansion Lane". Those concepts have no meaning in
90
+ > nozzle aerodynamics and are **not** implemented. The architecture above
91
+ > reflects the actual gas-dynamics pipeline.
92
+
93
+ ---
94
+
95
+ ## Installation
96
+
97
+ ```bash
98
+ git clone https://github.com/your-org/aeroprop-x
99
+ cd aeroprop-x
100
+ pip install . # core (numpy, scipy)
101
+ pip install .[plot] # add matplotlib for figures
102
+ pip install .[dev] # add pytest for the test-suite
103
+ ```
104
+
105
+ Requires Python ≥ 3.9.
106
+
107
+ ## Quick start (Python)
108
+
109
+ ```python
110
+ from aeroprop_x import moc_nozzle, evaluate, to_freecad_macro
111
+
112
+ # 1. Minimum-length MOC contour for exit Mach 2.6, 40 mm throat radius.
113
+ contour = moc_nozzle(exit_mach=2.6, n_characteristics=80, throat_radius=0.04)
114
+ print(contour.area_ratio, contour.length, contour.meta["area_ratio_error"])
115
+
116
+ # 2. Ideal performance at 10 km (pa ~ 26.5 kPa).
117
+ perf = evaluate(exit_mach=2.6, p0=5e6, pa=26_500, gamma=1.4,
118
+ R=287, T0=3000, throat_area=3.14159 * 0.04**2)
119
+ print(perf.report()) # C_F, c*, Isp, thrust, expansion regime
120
+
121
+ # 3. Export a FreeCAD macro that revolves the contour and writes STEP.
122
+ to_freecad_macro(contour, "nozzle.FCMacro")
123
+ ```
124
+
125
+ ## Quick start (CLI)
126
+
127
+ ```bash
128
+ # Design a minimum-length MOC contour and save CSV + DXF + a PNG.
129
+ aeroprop-x design moc --exit-mach 2.4 --throat-radius 0.05 \
130
+ --csv nozzle.csv --dxf nozzle.dxf --plot contour.png
131
+
132
+ # Design an 80% Rao bell from an area ratio.
133
+ aeroprop-x design bell --area-ratio 25 --throat-radius 0.05 --csv bell.csv
134
+
135
+ # Evaluate performance at altitude.
136
+ aeroprop-x analyze --area-ratio 25 --p0 7e6 --pa 26500 \
137
+ --gamma 1.22 --R 320 --T0 3500 --throat-area 0.01
138
+
139
+ # Export an MOC design straight to a FreeCAD STEP macro.
140
+ aeroprop-x export moc --exit-mach 3.0 --throat-radius 0.04 --freecad nozzle.FCMacro
141
+ ```
142
+
143
+ ## What it does
144
+
145
+ 1. **Nozzle contour generation.** A rigorous **planar minimum-length MOC**
146
+ solver (sharp-corner centred expansion, shock-free wall cancellation),
147
+ plus a **Rao thrust-optimised parabolic bell** and a **conical** baseline.
148
+ Enter exit Mach *or* area ratio.
149
+ 2. **Supersonic flow-field plotting.** Extract Mach, pressure, and temperature
150
+ over the characteristic mesh and interpolate onto a regular grid for
151
+ colour-mapped field plots.
152
+ 3. **Expansion & separation analysis.** Classify perfectly / under / over-
153
+ expanded operation against ambient pressure and flag likely flow separation
154
+ (Summerfield criterion).
155
+ 4. **CAD export.** Write CSV, ASCII DXF polylines, or a FreeCAD `.FCMacro`
156
+ that revolves the contour to a solid and exports STEP for SolidWorks /
157
+ Fusion 360 / FreeCAD.
158
+
159
+ ## Repository layout
160
+
161
+ ```
162
+ aeroprop-x/
163
+ ├── src/aeroprop_x/
164
+ │ ├── gasdynamics.py isentropic + Prandtl-Meyer relations
165
+ │ ├── moc.py Method-of-Characteristics min-length solver
166
+ │ ├── nozzle.py MOC / Rao bell / conical contour generators
167
+ │ ├── flowfield.py mesh -> Mach/p/T field extraction & gridding
168
+ │ ├── performance.py C_F, c*, Isp, thrust, expansion analysis
169
+ │ ├── cad_export.py CSV / DXF / FreeCAD-STEP export
170
+ │ ├── plotting.py contour, mesh, and field figures (matplotlib)
171
+ │ └── cli.py `aeroprop-x` command-line interface
172
+ ├── tests/ pytest suite (gas dynamics, MOC, nozzle, perf)
173
+ ├── examples/ quickstart.py, design_ssme_like.py
174
+ ├── docs/theory.md equations, derivations, assumptions
175
+ ├── validation_cases/ comparison vs tables & historical engines
176
+ ├── pyproject.toml packaging + console-script entry point
177
+ ├── CHANGELOG.md CONTRIBUTING.md LICENSE (MIT)
178
+ ```
179
+
180
+ ## Validation
181
+
182
+ - Isentropic and Prandtl–Meyer outputs match standard compressible-flow tables
183
+ to table precision.
184
+ - The MOC solver self-tests: for planar flow the exit height ratio converges to
185
+ the exact isentropic `A/A*` (relative error ≈ 3×10⁻⁴ at n = 160 for M = 2.4),
186
+ the peak centreline Mach equals the design Mach, and the exit flow leaves
187
+ parallel to the axis.
188
+
189
+ See [`validation_cases/README.md`](validation_cases/README.md) for the full
190
+ tables and reproduction commands.
191
+
192
+ ## Key limitations (read before trusting a number)
193
+
194
+ - **Planar MOC.** The MOC solver is 2-D. Revolving its contour as axisymmetric
195
+ overshoots the design area ratio by `√(A/A*)`; for accurate axisymmetric area
196
+ ratios use `rao_bell`. A true axisymmetric MOC is on the roadmap.
197
+ - **Ideal gas, inviscid.** No boundary layers, finite-rate chemistry, heat
198
+ transfer, or real-gas effects; Isp and thrust are ideal upper estimates.
199
+ - **Approximate defaults.** Rao wall angles are coarse chart interpolations;
200
+ the Summerfield separation threshold is an engineering estimate.
201
+
202
+ ## License
203
+
204
+ MIT — see [`LICENSE`](LICENSE). Contributions welcome; see
205
+ [`CONTRIBUTING.md`](CONTRIBUTING.md).
206
+
207
+ ## References
208
+
209
+ Anderson, *Modern Compressible Flow* (MOC, minimum-length nozzle) · Sutton &
210
+ Biblarz, *Rocket Propulsion Elements* · Rao, "Exhaust Nozzle Contour for
211
+ Optimum Thrust" (1958).
@@ -0,0 +1,177 @@
1
+ # AeroProp-X
2
+
3
+ **Open-source rocket nozzle design, Method-of-Characteristics (MOC) solver, and
4
+ aerothermodynamic performance analysis — in pure Python.**
5
+
6
+ AeroProp-X turns chamber conditions and a target expansion into a
7
+ mathematically-grounded converging–diverging (de Laval) nozzle contour. It
8
+ generates minimum-length MOC bells, Rao thrust-optimised bells, and conical
9
+ baselines; maps the supersonic flow field; analyses over/under-expansion and
10
+ flow separation; and exports CAD (CSV / DXF / FreeCAD-STEP) you can open in
11
+ Fusion 360, SolidWorks, or FreeCAD. No paywalled toolbox required.
12
+
13
+ > **Scope and honesty.** AeroProp-X models steady, inviscid, adiabatic,
14
+ > shock-free flow of a calorically-perfect gas. Results are **ideal
15
+ > preliminary-design estimates** — excellent for learning, sizing, and early
16
+ > trade studies, but not a replacement for CFD or hot-fire testing. Every
17
+ > approximation is documented in [`docs/theory.md`](docs/theory.md).
18
+
19
+ ---
20
+
21
+ ## Architecture
22
+
23
+ ```
24
+ ┌─────────────────────────────────────────────┐
25
+ │ High-pressure combustion chamber (p0,T0) │
26
+ └───────────────────────┬─────────────────────┘
27
+
28
+ Converging section
29
+ (subsonic acceleration)
30
+
31
+
32
+ Throat (M = 1, sonic)
33
+
34
+
35
+ ┌──────────────── Diverging section ───────────────┐
36
+ │ supersonic expansion, M > 1 │
37
+ │ │
38
+ │ gasdynamics ──► moc ──► nozzle ──► flowfield │
39
+ │ (isentropic + (char. (MOC/Rao/ (Mach/p/T │
40
+ │ Prandtl-Meyer) mesh) conical) field) │
41
+ └──────────────────────┬───────────────────────────┘
42
+
43
+ performance ──► cad_export / plotting
44
+ (C_F, c*, Isp, thrust, (CSV / DXF / FreeCAD-STEP,
45
+ expansion regime) contour & flow-field figures)
46
+
47
+
48
+ Optimal contour: max thrust, shock-free,
49
+ uniform axial exit
50
+ ```
51
+
52
+ > **Note on the original project brief.** The brief that seeded this repo
53
+ > contained pipeline labels copied from an unrelated speech/NLP template —
54
+ > "Linguistic & Acoustic Decomposition", "Neural Synthesis Module",
55
+ > "Linguistic/Acoustic Expansion Lane". Those concepts have no meaning in
56
+ > nozzle aerodynamics and are **not** implemented. The architecture above
57
+ > reflects the actual gas-dynamics pipeline.
58
+
59
+ ---
60
+
61
+ ## Installation
62
+
63
+ ```bash
64
+ git clone https://github.com/your-org/aeroprop-x
65
+ cd aeroprop-x
66
+ pip install . # core (numpy, scipy)
67
+ pip install .[plot] # add matplotlib for figures
68
+ pip install .[dev] # add pytest for the test-suite
69
+ ```
70
+
71
+ Requires Python ≥ 3.9.
72
+
73
+ ## Quick start (Python)
74
+
75
+ ```python
76
+ from aeroprop_x import moc_nozzle, evaluate, to_freecad_macro
77
+
78
+ # 1. Minimum-length MOC contour for exit Mach 2.6, 40 mm throat radius.
79
+ contour = moc_nozzle(exit_mach=2.6, n_characteristics=80, throat_radius=0.04)
80
+ print(contour.area_ratio, contour.length, contour.meta["area_ratio_error"])
81
+
82
+ # 2. Ideal performance at 10 km (pa ~ 26.5 kPa).
83
+ perf = evaluate(exit_mach=2.6, p0=5e6, pa=26_500, gamma=1.4,
84
+ R=287, T0=3000, throat_area=3.14159 * 0.04**2)
85
+ print(perf.report()) # C_F, c*, Isp, thrust, expansion regime
86
+
87
+ # 3. Export a FreeCAD macro that revolves the contour and writes STEP.
88
+ to_freecad_macro(contour, "nozzle.FCMacro")
89
+ ```
90
+
91
+ ## Quick start (CLI)
92
+
93
+ ```bash
94
+ # Design a minimum-length MOC contour and save CSV + DXF + a PNG.
95
+ aeroprop-x design moc --exit-mach 2.4 --throat-radius 0.05 \
96
+ --csv nozzle.csv --dxf nozzle.dxf --plot contour.png
97
+
98
+ # Design an 80% Rao bell from an area ratio.
99
+ aeroprop-x design bell --area-ratio 25 --throat-radius 0.05 --csv bell.csv
100
+
101
+ # Evaluate performance at altitude.
102
+ aeroprop-x analyze --area-ratio 25 --p0 7e6 --pa 26500 \
103
+ --gamma 1.22 --R 320 --T0 3500 --throat-area 0.01
104
+
105
+ # Export an MOC design straight to a FreeCAD STEP macro.
106
+ aeroprop-x export moc --exit-mach 3.0 --throat-radius 0.04 --freecad nozzle.FCMacro
107
+ ```
108
+
109
+ ## What it does
110
+
111
+ 1. **Nozzle contour generation.** A rigorous **planar minimum-length MOC**
112
+ solver (sharp-corner centred expansion, shock-free wall cancellation),
113
+ plus a **Rao thrust-optimised parabolic bell** and a **conical** baseline.
114
+ Enter exit Mach *or* area ratio.
115
+ 2. **Supersonic flow-field plotting.** Extract Mach, pressure, and temperature
116
+ over the characteristic mesh and interpolate onto a regular grid for
117
+ colour-mapped field plots.
118
+ 3. **Expansion & separation analysis.** Classify perfectly / under / over-
119
+ expanded operation against ambient pressure and flag likely flow separation
120
+ (Summerfield criterion).
121
+ 4. **CAD export.** Write CSV, ASCII DXF polylines, or a FreeCAD `.FCMacro`
122
+ that revolves the contour to a solid and exports STEP for SolidWorks /
123
+ Fusion 360 / FreeCAD.
124
+
125
+ ## Repository layout
126
+
127
+ ```
128
+ aeroprop-x/
129
+ ├── src/aeroprop_x/
130
+ │ ├── gasdynamics.py isentropic + Prandtl-Meyer relations
131
+ │ ├── moc.py Method-of-Characteristics min-length solver
132
+ │ ├── nozzle.py MOC / Rao bell / conical contour generators
133
+ │ ├── flowfield.py mesh -> Mach/p/T field extraction & gridding
134
+ │ ├── performance.py C_F, c*, Isp, thrust, expansion analysis
135
+ │ ├── cad_export.py CSV / DXF / FreeCAD-STEP export
136
+ │ ├── plotting.py contour, mesh, and field figures (matplotlib)
137
+ │ └── cli.py `aeroprop-x` command-line interface
138
+ ├── tests/ pytest suite (gas dynamics, MOC, nozzle, perf)
139
+ ├── examples/ quickstart.py, design_ssme_like.py
140
+ ├── docs/theory.md equations, derivations, assumptions
141
+ ├── validation_cases/ comparison vs tables & historical engines
142
+ ├── pyproject.toml packaging + console-script entry point
143
+ ├── CHANGELOG.md CONTRIBUTING.md LICENSE (MIT)
144
+ ```
145
+
146
+ ## Validation
147
+
148
+ - Isentropic and Prandtl–Meyer outputs match standard compressible-flow tables
149
+ to table precision.
150
+ - The MOC solver self-tests: for planar flow the exit height ratio converges to
151
+ the exact isentropic `A/A*` (relative error ≈ 3×10⁻⁴ at n = 160 for M = 2.4),
152
+ the peak centreline Mach equals the design Mach, and the exit flow leaves
153
+ parallel to the axis.
154
+
155
+ See [`validation_cases/README.md`](validation_cases/README.md) for the full
156
+ tables and reproduction commands.
157
+
158
+ ## Key limitations (read before trusting a number)
159
+
160
+ - **Planar MOC.** The MOC solver is 2-D. Revolving its contour as axisymmetric
161
+ overshoots the design area ratio by `√(A/A*)`; for accurate axisymmetric area
162
+ ratios use `rao_bell`. A true axisymmetric MOC is on the roadmap.
163
+ - **Ideal gas, inviscid.** No boundary layers, finite-rate chemistry, heat
164
+ transfer, or real-gas effects; Isp and thrust are ideal upper estimates.
165
+ - **Approximate defaults.** Rao wall angles are coarse chart interpolations;
166
+ the Summerfield separation threshold is an engineering estimate.
167
+
168
+ ## License
169
+
170
+ MIT — see [`LICENSE`](LICENSE). Contributions welcome; see
171
+ [`CONTRIBUTING.md`](CONTRIBUTING.md).
172
+
173
+ ## References
174
+
175
+ Anderson, *Modern Compressible Flow* (MOC, minimum-length nozzle) · Sutton &
176
+ Biblarz, *Rocket Propulsion Elements* · Rao, "Exhaust Nozzle Contour for
177
+ Optimum Thrust" (1958).
@@ -0,0 +1,61 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "aeroprop-x"
7
+ version = "0.1.0"
8
+ description = "Open-source rocket nozzle design, Method-of-Characteristics solver, and aerothermodynamic performance analysis."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Aryuemaan Chowdhury" }]
13
+ keywords = [
14
+ "rocket",
15
+ "nozzle",
16
+ "method-of-characteristics",
17
+ "aerospace",
18
+ "gas-dynamics",
19
+ "propulsion",
20
+ "cfd",
21
+ ]
22
+ classifiers = [
23
+ "Development Status :: 4 - Beta",
24
+ "Intended Audience :: Science/Research",
25
+ "Intended Audience :: Education",
26
+ "License :: OSI Approved :: MIT License",
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3.9",
29
+ "Programming Language :: Python :: 3.10",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
32
+ "Topic :: Scientific/Engineering :: Physics",
33
+ ]
34
+ dependencies = [
35
+ "numpy>=1.22",
36
+ "scipy>=1.8",
37
+ ]
38
+
39
+ [project.optional-dependencies]
40
+ plot = ["matplotlib>=3.5"]
41
+ dev = ["pytest>=7.0", "matplotlib>=3.5"]
42
+ all = ["matplotlib>=3.5"]
43
+
44
+ [project.urls]
45
+ Homepage = "https://github.com/aryuemaan/aeroprop_X"
46
+ Documentation = "https://github.com/aryuemaan/aeroprop_X"
47
+ Issues = "https://github.com/aryuemaan/aeroprop_X/issues"
48
+
49
+ [project.scripts]
50
+ aeroprop-x = "aeroprop_x.cli:main"
51
+
52
+ [tool.setuptools.packages.find]
53
+ where = ["src"]
54
+
55
+ [tool.pytest.ini_options]
56
+ testpaths = ["tests"]
57
+ addopts = "-q"
58
+
59
+ [tool.ruff]
60
+ line-length = 88
61
+ target-version = "py39"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,126 @@
1
+ """
2
+ AeroProp-X
3
+ ==========
4
+
5
+ An open-source, edge-capable toolkit for converging-diverging (de Laval)
6
+ rocket nozzle design, Method-of-Characteristics (MOC) flow solving, and
7
+ aerothermodynamic performance analysis.
8
+
9
+ Public API
10
+ ----------
11
+ Gas dynamics:
12
+ ``temperature_ratio``, ``pressure_ratio``, ``density_ratio``,
13
+ ``area_ratio``, ``mach_from_area_ratio``, ``prandtl_meyer``,
14
+ ``inverse_prandtl_meyer``, ``mach_angle``, ``max_prandtl_meyer``,
15
+ ``GasState``.
16
+
17
+ Method of Characteristics:
18
+ ``design_min_length_nozzle``, ``MOCPoint``, ``MOCResult``.
19
+
20
+ Nozzle contours:
21
+ ``moc_nozzle``, ``rao_bell``, ``conical_nozzle``, ``NozzleContour``.
22
+
23
+ Performance & expansion:
24
+ ``evaluate``, ``analyze_expansion``, ``NozzlePerformance``,
25
+ ``ExpansionState``, ``thrust_coefficient``, ``characteristic_velocity``,
26
+ ``exit_velocity``, ``divergence_efficiency``.
27
+
28
+ Flow field:
29
+ ``extract_flowfield``, ``FlowField``.
30
+
31
+ CAD / data export:
32
+ ``to_csv``, ``to_dxf``, ``to_freecad_macro``.
33
+
34
+ Plotting (requires matplotlib):
35
+ ``plot_contour``, ``plot_characteristics``, ``plot_mach_field``.
36
+ """
37
+
38
+ from __future__ import annotations
39
+
40
+ from .gasdynamics import (
41
+ GasState,
42
+ area_ratio,
43
+ density_ratio,
44
+ inverse_prandtl_meyer,
45
+ mach_angle,
46
+ mach_from_area_ratio,
47
+ max_prandtl_meyer,
48
+ prandtl_meyer,
49
+ prandtl_meyer_deg,
50
+ pressure_ratio,
51
+ temperature_ratio,
52
+ )
53
+ from .moc import MOCPoint, MOCResult, design_min_length_nozzle
54
+ from .nozzle import (
55
+ NozzleContour,
56
+ conical_nozzle,
57
+ moc_nozzle,
58
+ rao_angles_approx,
59
+ rao_bell,
60
+ )
61
+ from .performance import (
62
+ ExpansionState,
63
+ NozzlePerformance,
64
+ analyze_expansion,
65
+ characteristic_velocity,
66
+ divergence_efficiency,
67
+ evaluate,
68
+ exit_velocity,
69
+ thrust_coefficient,
70
+ )
71
+ from .flowfield import FlowField, extract_flowfield
72
+ from .cad_export import to_csv, to_dxf, to_freecad_macro
73
+
74
+ __version__ = "0.1.0"
75
+
76
+ __all__ = [
77
+ "__version__",
78
+ # gas dynamics
79
+ "GasState",
80
+ "area_ratio",
81
+ "density_ratio",
82
+ "inverse_prandtl_meyer",
83
+ "mach_angle",
84
+ "mach_from_area_ratio",
85
+ "max_prandtl_meyer",
86
+ "prandtl_meyer",
87
+ "prandtl_meyer_deg",
88
+ "pressure_ratio",
89
+ "temperature_ratio",
90
+ # MOC
91
+ "MOCPoint",
92
+ "MOCResult",
93
+ "design_min_length_nozzle",
94
+ # nozzle
95
+ "NozzleContour",
96
+ "conical_nozzle",
97
+ "moc_nozzle",
98
+ "rao_angles_approx",
99
+ "rao_bell",
100
+ # performance
101
+ "ExpansionState",
102
+ "NozzlePerformance",
103
+ "analyze_expansion",
104
+ "characteristic_velocity",
105
+ "divergence_efficiency",
106
+ "evaluate",
107
+ "exit_velocity",
108
+ "thrust_coefficient",
109
+ # flow field
110
+ "FlowField",
111
+ "extract_flowfield",
112
+ # export
113
+ "to_csv",
114
+ "to_dxf",
115
+ "to_freecad_macro",
116
+ ]
117
+
118
+
119
+ # Plotting depends on matplotlib, which is an optional extra. Import lazily so
120
+ # that the core library works in headless / minimal environments.
121
+ def __getattr__(name: str): # pragma: no cover - thin lazy importer
122
+ if name in {"plot_contour", "plot_characteristics", "plot_mach_field"}:
123
+ from . import plotting
124
+
125
+ return getattr(plotting, name)
126
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")