科研 Skill

STEP零件快速有限元分析

quick-fea

Runs quick linear-static and modal FEA on a STEP part with gmsh meshing and scikit-fem, checked against a hand calculation and mesh convergence. Use for FEA, stress, deflection, or frequency checks.

发布者 Codar安全审核通过v0.1.0更新于 2026-11-18

SKILL.md

Quick FEA

Setup: pip install gmsh scikit-fem matplotlib. On headless Linux, gmsh also needs apt-get install libglu1-mesa libxcursor1 libxinerama1 libxft2. Units: mm, N, MPa, t/mm³.

Prerequisites

gmsh, scikit-fem, numpy, and matplotlib installed and importable; a STEP file for the part. --fix/--load face-selector expressions are parsed by a restricted evaluator (see below), not by eval() on arbitrary code.

Workflow

  1. Geometry. Use the user's STEP, or build one with the parametric-part-cad skill. Remove cosmetic features (logos, small chamfers) that don't carry load. Note the bounding box; you'll use it to pick boundary faces.
  2. Write down the idealization before you solve: the material (E, ν, ρ, σy), which faces are fixed, which faces carry the load, the load magnitude and direction, and what is being neglected (contact, preload, plasticity, large deflection).
  3. Hand calculation first. Estimate the answer with a closed form: beam bending σ = Mc/I, δ = FL³/3EI, Lamé thick cylinder, plate formulas (references/hand_calcs.md). This is the sanity anchor.
  4. Solve:
    python scripts/fea.py part.step --E 69000 --nu 0.33 --fix "x[0] < 1e-3" \
        --load "x[0] > 149.999" --force 0,0,-500 --size 4 --out run1
    python scripts/fea.py part.step --E 69000 --nu 0.33 --rho 2.7e-9 --fix "x[0] < 1e-3" --modes 6 --out modal
    
    Face selection uses expressions on facet midpoints, for example np.abs(x[2]-10)<1e-3, or (x[0]**2+x[1]**2) < 6.1**2 for a bolt hole. --fix/--load accept only numeric literals, x[0..2], comparisons, + - * / ** %, and np.abs/np.sqrt/np.sin/np.cos calls; any other syntax (attribute access, imports, other calls) is rejected before evaluation.
  5. Convergence. Re-run with --size halved. A result is converged when max displacement changes by less than 2% and the 99th-percentile von Mises stress by less than 5%. Max von Mises at a sharp re-entrant corner is a singularity: it never converges. Report the stress at a small distance from the corner, or add the real fillet.
  6. Check:
    • equilibrium_error_pct < 1%;
    • FEA agrees with the hand calculation within about 15% for the nominal region, or you can explain why it differs;
    • margin = σy / σ_vm(p99) − 1, reported against the user's target safety factor;
    • deflection small compared with thickness. If not, linear theory doesn't apply; say so.
  7. Report: idealization sketch (text), mesh table, results with the convergence column, hand-calc comparison, contour image run1_vm.png, margin, and recommendations.

Limits

Linear elastic, small deflection, no contact, isotropic material. For bolted joints, model the bolt-hole bearing area as the fixed or load face, not the whole hole. For thin shells, use a fine mesh (at least 2 elements through thickness) or flag the stiffness error.

示例提示词

帮我对这个STEP支架做一次快速静力有限元分析并检查网格收敛性。

所属插件

机械设计与先进制造面向机械设计与制造研究:文本/草图生成 CAD、FreeCAD/SolidWorks 参数化建模、机构综合与零件选型、公差与 GD&T、DFM 与设计评审、快速有限元与应力代理模型、增材制造工艺与缺陷预测、疲劳断裂寿命。

安装该插件会一并获得同领域的 35 个 Skill / MCP。

同插件的其他科研 Skill

常见问题

STEP零件快速有限元分析能做什么?

Runs quick linear-static and modal FEA on a STEP part with gmsh meshing and scikit-fem, checked against a hand calculation and mesh convergence. Use for FEA, stress, deflection, or frequency checks。

如何安装STEP零件快速有限元分析?

在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「STEP零件快速有限元分析」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。

STEP零件快速有限元分析需要哪些权限?

该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。

STEP零件快速有限元分析经过官方审核吗?

是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。