Abstract
We propose GrainGNN, a surrogate model for the evolution of polycrystalline grain structure under rapid solidification conditions in metal additive manufacturing. High fidelity simulations of solidification microstructures are typically performed using multicomponent partial differential equations (PDEs) with moving interfaces. The inherent randomness of the PDE initial conditions (grain seeds) necessitates ensemble simulations to predict microstructure statistics, e.g., grain size, aspect ratio, and crystallographic orientation. Currently such ensemble simulations are prohibitively expensive and surrogates are necessary. In GrainGNN, we use a dynamic graph to represent interface motion and topological changes due to grain coarsening. We use a reduced representation of the microstructure using hand-crafted features; we combine pattern finding and altering graph algorithms with two neural networks, a classifier (for topological changes) and a regressor (for interface motion). Both networks have an encoder-decoder architecture; the encoder has a multi-layer transformer long-short-term-memory architecture; the decoder is a single layer perceptron. We evaluate GrainGNN by comparing it to high-fidelity phase field simulations for in-distribution and out-of-distribution grain configurations for solidification under laser power bed fusion conditions. GrainGNN results in 80%--90% pointwise accuracy; and nearly identical distributions of scalar quantities of interest (QoI) between phase field and GrainGNN simulations compared using Kolmogorov-Smirnov test. GrainGNN's inference speedup (PyTorch on single x86 CPU) over a high-fidelity phase field simulation (CUDA on a single NVIDIA A100 GPU) is 150$\times$--2000$\times$ for 100-initial grain problem. Further, using GrainGNN, we model the formation of 11,600 grains in 220 seconds on a single CPU core.
Introduction
In metal additive manufacturing (AM), the rapid cooling of molten metal creates a complex microstructure of crystalline grains. The morphology and orientation of these grains are critical, as they determine the mechanical properties, such as strength and fatigue resistance, of the final printed part. Predicting this evolution typically involves Phase Field (PF) models, which solve complex partial differential equations (PDEs) to track moving interfaces. While high-fidelity, PF simulations are computationally intensive, often requiring high-end GPUs. Because initial grain configurations are stochastic, researchers must perform ensemble simulations to obtain statistically significant results, making real-time optimization or large-scale part simulation infeasible. GrainGNN addresses this by providing a high-speed, graph-based surrogate model.
Methodology
GrainGNN shifts the computational focus from expensive voxel-based grids to a sparse, dynamic graph representation. The microstructure is modeled as a graph $G$ where nodes represent grains ($V_g$) or junctions ($V_j$), and edges ($E_{jg}, E_{jj}$) represent the physical boundaries and connections between them.
The architecture, termed GT-LSTM, combines a Graph Transformer (GT) to capture spatial interactions between neighboring grains with a Long Short-Term Memory (LSTM) network to track temporal evolution. The model employs a dual-network approach:
- Regressor: Predicts continuous geometric changes, such as junction displacement and grain area fluctuations.
- Classifier: Identifies discrete topological events, such as grain elimination or neighbor switching.
A custom graph update algorithm then reconstructs the topology for the subsequent time step based on these predictions. Training was conducted using a dataset of ~40,000 graph pairs derived from 1,500 high-fidelity CUDA-based PF simulations of 316L stainless steel.
Results and Discussion
GrainGNN demonstrates remarkable efficiency and accuracy. By focusing on interfaces rather than internal grain volumes, the model reduces the state space from approximately 500 million voxels to just 3,200 graph components.
As shown in the figure above, GrainGNN closely matches the visual and structural evolution predicted by the Phase Field solver. Quantitatively, the model achieves 80%--90% pointwise accuracy. Statistical distributions of key Quantities of Interest (QoI), such as grain size and orientation, are nearly identical to ground truth data, passing the Kolmogorov-Smirnov test for statistical similarity.
The most significant impact is the computational speedup. GrainGNN achieves inference speeds 150x to 2000x faster than PF simulations. Notably, GrainGNN runs on a single x86 CPU core, whereas the PF simulations require an NVIDIA A100 GPU. This efficiency allowed the simulation of 11,600 grains in just 220 seconds, a task that would be prohibitively expensive for traditional PDE solvers.
Conclusion
GrainGNN provides a scalable and accurate surrogate for microstructure evolution in metal AM. While currently limited to grain growth and coarsening (excluding nucleation) and simplified triple-junction geometries, it represents a major step toward real-time process monitoring. Future work will focus on incorporating grain nucleation and extending the model to the complex, non-rectangular geometries typical of real-world 3D-printed components.
Summary updated