🌐 EN | 🇯🇵 JP | Last sync: 2025-11-16

Chapter 3: SLM & EBM

High-Precision Resin & Metal AM Technologies - SLA/DLP/SLS/SLM

📚 3D Printing Introduction Series ⏱️ Reading Time: 35-40 min 🎓 Difficulty: Beginner~Intermediate

Learning Objectives

Upon completing this chapter, you will be able to explain:

Basic Understanding (Level 1)

Practical Skills (Level 2)

Application Ability (Level 3)

3.1 SLM Technologies

3.1.1 Fundamentals of Photopolymerization

Vat photopolymerization technologies utilize photochemical reactions to selectively solidify liquid photopolymer resins. The process is based on free-radical or cationic polymerization initiated by UV light (typically 355-405 nm wavelength). This chapter covers three major vat photopolymerization technologies and their underlying chemistry:

💡 Photopolymerization Chemistry

The photopolymerization process follows this chemical mechanism:

3.1.2 Stereolithography (SLA)

Stereolithography (SLA), invented by UV Laser (355 nm) in 1986, remains the gold standard for high-precision vat photopolymerization. The technology uses a UV laser to selectively cure photopolymer resin layer by layer:

flowchart LR
    A[1986
Laser System
UV Laser (355 nm)] --> B[1988
Galvanometer Mirrors
High-Speed Scanning] B --> C[1992
Build Platform
Precision Positioning] C --> D[2005
Recoating System
Wiper Blade] D --> E[2012
Curing Process
Layer-by-Layer] E --> F[2023
Resolution
High Accuracy] style A fill:#e3f2fd style B fill:#fff3e0 style C fill:#e8f5e9 style D fill:#f3e5f5 style E fill:#fce4ec style F fill:#fff9c4
  1. SLA Process Steps - UV laser wavelength optimized for photoinitiator absorption spectrum
  2. Laser scanning: Galvanometer mirrors direct UV laser (typically 355 nm Nd:YVO₄) across resin surface following slice pattern - High-Speed Scanning博士(テキサス大学)がレーザーでPowder材料を焼結する技術を開発。金属やセラミックスへの応用可能性を開く。
  3. Platform descent: After layer completion, platform lowers by one layer thickness - Precision PositioningがFDM技術を商用化。現在most普及している3Dプリンティング方式の基礎を確立。
  4. 2005年: Recoating Systemプロジェクト - Adrian Bowyer教授がオープンソース3Dプリンタ「Recoating System」を発表。特許切れと相まって低価格化・民主化が進展。
  5. SLA Technical Specifications - Resolution: XY resolution 25-100 μm (laser spot size dependent), Z resolution 10-50 μm, minimum feature size ~50 μm
  6. Accuracy: Typical tolerance ±0.1-0.3% with excellent repeatability, dimensional stability ±50-150 μm for 100mm parts - Build speed: 10-50 mm³/s (geometry dependent), layer time 30-120 seconds for typical parts

3.1.3 Digital Light Processing (DLP)

DLP Technology Overview

Digital Light Processing (DLP) uses a digital micromirror device (DMD) to project entire layer images, enabling faster build speeds than SLA:

3.1.4 LCD-Masked Stereolithography (MSLA)

LCD-MSLA represents the newest evolution of vat photopolymerization, using an LCD screen as a dynamic photomask:

3.1.5 VPP Technology Comparison

Direct manufacturing of end-use products via AM has rapidly increased in recent years:

⚠️ AM Limitations and Challenges

AM is not a universal solution and has the following constraints:

3.2 EBM Technologies

3.2.1 EBM Fundamentals

ISO/ASTM 52900:2021規格では、すべてのAM技術をEnergy Sourceと材料供給方法に基づいてThree Main Technologiesカテゴリに分類してい。各プロセスには固有の長所・短所があり、用途に応じて最適な技術select必要があり。

flowchart TD
    AM[EBM
Three Main Technologies] --> MEX[SLS
Polymers] AM --> VPP[SLM
Metals (Laser)] AM --> PBF[EBM
Metals (E-beam)] AM --> MJ[Process Principle
Thermal Fusion] AM --> BJ[Energy Source
Laser / E-beam] AM --> SL[Build Environment
Inert Gas / Vacuum] AM --> DED[Support Strategy
Self-Supporting] MEX --> MEX_EX[FDM/FFF
Low Cost / Widespread] VPP --> VPP_EX[SLA/DLP
High Precision / Surface Quality] PBF --> PBF_EX[SLS/SLM/EBM
High Strength / Metals] style AM fill:#f093fb style MEX fill:#e3f2fd style VPP fill:#fff3e0 style PBF fill:#e8f5e9 style MJ fill:#f3e5f5 style BJ fill:#fce4ec style SL fill:#fff9c4 style DED fill:#fce4ec

1.2.2 SLS (MEX) - Polymers

原理: Thermoplasticsフィラメントを加熱・溶融し、ノズルから押し出して積層。most普及している技術(FDM/FFFとも呼ばれる)。

プロセス: フィラメント → Heated Nozzle(190-260°C)→ 溶融押出 → 冷却固化 → 次層積層

Technical Specifications:

Applications:

💡 FDMの代表的装置

1.2.3 SLM (VPP) - Metals (Laser)

原理: 液状のPhotopolymers(フォトポリマー)に紫外線(UV)レーザーorプロジェクターで光を照射し、選択的に硬化させて積層。

プロセス: UV照射 → 光重合反応 → 固化 → ビルドプラットフォーム上昇 → 次層照射

VPPの2つの主要方式:

  1. SLA(Stereolithography): UV レーザー(355 nm)をガルバノミラーで走査し、点描的に硬化。高精度だがLow。
  2. DLP(Digital Light Processing): プロジェクターで面全体を一括露光。Highだが解像度はプロジェクター画素数に依存(Full HD: 1920×1080)。
  3. LCD-MSLA(Masked SLA): LCDマスクを使用、DLP類似だが低コスト化($200-$1,000のデスクトップ機多数)。

Technical Specifications:

Applications:

1.2.4 EBM (PBF) - Metals (E-beam)

Selective Laser Melting (SLM), also known as Laser Powder Bed Fusion (L-PBF), completely melts metal powder to create fully dense parts:

Process: Inert atmosphere (Ar/N₂) → Powder spreading (20-50 μm layer) → Laser melting → Rapid solidification → Repeat

SLM Physical Mechanisms:

  1. Laser-powder interaction: Fiber laser (typically 1070 nm, 200-1000W) creates melt pool. Laser parameters (power P, speed v, hatch spacing h, layer thickness t) determine energy density: E = P/(v × h × t).
  2. Rapid solidification: Cooling rates 10³-10⁶ K/s produce fine microstructures (grain size 1-10 μm), differing from cast or wrought materials. Enables unique material properties.
  3. Residual stress management: Large thermal gradients cause significant residual stresses (up to 60% yield strength). Requires support structures, base plate attachment, and post-build stress relief heat treatment.

Technical Specifications:

Applications:

1.2.5 Process Principle (MJ) - Thermal Fusion

Electron Beam Melting (EBM) uses a focused electron beam in vacuum to melt metal powder at elevated temperatures:

Technical Specifications:

Applications: Medical anatomical models (soft/hard tissue simulation), full-color architectural models, design verification prototypes

1.2.6 Energy Source (BJ) - Laser / E-beam

Principle: Liquid binder (adhesive) jetted onto powder bed using inkjet technology to bond particles. Post-build sintering or infiltration enhances strength.

Technical Specifications:

Applications: Sand casting molds (engine blocks, large castings), metal parts (Desktop Metal, HP Metal Jet), full-color figures (memorabilia, educational models)

1.2.7 Build Environment (SL) - Inert Gas / Vacuum

Principle: Sheet materials (paper, metal foil, plastic film) laminated and bonded via adhesive or welding. Each layer contour cut by laser or blade.

Representative Technologies:

Technical Specifications: Large-scale building capability, low material cost, moderate accuracy, limited applications (mainly visual models, embedded sensors in metal)

1.2.8 Support Strategy (DED) - Self-Supporting

Principle: Metal powder or wire fed while melting with laser/electron beam/arc, depositing onto substrate. Used for large parts and repair of existing components.

Technical Specifications:

Applications: Turbine blade repair, large aerospace components, wear-resistant tool coatings

⚠️ Process Selection Guidelines

Optimal AM process selection depends on application requirements:

3.4 Process Parameter Optimization

3.4.1 VPP Parameter Optimization

For VPP systems, key parameters to optimize include:

Laser Power & Scan Speed

