Logotipo de Mechanical Sim

Mechanical Sim

Organización
svd-ai-lab
mechanical-sim

Use when driving Ansys Mechanical via PyMechanical (ansys-mechanical-core) through the sim runtime, or reading solved `.rst` files with DPF on the agent side. Covers boundary conditions, loads, solver execution, and result extraction. This is the physics-layer counterpart to workbench-sim (which orchestrates cells 1-3); mechanical-sim owns cells 4-6 of the Static Structural workflow. Observation commands (`uv run sim screenshot` / `uv run sim inspect`) are tightly coupled with both the PyMechanical gRPC client *and* the Mechanical.exe GUI window — always launch with `batch=False` so the window is on the desktop for live sessions.

Descripción general

Editorsvd-ai-lab
Repositoriosim-cli
Nombre de la habilidadmechanical-sim
Estrellas
242
Forks
23
Archivos incluidos
19
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 19

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por svd-ai-lab en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Mechanical Sim en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/svd-ai-lab/sim-cli/tree/main/plugins/mechanical/src/sim_plugin_mechanical/_skills/mechanical
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/svd-ai-lab/sim-cli.git /tmp/sim-cli
mkdir -p .claude/skills
cp -r /tmp/sim-cli/plugins/mechanical/src/sim_plugin_mechanical/_skills/mechanical .claude/skills/mechanical-sim
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Mechanical Sim en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Mechanical Sim automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Mechanical Sim no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

mechanical-sim

This file is the Ansys Mechanical index. Use DPF for solved .rst files on disk; use sim-cli/PyMechanical for live Mechanical sessions that mutate, solve, inspect, or update the GUI-backed project.

This is not the Abaqus plugin. Do not run Abaqus .inp decks or Abaqus/CAE scripts here. Use solver=abaqus for Dassault SIMULIA Abaqus; use solver=mechanical only for Ansys Mechanical / PyMechanical sessions.

The /connect response tells you which active layers apply:

json
"skills": {
  "root":               "<sim-skills>/mechanical",
  "active_sdk_layer":   "0.12",
  "active_solver_layer": "24.1"
}

Always read base/, then your active sdk/<version>/, then your active solver/<version>/. Later layers override earlier ones on identically-named files.


First principles

  1. Workbench orchestrates, Mechanical computes. PyWorkbench drives Engineering Data / Geometry / Model. PyMechanical drives Setup / Solution / Results. Do not try to define boundary conditions via Workbench scripting — that belongs here.

  2. Observation is SDK+GUI coupled. Every uv run sim exec is a mechanical.run_python_script(code) call that mutates Mechanical's in-memory model. Mechanical's window on the desktop redraws after each call. Therefore uv run sim screenshot (which grabs the desktop) always reflects the current SDK state. This coupling only works with batch=False — so the driver defaults to GUI mode. Confirm both ui_mode == "gui" and batch == false from inspect session.summary before relying on screenshots for GUI sync.

  3. Scripts run inside Mechanical's IronPython interpreter. Globals ExtAPI, DataModel, Model, Quantity, Tree are already available — do NOT import ansys.mechanical. The last expression's string form is what run_python_script returns, so end snippets with a json.dumps(...) literal to get structured output.

  4. ExtAPI.DataModel.Project is the root. From there: .Model → the scene; .Model.Analyses[0] → the first analysis; .Model.Geometry → bodies; .Model.Mesh → meshing controls; .Model.Materials → material assignments.


base/ — always relevant

PathWhat's there
base/reference/pymechanical_api.mdPyMechanical SDK surface: launch_mechanical, run_python_script, download_project, file transfer. Read first.
base/reference/scripting_tree.mdMechanical's IronPython scripting tree: ExtAPI, DataModel, Model, Tree, common traversal patterns.
base/reference/capability_discovery.mdGeneric method/feature discovery before adding analyses, BCs, results, or solve logic. Use this when the workflow differs from known snippets.
base/reference/bc_scoping.mdBoundary condition scoping: creating Selection objects, NamedSelection, face IDs, ISelectionInfo. This is the #1 source of errors.
base/reference/solve_control.mdTriggering solve (analysis.Solution.Solve(True)), monitoring state, reading solve messages.
base/reference/result_extraction.mdTraversing analysis.Solution to pull deformation/stress values, exporting to CSV, using .rst files.
base/reference/observation_commands.mdHow sim's observation commands couple with Mechanical. Read this before using uv run sim inspect / uv run sim screenshot against a Mechanical session.
base/snippets/Numbered snippets (01_smoke through 06_extract_results). Each ends with a json.dumps(...) literal for structured output.
base/workflows/static_structural/End-to-end walk through cells 4-6, continuing where workbench-sim left off.
base/workflows/model_review_loop.mdRequired checkpoint loop: inspect health, project identity, model summary, then run one bounded snippet.
base/workflows/debug_failed_exec.mdFailure triage loop for scoping, selections, mesh, solve, and result extraction failures.
base/workflows/workbench_handoff.mdWorkbench-to-Mechanical checklist for Static Structural workflows.
base/known_issues.mdQuirks: Chinese locale gRPC, batch-mode stdin, IronPython Unicode, Selection vs ISelectionInfo.

