Use when running Ansys ICEM CFD meshing scripts — Tcl batch meshing via med_batch.exe, structured hex blocking, unstructured tetra generation, mesh export to Fluent/CFX/MAPDL/Abaqus formats
| Field | Value |
|---|---|
| Solver | Ansys ICEM CFD (meshing preprocessor) |
| Execution | Batch Tcl: icemcfd.bat -batch -script <file.tcl> |
| Session | No — ICEM meshing is batch-oriented, no persistent session. |
| SDK | None. Tcl 8.3.3 scripting via ic_* command API. |
| Script language | Tcl (.tcl, .rpl replay files) |
| Input geometry | .tin (native), .stl, .igs (IGES), CAD via converters |
| Output mesh | 143 export interfaces (Fluent .msh, CFX, ANSYS .inp, Abaqus, LS-DYNA, Nastran, CGNS, etc.) |
ic_uns_*), hex blocking (ic_hex_*), geometry import
(ic_load_tetin, ic_geo_import_*), boundary conditions
(ic_boco_*), mesh export to solver formats.ic_batch_mode (no arguments) at script top. Without it,
output interfaces may attempt interactive prompts that hang
med_batch.exe. Note: ic_batch_mode 1 throws "wrong # args"
(see KI-008) — it's a toggle, not a setter.exit 0. med_batch.exe does not auto-exit
after script completion — omitting exit causes a hang.C:/sim/model.tin
not C:\sim\model.tin — Tcl backslash-escapes break paths.ic_display_*, ic_view_*,
ic_screen_* require a GUI and fail silently in batch mode.lmap, no dict. {*} expansion works.catch**. ICEM Tcl commands print errors to
stderr but return empty string — use
if {[catch {ic_uns_run_mesh} err]} { puts "ERROR: $err"; exit 1 }
to detect failures.| Path | Purpose |
|---|---|
base/reference/icem_tcl_api.md | ic_* command families, batch mode, gotchas |
base/reference/output_formats.md | 143 export interfaces, major solver exports |
base/reference/mesh_workflow.md | Tetra vs hex patterns, quality metrics, batch caveats |
base/snippets/ | Smoke tests (Phase 1) |
base/known_issues.md | Discovered failure modes |
solver/24.1/notes.md | ICEM 24.1 Windows install notes |
base/reference/icem_tcl_api.md — understand the ic_* command
families and batch-mode conventions.base/reference/mesh_workflow.md — pick tetra or hex depending
on the task.base/reference/output_formats.md — pick the right export
interface for the downstream solver.ic_batch_mode 1 and end with exit 0.catch around critical ic_* calls.puts "{\"ok\": true, \"nodes\": 1234, \"elements\": 5678}"
exit 0
| Gate | Check |
|---|---|
| 1 — Exit | exit_code == 0 |
| 2 — Mesh generated | Output file exists and size > 0 |
| 3 — Element count | > 0 elements in output (zero = watertight failure) |
| 4 — Quality | Determinant > 0.3 (hex) or skewness < 0.9 (tetra) |
| Layer | When to consult | File |
|---|---|---|
base/ | Always | Above |
solver/24.1/ | ICEM 24.1 / 2024 R1 | solver/24.1/notes.md |
solver/24.2/ | ICEM 24.2 / 2024 R2 | solver/24.2/notes.md |
solver/25.1/ | ICEM 25.1 / 2025 R1 | solver/25.1/notes.md |
solver/25.2/ | ICEM 25.2 / 2025 R2 | solver/25.2/notes.md |