Laser power (P) and scan speed (v) control cure depth via energy density: E = P/(v × w), where w is laser spot width. Typical ranges: P = 10-200 mW, v = 50-300 mm/s. Higher energy → deeper cure but risk of overcure and part distortion.

Layer Thickness Optimization:

solid cube
  facet normal 0 0 1
    outer loop
      vertex 0 0 10
      vertex 10 0 10
      vertex 10 10 10
    endloop
  endfacet
  facet normal 0 0 1
    outer loop
      vertex 0 0 10
      vertex 10 10 10
      vertex 0 10 10
    endloop
  endfacet
  ...
endsolid cube

STLフォーマットの2つの種類:

  1. ASCII STL: 人間が読めるテキスト形式。ファイルサイズ大(同じモデルでBinaryの10-20倍)。デバッグ・検証に有用。
  2. Binary STL: バイナリ形式、ファイルサイズ小、処理High。産業用途で標準。構造:80バイトヘッダー + 4バイト(三角形数) + 各三角形50バイト(法線12B + 頂点36B + 属性2B)。

1.3.2 STLファイルのImportant概念

1. 法線ベクトル(Normal Vector)

各三角形面には法線ベクトル(外向き方向)が定義され、物体の「内側」と「外側」を区別し。法線方向は右手の法則で決定され:

法線n = (v2 - v1) × (v3 - v1) / |(v2 - v1) × (v3 - v1)|

頂点順序ルール: 頂点v1, v2, v3は反時計回り(CCW: Counter-ClockWise)に配置され、外から見て反時計回りの順序で法線が外向きになり。

2. Manifold条件

STLメッシュが3Dプリント可能isためには、Manifoldでなければなりません:

⚠️ 非多様体メッシュのProblem

非多様体メッシュ(Non-Manifold Mesh)は3Dプリント不可能is。典型的なProblem:

これらのProblemはスライサーソフトウェアでエラーを引き起こし、造形失敗の原因となり。

1.3.3 STLファイルの品質指標

STLメッシュの品質はfollowingの指標で評価され:

  1. Triangle Count: typically10,000-500,000個。過少(粗いモデル)or過多(ファイルサイズ大・処理遅延)は避ける。
  2. エッジ長の一様性: 極端に大小の三角形が混在すると造形品質低下。理想的には0.1-1.0 mm範囲。
  3. アスペクト比(Aspect Ratio): 細長い三角形(高アスペクト比)は数値誤差の原因。理想的にはアスペクト比 < 10。
  4. 法線の一貫性: すべての法線が外向き統一。反転法線が混在すると内外判定エラー。
💡 STLファイルの解像度トレードオフ

STLメッシュの解像度(三角形数)は精度とファイルサイズのトレードオフis:

CADソフトでSTLエクスポート時に、Chordal Tolerance(コード公差)orAngle Tolerance(角度公差)で解像度を制御し。推奨値:コード公差0.01-0.1 mm、角度公差5-15度。

1.3.4 Pythonライブラリによる STL処理

PythonでSTLファイルを扱うための主要ライブラリ:

  1. numpy-stl: HighSTL読込・書込、体積・表面積計算、法線ベクトル操作。シンプルで軽量。
  2. trimesh: 包括的な3Dメッシュ処理ライブラリ。メッシュ修復、ブーリアン演算、レイキャスト、衝突検出。多機能だが依存関係多い。
  3. PyMesh: 高度なメッシュ処理(リメッシュ、サブディビジョン、フィーチャー抽出)。インストールやや複雑。

numpy-stlの基本的な使用法:

# Requirements:
# - Python 3.9+
# - numpy>=1.24.0, <2.0.0

"""
Example: numpy-stlの基本的な使用法:

Purpose: Demonstrate core concepts and implementation patterns
Target: Beginner to Intermediate
Execution time: ~5 seconds
Dependencies: None
"""

from stl import mesh
import numpy as np

# STLファイルを読み込み
your_mesh = mesh.Mesh.from_file('model.stl')

# 基本的な幾何情報
volume, cog, inertia = your_mesh.get_mass_properties()
print(f"Volume: {volume:.2f} mm³")
print(f"Center of Gravity: {cog}")
print(f"Surface Area: {your_mesh.areas.sum():.2f} mm²")

# 三角形数
print(f"Number of Triangles: {len(your_mesh.vectors)}")

1.4 スライシングとツールパス生成

STLファイルを3Dプリンタが理解can指令(G-code)に変換するプロセスをスライシング(Slicing)といい。このセクションでは、スライシングの基本原理、ツールパス戦略、そしてG-codeの基礎を学び。

1.4.1 スライシングの基本原理

スライシングは、3Dモデルを一定の高さ(レイヤー高さ)で水平に切断し、各層の輪郭を抽出するプロセスis:

flowchart TD
    A[3Dモデル
STLファイル] --> B[Z軸方向に
層状にスライス] B --> C[各層の輪郭抽出
Contour Detection] C --> D[シェル生成
Perimeter Path] D --> E[インフィル生成
Infill Path] E --> F[サポート追加
Support Structure] F --> G[ツールパス最適化
Retraction/Travel] G --> H[G-code出力] style A fill:#e3f2fd style H fill:#e8f5e9

Layer Heightの選択

レイヤー高さは造形品質と造形時間のトレードオフdetermine最Importantパラメータis:

レイヤー高さ 造形品質 造形時間 典型的な用途
0.1 mm(極細) very高い(積層痕ほぼ不可視) very長い(×2-3倍) フィギュア、医療モデル、最終製品
0.2 mm(標準) 良好(積層痕は見えるが許容) 標準 一般的なプロトタイプ、機能部品
0.3 mm(粗) 低い(積層痕明瞭) 短い(×0.5倍) 初期プロトタイプ、内部構造部品
⚠️ レイヤー高さの制約

レイヤー高さはノズル径の25-80%に設定する必要があり。Exampleえば0.4mmノズルの場合、レイヤー高さは0.1-0.32mmが推奨範囲is。これを超えると、樹脂の押出量が不足したり、ノズルが前の層を引きずるProblemが発生し。

1.4.2 シェルとインフィル戦略

シェル(外殻)の生成

シェル(Shell/Perimeter)は、各層の外周部を形成する経路is:

インフィル(内部充填)パターン

インフィル(Infill)は内部構造を形成し、強度と材料使用量を制御し:

パターン 強度 印刷速度 材料使用量 特徴
Grid(格子) 速い シンプル、等方性、標準的な選択
Honeycomb(ハニカム) 遅い 高強度、重量比優秀、航空宇宙用途
Gyroid very高 3次元等方性、曲面的、最新の推奨
Concentric(同心円) 速い 柔軟性重視、シェル追従
Lines(直線) 低(異方性) very速い High印刷、方向性強度
💡 インフィル密度の目安

1.4.3 サポート構造の生成

オーバーハング角度が45度を超える部分は、サポート構造(Support Structure)is necessaryis:

サポートのタイプ

サポート設定のImportantパラメータ

パラメータ 推奨値 効果
Overhang Angle 45-60° この角度aboveでサポート生成
Support Density 10-20% 密度が高いほど安定だが除去困難
Support Z Distance 0.2-0.3 mm サポートと造形物の間隔(除去しやすさ)
Interface Layers 2-4層 接合層数(表面品質と除去性のバランス)

1.4.4 G-codeの基礎

G-codeは、3DプリンタやCNCマシンを制御する標準的な数値制御言語is。各行が1つのコマンドを表し:

主要なG-codeコマンド

コマンド 分類 機能 Example
G0 移動 High移動(非押出) G0 X100 Y50 Z10 F6000
G1 移動 直線移動(押出あり) G1 X120 Y60 E0.5 F1200
G28 初期化 ホームポジション復帰 G28 (全軸), G28 Z (Z軸のみ)
M104 温度 ノズル温度設定(非待機) M104 S200
M109 温度 ノズル温度設定(待機) M109 S210
M140 温度 ベッド温度設定(非待機) M140 S60
M190 温度 ベッド温度設定(待機) M190 S60

G-codeのExample(造形開始部分)

; === Start G-code ===
M140 S60       ; ベッドを60°Cに加熱開始(非待機)
M104 S210      ; ノズルを210°Cに加熱開始(非待機)
G28            ; 全軸ホーミング
G29            ; オートレベリング(ベッドメッシュ計測)
M190 S60       ; ベッド温度到達を待機
M109 S210      ; ノズル温度到達を待機
G92 E0         ; 押出量をゼロリセット
G1 Z2.0 F3000  ; Z軸を2mm上昇(安全確保)
G1 X10 Y10 F5000  ; プライム位置へ移動
G1 Z0.3 F3000  ; Z軸を0.3mmへ降下(初層高さ)
G1 X100 E10 F1500 ; プライムライン描画(ノズル詰除去)
G92 E0         ; 押出量を再度ゼロリセット
; === 造形開始 ===

