COMSOL plugin for sim-cli
Drive COMSOL Multiphysics from Codex, Claude Code,
and other local AI coding agents through sim-cli.
What you can do
Section titled “What you can do”- Run a model — point
simat a.mphfile and let it solve, headless or with the GUI visible. - Connect a live session — keep one COMSOL process open across many steps, send model-control snippets, observe model state, watch results stream back.
- Shared desktop — the agent and a human engineer share the same Model Builder window. Edits the agent makes appear live in the engineer’s screen; the engineer can interrupt, click around, or hand control back.
- Parametric sweeps — vary parameters between runs and collect results without restarting COMSOL.
- Extract solved fields — pull temperature, velocity, or any other evaluated quantity out of a finished study for downstream analysis.
- Server attach mode — point
simat a COMSOL server you already have running;simwon’t take ownership and won’t kill it on disconnect.
Works on Linux, macOS, and Windows.
Install
Section titled “Install”Use uv to install sim-cli-core and the COMSOL plugin into the same
project environment, then sync the bundled COMSOL skill into the agent
harness:
uv init # only if this is not already a uv projectuv add sim-cli-core sim-plugin-comsoluv run sim plugin sync-skills --target .agents/skills --copy # Codex / Copilotuv run sim plugin sync-skills --target .claude/skills --copy # Claude Codeuv run sim check comsoluv run sim plugin doctor comsol --deepuv run sim ... is the canonical command form for agent projects — it
runs the sim installed in this project’s venv so the plugin is visible.
Quick start
Section titled “Quick start”One-shot run:
uv run sim run --solver comsol path/to/model.mphPersistent session with the engineer watching the GUI:
uv run sim connect --solver comsol --ui-mode gui --driver-option visual_mode=shared-desktopuv run sim exec '<your model-control snippet>'uv run sim inspect session.healthuv run sim disconnectPrerequisites
Section titled “Prerequisites”- A licensed COMSOL Multiphysics installation on the host
- Python 3.10+ and
uvon the same machine
Not the same as other Ansys / SIMULIA plugins
Section titled “Not the same as other Ansys / SIMULIA plugins”Use the COMSOL plugin only for COMSOL Multiphysics workflows. For Dassault
SIMULIA Abaqus see abaqus; for Ansys Workbench see
workbench; for Ansys Mechanical see
mechanical.
Source
Section titled “Source”- GitHub: svd-ai-lab/sim-plugin-comsol
- PyPI: sim-plugin-comsol (Apache-2.0)