科研 Skill

L-PBF逐层孔隙率预测

thermal-porosity

Predicts layer-wise porosity in laser powder bed fusion from in-situ pyrometry image sequences using CT-aligned thresholds and a trained regression model. Use for in-situ LPBF porosity prediction.

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

SKILL.md

Thermal-image porosity (ThermoPore)

ThermoPore (Pak et al., Additive Manufacturing 95 (2024) 104503) links every L-PBF build layer's in-situ pyrometry sequence (200 frames, 64 × 64 px at about 21 µm/px) to the pores micro-CT later finds in that layer. It has two tasks:

  • count the pores;
  • localize them on a 16 × 16 grid.

scripts/thermopore.py covers the whole pipeline. It needs numpy, pandas and scikit-learn; the deep models also need PyTorch. Paper details and reference numbers are in references/paper-notes.md.

Workflow

  1. Rehearse (no data needed): python scripts/thermopore.py synth --out run/.
    • This builds a synthetic 10-step × 16-layer build with pores tied to cold and hot cells.
    • Use it to check the pipeline and learn the formats. It is not evidence of real-world accuracy, and every result from it carries "synthetic_data": true. Say so.
  2. Prepare real data:
    python scripts/thermopore.py prepare --frames layers/ --pores ct_pores.csv --out run/ \
        --z-offset 5 --xy-offset 120,40 [--min-peak 900] [--voxel-um 3.63]
    
    • layers/ holds one .npy or .tif stack per build layer, sorted by name.
    • Empty frames are dropped by a threshold on each frame's peak temperature (automatic unless you pass --min-peak), then each layer is resampled to 200 frames.
    • ct_pores.csv has pore_id, layer, x_um, y_um, esd_um, or voxels plus --voxel-um. Its coordinates are already in the thermal camera's frame, except for the offsets you pass.
    • Alignment matters most. Check it with map (step 4) on a layer where the whole scan is in view, before training anything.
  3. Baseline first (CPU, seconds):
    python scripts/thermopore.py baseline --data run/ --task count [--depth 1|2|3] [--esd-min musigma]
    python scripts/thermopore.py baseline --data run/ --task localize
    
    • The features are thermal-history maps: peak T, min-of-peak, mean T, dwell above a melt threshold and peak-T roughness, pooled to 16 × 16.
    • The baseline gives a number to beat and features you can explain: cold cells point to lack of fusion, hot cells to keyholing.
  4. Look at a layer: python scripts/thermopore.py map --data run/ --layer 40 --out l40.png shows one frame, the peak map, the dwell map and the CT pore map.
  5. Deep models (GPU recommended):
    python scripts/thermopore.py train --data run/ --task count --epochs 500 [--rotate] --out cnn.pt
    python scripts/thermopore.py train --data run/ --task localize --epochs 1000 [--rotate] --out vivit.pt
    
    • These are the paper's architectures. --small shrinks the ViViT and raises learning rates for CPU smoke tests.
    • --rotate applies one rotation to the whole sequence and its label map, and never changes intensities.

Reporting

  • Use the paper's split: 75/25 within each process step. Report the count task as RMSE and R² with predictions rounded to integers; report localization as mean and max IoU at the threshold chosen on the training layers.
  • State the ESD threshold.
    • With a 100-voxel minimum, gas pores dominate and are hard to predict.
    • A μ+σ cut (about 50 µm) keeps keyhole and lack-of-fusion pores, but leaves few positive cells, so IoU becomes noisy.
  • Compare with the paper (R² 0.57 best, RMSE 7.84, IoU 0.32 mean), and with your own baseline.
  • If the deep model doesn't beat the baseline, report that. The paper notes its dataset was small, and so is most real CT data.
  • These models flag regions for CT and inspection; they don't replace qualification.

Cite: Pak et al., ThermoPore, Addit. Manuf. 95 (2024) 104503.

示例提示词

帮我用这组打印过程的红外图像序列预测逐层孔隙率分布。

所属插件

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

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

同插件的其他科研 Skill

常见问题

L-PBF逐层孔隙率预测能做什么?

Predicts layer-wise porosity in laser powder bed fusion from in-situ pyrometry image sequences using CT-aligned thresholds and a trained regression model. Use for in-situ LPBF porosity prediction。

如何安装L-PBF逐层孔隙率预测?

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

L-PBF逐层孔隙率预测需要哪些权限?

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

L-PBF逐层孔隙率预测经过官方审核吗?

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