1.4.5 主要スライシングソフトウェア

ソフトウェア ライセンス 特徴 推奨用途
Cura オープンソース 使いやすい、豊富なプリセット、Tree Support標準搭載 初心者〜中級者、FDM汎用
PrusaSlicer オープンソース 高度な設定、変数レイヤー高さ、カスタムサポート 中級者〜上級者、最適化重視
Slic3r オープンソース PrusaSlicerの元祖、軽量 レガシーシステム、研究用途
Simplify3D 商用($150) Highスライシング、マルチプロセス、Details制御 プロフェッショナル、産業用途
IdeaMaker 無料 Raise3D専用だが汎用性高い、直感的UI Raise3Dユーザー、初心者

1.4.6 ツールパス最適化戦略

効率的なツールパスは、造形時間・品質・材料使用量を改善し:

Example 1: STLファイルの読み込みと基本情報取得

# Requirements:
# - Python 3.9+
# - numpy>=1.24.0, <2.0.0

"""
Example: Example 1: STLファイルの読み込みと基本情報取得

Purpose: Demonstrate neural network implementation
Target: Beginner to Intermediate
Execution time: 5-10 seconds
Dependencies: None
"""

# ===================================
# Example 1: STLファイルの読み込みと基本情報取得
# ===================================

import numpy as np
from stl import mesh

# STLファイルを読み込む
your_mesh = mesh.Mesh.from_file('model.stl')

# 基本的な幾何情報を取得
volume, cog, inertia = your_mesh.get_mass_properties()

print("=== STLファイル基本情報 ===")
print(f"Volume: {volume:.2f} mm³")
print(f"Surface Area: {your_mesh.areas.sum():.2f} mm²")
print(f"Center of Gravity: [{cog[0]:.2f}, {cog[1]:.2f}, {cog[2]:.2f}] mm")
print(f"Number of Triangles: {len(your_mesh.vectors)}")

# バウンディングボックス(最小包含直方体)を計算
min_coords = your_mesh.vectors.min(axis=(0, 1))
max_coords = your_mesh.vectors.max(axis=(0, 1))
dimensions = max_coords - min_coords

print(f"\n=== バウンディングボックス ===")
print(f"X: {min_coords[0]:.2f} to {max_coords[0]:.2f} mm (幅: {dimensions[0]:.2f} mm)")
print(f"Y: {min_coords[1]:.2f} to {max_coords[1]:.2f} mm (奥行: {dimensions[1]:.2f} mm)")
print(f"Z: {min_coords[2]:.2f} to {max_coords[2]:.2f} mm (高さ: {dimensions[2]:.2f} mm)")

# 造形時間の簡易推定(レイヤー高さ0.2mm、速度50mm/sと仮定)
layer_height = 0.2  # mm
print_speed = 50    # mm/s
num_layers = int(dimensions[2] / layer_height)
# 簡易計算: 表面積に基づく推定
estimated_path_length = your_mesh.areas.sum() / layer_height  # mm
estimated_time_seconds = estimated_path_length / print_speed
estimated_time_minutes = estimated_time_seconds / 60

print(f"\n=== 造形推定 ===")
print(f"レイヤー数(0.2mm/層): {num_layers} 層")
print(f"推定造形時間: {estimated_time_minutes:.1f} 分 ({estimated_time_minutes/60:.2f} 時間)")

# 出力Example:
# === STLファイル基本情報 ===
# Volume: 12450.75 mm³
# Surface Area: 5832.42 mm²
# Center of Gravity: [25.34, 18.92, 15.67] mm
# Number of Triangles: 2456
#
# === バウンディングボックス ===
# X: 0.00 to 50.00 mm (幅: 50.00 mm)
# Y: 0.00 to 40.00 mm (奥行: 40.00 mm)
# Z: 0.00 to 30.00 mm (高さ: 30.00 mm)
#
# === 造形推定 ===
# レイヤー数(0.2mm/層): 150 層
# 推定造形時間: 97.2 分 (1.62 時間)

Example 2: メッシュの法線ベクトル検証

# Requirements:
# - Python 3.9+
# - numpy>=1.24.0, <2.0.0

# ===================================
# Example 2: メッシュの法線ベクトル検証
# ===================================

import numpy as np
from stl import mesh

def check_normals(mesh_data):
    """STLメッシュの法線ベクトルの整合性をチェック

    Args:
        mesh_data: numpy-stlのMeshオブジェクト

    Returns:
        tuple: (flipped_count, total_count, percentage)
    """
    # 右手系ルールで法線方向を確認
    flipped_count = 0
    total_count = len(mesh_data.vectors)

    for i, facet in enumerate(mesh_data.vectors):
        v0, v1, v2 = facet

        # エッジベクトルを計算
        edge1 = v1 - v0
        edge2 = v2 - v0

        # 外積で法線を計算(右手系)
        calculated_normal = np.cross(edge1, edge2)

        # 正規化
        norm = np.linalg.norm(calculated_normal)
        if norm > 1e-10:  # ゼロベクトルでないことを確認
            calculated_normal = calculated_normal / norm
        else:
            continue  # 縮退三角形をスキップ

        # ファイルに保存されている法線と比較
        stored_normal = mesh_data.normals[i]
        stored_norm = np.linalg.norm(stored_normal)

        if stored_norm > 1e-10:
            stored_normal = stored_normal / stored_norm

        # 内積で方向の一致をチェック
        dot_product = np.dot(calculated_normal, stored_normal)

        # 内積が負なら逆向き
        if dot_product < 0:
            flipped_count += 1

    percentage = (flipped_count / total_count) * 100 if total_count > 0 else 0

    return flipped_count, total_count, percentage

# STLファイルを読み込み
your_mesh = mesh.Mesh.from_file('model.stl')

# 法線チェックを実行
flipped, total, percent = check_normals(your_mesh)

print("=== 法線ベクトル検証結果 ===")
print(f"総三角形数: {total}")
print(f"反転法線数: {flipped}")
print(f"反転率: {percent:.2f}%")

if flipped == 0:
    print("\n✅ すべての法線が正しい方向を向いてい")
    print("   このメッシュは3Dプリント可能is")
elif percent < 5:
    print("\n⚠️ 一部の法線が反転してい(軽微)")
    print("   スライサーが自動修正する可能性が高い")
else:
    print("\n❌ 多数の法線が反転してい(重大)")
    print("   メッシュ修復ツール(Meshmixer, netfabb)での修正を推奨")

# 出力Example:
# === 法線ベクトル検証結果 ===
# 総三角形数: 2456
# 反転法線数: 0
# 反転率: 0.00%
#
# ✅ すべての法線が正しい方向を向いてい
#    このメッシュは3Dプリント可能is

Example 3: マニフォールド性のチェック

# ===================================
# Example 3: マニフォールド性(Watertight)のチェック
# ===================================

import trimesh

# STLファイルを読み込み(trimeshは自動で修復を試みる)
mesh = trimesh.load('model.stl')

print("=== メッシュ品質診断 ===")

# 基本情報
print(f"Vertex count: {len(mesh.vertices)}")
print(f"Face count: {len(mesh.faces)}")
print(f"Volume: {mesh.volume:.2f} mm³")

# マニフォールド性をチェック
print(f"\n=== 3Dプリント適性チェック ===")
print(f"Is watertight (密閉性): {mesh.is_watertight}")
print(f"Is winding consistent (法線一致性): {mesh.is_winding_consistent}")
print(f"Is valid (幾何的妥当性): {mesh.is_valid}")

# ProblemのDetailsを診断
if not mesh.is_watertight:
    # 穴(hole)の数を検出
    try:
        edges = mesh.edges_unique
        edges_sorted = mesh.edges_sorted
        duplicate_edges = len(edges_sorted) - len(edges)
        print(f"\n⚠️ Problem検出:")
        print(f"   - メッシュに穴があり")
        print(f"   - 重複エッジ数: {duplicate_edges}")
    except:
        print(f"\n⚠️ メッシュ構造にProblemがあり")

