Back to guides
3
8 min

AI for Heat Treatment & Microstructure Prediction

Replacing Dilatometry with Computation and Classifying Microstructures from Images

CCT/TTT Prediction from Composition

Continuous Cooling Transformation (CCT) and Time-Temperature-Transformation (TTT) diagrams are the foundation of heat treatment design. They tell you what microstructure you will get for a given composition and cooling path. The problem: generating them experimentally requires dilatometry — machining samples, running controlled cooling at 8-12 different rates, analysing the dilatation curves, metallographic confirmation. One diagram takes 2-3 weeks and ₹50,000-1,00,000 in lab time.

For a steel plant or forging shop that processes 50+ grades, maintaining an up-to-date CCT library is expensive. And when a customer requests a new composition variant, the 3-week lead time for dilatometry delays the entire development cycle.

ML-Based CCT Prediction

Open data/cct-ttt-data.json — it contains digitized CCT diagrams for 200+ steel compositions: transformation start/finish temperatures (Fs, Ff, Ps, Pf, Bs, Bf, Ms) as functions of cooling rate, along with resulting hardness values.

An ML model trained on this data predicts transformation temperatures from composition and cooling rate:

Features: C, Mn, Si, Cr, Ni, Mo, V, Nb, Ti, B, N, Al, Cu,
          austenitizing_temp, austenitizing_time,
          prior_austenite_grain_size (ASTM number),
          cooling_rate (°C/s)
Targets: Fs, Ps, Pf, Bs, Bf, Ms, hardness_HRC
Model: Multi-output gradient boosted trees
TransformationMAE (°C)Within ±15°CNotes
Ferrite start (Fs)12°C82%Most sensitive to C, Mn
Pearlite start (Ps)14°C78%Affected by Cr, Mo (hardenability)
Bainite start (Bs)11°C85%Strong Bs = f(C, Mn, Cr, Mo, Ni)
Martensite start (Ms)8°C91%Best predicted — well-established empirical relations
Hardness (HRC)1.8 HRC90%Follows from phase fractions

The Ms prediction is most accurate because the Andrews/Kung-Rayson empirical formulae are already quite good — the ML model essentially learns and refines these. Bainite start is the most valuable prediction because empirical Bs formulae are less reliable, and bainitic steels (for automotive, rail, and wear applications) are increasingly important.

Heat Treatment Parameter Optimization

Open data/heat-treatment-records.csv — each row is a production heat treatment record: steel grade, part geometry (diameter, length, section thickness), furnace parameters (austenitizing temperature, soak time), quench medium and severity, tempering temperature and time, and resulting properties (hardness, tensile, impact).

The Optimization Problem

Heat treatment is a constrained optimization:

Maximize: Charpy_impact_energy (toughness)
Subject to:
  hardness ∈ [28, 34] HRC (customer specification)
  yield_strength >= 750 MPa
  through-hardening achieved (core hardness within 3 HRC of surface)
Variables:
  austenitizing_temp ∈ [830, 880] °C
  soak_time ∈ [60, 180] min (depends on section thickness)
  quench_severity ∈ {oil, polymer_10%, polymer_15%, water}
  tempering_temp ∈ [450, 650] °C
  tempering_time ∈ [60, 240] min

For auto component manufacturers in Pune and Chennai — crankshafts, connecting rods, gears, axle shafts — hitting the hardness spec is relatively easy. Maximizing toughness within that hardness window is where the value lies. A gear that meets 30 HRC but has poor impact toughness will fail by tooth root fatigue in service.

Bayesian Optimization in Production

A Bayesian optimizer with a Gaussian process surrogate explores the parameter space efficiently. After 30-40 production trials (rather than 200+ in a full factorial), it identifies the tempering temperature sweet spot that maximizes toughness at the target hardness.

At Bharat Forge (Pune), AI-optimized heat treatment of 42CrMo4 crankshaft forgings found that tempering at 590°C × 150 min (vs the standard recipe of 600°C × 120 min) improved Charpy V-notch from 35 J to 48 J at the same 30 HRC hardness — a 37% improvement in toughness from a small parameter adjustment that operators would not have explored manually.

Section Thickness Effects

For large forgings (> 200mm section), through-hardening is the primary challenge. The Grossmann end-quench concept (ideal critical diameter, DI) gives a first approximation, but real quenching involves complex heat transfer with time-varying HTC (heat transfer coefficient) that depends on surface temperature, quenchant agitation, and part geometry.

