Skip to content

Commit 5e367b8

Browse files
Document config-driven pipeline with customisable parameters in README
Replace the old pipeline section with comprehensive documentation of the YAML config system, parameter tables, Docker-based SU2 execution, and system-level dependency notes. Add .gitignore. Made-with: Cursor
1 parent 792ac50 commit 5e367b8

2 files changed

Lines changed: 57 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,4 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
.DS_Store

README.md

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,68 @@ To install SU2 alongside the MCP server, opt in to the extra dependency group wh
9090
pip install su2-mcp-server[su2]
9191
```
9292

93-
### TiGL → SU2 pipeline (external agent)
93+
### TiGL → SU2 → pyCycle pipeline
9494

95-
An external agent can chain TiGL MCP, SU2 MCP, and (optionally) Pycycle MCP to design and analyze an aircraft:
95+
An orchestration script (`pipeline/tigl_to_su2.py`) chains all three MCP servers into a single automated run:
9696

97-
1. **TiGL MCP**: Open CPACS, export configuration as STEP (base64).
98-
2. **SU2 MCP**: `create_su2_session``generate_mesh_from_step(session_id, step_base64)` (requires `gmsh` on PATH)`update_config_entries` to set Euler/freestream and `MARKER_FAR`/`MARKER_EULER` to match the mesh markers (FARFIELD, WALL) → `run_su2_solver``list_result_files` / `read_history_csv` / `get_result_file_base64` for results.
99-
3. **Pycycle MCP**: Use for propulsion/cycle analysis as needed.
97+
```
98+
CPACS XML → [TiGL MCP] → STEP → [Gmsh]SU2 mesh → [SU2] → CL/CD[pyCycle MCP] → TSFC, fuel flow
99+
```
100100

101-
For a single Docker environment that has TiGL, Gmsh, and SU2, use the `tigl-mcp` image (which includes SU2 and Gmsh) and run the SU2 MCP server in that same environment so `generate_mesh_from_step` can call `gmsh`.
101+
1. **TiGL MCP** (port 8000): Open CPACS, export configuration as watertight STEP.
102+
2. **SU2 MCP / Gmsh**: Volume mesh from STEP (BooleanFragments, FARFIELD/WALL markers), then Euler CFD to get CL/CD.
103+
3. **pyCycle MCP** (port 8001): Flight conditions + drag → engine sizing (thrust, TSFC, fuel flow).
102104

103-
### Running the server when SU2 is not installed locally
105+
#### Config-driven runs
104106

105-
The server runs `SU2_CFD` when you call `run_su2_solver`. If SU2 is not on your machine, run the SU2 MCP server inside a container that has SU2 (e.g. the [tigl-mcp](https://github.com/cmudrc/tigl-mcp) Docker image). From the host, mount this repo and start the server:
107+
The pipeline uses a YAML config file (`pipeline_config.yaml`) that controls all ~15 user-relevant parameters. CLI arguments override config values.
106108

107109
```bash
108-
docker run --rm -p 8002:8002 -v /path/to/su2-mcp:/app/su2-mcp tigl-mcp:dev \
109-
bash -lc "pip install -e /app/su2-mcp && su2-mcp-server --transport http --host 0.0.0.0 --port 8002 --path /mcp"
110+
# Run with config file
111+
python pipeline/tigl_to_su2.py D150.xml --config pipeline/pipeline_config.yaml -o output/
112+
113+
# Override specific values via CLI
114+
python pipeline/tigl_to_su2.py D150.xml -c pipeline/pipeline_config.yaml --mach 0.85 --density 80
115+
116+
# Defaults only (no config file needed)
117+
python pipeline/tigl_to_su2.py D150.xml -o output/
110118
```
111119

112-
Then clients can connect to `http://localhost:8002/mcp`. For a pre-built script that does this, see the parent repo that contains both tigl-mcp and su2-mcp.
120+
Config file sections: `flight` (mach, aoa, altitude), `aircraft` (ref_area, ref_length), `meshing` (surface_density, farfield_factor, algorithm), `cfd` (iterations, CFL, limiter), `engine` (type, default thrust). A `resolved_config.yaml` is saved alongside outputs for reproducibility.
121+
122+
#### Customisable parameters
123+
124+
| Category | Key parameters | Default |
125+
|----------|---------------|---------|
126+
| Flight | mach, aoa, altitude | 0.78, 2°, 35,000 ft |
127+
| Mesh quality | `surface_density` (span/N) | 30 (coarse) — set 80-150 for smooth |
128+
| CFD | iterations, CFL, limiter_coeff | 250, 1.0, 0.1 |
129+
| Engine | type, default_thrust_lbf | turbofan, 5900 |
130+
131+
#### Hardcoded (not exposed via config)
132+
133+
- Solver: Euler (inviscid) — RANS support is a future milestone
134+
- Flux scheme: ROE with Venkatakrishnan limiter
135+
- pyCycle engine cycle internals (duct losses, bleed fractions, nozzle Cv)
136+
- TiGL STEP deflection tolerance (0.001)
137+
138+
### Running SU2 when not installed locally
139+
140+
SU2 is available inside the [tigl-mcp](https://github.com/cmudrc/tigl-mcp) Docker image. Copy your mesh and config into the running container:
141+
142+
```bash
143+
docker cp output/aircraft_volume.su2 <container>:/tmp/aircraft_volume.su2
144+
docker cp output/euler.cfg <container>:/tmp/euler.cfg
145+
docker exec <container> bash -c "cd /tmp && conda run -n tigl SU2_CFD euler.cfg"
146+
docker cp <container>:/tmp/history.csv output/
147+
docker cp <container>:/tmp/vol_solution.vtu output/
148+
```
149+
150+
### System-level dependencies
151+
152+
These cannot be pip-installed and require conda or system packages:
153+
154+
- **SU2** (`SU2_CFD`): `conda install -c conda-forge su2` or use the Docker image
155+
- **Gmsh** (Python API): `pip install gmsh` (or `conda install -c conda-forge gmsh`)
156+
157+
The MCP server itself (`pip install .`) is pure Python and installs cleanly.

0 commit comments

Comments
 (0)