# 修復を試みる
if not mesh.is_watertight or not mesh.is_winding_consistent:
    print(f"\n🔧 自動修復を実行中...")

    # 法線を修正
    trimesh.repair.fix_normals(mesh)
    print("   ✓ 法線ベクトルを修正")

    # 穴を埋める
    trimesh.repair.fill_holes(mesh)
    print("   ✓ 穴を充填")

    # 縮退三角形を削除
    mesh.remove_degenerate_faces()
    print("   ✓ 縮退面を削除")

    # 重複頂点を結合
    mesh.merge_vertices()
    print("   ✓ 重複頂点を結合")

    # 修復後の状態を確認
    print(f"\n=== 修復後の状態 ===")
    print(f"Is watertight: {mesh.is_watertight}")
    print(f"Is winding consistent: {mesh.is_winding_consistent}")

    # 修復したメッシュを保存
    if mesh.is_watertight:
        mesh.export('model_repaired.stl')
        print(f"\n✅ 修復完了! model_repaired.stl として保存しました")
    else:
        print(f"\n❌ 自動修復失敗。Meshmixer等の専用ツールを推奨")
else:
    print(f"\n✅ このメッシュは3Dプリント可能is")

# 出力Example:
# === メッシュ品質診断 ===
# Vertex count: 1534
# Face count: 2456
# Volume: 12450.75 mm³
#
# === 3Dプリント適性チェック ===
# Is watertight (密閉性): True
# Is winding consistent (法線一致性): True
# Is valid (幾何的妥当性): True
#
# ✅ このメッシュは3Dプリント可能is

Example 4: 基本的なスライシングアルゴリズム

# Requirements:
# - Python 3.9+
# - numpy>=1.24.0, <2.0.0

# ===================================
# Example 4: 基本的なスライシングアルゴリズム
# ===================================

import numpy as np
from stl import mesh

def slice_mesh_at_height(mesh_data, z_height):
    """温度プロファイルを生成

    Args:
        t (array): 時間配列 [min]
        T_target (float): 保持温度 [°C]
        heating_rate (float): 加熱速度 [°C/min]
        hold_time (float): 保持時間 [min]
        cooling_rate (float): 冷却速度 [°C/min]

    Returns:
        array: 温度プロファイル [°C]
    """
    T_room = 25  # 室温
    T = np.zeros_like(t)

    # 加熱時間
    t_heat = (T_target - T_room) / heating_rate

    # 冷却開始時刻
    t_cool_start = t_heat + hold_time

    for i, time in enumerate(t):
        if time <= t_heat:
            # 加熱フェーズ
            T[i] = T_room + heating_rate * time
        elif time <= t_cool_start:
            # 保持フェーズ
            T[i] = T_target
        else:
            # 冷却フェーズ
            T[i] = T_target - cooling_rate * (time - t_cool_start)
            T[i] = max(T[i], T_room)  # 室温followingにはならない

    return T

def simulate_reaction_progress(T, t, Ea, D0, r0):
    """温度プロファイルに基づく反応進行を計算

    Args:
        T (array): 温度プロファイル [°C]
        t (array): 時間配列 [min]
        Ea (float): 活性化エネルギー [J/mol]
        D0 (float): 頻度因子 [m²/s]
        r0 (float): 粒子半径 [m]

    Returns:
        array: 反応率
    """
    R = 8.314
    C0 = 10000
    alpha = np.zeros_like(t)

    for i in range(1, len(t)):
        T_k = T[i] + 273.15
        D = D0 * np.exp(-Ea / (R * T_k))
        k = D * C0 / r0**2

        dt = (t[i] - t[i-1]) * 60  # min → s

        # 簡易積分(微小時間での反応進行)
        if alpha[i-1] < 0.99:
            dalpha = k * dt / (2 * (1 - (1-alpha[i-1])**(1/3)))
            alpha[i] = min(alpha[i-1] + dalpha, 1.0)
        else:
            alpha[i] = alpha[i-1]

    return alpha

# パラメータ設定
T_target = 1200  # °C
hold_time = 240  # min (4 hours)
Ea = 300e3  # J/mol
D0 = 5e-4  # m²/s
r0 = 5e-6  # m

# 異なる加熱速度での比較
heating_rates = [2, 5, 10, 20]  # °C/min
cooling_rate = 3  # °C/min

# 時間配列
t_max = 800  # min
t = np.linspace(0, t_max, 2000)

# プロット
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 10))

# 温度プロファイル
for hr in heating_rates:
    T_profile = temperature_profile(t, T_target, hr, hold_time, cooling_rate)
    ax1.plot(t/60, T_profile, linewidth=2, label=f'{hr}°C/min')

ax1.set_xlabel('Time (hours)', fontsize=12)
ax1.set_ylabel('Temperature (°C)', fontsize=12)
ax1.set_title('Temperature Profiles', fontsize=14, fontweight='bold')
ax1.legend(fontsize=10)
ax1.grid(True, alpha=0.3)
ax1.set_xlim([0, t_max/60])

# 反応進行
for hr in heating_rates:
    T_profile = temperature_profile(t, T_target, hr, hold_time, cooling_rate)
    alpha = simulate_reaction_progress(T_profile, t, Ea, D0, r0)
    ax2.plot(t/60, alpha, linewidth=2, label=f'{hr}°C/min')

ax2.axhline(y=0.95, color='red', linestyle='--', linewidth=1, label='Target (95%)')
ax2.set_xlabel('Time (hours)', fontsize=12)
ax2.set_ylabel('Conversion', fontsize=12)
ax2.set_title('Reaction Progress', fontsize=14, fontweight='bold')
ax2.legend(fontsize=10)
ax2.grid(True, alpha=0.3)
ax2.set_xlim([0, t_max/60])
ax2.set_ylim([0, 1])

plt.tight_layout()
plt.savefig('temperature_profile_optimization.png', dpi=300, bbox_inches='tight')
plt.show()

# 各加熱速度での95%反応到達時間を計算
print("\n95%反応到達時間の比較:")
print("=" * 60)
for hr in heating_rates:
    T_profile = temperature_profile(t, T_target, hr, hold_time, cooling_rate)
    alpha = simulate_reaction_progress(T_profile, t, Ea, D0, r0)

    # 95%到達時刻
    idx_95 = np.where(alpha >= 0.95)[0]
    if len(idx_95) > 0:
        t_95 = t[idx_95[0]] / 60
        print(f"加熱速度 {hr:2d}°C/min: t₉₅ = {t_95:.1f} hours")
    else:
        print(f"加熱速度 {hr:2d}°C/min: 反応不完全")

# 出力Example:
# 95%反応到達時間の比較:
# ============================================================
# 加熱速度  2°C/min: t₉₅ = 7.8 hours
# 加熱速度  5°C/min: t₉₅ = 7.2 hours
# 加熱速度 10°C/min: t₉₅ = 6.9 hours
# 加熱速度 20°C/min: t₉₅ = 6.7 hours

ExerciseProblem

1.5.1 pycalphadとは

pycalphadは、CALPHAD(CALculation of PHAse Diagrams)法に基づく相図計算forのPythonライブラリis。熱力学データベースから平衡相を計算し、反応経路の設計に有用is。

💡 CALPHAD法の利点

1.5.2 二元系相図の計算Example

# ===================================
# Example 5: pycalphadで相図計算
# ===================================

# Note: pycalphadのインストールis necessary
# pip install pycalphad

from pycalphad import Database, equilibrium, variables as v
import matplotlib.pyplot as plt
import numpy as np

# TDBデータベースを読み込み(ここでは簡易的なExample)
# 実際には適切なTDBファイルis necessary
# Example: BaO-TiO2系

# 簡易的なTDB文字列(実際はより複雑)
tdb_string = """
$ BaO-TiO2 system (simplified)
ELEMENT BA   BCC_A2  137.327   !
ELEMENT TI   HCP_A3   47.867   !
ELEMENT O    GAS      15.999   !

FUNCTION GBCCBA   298.15  +GHSERBA;   6000 N !
FUNCTION GHCPTI   298.15  +GHSERTI;   6000 N !
FUNCTION GGASO    298.15  +GHSERO;    6000 N !

PHASE LIQUID:L %  1  1.0  !
PHASE BAO_CUBIC %  2  1 1  !
PHASE TIO2_RUTILE %  2  1 2  !
PHASE BATIO3 %  3  1 1 3  !
"""

# 注: 実際の計算には正式なTDBファイルis necessary
# ここでは概念的な説明に留める

print("pycalphadによる相図計算の概念:")
print("=" * 60)
print("1. TDBデータベース(熱力学データ)を読み込む")
print("2. 温度・組成範囲を設定")
print("3. 平衡計算を実行")
print("4. 安定相を可視化")
print()
print("実際の適用Example:")
print("- BaO-TiO2系: BaTiO3の形成温度・組成範囲")
print("- Si-N系: Si3N4の安定領域")
print("- 多元系セラミックスの相関係")

