calculix-sizing-optimization
GitHub用于CalculiX壳或梁模型的轻量化优化。通过Latin Hypercube扫描和坐标下降法,调整截面厚度等标量参数,在满足应力和位移约束的前提下最小化质量。
Trigger Scenarios
Install
npx skills add Cai-aa/CAE-Agent-Hub --skill calculix-sizing-optimization -g -y
SKILL.md
Frontmatter
{
"name": "calculix-sizing-optimization",
"description": "Workflow skill for two-stage sizing\/parameter optimization on a CalculiX shell or beam deck via the optimize_structure tool — Latin Hypercube sweep plus coordinate descent to minimize mass subject to stress\/displacement constraints by tuning scalar section\/material\/load cards. Use when an agent must lighten a CalculiX shell or beam model while keeping stress and deflection within limits."
}
CalculiX Sizing Optimization
Two-stage sizing/parameter optimization: minimize mass subject to stress and displacement constraints by editing scalar design variables in place (shell thickness, beam section, material E/nu/density, load magnitude). The mesh and geometry never change — only scalar cards.
This is sizing optimization, not topology optimization. It thins sections; it does not redistribute material in space.
When to Use
Use when an agent must lighten a CalculiX shell or beam model while keeping
von Mises stress and displacement within limits. Driven by the
optimize_structure_tool MCP tool.
Do NOT use for:
- Solid (C3D8 / C3D8R) models. Solids expose no scalar geometry card — their mass is set by node-defined volume x density, so there is no thickness to thin. Material/load variables on a solid are degenerate for mass minimization (density changes mass but not stiffness; E changes stiffness but not mass). Solid lightweighting needs shape or topology optimization, which is a different problem and is not covered here.
- Topology optimization (material distribution over a fixed mesh) — separate, future work.
Workflow
parse_inp/list_design_vars_tool— confirm the deck and find theshell.<elset>.thickness(or beam section)var_idand its current value.- Choose bounds
{var_id: [lower, upper]}to bracket the search. Mass falls monotonically with shell/beam thickness. optimize_structure_tool— run the two-stage loop (LHS sweep, then coordinate descent). Each evaluation is a real ccx solve, so setmax_solvesto bound wall time.- Inspect the result:
best(vars, mass_kg, stress_vm, disp, feasible,mass_reduction_pct),converged/termination_reason, andhistory. - Optional:
export_results_toolon the persisted<stem>.optimized.inpto render the optimized design in the viewer.
Rules
- Frame results as sizing/parameter optimization (section sizing), never topology.
- Defaults: minimize mass s.t. max von Mises < 250 MPa and max displacement <
1.5 mm; pass
objective/constraintsto override. - The acceptance rule assumes shell/beam thickness (mass-monotone). Material E and load magnitude are exposed as variables but are not validated for mass-minimization — prefer section thickness.
- Units follow the
.inp(commonly mm-t-s-MPa);mass_kgis reported in kg. - A
converged=Falseresult is not a failure:bestis the lightest feasible point found, andbound_limitedtells whether it already sits at the box optimum (widen the bounds to do better).
Example
MCP/CalculiX/examples/bracket.inp is a public S4 shell bracket (steel plate,
clamped edge, transverse tip load). Starting from thickness 8 mm with bounds
{"shell.PLATE.thickness": [2.0, 8.0]} and n_lhs=8, the optimizer converges
to ~4.1 mm — about -48% mass — while keeping stress < 250 MPa and
displacement < 1.5 mm.
Version History
- fc7b93e Current 2026-08-16 09:00


