科研 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.
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 has | Use | Why |
|---|---|---|
| Measured or simulated melt-pool depth, width (and length) | criteria | Exact physics rules. No model, no uncertainty beyond the measurement. |
| Process parameters only | predict (after build + train, once) | Learned from about 2,400 experiments plus augmentation. |
| "What settings should I use?" | map | Power–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
| Regime | Fires when |
|---|---|
| Keyholing | W / D < 1.5 |
| Lack of Fusion | (h / W)² + (t / D)² > 1 |
| Balling | L / 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
trainprints exact-match accuracy (all four labels correct) and F1 for each label.- Default
--split groupedholds out whole melt pools, typically about 88% exact match. --split randomreproduces the paper's protocol and scores about 98%. It is inflated by leakage, so never quote it as expected accuracy (see notes).--no-monotoneremoves 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]
predictreturns 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.mapshades 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
- Give the regime and its probability, plus the energy numbers.
- 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.
- Say whether the point lies inside the measured data (circles on the map) or is extrapolated. Green regions with no circles are guesses.
- 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.parquetincludes the Baseline[SEP]text. Seereferences/finetune.md.
Cite: Pak & Barati Farimani, Addit. Manuf. Lett. 14 (2025) 100292; Akbari et al., MeltpoolNet, Addit. Manuf. 55 (2022) 102817.
示例提示词
给定这组激光功率和扫描速度,帮我判断L-PBF打印会不会出现未熔合缺陷。
所属插件
安装该插件会一并获得同领域的 35 个 Skill / MCP。
同插件的其他科研 Skill
- FDM增材制造可制造性设计Checks an existing STEP part for FDM printability with the AgentsCAD method: overhang detection, reorientation, chamfers, and kernel plus visual verification. Use for DFAM review before 3D printing.
- 激光粉末床合金可打印性筛选Screens metal alloy compositions for laser powder bed fusion printability using CALPHAD or built-in thermophysical data and Rosenthal melt pools. Use when choosing or qualifying an AM alloy.
- 增材制造文献问答检索Answers additive-manufacturing questions from the user’s own PDF library with page-cited evidence via retrieval. Use for literature-grounded AM questions instead of relying on memory.
- CADSmith文本生成CADGenerates dimensionally exact CadQuery CAD from natural language using the CADSmith plan-code-validate-refine loop. Use when the user describes a part in words and wants a CAD model.
- OpenFOAM CFD仿真自动搭建Sets up, runs, diagnoses, and reports OpenFOAM CFD cases from a plain-language request using registered flow families and deterministic accept/reject validators. Use for guided OpenFOAM case setup.
- 机械设计评审文档汇编Assembles a mechanical design-review package: requirements traceability, design FMEA with RPN, costed multi-level BOM, risk register, and a PDR/CDR checklist. Use when preparing a design review.
- 面向制造的可制造性评审Reviews a part or assembly for CNC machining, sheet metal, injection molding, casting, or 3D printing manufacturability, flagging rule violations. Use when the user asks for a DFM/DFMA check.
- 工程图纸与GD&T审查Reviews mechanical drawings (PDF, image, or DXF) for dimensioning errors, GD&T misuse, datum problems, and ASME Y14.5/ISO GPS compliance. Use when checking a drawing before release.
- 工程计算报告生成Turns engineering calculations or scripts into a formal calculation report with objective, assumptions, equations, and unit-checked results. Use for a calc report ready for sign-off.
- LLM-SR方程发现Discovers interpretable equations from engineering data with the LLM-SR loop: skeleton proposals, constant fitting, and out-of-domain scoring. Use for symbolic regression on experimental data.
- 疲劳断裂寿命分析Estimates fatigue life and crack-growth life for metal parts from S-N data, load histories, and fracture-mechanics inputs. Use for Miner’s-rule damage, rainflow counting, or Paris-law crack growth.
- 图像直接生成FDM G代码Converts a photo, sketch, or slice image of a flat or near-flat part directly into FDM G-code without CAD, via silhouette and toolpath extraction. Use for sketch-to-print without modeling.
- 点阵结构刚度逆向设计Designs 3D-printable lattice unit cells for a target stiffness using TPMS cells, printability checks, and voxel homogenization. Use for lattice infill or metamaterial design.
- 平面连杆机构综合Synthesizes planar four-bar or six-bar linkages whose end-effector traces a target curve, using graph-based topology and forward-kinematics search. Use for mechanism path-generation problems.
- LLM驱动FDM打印逐层监控Monitors an FDM print layer by layer through Klipper/Moonraker, diagnosing defects from camera images and applying safety-bounded G-code corrections. Use to watch or fix a live 3D print.
- LLM迭代桁架优化设计Designs and optimizes 2D trusses with an LLM-in-the-loop FEM workflow where proposed members are scored by an exact truss FEM. Use for iterative truss topology or sizing optimization.
- L-PBF熔池图像超分辨率Upscales low-cost webcam images of an L-PBF build plate to high resolution via registration and a trained diffusion or CNN model. Use for in-situ L-PBF monitoring with cheap cameras.
- 机械零件强度校核Sizes and checks machine elements: bolted joints, shafts for fatigue, bearings for L10 life, springs, welds, and gears, with shown work and safety factors. Use to size or verify a machine element.
- Ashby材料选型Selects engineering materials with the Ashby method: translate function and constraints into a performance index, then screen and rank a shortlist. Use when choosing between candidate materials.
- 产品逆向拆解分析Reverse-engineers a physical product as an engineering system: function structure, costed BOM, DFA index, should-cost, FMEA, and a printable HTML report. Use when asked to tear down a product.
- 力学教学图绘制Produces mechanics teaching figures such as Mohr’s circle, shear/moment diagrams, S-N curves, and free-body diagrams as PNG/SVG. Use when asked to draw or plot a mechanics concept.
- 增材制造熔池几何预测Predicts metal AM melt-pool depth, width, length, and mode (keyhole, lack of fusion, balling, desirable) from laser power, speed, and beam size. Use for LPBF parameter prediction.
- 自然语言参数化CAD建模Turns a plain-English or dimensioned part description into a parametric CadQuery script and exports STEP, STL, and a mass/volume report. Use when asked to model or generate a CAD part.
- FreeCAD自然语言建模Generates FreeCAD models from natural-language queries using the Query2CAD self-refinement loop: macro generation, error repair, and image-text scoring. Use for text-to-CAD in FreeCAD.
常见问题
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 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。