科研 Skill

L-PBF缺陷区间预测

lpbf-defect-prediction

Predicts L-PBF defect regime (keyholing, lack of fusion, balling, or none) from process parameters and checks melt-pool dimensions against standard criteria. Use when selecting LPBF parameters.

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

SKILL.md

L-PBF defect prediction (AdditiveLLM)

Takes a metal L-PBF parameter set and says which defect regime it most likely falls in. Can also draw the safe window across power and speed. The workflow follows AdditiveLLM (Pak & Barati Farimani, Additive Manufacturing Letters 2025): MeltpoolNet melt-pool data, labelled with three geometric criteria, augmented over hatch and layer, and learned as a multi-label classifier. Paper details and how this skill differs are in references/paper-notes.md.

Everything runs through scripts/lpbf.py (numpy, pandas, scikit-learn, matplotlib, pyarrow). The first run downloads MeltpoolNet (~1 MB) from github.com/BaratiLab/MeltpoolNet to ~/.cache/mechanical-engineering-skills/meltpoolnet. Set LPBF_CACHE to put it elsewhere.

Pick the mode from what the user has

User hasUseWhy
Measured or simulated melt-pool depth, width (and length)criteriaExact physics rules. No model, no uncertainty beyond the measurement.
Process parameters onlypredict (after build + train, once)Learned from about 2,400 experiments plus augmentation.
"What settings should I use?"mapPower–velocity map, defect-free region, most robust point, and where the data actually is.

Criteria (paper Eqs. 1–3)

python scripts/lpbf.py criteria --depth 120 --width 150 --length 420 --hatch 100 --layer 40
RegimeFires when
KeyholingW / D < 1.5
Lack of Fusion(h / W)² + (t / D)² > 1
BallingL / W > π

The labels are not exclusive. None means every criterion that could be evaluated passed. Missing inputs leave that criterion unevaluated, and the output says so. Never report "None" when a criterion was skipped.

Model (one-time, about 1 minute)

python scripts/lpbf.py build --out data.parquet      # ≈325k rows; prints label shares
python scripts/lpbf.py train --data data.parquet --model model.joblib   # grouped split by default
  • train prints exact-match accuracy (all four labels correct) and F1 for each label.
  • Default --split grouped holds out whole melt pools, typically about 88% exact match.
  • --split random reproduces the paper's protocol and scores about 98%. It is inflated by leakage, so never quote it as expected accuracy (see notes).
  • --no-monotone removes the physics constraints, for ablation only.

Predict and map

python scripts/lpbf.py predict --model model.joblib --material Ti-6Al-4V \
    --power 280 --velocity 1200 --beam 80 --hatch 100 --layer 30
python scripts/lpbf.py map --model model.joblib --material Ti-6Al-4V \
    --hatch 100 --layer 30 --beam 80 --out map.png [--pmax 500 --vmax 2500]
  • predict returns a probability for each regime, the predicted labels (None only if no defect head reaches 0.5), line and volumetric energy, and the model's validation scores.
  • map shades the regions where each defect head is above 0.5. Green means all three are below 0.5. Measured points for that material are drawn as circles. The output also reports the defect-free fraction and the most robust point (the largest smoothed margin).
  • Materials in the data include SS316L, SS17-4PH, IN625, IN718, IN738LC, Ti-6Al-4V, Hastelloy X, Cu10Sn, AlSi10Mg, Ti-48Al and others. Other alloys need --props density,Cp,k,Tm, and you should warn the user that the result is extrapolated.

How to report

  1. Give the regime and its probability, plus the energy numbers.
  2. Name the physical lever:
    • keyhole: lower power or raise speed;
    • LoF: lower hatch or layer, or raise energy;
    • balling: lower speed at the same energy, or reduce the power–speed product.
  3. Say whether the point lies inside the measured data (circles on the map) or is extrapolated. Green regions with no circles are guesses.
  4. For a real build, recommend a small DOE of single tracks and density cubes around the suggested point. The model narrows the search; it does not replace qualification.

Caveats to pass on

  • Labels come from single-track melt-pool geometry. They do not cover spatter, cracking, residual stress, contour or downskin effects.
  • W/D < 1.5 is a conservative keyhole rule. Many SS316L conduction-mode tracks trip it, so that material's map shows a narrow window.
  • Balling has few examples because it needs melt-pool length, so the balling head rarely fires.
  • To fine-tune an actual LLM as in the paper, data.parquet includes the Baseline [SEP] text. See references/finetune.md.

Cite: Pak & Barati Farimani, Addit. Manuf. Lett. 14 (2025) 100292; Akbari et al., MeltpoolNet, Addit. Manuf. 55 (2022) 102817.

示例提示词

给定这组激光功率和扫描速度,帮我判断L-PBF打印会不会出现未熔合缺陷。

所属插件

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

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

同插件的其他科研 Skill

常见问题

L-PBF缺陷区间预测能做什么?

Predicts L-PBF defect regime (keyholing, lack of fusion, balling, or none) from process parameters and checks melt-pool dimensions against standard criteria. Use when selecting LPBF parameters。

如何安装L-PBF缺陷区间预测?

在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「L-PBF缺陷区间预测」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。

L-PBF缺陷区间预测需要哪些权限?

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

L-PBF缺陷区间预测经过官方审核吗?

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