Skip to main content
Glama

Molding Warpage Submit

molding_warpage_submit
Destructive

Submit an injection-molded part for warpage simulation, predicting whether differential cooling shrinkage will bow it out of flat after ejection. Returns flatness pass/fail, warp magnitude, and direction in millimeters.

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}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
poissonNo
materialNo
cte_per_kNo
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. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, destructive=true), the description discloses asynchronous job submission, non-raising error behavior with {ok:false, reason, install}, CalculiX subprocess isolation, unit conventions, required prerequisites, and the expected job_result payload. This is substantial behavioral context that goes far beyond the structured fields.

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

Conciseness5/5

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

The description is long, but every section earns its place for a tool with 16 params and complex physics: purpose, coupling modes, parameter semantics, fidelity caveats, and return structure are all clearly separated and front-loaded. It is structured enough that an agent can quickly extract invocation requirements without wading through irrelevant prose.

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?

Given the tool's complexity, the description covers all required operational knowledge: how to choose between input modes, what defaults exist, what the worker does, what units are used, what fidelity limits apply, and exactly what fields to expect in job_result. There is no output schema, so the detailed return-value description is essential and is present.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates richly: it explains `body`, the mutual exclusivity of `dT_through_k` and `cooling_case_dir`, cooling mesh defaults, material property fallbacks, the meaning of `ref_temp_c`, `thickness_axis`, flatness tolerances, and representative return fields. Nearly every one of the 16 parameters receives meaningful context that the schema alone does not provide.

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?

The description states a specific resource and operation: it computes injection-molding warpage/residual distortion as an asynchronous FEM thermo-elastic post-step, and even frames the exact question it answers ('will the part bow out of flat once it cools and is ejected'). It differentiates itself from the lower-fidelity CTE shrinkage screen and from other molding tools by naming issue numbers and the higher-fidelity relationship.

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?

The description gives clear usage context: it requires the `ccx` binary, handles missing binaries gracefully, supports two input modes (`dT_through_k` vs. `cooling_case_dir`), and warns about fidelity limits. It identifies the higher-fidelity twin relationship but does not explicitly enumerate when to prefer this tool over each sibling alternative, so it stops short of a 5.

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