# 概念的なプロット(実データに基づくイメージ)
fig, ax = plt.subplots(figsize=(10, 7))

# 温度範囲
T = np.linspace(800, 1600, 100)

# 各相の安定領域(概念図)
# BaO + TiO2 → BaTiO3 反応
BaO_region = np.ones_like(T) * 0.3
TiO2_region = np.ones_like(T) * 0.7
BaTiO3_region = np.where((T > 1100) & (T < 1400), 0.5, np.nan)

ax.fill_between(T, 0, BaO_region, alpha=0.3, color='blue', label='BaO + TiO2')
ax.fill_between(T, BaO_region, TiO2_region, alpha=0.3, color='green',
                label='BaTiO3 stable')
ax.fill_between(T, TiO2_region, 1, alpha=0.3, color='red', label='Liquid')

ax.axhline(y=0.5, color='black', linestyle='--', linewidth=2,
           label='BaTiO3 composition')
ax.axvline(x=1100, color='gray', linestyle=':', linewidth=1, alpha=0.5)
ax.axvline(x=1400, color='gray', linestyle=':', linewidth=1, alpha=0.5)

ax.set_xlabel('Temperature (°C)', fontsize=12)
ax.set_ylabel('Composition (BaO mole fraction)', fontsize=12)
ax.set_title('Conceptual Phase Diagram: BaO-TiO2', fontsize=14, fontweight='bold')
ax.legend(fontsize=10, loc='upper right')
ax.grid(True, alpha=0.3)
ax.set_xlim([800, 1600])
ax.set_ylim([0, 1])

# テキスト注釈
ax.text(1250, 0.5, 'BaTiO₃\nformation\nregion',
        fontsize=11, ha='center', va='center',
        bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.7))

plt.tight_layout()
plt.savefig('phase_diagram_concept.png', dpi=300, bbox_inches='tight')
plt.show()

# 実際の使用Example(コメントアウト)
"""
# 実際のpycalphad使用Example
db = Database('BaO-TiO2.tdb')  # TDBファイル読み込み

# 平衡計算
eq = equilibrium(db, ['BA', 'TI', 'O'], ['LIQUID', 'BATIO3'],
                 {v.X('BA'): (0, 1, 0.01),
                  v.T: (1000, 1600, 50),
                  v.P: 101325})

# 結果プロット
eq.plot()
"""

1.6 実験計画法(DOE)による条件最適化

1.6.1 DOEとは

実験計画法(Design of Experiments, DOE)は、複数のパラメータが相互作用する系で、最小の実験回数で最適条件を見つける統計手法is。

固相反応で最適化should主要パラメータ:

1.6.2 応答曲面法(Response Surface Methodology)

# Requirements:
# - Python 3.9+
# - matplotlib>=3.7.0
# - numpy>=1.24.0, <2.0.0

# ===================================
# Example 6: DOEによる条件最適化
# ===================================

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from scipy.optimize import minimize

# 仮想的な反応率モデル(温度と時間の関数)
def reaction_yield(T, t, noise=0):
    """温度と時間から反応率を計算(仮想モデル)

    Args:
        T (float): 温度 [°C]
        t (float): 時間 [hours]
        noise (float): ノイズレベル

    Returns:
        float: 反応率 [%]
    """
    # 最適値: T=1200°C, t=6 hours
    T_opt = 1200
    t_opt = 6

    # 二次モデル(ガウス型)
    yield_val = 100 * np.exp(-((T-T_opt)/150)**2 - ((t-t_opt)/3)**2)

    # ノイズ追加
    if noise > 0:
        yield_val += np.random.normal(0, noise)

    return np.clip(yield_val, 0, 100)

# 実験点配置(中心複合計画法)
T_levels = [1000, 1100, 1200, 1300, 1400]  # °C
t_levels = [2, 4, 6, 8, 10]  # hours

# グリッドで実験点を配置
T_grid, t_grid = np.meshgrid(T_levels, t_levels)
yield_grid = np.zeros_like(T_grid, dtype=float)

# 各実験点で反応率を測定(シミュレーション)
for i in range(len(t_levels)):
    for j in range(len(T_levels)):
        yield_grid[i, j] = reaction_yield(T_grid[i, j], t_grid[i, j], noise=2)

# 結果の表示
print("実験計画法による反応条件最適化")
print("=" * 70)
print(f"{'Temperature (°C)':<20} {'Time (hours)':<20} {'Yield (%)':<20}")
print("-" * 70)
for i in range(len(t_levels)):
    for j in range(len(T_levels)):
        print(f"{T_grid[i, j]:<20} {t_grid[i, j]:<20} {yield_grid[i, j]:<20.1f}")

# 最大反応率の条件を探す
max_idx = np.unravel_index(np.argmax(yield_grid), yield_grid.shape)
T_best = T_grid[max_idx]
t_best = t_grid[max_idx]
yield_best = yield_grid[max_idx]

print("-" * 70)
print(f"最適条件: T = {T_best}°C, t = {t_best} hours")
print(f"最大反応率: {yield_best:.1f}%")

# 3Dプロット
fig = plt.figure(figsize=(14, 6))

# 3D表面プロット
ax1 = fig.add_subplot(121, projection='3d')
T_fine = np.linspace(1000, 1400, 50)
t_fine = np.linspace(2, 10, 50)
T_mesh, t_mesh = np.meshgrid(T_fine, t_fine)
yield_mesh = np.zeros_like(T_mesh)

for i in range(len(t_fine)):
    for j in range(len(T_fine)):
        yield_mesh[i, j] = reaction_yield(T_mesh[i, j], t_mesh[i, j])

surf = ax1.plot_surface(T_mesh, t_mesh, yield_mesh, cmap='viridis',
                        alpha=0.8, edgecolor='none')
ax1.scatter(T_grid, t_grid, yield_grid, color='red', s=50,
            label='Experimental points')

ax1.set_xlabel('Temperature (°C)', fontsize=10)
ax1.set_ylabel('Time (hours)', fontsize=10)
ax1.set_zlabel('Yield (%)', fontsize=10)
ax1.set_title('Response Surface', fontsize=12, fontweight='bold')
ax1.view_init(elev=25, azim=45)
fig.colorbar(surf, ax=ax1, shrink=0.5, aspect=5)

# 等高線プロット
ax2 = fig.add_subplot(122)
contour = ax2.contourf(T_mesh, t_mesh, yield_mesh, levels=20, cmap='viridis')
ax2.contour(T_mesh, t_mesh, yield_mesh, levels=10, colors='black',
            alpha=0.3, linewidths=0.5)
ax2.scatter(T_grid, t_grid, c=yield_grid, s=100, edgecolors='red',
            linewidths=2, cmap='viridis')
ax2.scatter(T_best, t_best, color='red', s=300, marker='*',
            edgecolors='white', linewidths=2, label='Optimum')

ax2.set_xlabel('Temperature (°C)', fontsize=11)
ax2.set_ylabel('Time (hours)', fontsize=11)
ax2.set_title('Contour Map', fontsize=12, fontweight='bold')
ax2.legend(fontsize=10)
fig.colorbar(contour, ax=ax2, label='Yield (%)')

plt.tight_layout()
plt.savefig('doe_optimization.png', dpi=300, bbox_inches='tight')
plt.show()

1.6.3 実験計画の実践的アプローチ

実際の固相反応では、followingの手順でDOEを適用し:

  1. スクリーニング実験(2水準要因計画法): 影響の大きいパラメータを特定
  2. 応答曲面法(中心複合計画法): 最適条件の探索
  3. 確認実験: 予測された最適条件で実験し、モデルを検証
✅ 実Example: Li-ion電池正極材LiCoO₂の合成最適化

ある研究グループがDOEusingLiCoO₂の合成条件を最適化した結果:

1.7 反応速度曲線のフィッティング

1.7.1 実験データからの速度定数決定

# Requirements:
# - Python 3.9+
# - matplotlib>=3.7.0
# - numpy>=1.24.0, <2.0.0

"""
Example: 1.7.1 実験データからの速度定数決定

Purpose: Demonstrate data visualization techniques
Target: Intermediate
Execution time: 10-30 seconds
Dependencies: None
"""

# ===================================
# Example 7: 反応速度曲線フィッティング
# ===================================

import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit

# 実験データ(時間 vs 反応率)
# Example: BaTiO3合成 @ 1200°C
time_exp = np.array([0, 1, 2, 3, 4, 6, 8, 10, 12, 15, 20])  # hours
conversion_exp = np.array([0, 0.15, 0.28, 0.38, 0.47, 0.60,
                          0.70, 0.78, 0.84, 0.90, 0.95])

