Calculix Sizing Optimization logo

Calculix Sizing Optimization

CommunityPopular
Cai-aa
calculix-sizing-optimization

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 or natural-frequency 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, or must thin a deck until its first modes clear a resonance floor (freq_1_hz constraint on a *FREQUENCY deck).

Overview

PublisherCai-aa
RepositoryCAE-Agent-Hub
Skill namecalculix-sizing-optimization
Stars
1K
Forks
130
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Cai-aa on GitHub. Read the source before you install it.

Installation

Install the Calculix Sizing Optimization AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Cai-aa/CAE-Agent-Hub/tree/main/Skill/calculix/calculix-sizing-optimization
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Cai-aa/CAE-Agent-Hub.git /tmp/CAE-Agent-Hub
mkdir -p .claude/skills
cp -r /tmp/CAE-Agent-Hub/Skill/calculix/calculix-sizing-optimization .claude/skills/calculix-sizing-optimization
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Calculix Sizing Optimization in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Calculix Sizing Optimization on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Calculix Sizing Optimization is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CalculiX Sizing Optimization

Two-stage sizing/parameter optimization: minimize mass subject to stress, displacement, or natural-frequency 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 (static deck), or must lighten it while keeping a natural frequency above a resonance floor (modal deck). 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

  1. parse_inp / list_design_vars_tool — confirm the deck and find the shell.<elset>.thickness (or beam section) var_id and its current value.
  2. Choose bounds {var_id: [lower, upper]} to bracket the search. Mass falls monotonically with shell/beam thickness.
  3. optimize_structure_tool — run the two-stage loop (LHS sweep, then coordinate descent). Each evaluation is a real ccx solve, so set max_solves to bound wall time.
  4. Inspect the result: best (vars, mass_kg, stress_vm, disp, feasible, mass_reduction_pct), converged / termination_reason, and history.
  5. Optional: export_results_tool on the persisted <stem>.optimized.inp to 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 / constraints to override.
  • Match the constraint set to the deck: a *STATIC deck reports max_stress_vm / max_disp; a *FREQUENCY deck reports freq_<N>_hz (mode N in Hz, from the .dat eigenvalue table) and nothing else. Mixing a stress constraint into a modal optimization makes every point infeasible — the run warns about missing metrics rather than failing opaquely.
  • Avoid-resonance runs: on a modal deck pass e.g. constraints=[{"metric": "freq_1_hz", "op": ">", "value": 300.0}]; thinning stops where mode 1 sits just above the floor. Constraint metric names are validated (mass, max_stress_vm, max_disp, freq_<N>_hz).
  • 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_kg is reported in kg.
  • A converged=False result is not a failure: best is the lightest feasible point found, and bound_limited tells 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.

MCP/CalculiX/examples/plate_modal.inp is the avoid-resonance counterpart: a public S4 shell cantilever plate with a 5-mode *FREQUENCY step. With constraints=[{"metric": "freq_1_hz", "op": ">", "value": 30.0}] the optimizer thins from 4 mm to ~3.23 mm — -19% mass, f1 = 30.4 Hz — matching the Euler-Bernoulli hand calc t* = 30 / 9.29 ≈ 3.23 mm for L = 300 steel (f1 ≈ (1.8751²/2π)(t/L²)√(E/12ρ)).

Frequently asked questions

What does the Calculix Sizing Optimization AI skill do?

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 or natural-frequency 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, or must thin a deck until its first modes clear a resonance floor (freq_1_hz constraint on a *FREQUENCY deck).

Why use Calculix Sizing Optimization on TypingMind?

Because you install it once and use it with any model. Calculix Sizing Optimization is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Calculix Sizing Optimization in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Cai-aa/CAE-Agent-Hub/tree/main/Skill/calculix/calculix-sizing-optimization. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Calculix Sizing Optimization?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Calculix Sizing Optimization?

As many as you like. As long as a model supports skills, you can use Calculix Sizing Optimization with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Calculix Sizing Optimization AI skill free?

Yes. It is published on GitHub by Cai-aa under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