Skip to main content
Research Highlight

GrainNN: A Neighbor-aware Long Short-term Memory Network for Predicting Microstructure Evolution During Polycrystalline Grain Formation

Achievement: A multidisciplinary team of researchers from Oak Ridge National Laboratory and the University of Texas at Austin developed a new machine-learning-based reduced-order model called GrainNN to predict the grain structure that forms as a metal solidifies. Taking material parameters, thermal solidification conditions, and seed grains at the bottom of the computational domain as input, the reduced-order model generates the expected grain structure upon solidification. These are the same inputs and output as a direct simulation (e.g. phase field, cellular automata, kinetic Monte Carlo methods). GrainNN can be orders of magnitude faster than standard direct-simulation methods for ensemble calculations, even when the cost of generating training data is accounted for. For cases similar to the training data, the reduced-order model is shown to correctly identify which points in the domain belong to which grains an average of 96% of the time (using direct simulation results as a reference). By learning some of the fundamental relationships that govern grain evolution during solidification, GrainNN generalizes spatially and temporally to cases outside the training data. Generalizations were demonstrated for a wider domain, larger initial grains, longer time horizon, and a circular domain similar to an additive manufacturing melt pool. The error for these out-of-training-sample generalizations was only slightly higher than the in-sample tests – with identification of the correct grain at 91-95%. Beyond explicit microstructure generation, the capability to accurately predict statistical features of the microstructure such as the grain size distribution and the average grain misorientation.

Significance and Impact: This work demonstrates a path toward accurate, low-cost predictions of the grain structures of metal alloys that can be used to design advanced manufacturing processes to yield desired material properties. The grain structure of a material can play a large role in the properties of a material (e.g. its strength). The grain structure that forms during a solidification process such as additive manufacturing, welding, or casting is determined by the thermal conditions during solidification. With this work, we show that a reduced-order model based on machine learning methods can make a connection between the thermal conditions during solidification and the eventual grain structure. As this type of prediction capability matures (e.g. by moving from 2D to 3D), reduced-order models of this type will allow researchers to optimize the solidification conditions to yield the desired grain structure, including for cases where the structure intentionally varies across the part.

Research Details

  • A long short-term memory neural network with a novel physics-interpretable transformer architecture (“GrainNN”) was developed to predict the grain structure in additively manufactured alloys.
  • This new transformer architecture includes a self-attention mechanism to identify the neighbors for each grain as solidification progresses. This capability is important because the neighboring grains can change as competitive growth eliminates some grains.
  • To enhance the explainability of the neural network, the features of the microstructures are manually defined. These features are time varying and are a mix of per-grain and global features.
  • 2500 phase-field simulations were performed to provide training and validation data for GrainNN. A phase-field method was chosen because it is a common approach for grain structure prediction, but the workflow for training GrainNN generalizes to other types of training data such as cellular automata and kinetic Monte Carlo simulations.
  • When applied to cases similar to the training data (although not in the training data), on average only 3.7% of the points in the domain are associated with the incorrect grain.
  • The error increased only modestly for cases dissimilar to the training data: 5% for larger grains, 5% for a longer time horizon, 8% for both larger grains and a longer time horizon, 8% for more grains, and 9% for a circular “melt pool” domain. 
  • Inference with GrainNN is at least three orders of magnitude faster than a phase-field simulation of the same conditions. For an example problem to estimate the statistical distribution of certain microstructural features under varied solidification conditions, GrainNN shown to be orders of magnitude faster than direct simulations, even when the computational costs of generating training data and training the network are included.

Sponsor/Funding: DOE ASCR (AEOLUS Center)

ORNL lead researcher and affiliation: Stephen DeWitt, Scalable Algorithms and Coupled Physics Group, Computational Sciences and Engineering Division, ORNL 

Team: Yigong Qin (UT-Austin), Stephen DeWitt (ORNL), Balasubramaniam Radhakrishnan (ORNL), George Biros (UT-Austin)

Citation and DOI: Y. Qin, S. DeWitt, B. Radhakrishnan, G. Biros. GrainNN: A neighbor-aware long short-term memory network for predicting microstructure evolution during polycrystalline grain formation, Computational Materials Science, 218, 111927 (2023); DOI: 10.1016/j.commatsci.2022.111927

GrainNN is a neighbor-aware long short-term memory neural network model to predict grain formation in metal alloys. CSED ORNL CCSD Computational Sciences and Engineering
GrainNN is a neighbor-aware long short-term memory neural network model to predict grain formation in metal alloys. It propagates manually defined features in time using a transformer-based approach with a self-attention mechanism. The predicted microstructure is reconstructed using linear interpolations in time and space between model outputs. The approach is shown to generalize well outside the training data, including to cases with more grains and different domain geometry than the training data. GrainNN can be used to predict explicit microstructures as well as statistically defined quantities of interest.

Summary: GrainNN, a new neural network for predicting the formation of grains during additive manufacturing and other solidification processes has been developed. GrainNN uses a transformer-based self-attention mechanism in a long short-term memory neural network to learn the interactions between grains during solidification. Using phase-field model simulations of grain evolution as training data, GrainNN has been demonstrated to make accurate predictions for scenarios similar to the training data, as well as scenarios well outside the training data – situations with larger grains, more grains, and/or a longer time horizon as well as a circular “melt pool” geometry. GrainNN yields accurate predictions, with points in the domain being assigned to the correct grain with at least 90% accuracy. When employed to predict the statistical distribution of microstructural quantities of interest, GrainNN is orders of magnitude less computationally expense than phase-field simulations, even accounting for the cost of generating training data and training GrainNN. Going forward, the combination of low computational cost and high accuracy of reduced-order models of this type will permit including them inside optimization loops to determine the solidification conditions that lead to a target grain structure, and therefore targeted (location-specific) material properties.