starccm-sim
Skill for controlling Simcenter STAR-CCM+ through the simplest real path
that can produce evidence: direct starccm+ launcher/batch commands, saved
.sim inspection, native Java macros, or sim-cli when its runtime layer is
useful.
First principles
- Star-CCM+ uses Java macros, not Python scripts. Every automation script is a
.javafile extendingStarMacro. There is no pip-installable Python SDK. - Execution is batch-mode subprocess.
starccm+ -batch macro.java [case.sim]— sim never imports Star-CCM+ libraries. - The macro recorder is your best API discovery tool. Record GUI actions → read generated
.java→ adapt. - License is required.
CDLMD_LICENSE_FILEmust point to a valid license file. The driver auto-detectslicense.datnear the installation.
Hard constraints
- Script format:
.javafiles only. Mustextends StarMacroandimport star.common.*. - Output convention: Print a JSON object via
sim.println(jsonString)as the last meaningful output line. The driver'sparse_output()extracts it. - No persistent session: Current driver is one-shot only (
supports_session = False). Eachsim runstarts and stops Star-CCM+. - Startup overhead: ~15-20s per run (JVM + license checkout). Plan macros to do meaningful work per invocation.
File index
| Path | What it contains | When to read |
|---|---|---|
base/reference/java_macro_api.md | Java macro API reference — classes, methods, patterns | When writing any macro |
base/reference/batch_execution.md | CLI flags, license setup, parallel execution | When configuring runs |
base/snippets/starccm_01_smoke_test.java | Minimal connectivity test | First run verification |
base/snippets/starccm_02_pipe_flow.java | Geometry creation + volume mesh generation | E2E reference |
base/known_issues.md | Vendor quirks and workarounds | When debugging failures |
solver/21.02/notes.md | Version-specific notes for 2602 (21.02) | After version detection |
Required protocol
- Direct availability probe: before requiring sim-cli, look for a real
starccm+launcher fromPATH,STARCCM_HOME/user-provided paths, common Siemens install roots, and visible STAR-CCM+ sessions. Check license signals such asCDLMD_LICENSE_FILEwhen present, while remembering that a path or env var is not proof of solver/license availability. For sim runtime validation, runsim check starccmfrom a project environment with sim-cli/plugin installed. - Write macro:
.javafile extendingStarMacro. End withsim.println(json). - Lint:
sim lint macro.java— checks structure before execution. - Run:
sim run macro.java --solver starccm— executes in batch mode. - Check result:
sim logs last— verifyexit_code == 0AND parsed output meets acceptance criteria.
Input classification
- Category A (must ask user): Geometry file path, physics models, boundary condition values, acceptance criteria.
- Category B (may default): Processor count (
-np), mesh base size, iteration count. - Category C (derive from context): Region names, boundary names, field function names — discover via macro recorder or inspection macro.


