@casys/mcp-openfoam 0.1.2 → 0.2.0
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.
- package/README.md +28 -0
- package/THIRD_PARTY_NOTICES.txt +1096 -0
- package/mcp-openfoam.mjs +106 -7
- package/package.json +2 -2
- package/ui-dist/axial-profile/index.html +3693 -0
- package/ui-dist/cfd-metrics/index.html +3693 -0
- package/ui-dist/cfd-verdict/index.html +3693 -0
package/README.md
CHANGED
|
@@ -19,6 +19,34 @@ and `potentialFoam` simulations in isolated temporary case directories.
|
|
|
19
19
|
3. **`openfoam_run_case`** — Executes custom OpenFOAM cases (`blockMesh` + `checkMesh` +
|
|
20
20
|
`simpleFoam` or `potentialFoam`) from caller-provided dictionaries and initial fields.
|
|
21
21
|
|
|
22
|
+
## Widgets
|
|
23
|
+
|
|
24
|
+
Results are shown as small, individual MCP App widgets, one reading each, never a dashboard. Each
|
|
25
|
+
widget is its own `ui://mcp-openfoam/<widget>` resource and adapts to the width its host grants (a
|
|
26
|
+
Compose board snaps its resize handle between `supportedWidths`; a standalone host gets the widest).
|
|
27
|
+
|
|
28
|
+
| Widget (`ui://mcp-openfoam/…`) | Kind | Shows | `supportedWidths` |
|
|
29
|
+
| ------------------------------ | ----- | -------------------------------------------------------------------- | ----------------- |
|
|
30
|
+
| `cfd-verdict` | stat | Converged / not converged / mesh failed with 2 to 3 headline numbers | 280, 380, 520 |
|
|
31
|
+
| `cfd-metrics` | table | Results, mesh quality and final residuals, quantities down | 340, 480, 680 |
|
|
32
|
+
| `axial-profile` | chart | Velocity (and pressure) along the nozzle axis; nozzle runs only | 320, 440, 640 |
|
|
33
|
+
|
|
34
|
+
Smallest width: the essential. Middle: the usual reading. Largest: the full detail of that one
|
|
35
|
+
thing, with a provenance footer (provenance, engine, case SHA-256). The three tools and
|
|
36
|
+
`run_snippet` advertise `cfd-verdict` by default; a board selects another widget for the same result
|
|
37
|
+
by resource URI. Only a nozzle result has an axial profile: for an airfoil or custom-case result
|
|
38
|
+
`axial-profile` shows an explicit empty state, so a board should only offer it for nozzle runs
|
|
39
|
+
(`kind === "openfoam-nozzle-cfd"`). `OPENFOAM_WIDGETS` (exported from `mod.ts`) lists URIs, kinds
|
|
40
|
+
and `supportedWidths` for a board to read:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { OPENFOAM_WIDGETS } from "jsr:@casys/mcp-openfoam";
|
|
44
|
+
// { resourceUri: widget.uri, supportedWidths: widget.supportedWidths }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Rebuild the committed single-file HTML with `deno task build:ui` (needs network access to JSR for
|
|
48
|
+
`@mcpview/components`); `deno task check:ui:bundle` fails when a bundle is stale.
|
|
49
|
+
|
|
22
50
|
## Docker Quickstart
|
|
23
51
|
|
|
24
52
|
```bash
|