sdk/<active_sdk_layer>/

  • sdk/0.12/ — PyMechanical 0.12 (works with Ansys 24.1–25.2).
    • notes.md — launch_mechanical(version=241, batch=False), wait_till_mechanical_is_ready.

solver/<active_solver_layer>/

  • solver/24.1/ — Ansys Mechanical 24.1.
    • notes.md — scripting namespace: which ExtAPI members exist in 24.1.

Hard constraints

  1. Never launch with batch=True unless the user has explicitly asked for headless mode. sim's observation commands need the GUI.
  2. Never import ansys.mechanical.* inside a snippet that goes through run_python_script. The interpreter is Mechanical's embedded IronPython — the Python SDK is the wrong side of the wire.
  3. Always end snippets with json.dumps(...) to get structured stdout. run_python_script returns only the last expression's repr.
  4. Workbench skill owns cells 1-3. If the user asks for geometry import or material definition, hand back to workbench-sim.
  5. Never trust raw names or paths as public evidence. Return counts, booleans, self-created ASCII tags, or sanitized strings from snippets.
  6. Discover live capabilities before coding a new workflow. Use mechanical.capabilities, mechanical.object.properties:*, and official PyMechanical scripting docs to confirm available analysis, BC, result, and solve APIs. Do not infer physics support from AnalysisType strings alone.
  7. Observe long-running work out-of-band. During solves, updates, imports, or hangs, use screenshots and file/message polling while the SDK call is blocked. Read base/reference/observation_commands.md before starting any expected long-running operation.

Required protocol

If the user's question is about an existing solved project (a .rst on disk), use DPF on the agent side; do not launch Mechanical at all.

Before every Mechanical script:

  1. Read base/workflows/model_review_loop.md and inspect session.health, mechanical.project.identity, and mechanical.model.summary.
  2. For any workflow not already proven by a local snippet, read base/reference/capability_discovery.md and inspect mechanical.capabilities before adding setup objects.
  3. Check base/known_issues.md for the operation you are about to do.
  4. If this is a Workbench handoff, read base/workflows/workbench_handoff.md and confirm Mechanical sees the expected analysis and non-empty geometry.
  5. For long-running solve/update/import steps, capture a screenshot before the call, then monitor with screenshots and available solver files/messages until it completes or clearly fails.
  6. Run one bounded snippet, ending with json.dumps(...).
  7. Inspect last.result, mechanical.model.summary, and mechanical.messages after solve/result failures. In GUI mode, use a screenshot as visual confirmation after significant tree changes.
  8. If execution fails, switch to base/workflows/debug_failed_exec.md before trying another full script.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Mechanical Sim?

Use when driving Ansys Mechanical via PyMechanical (ansys-mechanical-core) through the sim runtime, or reading solved `.rst` files with DPF on the agent side. Covers boundary conditions, loads, solver execution, and result extraction. This is the physics-layer counterpart to workbench-sim (which orchestrates cells 1-3); mechanical-sim owns cells 4-6 of the Static Structural workflow. Observation commands (`uv run sim screenshot` / `uv run sim inspect`) are tightly coupled with both the PyMechanical gRPC client *and* the Mechanical.exe GUI window — always launch with `batch=False` so the win...

¿Por qué usar Mechanical Sim en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Mechanical Sim está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Mechanical Sim en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/svd-ai-lab/sim-cli/tree/main/plugins/mechanical/src/sim_plugin_mechanical/_skills/mechanical. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Mechanical Sim?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Mechanical Sim?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Mechanical Sim con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Mechanical Sim?

Sí. svd-ai-lab la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