An FEA-trained surrogate model predicts core cooling rate from part geometry and quench conditions in milliseconds (vs hours for full FEA simulation). This enables real-time quench recipe selection on the shop floor.

Microstructure Classification from Metallographic Images

Open data/microstructure-image-metadata.json — it catalogues metallographic images with composition, processing history, etchant used, magnification, and expert-labelled microstructural constituents (ferrite, pearlite, bainite, martensite, retained austenite, grain boundary ferrite, Widmanstätten ferrite).

Convolutional Neural Networks for Phase Identification

Manual microstructure classification requires a trained metallographer — and even experts disagree on boundary cases (upper bainite vs fine pearlite, acicular ferrite vs bainitic ferrite). A CNN trained on 10,000+ labelled micrographs provides consistent, reproducible classification:

Architecture: ResNet-34 pretrained on ImageNet, fine-tuned on metallographic images
Input: 256 × 256 px micrograph patches (nital-etched, optical microscopy, 200-500x)
Output: phase fractions [ferrite, pearlite, bainite, martensite, other]
Training: 10,000 images, 80/10/10 split
Accuracy: 93% per-pixel classification (vs 87% inter-expert agreement)

The key insight: the model actually outperforms individual experts because it is trained on consensus labels from multiple metallographers. It learns the "average expert" classification.

Grain Size Measurement

ASTM E112 grain size measurement is tedious — intercept counting or planimetric methods on etched micrographs. AI automates this completely:

  • Segment grain boundaries using a U-Net trained on manually annotated images
  • Detect individual grains as connected components
  • Compute mean grain area, equivalent diameter, and ASTM grain size number
  • Flag anomalies — duplex grain sizes, abnormal grain growth, mixed grain structures
  • For auto component heat treatment shops that must report grain size on every batch (customer audit requirement), this eliminates 30-45 minutes of metallographer time per sample.

    Indian Context: Pune/Chennai Auto Clusters

    The Pune-Chakan and Chennai-Sriperumbudur auto component clusters together produce millions of heat-treated components annually — for Bajaj, Tata Motors, Hyundai, and export customers. Quality requirements are tightening (TS 16949 / IATF 16949), and customers increasingly demand CPK > 1.67 on hardness.

    AI-based microstructure classification serves two purposes here:

  • Root cause analysis — when a batch fails mechanical testing, the micrograph tells you why. Was it incomplete austenitization (coarse ferrite patches)? Insufficient quench (upper bainite instead of martensite)? Over-tempering (spheroidized carbides)? The CNN classifies the failure mode instantly.
  • Process correlation — linking microstructural features to heat treatment parameters builds a database that captures tribal knowledge. When the experienced heat treater retires, the AI retains the process-microstructure relationships they knew intuitively.
  • Tool Steel Hardening

    Tool steels (D2, H13, M2) require precise heat treatment — austenitizing temperatures within ±5°C, controlled atmosphere (vacuum or salt bath), multi-stage tempering. The secondary hardening response in high-speed steels (M2, M35) depends critically on austenitizing temperature (controlling carbide dissolution) and tempering temperature (controlling MC/M2C precipitation).

    An AI model that predicts secondary hardening peak temperature and retained austenite decomposition from composition and austenitizing conditions replaces the trial-and-error approach of running 6-8 tempering trials on each new batch. For small die-making shops that process 20+ tool steel grades, this is a significant time saving.

    Key Takeaways

  • CCT prediction from composition replaces weeks of dilatometry — ML models achieve ±12°C accuracy on transformation temperatures. Ms is best predicted, Bs is the most valuable prediction.
  • Heat treatment optimization finds the toughness sweet spot — Bayesian optimization in 30-40 trials identifies parameter combinations that operators would not explore manually. The value is in toughness at target hardness, not just hitting the hardness spec.
  • Microstructure classification provides consistency — CNNs trained on consensus labels outperform individual experts. This is valuable for root cause analysis, process correlation, and automated grain size measurement.
  • Section thickness effects need surrogate models — FEA-trained surrogates predict core cooling rates in milliseconds, enabling real-time quench recipe selection for large forgings.
  • This is chapter 3 of AI for Metallurgy & Materials.

    Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.

    View course details