# Jander式モデル
def jander_model(t, k):
    """Jander式による反応率計算

    Args:
        t (array): 時間 [hours]
        k (float): 速度定数

    Returns:
        array: 反応率
    """
    # [1 - (1-α)^(1/3)]² = kt を α about解く
    kt = k * t
    alpha = 1 - (1 - np.sqrt(kt))**3
    alpha = np.clip(alpha, 0, 1)  # 0-1の範囲に制限
    return alpha

# Ginstling-Brounshtein式(別の拡散モデル)
def gb_model(t, k):
    """Ginstling-Brounshtein式

    Args:
        t (array): 時間
        k (float): 速度定数

    Returns:
        array: 反応率
    """
    # 1 - 2α/3 - (1-α)^(2/3) = kt
    # 数値的に解く必要があるが、ここでは近似式を使用
    kt = k * t
    alpha = 1 - (1 - kt/2)**(3/2)
    alpha = np.clip(alpha, 0, 1)
    return alpha

# Power law (経験式)
def power_law_model(t, k, n):
    """べき乗則モデル

    Args:
        t (array): 時間
        k (float): 速度定数
        n (float): 指数

    Returns:
        array: 反応率
    """
    alpha = k * t**n
    alpha = np.clip(alpha, 0, 1)
    return alpha

# 各モデルでフィッティング
# Jander式
popt_jander, _ = curve_fit(jander_model, time_exp, conversion_exp, p0=[0.01])
k_jander = popt_jander[0]

# Ginstling-Brounshtein式
popt_gb, _ = curve_fit(gb_model, time_exp, conversion_exp, p0=[0.01])
k_gb = popt_gb[0]

# Power law
popt_power, _ = curve_fit(power_law_model, time_exp, conversion_exp, p0=[0.1, 0.5])
k_power, n_power = popt_power

# 予測曲線生成
t_fit = np.linspace(0, 20, 200)
alpha_jander = jander_model(t_fit, k_jander)
alpha_gb = gb_model(t_fit, k_gb)
alpha_power = power_law_model(t_fit, k_power, n_power)

# 残差計算
residuals_jander = conversion_exp - jander_model(time_exp, k_jander)
residuals_gb = conversion_exp - gb_model(time_exp, k_gb)
residuals_power = conversion_exp - power_law_model(time_exp, k_power, n_power)

# R²計算
def r_squared(y_true, y_pred):
    ss_res = np.sum((y_true - y_pred)**2)
    ss_tot = np.sum((y_true - np.mean(y_true))**2)
    return 1 - (ss_res / ss_tot)

r2_jander = r_squared(conversion_exp, jander_model(time_exp, k_jander))
r2_gb = r_squared(conversion_exp, gb_model(time_exp, k_gb))
r2_power = r_squared(conversion_exp, power_law_model(time_exp, k_power, n_power))

# プロット
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 6))

# フィッティング結果
ax1.plot(time_exp, conversion_exp, 'ko', markersize=8, label='Experimental data')
ax1.plot(t_fit, alpha_jander, 'b-', linewidth=2,
         label=f'Jander (R²={r2_jander:.4f})')
ax1.plot(t_fit, alpha_gb, 'r-', linewidth=2,
         label=f'Ginstling-Brounshtein (R²={r2_gb:.4f})')
ax1.plot(t_fit, alpha_power, 'g-', linewidth=2,
         label=f'Power law (R²={r2_power:.4f})')

ax1.set_xlabel('Time (hours)', fontsize=12)
ax1.set_ylabel('Conversion', fontsize=12)
ax1.set_title('Kinetic Model Fitting', fontsize=14, fontweight='bold')
ax1.legend(fontsize=10)
ax1.grid(True, alpha=0.3)
ax1.set_xlim([0, 20])
ax1.set_ylim([0, 1])

# 残差プロット
ax2.plot(time_exp, residuals_jander, 'bo-', label='Jander')
ax2.plot(time_exp, residuals_gb, 'ro-', label='Ginstling-Brounshtein')
ax2.plot(time_exp, residuals_power, 'go-', label='Power law')
ax2.axhline(y=0, color='black', linestyle='--', linewidth=1)

ax2.set_xlabel('Time (hours)', fontsize=12)
ax2.set_ylabel('Residuals', fontsize=12)
ax2.set_title('Residual Plot', fontsize=14, fontweight='bold')
ax2.legend(fontsize=10)
ax2.grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('kinetic_fitting.png', dpi=300, bbox_inches='tight')
plt.show()

# 結果サマリー
print("\n反応速度モデルのフィッティングResult:")
print("=" * 70)
print(f"{'Model':<25} {'Parameter':<30} {'R²':<10}")
print("-" * 70)
print(f"{'Jander':<25} {'k = ' + f'{k_jander:.4f} h⁻¹':<30} {r2_jander:.4f}")
print(f"{'Ginstling-Brounshtein':<25} {'k = ' + f'{k_gb:.4f} h⁻¹':<30} {r2_gb:.4f}")
print(f"{'Power law':<25} {'k = ' + f'{k_power:.4f}, n = {n_power:.4f}':<30} {r2_power:.4f}")
print("=" * 70)
print(f"\n最適モデル: {'Jander' if r2_jander == max(r2_jander, r2_gb, r2_power) else 'GB' if r2_gb == max(r2_jander, r2_gb, r2_power) else 'Power law'}")

# 出力Example:
# 反応速度モデルのフィッティングResult:
# ======================================================================
# Model                     Parameter                      R²
# ----------------------------------------------------------------------
# Jander                    k = 0.0289 h⁻¹                 0.9953
# Ginstling-Brounshtein     k = 0.0412 h⁻¹                 0.9867
# Power law                 k = 0.2156, n = 0.5234         0.9982
# ======================================================================
#
# 最適モデル: Power law

1.8 高度なトピック: 微細構造制御

1.8.1 粒成長の抑制

固相反応では、高温・長時間保持by望ましくない粒成長が起こり。これを抑制する戦略:

1.8.2 反応の機械化学的活性化

メカノケミカル法(高エネルギーボールミル)by、固相反応を室温付近で進行させることも可能is:

# Requirements:
# - Python 3.9+
# - matplotlib>=3.7.0
# - numpy>=1.24.0, <2.0.0

# ===================================
# Example 8: 粒成長シミュレーション
# ===================================

import numpy as np
import matplotlib.pyplot as plt

def grain_growth(t, T, D0, Ea, G0, n):
    """粒成長の時間発展

    Burke-Turnbull式: G^n - G0^n = k*t

    Args:
        t (array): 時間 [hours]
        T (float): 温度 [K]
        D0 (float): 頻度因子
        Ea (float): 活性化エネルギー [J/mol]
        G0 (float): 初期粒径 [μm]
        n (float): 粒成長指数(typically2-4)

    Returns:
        array: 粒径 [μm]
    """
    R = 8.314
    k = D0 * np.exp(-Ea / (R * T))
    G = (G0**n + k * t * 3600)**(1/n)  # hours → seconds
    return G

# パラメータ設定
D0_grain = 1e8  # μm^n/s
Ea_grain = 400e3  # J/mol
G0 = 0.5  # μm
n = 3

# 温度の影響
temps_celsius = [1100, 1200, 1300]
t_range = np.linspace(0, 12, 100)  # 0-12 hours

plt.figure(figsize=(12, 5))

# 温度依存性
plt.subplot(1, 2, 1)
for T_c in temps_celsius:
    T_k = T_c + 273.15
    G = grain_growth(t_range, T_k, D0_grain, Ea_grain, G0, n)
    plt.plot(t_range, G, linewidth=2, label=f'{T_c}°C')

plt.axhline(y=1.0, color='red', linestyle='--', linewidth=1,
            label='Target grain size')
plt.xlabel('Time (hours)', fontsize=12)
plt.ylabel('Grain Size (μm)', fontsize=12)
plt.title('Grain Growth at Different Temperatures', fontsize=14, fontweight='bold')
plt.legend(fontsize=10)
plt.grid(True, alpha=0.3)
plt.ylim([0, 5])

# Two-step sinteringの効果
plt.subplot(1, 2, 2)

# Conventional sintering: 1300°C, 6 hours
t_conv = np.linspace(0, 6, 100)
T_conv = 1300 + 273.15
G_conv = grain_growth(t_conv, T_conv, D0_grain, Ea_grain, G0, n)

# Two-step: 1300°C 1h → 1200°C 5h
t1 = np.linspace(0, 1, 20)
G1 = grain_growth(t1, 1300+273.15, D0_grain, Ea_grain, G0, n)
G_intermediate = G1[-1]

t2 = np.linspace(0, 5, 80)
G2 = grain_growth(t2, 1200+273.15, D0_grain, Ea_grain, G_intermediate, n)

t_two_step = np.concatenate([t1, t2 + 1])
G_two_step = np.concatenate([G1, G2])

plt.plot(t_conv, G_conv, 'r-', linewidth=2, label='Conventional (1300°C)')
plt.plot(t_two_step, G_two_step, 'b-', linewidth=2, label='Two-step (1300°C→1200°C)')
plt.axvline(x=1, color='gray', linestyle=':', linewidth=1, alpha=0.5)

plt.xlabel('Time (hours)', fontsize=12)
plt.ylabel('Grain Size (μm)', fontsize=12)
plt.title('Two-Step Sintering Strategy', fontsize=14, fontweight='bold')
plt.legend(fontsize=10)
plt.grid(True, alpha=0.3)
plt.ylim([0, 5])

plt.tight_layout()
plt.savefig('grain_growth_control.png', dpi=300, bbox_inches='tight')
plt.show()

# 最終粒径の比較
G_final_conv = grain_growth(6, 1300+273.15, D0_grain, Ea_grain, G0, n)
G_final_two_step = G_two_step[-1]

print("\n粒成長の比較:")
print("=" * 50)
print(f"Conventional (1300°C, 6h): {G_final_conv:.2f} μm")
print(f"Two-step (1300°C 1h + 1200°C 5h): {G_final_two_step:.2f} μm")
print(f"粒径抑制効果: {(1 - G_final_two_step/G_final_conv)*100:.1f}%")

# 出力Example:
# 粒成長の比較:
# ==================================================
# Conventional (1300°C, 6h): 4.23 μm
# Two-step (1300°C 1h + 1200°C 5h): 2.87 μm
# 粒径抑制効果: 32.2%

学習目標の確認

Upon completing this chapter, you will be able to explain:

基本理解

実践スキル

応用力

ExerciseProblem

Easy(基礎確認)

Q1: STLファイル形式の理解

STLファイルのASCII形式とBinary形式about、正しい説明はどれisか?

a) ASCII形式の方がファイルサイズが小さい
b) Binary形式は人間が直接読めるテキスト形式
c) Binary形式はtypicallyASCII形式の5-10倍小さいファイルサイズ
d) Binary形式はASCII形式より精度が低い

Solutionを表示

正解: c) Binary形式はtypicallyASCII形式の5-10倍小さいファイルサイズ

解説:

実Example: 10,000三角形のモデル → ASCII: 約7MB、Binary: 約0.5MB

Q2: 造形時間の簡易計算

体積12,000 mm³、高さ30 mmの造形物を、レイヤー高さ0.2 mm、印刷速度50 mm/sで造形し。おおよその造形時間はどれisか?(インフィル20%、壁2層と仮定)

a) 30分
b) 60分
c) 90分
d) 120分

Solutionを表示

正解: c) 90分(約1.5時間)

計算手順:

  1. レイヤー数: 高さ30mm ÷ レイヤー高さ0.2mm = 150層
  2. 1層あたりの経路長さの推定:
    • 体積12,000mm³ → 1層あたり平均80mm³
    • 壁(シェル): 約200mm/層(ノズル径0.4mmと仮定)
    • インフィル20%: 約100mm/層
    • 合計: 約300mm/層
  3. 総経路長: 300mm/層 × 150層 = 45,000mm = 45m
  4. 印刷時間: 45,000mm ÷ 50mm/s = 900秒 = 15分
  5. 実際の時間: 移動時間・リトラクション・加減速considerと約5-6倍 → 75-90分

ポイント: スライサーソフトが提供する推定時間は、加減速・移動・温度安定化を含むため、単純計算の4-6倍程度になり。

Q3: AMプロセスの選択

次の用途に最適なAMプロセスを選んでください:「航空機エンジン部品のチタン合金製燃料噴射ノズル、複雑な内部流路、高強度・高耐熱性要求」

a) FDM (Fused Deposition Modeling)
b) SLA (Stereolithography)
c) SLM (Selective Laser Melting)
d) Energy Source

Solutionを表示

正解: c) SLM (Selective Laser Melting / EBM for Metal)

理由:

実Example: GE AviationのLEAP燃料ノズル(SLM製)は、従来20部品を溶接していたものを1部品に統合、重量25%削減、耐久性5倍向上を達成。

Medium(応用)

Q4: PythonでSTLメッシュを検証

followingのPythonコードを完成させて、STLファイルのマニフォールド性(watertight)を検証してください。

import trimesh

mesh = trimesh.load('model.stl')

# ここにコードを追加: マニフォールド性をチェックし、
# Problemがあれば自動修復を行い、修復後のメッシュを
# 'model_fixed.stl'として保存してください
Solutionを表示

SolutionExample:

import trimesh

mesh = trimesh.load('model.stl')

# マニフォールド性をチェック
print(f"Is watertight: {mesh.is_watertight}")
print(f"Is winding consistent: {mesh.is_winding_consistent}")

# Problemがある場合は修復
if not mesh.is_watertight or not mesh.is_winding_consistent:
    print("メッシュ修復を実行中...")

    # 法線を修正
    trimesh.repair.fix_normals(mesh)

    # 穴を埋める
    trimesh.repair.fill_holes(mesh)

    # 縮退三角形を削除
    mesh.remove_degenerate_faces()

    # 重複頂点を結合
    mesh.merge_vertices()

    # 修復結果を確認
    print(f"修復後 watertight: {mesh.is_watertight}")

    # 修復したメッシュを保存
    if mesh.is_watertight:
        mesh.export('model_fixed.stl')
        print("修復完了: model_fixed.stl として保存")
    else:
        print("⚠️ 自動修復失敗。Meshmixer等usingください")
else:
    print("✓ メッシュは3Dプリント可能is")

解説:

実践ポイント: trimeshでも修復できない複雑なProblemは、Meshmixer、Netfabb、MeshLabetc.の専用ツールis necessaryis。

Q5: サポート材料の体積計算

直径40mm、高さ30mmの円柱を、底面から45度の角度で傾けて造形し。サポート密度15%、レイヤー高さ0.2mmと仮定して、おおよそのサポート材料体積を推定してください。

Solutionを表示

Solutionプロセス:

  1. サポートis necessaryな領域の特定:
    • 45度傾斜 → 円柱底面の約半分がオーバーハング(45度aboveの傾斜)
    • 円柱を45度傾けると、片側が浮いた状態になる
  2. サポート領域の幾何計算:
    • 円柱の投影面積: π × (20mm)² ≈ 1,257 mm²
    • 45度傾斜時のサポート必要面積: 約1,257mm² × 0.5 = 629 mm²
    • サポート高さ: 最大で約 30mm × sin(45°) ≈ 21mm
    • サポート体積(密度100%と仮定): 629mm² × 21mm ÷ 2(三角形状)≈ 6,600 mm³
  3. サポート密度15%を考慮:
    • 実際のサポート材料: 6,600mm³ × 0.15 = 約990 mm³
  4. 検証:
    • 円柱本体の体積: π × 20² × 30 ≈ 37,700 mm³
    • サポート/本体比: 990 / 37,700 ≈ 2.6%(妥当な範囲)

答え: 約1,000 mm³ (990 mm³)

実践的考察:

Q6: レイヤー高さの最適化

高さ60mmの造形物を、品質と時間のバランスを考慮して造形し。レイヤー高さ0.1mm、0.2mm、0.3mmの3つの選択肢がある場合、それぞれの造形時間比と推奨用途を説明してください。

Solutionを表示

Solution:

レイヤー高さ レイヤー数 時間比 品質 推奨用途
0.1 mm 600層 ×3.0 very高い 展示用フィギュア、医療モデル、最終製品
0.2 mm 300層 ×1.0(基準) 良好 一般的なプロトタイプ、機能部品
0.3 mm 200層 ×0.67 低い 初期プロトタイプ、強度優先の内部部品

時間比の計算根拠:

実践的な選択基準:

  1. 0.1mm推奨ケース:
    • 表面品質が最優先(顧客プレゼン、展示会)
    • 曲面の滑らかさがImportant(顔、曲線形状)
    • 積層痕をほぼ消したい
  2. 0.2mm推奨ケース:
    • 品質と時間のバランス重視(most一般的)
    • 機能試験用プロトタイプ
    • 適度な表面仕上がりで十分
  3. 0.3mm推奨ケース:
    • 速度優先(形状確認のみ)
    • 内部構造部品(外観不問)
    • 大型造形物(時間削減効果大)

変数レイヤー高さ(Advanced):
PrusaSlicerやCuraの変数レイヤー高さ機能を使えば、平坦部は0.3mm、曲面部は0.1mmと混在させて、品質と時間を両立可能。

Q7: AMプロセス選択の総合Problem

航空宇宙用の軽量ブラケット(アルミニウム合金、トポロジー最適化済み複雑形状、高強度・軽量要求)の製造に最適なAMプロセスを選択し、その理由を3つ挙げてください。also、考慮should後処理を2つ挙げてください。

Solutionを表示

最適プロセス: LPBF (Laser EBM) - SLM for Aluminum

選択理由(3つ):

  1. 高密度・高強度:
    • レーザー完全溶融by相対密度99.5%aboveを達成
    • 鍛造材に匹敵する機械的特性(引張強度、疲労特性)
    • 航空宇宙認証(AS9100、Nadcap)取得可能
  2. トポロジー最適化形状の製造能力:
    • 複雑なラティス構造(厚さ0.5mmfollowing)を高精度で造形
    • 中空構造、バイオニック形状etc.従来加工不可能な形状に対応
    • サポート除去後、内部構造もアクセス可能
  3. Resolution Mechanismsと軽量化:
    • Buy-to-Fly比(材料投入量/最終製品重量)が切削加工の1/10〜1/20
    • トポロジー最適化で従来設計比40-60%軽量化
    • アルミ合金(AlSi10Mg、Scalmalloy)で比強度最大化

必要な後処理(2つ):

  1. 熱処理(Heat Treatment):
    • 応力除去焼鈍(Stress Relief Annealing): 300°C、2-4時間
    • 目的: 造形時の残留応力を除去、寸法安定性向上
    • 効果: 疲労寿命30-50%向上、反り変形防止
  2. 表面処理(Surface Finishing):
    • 機械加工(CNC): 取り付け面、ボルト穴の高精度加工(Ra < 3.2μm)
    • 化学研磨(Electropolishing): 表面粗さ低減(Ra 10μm → 2μm)
    • ショットピーニング(Shot Peening): 表面層に圧縮残留応力を付与、疲労特性向上
    • アノダイズ処理: 耐食性向上、絶縁性付与(航空宇宙標準)

追加考慮事項:

実Example: Airbus A350のチタンブラケット
従来32部品を組立てていたブラケットを1部品に統合、重量55%削減、リードタイム65%短縮、コスト35%削減を達成。

3水準 × 3水準 = 9回(フルファクトリアル計画)

DOEの利点(従来法との比較):

  1. 交互作用の検出is possible
  2. 実験回数の削減

追加の利点:

Hard(発展)

Q7: 複雑な反応系の設計

次の条件でLi₁.₂Ni₀.₂Mn₀.₆O₂(リチウムリッチ正極材料)を合成する温度プロファイルを設計してください:

温度プロファイル(加熱速度、保持温度・時間、冷却速度)と、その設計理由を説明してください。

Solutionを見る

推奨温度プロファイル:

Phase 1: 予備加熱(Li₂CO₃分解)

Phase 2: 中間加熱(前駆体形成)

Phase 3: 本焼成(目的相合成)

Phase 4: 冷却

設計のImportantポイント:

  1. Li揮発対策:
    • 900°Cfollowingに制限(本問の制約)
    • furthermore、Li過剰原料(Li/TM = 1.25etc.)を使用
    • 酸素気流中で焼成してLi₂Oの分圧を低減
  2. 粒径制御 (< 5 μm):
    • 低温(850°C)・長時間(12h)で反応を進める
    • 高温・短時間だと粒成長が過剰になる
    • 原料粒径も1μmfollowingに微細化
  3. 組成均一性:
    • 750°Cでの中間保持がImportant
    • この段階で遷移金属の分布を均質化
    • 必要に応じて、750°C保持後に一度冷却→粉砕→再加熱

全体所要時間: 約30時間(加熱12h + 保持18h)

代替手法の検討:

Q8: 速度論的解析の総合Problem

followingのデータから、反応機構を推定し、活性化エネルギーを計算してください。

実験データ:

温度 (°C) 50%反応到達時間 t₅₀ (hours)
100018.5
11006.2
12002.5
13001.2

Jander式を仮定した場合: [1-(1-0.5)^(1/3)]² = k·t₅₀

Solutionを見る

Solution:

ステップ1: 速度定数kの計算

Jander式で α=0.5 のとき:
[1-(1-0.5)^(1/3)]² = [1-0.794]² = 0.206² = 0.0424

したがって k = 0.0424 / t₅₀

T (°C) T (K) t₅₀ (h) k (h⁻¹) ln(k) 1000/T (K⁻¹)
1000127318.50.00229-6.0800.7855
110013736.20.00684-4.9850.7284
120014732.50.01696-4.0770.6788
130015731.20.03533-3.3430.6357

ステップ2: Arrheniusプロット

ln(k) vs 1/T をプロット(線形回帰)

線形フィット: ln(k) = A - Eₐ/(R·T)

傾き = -Eₐ/R

線形回帰計算:
slope = Δ(ln k) / Δ(1000/T)
= (-3.343 - (-6.080)) / (0.6357 - 0.7855)
= 2.737 / (-0.1498)
= -18.27

ステップ3: 活性化エネルギー計算

slope = -Eₐ / (R × 1000)
Eₐ = -slope × R × 1000
Eₐ = 18.27 × 8.314 × 1000
Eₐ = 151,899 J/mol ≈ 152 kJ/mol

ステップ4: 反応機構の考察

ステップ5: 検証方法の提案

  1. 粒子サイズ依存性: 異なる粒径で実験し、k ∝ 1/r₀² が成立するか確認
    • 成立 → 拡散律速
    • 不成立 → 界面反応律速
  2. 他の速度式でのフィッティング:
    • Ginstling-Brounshtein式(3次元拡散)
    • Contracting sphere model(界面反応)
    • どちらがR²が高いか比較
  3. 微細構造観察: SEMで反応界面を観察
    • 厚い生成物層 → 拡散律速の証拠
    • 薄い生成物層 → 界面反応律速の可能性

最終結論:
活性化エネルギー Eₐ = 152 kJ/mol
推定機構: 界面反応律速、or微細粒子系での拡散律速
追加実験が推奨される。

次のステップ

第3章ではEBM(AM)の基礎として、ISO/ASTM 52900によるThree Main Technologies分類、STLファイル形式の構造、スライシングとG-codeの基本を学びました。次の第2章では、Polymers(FDM/FFF)のDetailsな造形プロセス、材料特性、プロセスパラメータ最適化about学び。

Reference文献

  1. Gibson, I., Rosen, D., & Stucker, B. (2015). Additive Manufacturing Technologies: 3D Printing, Rapid Prototyping, and Direct Digital Manufacturing (2nd ed.). Springer. pp. 1-35, 89-145, 287-334. - AM技術の包括的教科書、Three Main TechnologiesカテゴリとSTLデータ処理のDetails解説
  2. ISO/ASTM 52900:2021. Additive manufacturing — General principles — Fundamentals and vocabulary. International Organization for Standardization. - AM用語とプロセス分類の国際標準規格、産業界で広く参照される
  3. Kruth, J.P., Leu, M.C., & Nakagawa, T. (1998). "Progress in Additive Manufacturing and Rapid Prototyping." CIRP Annals - Manufacturing Technology, 47(2), 525-540. - 選択的レーザー焼結とバインディング機構の理論的基礎
  4. Hull, C.W. (1986). Apparatus for production of three-dimensional objects by stereolithography. US Patent 4,575,330. - 世界初のAM技術(SLA)の特許、AM産業の起源となるImportant文献
  5. Wohlers, T. (2023). Wohlers Report 2023: 3D Printing and Additive Manufacturing Global State of the Industry. Wohlers Associates, Inc. pp. 15-89, 156-234. - AM市場動向と産業応用の最新統計レポート、年次更新される業界標準資料
  6. 3D Systems, Inc. (1988). StereoLithography Interface Specification. - STLファイル形式の公式仕様書、ASCII/Binary STL構造の定義
  7. numpy-stl Documentation. (2024). Python library for working with STL files. https://numpy-stl.readthedocs.io/ - STLファイル読込・体積計算forのPythonライブラリ
  8. trimesh Documentation. (2024). Python library for loading and using triangular meshes. https://trimsh.org/ - メッシュ修復・ブーリアン演算・品質評価の包括的ライブラリ

使用ツールとライブラリ

Disclaimer