Skip to main content
Glama

Molding Warpage Submit

molding_warpage_submit
Destructive

Submit an injection-molding warpage analysis to predict part bow and flatness from differential cooling shrinkage, using through-thickness temperature or a cooling-case result.

Instructions

Injection-molding WARPAGE / residual distortion, asynchronous — the FEM thermo-elastic post-step of the cooling solve (GitHub issue #113 Part B; the higher-fidelity twin of the #104 CTE shrinkage screen). Answers will the part bow out of flat once it cools and is ejected. Requires the ccx (CalculiX) binary; when none resolves this returns {ok:false, reason, install} rather than raising.

The physics: a moulding shrinks as it cools (CTE); uniform shrinkage just makes it smaller, but differential shrinkage warps it. The dominant driver is the asymmetric frozen-in through-thickness temperature field at ejection (an unbalanced cooling layout, one mould half hotter, a rib on one face). Pass that as dT_through_k (K, the through-thickness differential: T at the thin-face minimum minus the maximum). The worker meshes body, imposes the field as a thermal eigenstrain, pins a statically-determinate 3-2-1 constraint, and solves the free linear-elastic distortion in ccx. A balanced field (dT_through_k≈0) warps ~0; an asymmetric one bows to the analytic plate curvature (κ=α·ΔT/h), directionally correct.

Backend: CalculiX (ccx), driven by a deck the worker writes directly (the GPL solver is held at the subprocess boundary, never imported). Units mm / MPa / 1/K / °C, so warp comes back in mm.

Coupled cooling hand-off (issue #116): instead of hand-passing dT_through_k, pass cooling_case_dir (a molding_fill_submit(stages="fill_pack") result's case_dir) with cooling_nx/cooling_ny (the cooling case mesh; defaults 60/8) and optional cooling_nz/cooling_time — the worker reads that cooling solve's cell- centre temperature field and auto-derives the antisymmetric (bending) through- thickness differential. The result reports dT_through_k and dT_source.

Params: body (a shape handle — the part), and either dT_through_k or cooling_case_dir (one is required). Material elastic props from material (corpus card) or explicit youngs_mpa/poisson/ cte_per_k — solidified-resin defaults are used with a warning otherwise (the corpus rheology cards don't carry structural props). ref_temp_c is the stress- free / solidification temperature (warp is invariant to it — it only scales the reported residual stress). char_length_mm sets the mesh size; thickness_axis ('x'|'y'|'z') overrides the auto-detected through-thickness axis; flatness_tol_mm or flatness_tol_frac (default 0.2 % of span) set the gate tolerance.

Fidelity caveat: a one-way, linear-elastic, loose coupling — it ignores viscoelastic stress relaxation, flow-induced anisotropy, and the packing-pressure residual; it captures the dominant differential-shrinkage warp and its direction, not a calibrated absolute. fidelity="solve" with a conservative band_pct; read the band.

Returns the degradation dict, or {job_id, status, cache_hit}; poll job_result for {ok, returncode, solver, case_dir, nodes, tets, warp_axis, span_mm, thickness_mm, dT_through_k, dT_source, analytic_bow_mm, gate} where gate is {pass (on flatness), score, fidelity:"solve", band_pct, max_warp_mm, flatness_tol_mm, warp_per_span, max_disp_mm, warp_faithful, analytic_bow_mm, warnings}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "body": "<body>"
    },
    "name": "molding_warpage_submit"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes
poissonNo
materialNo
cte_per_kNo
workspaceNoRun this call in this named workspace
cooling_nxNo
cooling_nyNo
cooling_nzNo
ref_temp_cNo
youngs_mpaNo
cooling_timeNo
dT_through_kNo
char_length_mmNo
thickness_axisNo
flatness_tol_mmNo
cooling_case_dirNo
flatness_tol_fracNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial context beyond the annotations: it is asynchronous, returns {job_id,status,cache_hit} and must be polled via job_result, requires the ccx binary and returns {ok:false,reason,install} instead of raising when missing, and discloses the fidelity caveat (one-way, linear-elastic, loose coupling). This richly supplements the destructiveHint/readOnlyHint flags without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is long and dense, but the physics exposition and hand-off detail earn their place for a complex multi-mode FEM tool, and the core purpose is front-loaded in the first sentence. Some prose could be trimmed, but it is not padded for its own sake.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-param tool with no output schema and only safety annotations, the description is thorough: it describes the return dict and gate fields, documents degradation behavior, the two input modes, and the fidelity limitation. An agent has what it needs to call it and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 6% schema coverage across 17 params, the description carries the load and mostly succeeds: it explains body, dT_through_k, cooling_case_dir, cooling_nx/ny/nz/time, material vs youngs_mpa/poisson/cte_per_k, ref_temp_c, char_length_mm, thickness_axis, and flatness_tol_mm/frac with physics-derived meaning. Only `workspace` is unexplained, leaving a small gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: an injection-molding warpage/residual-distortion FEM post-step of the cooling solve, answering 'will the part bow out of flat'. It explicitly positions itself relative to siblings (the higher-fidelity twin of the #104 CTE shrinkage screen, the post-step of molding_fill_submit), so an agent can distinguish it from molding_fill_submit, molding_screen, and moldability_screen.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the two input modes clearly ('either dT_through_k or cooling_case_dir — one is required') and the coupled-cooling hand-off from a molding_fill_submit stages=fill_pack result. It gives strong context for when this applies (differential shrinkage after cooling), though it does not explicitly state exclusions versus the moldability/molding screens.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools