Introduction

Solidification is recognized as one of the most critical phenomena in both conventional and advanced manufacturing processes of metals and alloys1. The mechanical properties and deformation behavior of these materials depend on the nano/microstructures that form during the solidification process. Various experimental techniques have been used to study the nano/microstructures and tensile/compression/torsion deformation properties of solidified metals and alloys2,3, but experimental procedures are expensive and require more time and resources to generate reliable data. To perform controlled melting and solidification of metals and alloys, special melting and solidification equipment is needed. In addition, the nano/microscale characterization and temperature-dependent mechanical testing of solidified samples are expensive parts of understanding the effects of solidification parameters on nano/microstructures and mechanical properties. Besides, carrying out stochastic analysis (e.g., by Monte Carlo simulations) based on thousands of solidification experiments is practically impossible. A viable alternative is to use numerical simulation tools to study the solidification process and its effect on mechanical properties. It should be noted that the computational and simulation-based approaches can not replace the experiments, but they can provide insights and recommendations for experiments, which can lead to more efficient and effective experiments with more accurate results.

State-of-the-art simulation techniques at different length and time scales for the study of solidification include classical molecular dynamics (MD)4 and phase-field modeling (PFM)5, among others. Models at larger length scales (microscale and larger), like PFM, require input parameters and data from atomistic models (nanoscale) like MD and experiments4,6,7. Quantification of stochastic variations and manufacturing uncertainties during solidification is critically important. Accurate atomistic simulations of metal solidification and the resulting properties require excessive computational expenses for probabilistic analyses where thousands of random realizations are necessary. Inadequate model sizes and time scales lead to inaccuracy in each random realization, causing a large cumulative statistical error in the probabilistic results. In this work, we present a machine learning (ML) approach, as a surrogate to MD simulations, for carrying out efficient and accurate stochastic computations.

Classical MD simulations have been used for predicting both nano-scale and bulk properties. The interatomic potentials for the classical MD simulations can be designed in such a way that they can predict from low-temperature properties such as different physical constants and stacking faults to high-temperature properties like melting point or solid-liquid interface free energy8,9,10. Although MD simulations have the capability of predicting bulk scale properties, they can be computationally demanding depending on the system size, required level of accuracy and efficiency of interatomic potentials. The situation further aggravates in the case of stochastic simulations that need thousands of realizations for carrying out Monte Carlo (MC) simulation. Since quantifying uncertainty in the mechanical properties of solidified materials is getting significant traction with the rapid adoption of additive manufacturing technologies, there is a strong rationale to develop efficient stochastic computational frameworks. In this context, ML-based approaches can be integrated with MD simulations for improving the feasibility of performing full-scale probabilistic characterization. Conventional ML models require a large number of consistent training data points that can be generated based on MD simulations11,12. Further, since the MD simulation involves random fluctuations of atoms, there is always a notion of inherent variability involved with the repeatability, even with the same simulation parameters. This leads to a mean and standard deviation corresponding to each of the training data-point. In this article, we propose a Bayesian ML approach coupled with MD simulations to overcome the aforementioned critical computational issues. This ML approach, referred to as the hybrid polynomial correlated function expansion (H-PCFE), is data efficient and accounts for the effect of uncertainty in training data by exploiting mean and standard deviation of the MD simulations.

As the goal of this work is to integrate ML and MD methods to accelerate probabilistic characterization of solidified metal properties, here we briefly review the previous research on ML algorithms coupled with MD simulations for the determination of material properties and discuss how our work contributes to this field. ML algorithms available in the literature can be classified into two categories: (a) unsupervised learning, and (b) supervised learning13. In unsupervised learning, we have access to unlabeled data. The goal of unsupervised learning is to find some pattern in the data available. On the other hand, in supervised learning, one has access to labeled data and the objective is to predict labels or outputs for a new set of input data. The unlabeled data indicates a scenario when the features, characteristics, classifications and attributes of the input and output parameters are not known apriori. This is unlike the current scenario of supervised learning where we know the inputs (temperature and strain rate) and outputs of the model (Young’s modulus, yield stress and ultimate stress). Over the last decade, a significant interest has evolved to exploit the capabilities of ML algorithms to enhance the MD-based simulation outputs for material characterization and innovation14,15,16,17. In this paper, we are concerned with supervised learning for predicting outputs corresponding to unseen input parameter combinations. Popular supervised learning techniques available in the literature include deep neural networks18,19,20, Gaussian process21,22 and support vector regression23. It is worthwhile to note that each of the available techniques has its own merits and shortcomings depending on the nature of the problem or physical model under consideration. In this paper, we integrate a form of Gaussian process called H-PCFE24 with MD simulations. H-PCFE is a probabilistic ML algorithm that provides error estimates (predictive variance), and therefore it is suitable for cases having sparse datasets.

In this work, we would focus on the mechanical properties of solidified aluminum4,25 in deterministic and stochastic domains. This work has three different interlinked components with an overarching goal of efficient uncertainty quantification. First, we construct a dataset from MD simulations of tensile deformation of solidified aluminum. During this stage, along with MD simulations of algorithmically generated training data points, we investigate the mechanical properties and structure-property relationship comprehensively by presenting various stress–strain and strength plots versus solidification conditions and strain rates. In the second stage, based on the physics-based training data for mechanical properties such as Young’s modulus, yield stress and ultimate strength, we form the ML models for predicting scenarios that have not been simulated (i.e., unseen combination of input parameters). In the final stage, we perform sensitivity analysis for the input variables (deformation temperature and strain rate) and output variables (Young’s modulus, yield stress and ultimate strength) along with complete probabilistic characterization for quantifying uncertainty.

Results

Mechanical properties of solidified polycrystalline aluminum

In this section, we discuss the mechanical properties of polycrystalline aluminum created by solidification at different isothermal temperatures and quench rates. The stress–strain plots are obtained from the simulated polycrystalline aluminum under uniaxial tension for different solidified structures. Figure 1 shows an example of such a stress–strain curve where detwinning of solidification twins happens during tensile deformation25. From each stress–strain curve, the mechanical properties such as Young’s modulus, yield stress and ultimate tensile strength are derived. Young’s modulus is the slope of the linear portion of the stress–strain plot. The elastic part of the curve where Young’s modulus is calculated acts linearly, and no permanent deformation happens. The yield stress is found from the linear regression of the stress data with 0.2% offset on strain. The intersecting point of the linear fit from the regression and the actual stress–strain curve is the yield stress. The maximum tensile stress on the stress–strain plot is defined as the ultimate tensile strength (UTS).

Fig. 1: Tensile deformation of an isothermally solidified aluminum sample under stochastic environment.
figure 1

a The solidified polycrystalline aluminum before applying deformation, (bd) Snapshots of the polycrystalline aluminum during deformation under the strain rate of 109 K s−1 at 300 K, (e) Stress–strain plot of the polycrystalline aluminum. The inset images show detwinning during plastic deformation. f Schematic representation of the stochastic analysis. The random input parameters x1 and x2 are temperature and strain rate respectively, while the outputs y are Young’s modulus, yield stress and ultimate stress. The parameter ω is used to represent the stochastic nature of the input and output quantities.

Young’s modulus of the solidified polycrystalline samples is compared with that of the single crystal aluminum in Fig. 2a–d. The expected decline of Young’s modulus is observed with increasing the deformation temperature when the strain rate is kept constant between 108 s−1 to 1010 s−1. A higher strain rate and/or a lower deformation temperature produce a stiffer sample (Fig. 2a). The single crystal has Young’s modulus of ~60-65 GPa at 300 K under the strain rate of 1010 s−1. The samples prepared by isothermal solidification at 500 K can reach up to 58 GPa of Young’s modulus (Fig. 2a) for a deformation temperature of 300 K and strain rate of 108 s−1. Young’s modulus remains much lower for all other samples prepared by isothermal and quenching condition. The samples solidified at the slowest quench rate of 1011 K s−1, have a Young’s modulus of ~59 GPa (Fig. 2b). At higher strain rates the dislocation movements are affected by the velocity of the atoms. When the strain rate is reduced, it is observed that the single crystal and samples with larger grain sizes (annealing at 500 K and quenching at 1011 K s−1) have closer Young’s moduli. As shown in Fig. 2c, d, the single crystal has Young’s modulus of ~58 GPa at 300 K compared to ~57 GPa of the sample prepared by isothermal solidification at 500 K at the slowest quench rate of 1011 K s−1.

Fig. 2: Young’s modulus and ultimate tensile strength for isothermally solidified polycrystalline samples.
figure 2

Young’s modulus of (a, c) isothermally solidified polycrystalline samples at the strain rate of 1010 s−1 and 108 s−1, and (b, d) solidified polycrystalline samples prepared by quenching at the strain rate of 1010 s−1 and 108 s−1. UTS of (e) isothermally solidified polycrystalline at the strain rate of 1010 s−1, and (f) solidified polycrystalline samples prepared by quenching at the strain rate of 1010 s−1. The error bars represent the deviation originating from the three different simulations for three different deformation directions.

Table 1 shows a detailed comparison of Young’s modulus obtained in this study with the single crystal and nanocrystalline experiments. The results from this MD calculation are close to previous experimental results. The margin of error is less than 5% for single crystal including Young’s modulus determined by indentation tests26,27. Similarly, for nanocrystalline aluminum, the difference of Young’s modulus predicted by MD simulation and the one from experiments is below 10%. However, it should be noted that the experiments are normally done with pristine single crystal aluminum with preexisting evenly distributed grain boundaries (GBs), whereas the samples produced in all our solidification simulations have several defects (such as dislocations, twins, vacancies etc.) and randomly distributed GBs.

Table 1 Young’s modulus values for deformation at 300 K for bulk aluminum in the form of single crystal and nanocrystalline, obtained by MD calculations and/or experimental measurements.

Unlike Young’s modulus, UTS largely differs between single crystal and polycrystals (see Fig. 2e, f). At deformation temperature of 300 K and strain rate of 1010 s−1, (Fig. 2e), the UTS of single crystal aluminum is ~7.25 GPa whereas the sample solidified isothermally at 500 K has the UTS of ~3.75 GPa. So, the UTS of the single crystal is almost twice as the polycrystalline for different strain rates and deformation temperatures. UTS of isothermally produced samples and quenched samples is similar and remains between 2.5 and 4 GPa. The temperature acts as the major factor in reducing the strength for both single crystal and polycrystals. UTS of a single crystal goes down from 7.25 GPa to 5.5 GPa (Fig. 2e, f) with the increase in deformation temperature from 300 K to 500 K which is a decrease of strength by almost 24%. However, in samples isothermally solidified, UTS reduces only by 10%; for example, for the sample isothermally solidified at 500 K in Fig. 2e, UTS goes down from 3.5 GPa to 3.25 GPa in this deformation temperature range. The strength also reduces by a similar margin for quenched aluminum. The values of the UTS for aluminum are relatively higher in comparison to experimental data. However, our results of 2–7 GPa are well-aligned with existing MD simulations of aluminum nanocrystalline structures28,29,30. We also studied the effects of defects on solidified polycrystalline aluminum under similar strain rates, where the strength of aluminum remains within 2–7 GPa range25. The higher strength of nanocrystalline aluminum utilizing MD simulation generally occurs due to the smaller size of simulation box and shorter time scale of pico to nano seconds. Such differences between MD simulation and bulk results are well-accepted by the computational materials science community. In theory, we could build a micro or millimeter-scale simulation box for achieving better experimental agreement, but that will contain trillions of atoms and will be unrealistic to simulate by using classical MD simulations.

It can be noted from Fig. 2e, f that the samples prepared at higher annealing temperatures or slower cooling rate have a higher UTS. As shown in Fig. 2e, the UTS for the samples isothermally solidified at 500 K is much higher than those solidified at 300 K. And the slowest quench rate of 1011 K s−1 produces the highest strength among all the polycrystalline samples prepared by quenching (Fig. 2d). Classically, one would expect an increase in yield stress (\({\sigma }_{y}\)) for smaller grain sizes according to the Hall–Petch equation31,32 given by

$${\sigma }_{y}={\sigma }_{0}+k{d}^{-1/2},$$
(1)

where \({\sigma }_{0}\) is the friction stress in the absence of grain boundaries, \(k\) is a strengthening coefficient and \(d\) is the grain size. In general yield stress increases as grain size decreases because pile-ups in fine-grained materials contain fewer dislocations, the stress at the tip of the pile-up decreases and, thus, a larger applied stress is required to generate dislocations in the adjacent grain. In very small grains, this mechanism breaks down as grains are unable to support dislocation pile-ups. As a consequence, a threshold value is expected at which a maximum yield stress can be achieved. Experimental studies on nano-crystalline aluminum have revealed that the Hall–Petch slope (\(k\) value in Eq. (1)) is reduced or becomes negative below a certain grain size33,34,35. This is known as the inverse Hall–Petch effect. Furthermore, the transition in the Hall–Petch slope normally occurs for grain sizes above 25 nm, where dislocation pile-ups are still possible36. The maximum grain size achieved in this study is ~14 nm, so we don’t observe the transition in the Hall–Petch effect in this study. The inverse Hall–Petch relationship was discussed in detail for all the polycrystalline samples in our previous work37.

In this subsection, we have discussed the critical deterministic physics involved behind the mechanical analysis of solidified aluminum that leads to the current output quantities of interest such as Young’s modulus, yield stress and ultimate stress. The ML models are created here considering the influencing factors like strain rate and temperature for mapping the output quantities based on a data-driven Baseyan framework with the aim of generating stochastic insights (refer to the following subsection).

Machine learning model formation and stochastic analysis

As discussed in the preceding section, the mechanical properties vary with changes in temperature and strain rate considerably. To understand how the mechanical properties are influenced by these two factors, ML-assisted mapping has been performed considering the individual and combined methods of training (refer to section 2.2.1 and 2.2.2). First, simulations have been performed considering the individual method (refer to section 2.2.1). As shown in Fig. 3a the margin of error remains as high as 37% for UTS. The prediction of Young’s modulus remains close to MD simulation data (i.e., ground truth). However, as we calculate the yield stress or UTS, the ML predictions deviate considerably from MD simulations. When we follow the combined method (refer to section 2.2.2), the ML predictions improve significantly with respect to the MD-based ground truths (15% or more), Fig. 3b. The reduction in error can be attributed to the fact that the ML model for the combined method also learns from other datasets while predicting for a particular case. To visualize the consistency and prediction accuracy between the ML model and MD results, we show parity plots of all the output quantities (i.e., Young’s modulus, yield stress and UTS) for isothermally solidified sample at 400 K (Case 3) in Fig. 3c–e. Given the superior accuracy of the combined method, the same has been used for generating these plots. To illustrate the generalization of the proposed approach, a test dataset (dataset not used during training, i.e., unseen data points) has been used for the parity plots. The agreement between the MD and ML results is quite evident and within acceptable limits, suggesting the validity of ML model for further analyses.

Fig. 3: Error margins in H-PCFE predictions based on individual and combined methods.
figure 3

Error margin for different cases in H-PCFE predictions, obtained using (a) individual method and (b) combined method. Representative scatter plots for the ML model and MD prediction considering (c) Young’s modulus, (d) yield stress and (e) UTS for all the case 3 or isothermally solidified samples at 400 K. Young’s modulus, yield stress and ultimate stress are presented here in GPa unit.

There are multiple ways to check the prediction accuracy of ML models13,38. Though R2 values are a popular way to have some preliminary sense of accuracy, it is widely accepted that checking only R2 is not adequate and can sometimes be misleading. For this reason, we have resorted to parity plots or scatter plots, which provide a way for direct comparison between predicted results and ground. In such a plot, the closer the points are to the diagonal line, the lesser the prediction error is. From the presented results, we notice that the points are quite close to the diagonal line for the combined method, indicating its high prediction accuracy. We have further reported the maximum error values which show reasonably less prediction error for the converged cases, ascertaining further confidence in ML models. Note that the maximum error is a stricter indicator of the prediction quality compared to the mean error or the root mean square error. For comprehensiveness, we have also checked the R2 values, wherein we note that the values are above 0.97. This further indicates a high prediction accuracy as the values are very close to 1. Based on these three forms of validation or accuracy analysis, we conclude that ML models have a high prediction capability.

As the combined method produces a much lower error margin, we have obtained the probability density functions based on these surrogate models by performing MC simulations. Unlike conventional frequentist ML approaches, the proposed H-PCFE based approach accounts for the modeling uncertainty by considering both mean and standard deviation of the MD simulation results. Additionally, H-PCFE being a Bayesian surrogate model, also captures the epistemic uncertainty due to limited and noisy training data. The error bounds (shaded portion) shown in Fig. 4 represent the overall uncertainty captured using the proposed approach. The probabilistic distribution of Young’s modulus for single crystal and isothermally solidified samples at different temperatures follows the normal distribution. The effect of quench rate on the probabilistic descriptions of Young’s modulus, yield stress and UTS is presented in Fig. 5. Interestingly, all the probability distribution plots roughly follow normal distribution with a single peak under the compound effect of source uncertainties. In this context, it should be noted that we have presented the probability density function (PDF) plots in their original form based on raw data rather than fitting them to a particular predefined distribution. This allows us to show the probabilistic characteristics of the data without any bias. An asymmetric distribution of Young’s modulus, yield stress or ultimate stress can be advantageous or disadvantageous from a mechanical design perspective depending on the nature of asymmetry. For example, if the PDF is asymmetric towards higher values (i.e., positively skewed distribution) of Young’s modulus, yield stress or ultimate stress, this means the probability of having a higher value of these quantities is higher and can be treated as advantageous.

Fig. 4: Probabilistic descriptions of Young’s modulus for various aluminum samples.
figure 4

Probability distribution function plots of Young’s modulus for different aluminum samples of (a) single crystal, isothermally solidified at (b) 300 K, (c) 400 K and (d) 500 K.

Fig. 5: Probabilistic descriptions depending on quench rate.
figure 5

Probability distribution function plots of Young’s modulus, yield stress and ultimate stress for different Al samples, solidified at quench rate of (ac) 2.5 × 1011 K s−1 and (df) 5 × 1011 K s−1.

Sensitivity analysis

The relative sensitivity of the mechanical properties is quantified here for both strain rate and temperature. Moment-independent sensitivity analysis is performed for obtaining the sensitivity plots39,40. The advantage of moment-independent sensitivity measure resides in the fact that it utilizes the complete information of the probability distribution and not just the second-order moments; detailed descriptions are provided in Supplementary Material (Section III). However, moment-independent sensitivity analyses are expensive from a computational point of view. To address this issue, the trained H-PCFE models based on the combined method (refer to section 2.2.2) are exploited in the current analysis.

From the sensitivity analysis results presented in Fig. 6, we observe that the mechanical properties are less influenced by temperature than strain rate for all the solidified samples. As there are no grain boundaries present in single crystals, the motion of atoms with the increase in temperature is much more significant than the variation in strain rate. Unlike the single crystal, the solidified polycrystalline samples have grain boundaries, which may either resist or facilitate the process of deformation. As shown in Fig. 6b–g the strain rate is a dominant factor in determining the mechanical properties of the aluminum samples. In polycrystalline samples, the position and orientations of the grain boundaries are also influencing factors that can determine the sensitivity of the two parameters. As shown in Fig. 6e, Young’s modulus is equally sensitive to the temperature and strain rate for the sample solidified at 1011 K s−1. Due to the slower quench rate, the grain boundaries are larger than any other solidified samples, and as a result it behaves similarly to the single crystal one for Young’s modulus. The yield and ultimate stressese, however, are more sensitive to strain rate, which shows the polycrystalline nature of the samples. An important general observation made from all the results is that the presence of grain boundaries and twin boundaries makes the samples more sensitive to the strain rates applied to perform tensile deformation than the deformation temperature.

Fig. 6: Sensitivity quantification for temperature and strain rate.
figure 6

Sensitivity to temperature and strain rate calculated for (a) single crystal, isothermal temperatures at (b) 300 K, (c) 400 K, (d) 500 K and the samples prepared by quenching rates of (e) 1011, (f) 2.5 × 1011 and (g) 5 × 1011 K s−1.

Disscusion

Solidification has been at the heart of the most important manufacturing processes, including rapidly evolving techniques like additive manufacturing, where the quantifications of stochastic variations and manufacturing uncertainties are critically important. Efficient Bayesian ML-based schemes are proposed in this work for full-scale probabilistic characterization and sensitivity analysis of the mechanical properties of solidified metals.

Although MD simulations have the capability of predicting mechanical properties, they can be computationally demanding depending on the system size, the efficiency of interatomic potentials, and the required level of accuracy. The situation further aggravates in the case of stochastic simulations that need thousands of realizations for carrying out MC simulations. Since quantifying uncertainty in the mechanical properties of solidified materials is getting significant traction with the rapid adoption of additive manufacturing technologies, there is a strong rationale to develop efficient stochastic computational frameworks. In this context, ML-based approaches can be integrated with MD simulations for improving the feasibility of performing full-scale probabilistic characterization. Conventional ML models require a large number of consistent training data points that can be generated based on MD simulations. Further, since the MD simulation itself is a random process, there is always a notion of inherent variability involved with the repeatability, even with the same simulation parameters. This leads to a mean and standard deviation corresponding to each of the training data points. In this article, we have proposed a data-efficient Bayesian ML approach coupled with MD simulations, referred to as the hybrid polynomial correlated function expansion, for establishing a computational mapping between the crucial influencing parameters (like strain rate and temperature) and mechanical properties (like Young’s modulus, yield stress and ultimate strength). The proposed approach accounts for the effect of uncertainty in training data by exploiting mean and standard deviation of the MD simulations, which in principle can address the issue of repeatability in stochastic simulations with low variance.

The MD simulations for studying the mechanical deformation of single crystal and polycrystalline aluminum were carried out based on 2NN MEAM interatomic potential. The samples were prepared by quenching or isothermal solidification and were deformed under uniaxial tension in three orthogonal directions to determine the mechanical properties while taking into account the errors. The errors or variations originate in solidified polycrystalline aluminum samples where the grain boundaries, vacancies and twin boundaries form spontaneously in arbitrary directions. We have coupled the current MD simulation approach with Bayesian ML models by incorporating the mean and standard deviation of such variations. Two different approaches have been proposed in the context of training the ML model, individual and combined methods, wherein the latter is found to perform significantly better in terms of prediction. Complete probabilistic descriptions are presented based on the ML models showing a significant degree of stochastic response bounds (including symmetric, positively and negatively skewed Gaussian distributions) in the mechanical properties due to the inherent uncertainties involved in temperature and strain rate. Such quantifiable numerical outcomes lead to the realization of the importance of adopting an inclusive analysis and large stochastic data-informed design framework considering the inevitable random variabilities. The sensitivity analysis results reveal that Young’s modulus, yield stress and ultimate strength are relatively more sensitive to strain rate than temperature. Thus, relatively more operational control needs to be ensured in the strain rate to avoid undesirable stochastic variations in the mechanical properties.

It should be noted that a wide range of input parameters is considered in this study for forming ML models. This covers a large MD simulation domain of influencing factors. In principle, ML models are able to predict the outputs accurately even beyond the training domain as long as the governing equations are continuous with no drastic change in their nature and no additional parameters come into play. In such cases, more training data would be needed, and following the same computational framework as proposed here, one can expand the prediction range. Another way of dealing with such cases and to capture the physics more accurately is to involve physics-informed ML models41,42. Since the current focus of this paper is data-driven ML models13,43, such an analysis is out of scope here.

In Summary, efficient Bayesian ML-based schemes are proposed in this work for full-scale probabilistic characterization and sensitivity analysis of the mechanical properties of solidified metals. We have developed a data-efficient approach coupled with MD simulations, referred to as the hybrid polynomial correlated function expansion, for establishing a computational mapping between strain rate, temperature and mechanical properties like Young’s modulus, yield stress and ultimate strength. The physics concerning the mechanical deformation of single crystal and polycrystalline aluminum is captured through training based on MD simulations considering the 2NN MEAM interatomic potential. The proposed approach accounts for the effect of uncertainty in training data by exploiting mean and standard deviation of the MD simulations concerning solidified polycrystalline aluminum samples where the grain boundaries, vacancies and twin boundaries form spontaneously in arbitrary directions. This, in principle, can address the issue of repeatability in stochastic simulations with low variance. The complete probabilistic descriptions reveal a significant degree of stochastic variations in the mechanical properties due to the inherent uncertainties involved in temperature and strain rate.

In general, the numerical results presented here illustrate that the proposed Bayesian ML-based approach can reliably predict the mechanical properties in a computationally efficient error-inclusive framework for data-intensive analyses such as uncertainty and sensitivity quantification. The proposed data-driven framework is generic in nature and can be extended to other metals and alloys for predicting different multi-physical properties.

Methods

Molecular dynamics simulation

Deterministic MD simulations of solidification and deformation of solidified aluminum4,37,44 are at the core of the current ML-assisted analysis. MD simulations of homogenous nucleation from pure aluminum melt were performed in a simulation box with size of 25 × 25 × 25 nm3 (64 × 64 × 64 unit cells, with 1000188 atoms) and with the isothermal-isobaric (NPT) ensemble. Periodic boundary conditions were employed in all three directions during the melt preparation. A non-periodic boundary condition was applied in the direction of the solidification. The time step of simulations was 0.003 ps. The adequate model size is determined based on a convergence study and validating the results with existing literature (refer to Tables 1 and 2). The second nearest neighbor-modified embedded atom method potential (2NN-MEAM) for aluminum9 was used for the MD simulations. We recently tested this interatomic potential which showed reliable predictions for solid-liquid coexistence properties (i.e. melting point, solid-liquid energy, melting point, specific heat etc.) of aluminum4,9.

Table 2 The low-temperature elastic properties and high-temperature melting properties of aluminum predicted by 2NN-MEAM9 MD simulations.

The melting and solidification simulations were done in two steps. First, we prepared the aluminum melt and performed equilibration at 1325 K. We obtained a homogenous liquid aluminum in the simulation box at about 100 ps. The simulation was continued to 300 ps to make sure the initial melt was properly equilibrated. Second, after the melt was ready, the next stage of equilibration was performed to create the solid samples by keeping the aluminum melt at a constant temperature of 300, 400 and 500 K for 3,000 ps. Each isothermal simulation was repeated five times to evaluate the possible errors. Further, each isothermal simulation was run for a total of 500 ps to simulate the crystal nucleation and solidification. Additional details about MD simulations of solidification and deformation can be found in the Supplementary Material (Section I) and in our previous works on aluminum4,25,45. Table 2 shows the low-temperature elastic properties and high-temperature melting properties of aluminum determined by 2NN-MEAM MD simulations. A good agreement can be noticed with the results from the literature. This gives us adequate confidence in using the current MD simulation methodology to generate the training data for the development of the subsequent ML model.

The OVITO visualization package was used to monitor the deformation processes46. Within OVITO, common neighbor analysis (CNA) was used47 to identify the local crystalline structure of atoms. Using CNA, one can distinguish atoms in different crystal structure regions by calculating the statistics of diagrams formed from the nearest neighbors of each atom and comparing them with those previously known for standard crystals. Atoms not identified as face-centered cubic, hexagonal close-packed, or any other crystal type as implemented in OVITO can be identified as amorphous liquid or amorphous solid atoms.

After completing the solidification simulations at different isothermal and quenching conditions, MD simulations of the deformation of solidified single and polycrystalline aluminum samples were completed. The isothermal samples were prepared by keeping the aluminum melt at a constant temperature of 300, 400 and 500 K for 3000 ps. The results concerning the effect of undercooling temperature on the average grain size were reported in our previous work4,37,48,49, showing that the average grain size increases with decreasing the undercooling. In later part of the present article, the effect of grain size on mechanical properties is investigated. For simulating quenching conditions, aluminum melt is quenched from 1325 K to 300 K at cooling rates of 1011, 2.5 × 1011 and 5 × 1011 Ks−1. Six polycrystalline samples were created, three for isothermal and three for quenching cases. The quenching method was used to mimic the actual experimental procedure for producing undercooling where the temperature decreases from above the melting temperature with a certain cooling rate. More details on the isothermal and quenching simulations are available in our previously published works4,25,37,45,48,49. All the polycrystalline aluminum models were deformed at three different deformation temperatures (300, 400 and 500 K) and three strain rates (108, 109 and 1010 s−1), as shown in Table 3. During the MD simulation, we fix one end of the simulation box and apply “constant displacement” over a time, which is effectively a “constant engineering strain rate”. This means the box dimension changes linearly with time from its initial to final value. This method can be applied in LAMMPS by utilizing ‘erate’ command50. The stress in MD simulations is a measurement of pressure, and it can be done by using standard expressions for virial stress51, where the further the atoms move the higher the stress becomes. As a result, if we deform in the x directions, the values for the stress in the x-direction are the actual engineering stress, and the stress in the y and z directions remains close to zero.

Table 3 Single crystal, isothermal and quenching solidification simulations.

For the purpose of comparison, we also deformed a single crystal aluminum at the same strain rates and temperatures (9 cases). To calculate the statistical error from all the simulations, each uniaxial tensile simulation was replicated in x, y and z directions. The average stress data were recorded every 1000 steps (or 0.3 ps). Overall, 195 simulations (6 solidification cases and 63 deformation cases each at 3 directions) were performed to analyze the deformation behavior and mechanical properties of solidified aluminum. The results of these simulations are exploited in the next stage for ML model formation.

H-PCFE based machine learning modeling

In general, MD simulations with adequate model sizes can involve unreasonably high computational expenses for probabilistic analyses where thousands of random realizations are necessary. The situation further aggravates in the case of high strain rate simulations. Reducing model size can lead to inaccurate results in each random realization, resulting in a large cumulative statistical error in the probabilistic results obtained through MC simulations. The challenges of running multiple MD simulations at the necessary time and length scales can be addressed by ML-based approaches. In this work, we propose to perform a few MD simulations, with an adequate model size, based on which the ML models are formed. Subsequently, we perform MC simulations using efficient yet high-fidelity ML models (free from inaccuracies due to small model sizes in MD) to probabilistically characterize the properties of solidified metals. The ML-based approach acts as a surrogate to the computationally expensive MD simulations and predicts the macro-scale properties of solidified metals efficiently. Unlike conventional ML models, the proposed H-PCFE, being a Bayesian ML approach, is data efficient. Further, it can account for the effect of uncertainty in training data by exploiting mean and standard deviation of the MD simulations, which in principle addresses the issue of repeatability in stochastic simulations with low variance.

The H-PCFE based ML approach is integrated with MD simulations24,52. H-PCFE can be viewed as a type of Gaussian process (GP)21,22 where the mean function is represented by using polynomial correlated function expansion (PCFE)52. PCFE is formulated by combining the well-known analysis-of-variance (ANOVA) decomposition53 with polynomial chaos expansion (PCE)54. Detailed formulation of H-PCFE is provided in the Supplementary Material (Section II).

Consider \({\boldsymbol{X}}{\boldsymbol{=}}\left\{{X}_{1},{X}_{2},\ldots ,{X}_{N}\right\}{\boldsymbol{\in }}{{\mathbb{R}}}^{N}\) to be the input variables and \(Y\) to be the output. In H-PCFE, a probabilistic mapping between the output \(Y\) and the inputs \({\boldsymbol{X}}\) is assumed

$${Y|}{\boldsymbol{X}}\sim {\mathcal{G}}{\mathcal{P}}\left({\mu }_{{\rm{PCFE}}}\left(\cdot ;{\boldsymbol{\alpha }}\right),C\left(\cdot ,\cdot ;{{\boldsymbol{\theta }}}_{{\rm{GP}}}\right)\right),$$
(2)

where \({\mathcal{G}}{\mathcal{P}}\left(\cdot \right)\) represents a GP with mean-function \({\mu }_{{\rm{PCFE}}}\) and covariance function \(C\). As for the covariance function \(C\), there exists a number of functions in the literature52. In this work, the Gaussian covariance function has been used. \({\boldsymbol{\alpha }}\) in Eq. (2) represents the unknown coefficients in PCFE, and \({{\boldsymbol{\theta }}}_{{\rm{GP}}}\) represents the length-scale parameters and process variance of GP. \({\boldsymbol{\theta }}=\left[{\boldsymbol{\alpha }},{{\boldsymbol{\theta }}}_{{\rm{GP}}}\right]\) are referred to as the hyperparameters of H-PCFE. The hyperparameters of H-PCFE are computed by using maximum likelihood estimation and homotopy algorithm55. The estimation is carried out based on training dataset \({{{\Xi }}}_{t}\) and \({{\boldsymbol{Y}}}_{t}\). For further details on H-PCFE, interested readers may refer to24,53,56. For details on homotopy algorithm, readers may refer to55,57,58.

In this work, there are two inputs and three outputs. The two inputs are temperature and strain rate while the outputs are Young’s modulus, yield stress and ultimate stress. Training data for computing the hyperparameters of H-PCFE are generated by running MD simulations. The MD simulations are run for seven different solidification cases as shown in Table 3 (as discussed in the preceding subsection). For training the ML model, we have proposed two different approaches as discussed below.

Individual method

In this method, we train a different H-PCFE model for each dataset. In other words, we train seven H-PCFE models, each mapping the two inputs and the three outputs. The primary bottleneck of this method resides in the fact that we only have 9 training data (along with the information regarding mean and standard deviation) for training each H-PCFE model. Therefore, it is unlikely that the results obtained using this method will be accurate.

Combined method

To address the issue associated with individual method, we propose a combined method where the idea is to combine datasets from all the seven cases. To that end, a dummy variable \(Z\) is introduced. The variable \(Z\) is used to indicate the dataset from which the input training sample is taken. The input training matrix takes the following form

$${\Xi }_{t}={\left\{{X}_{1}^{i},{X}_{2}^{i},{Z}^{i}\right\}}_{i=1}^{{N}_{s}}=\left[\begin{array}{ccc}{X}_{1}^{1} & {X}_{2}^{1} & 1\\ {X}_{1}^{2} & {X}_{2}^{2} & 1\\ \vdots & \vdots & \vdots \\ {X}_{1}^{1} & {X}_{2}^{1} & 2\\ {X}_{1}^{2} & {X}_{2}^{2} & 2\\ \vdots & \vdots & \vdots \\ {X}_{1}^{9} & {X}_{2}^{9} & 7\end{array}\right]$$
(3)

where \({X}_{1}\) indicates temperature, \({X}_{2}\) indicates strain rate, and \({N}_{s}\) indicates the number of training samples. With this, it is possible to train a single H-PCFE model for all seven cases. The advantage of this setup is two-fold. First, the issue associated with extreme sparsity of data is addressed; instead of 9, the H-PCFE model now has 63 data points to be trained by. Second, with such augmentation, it is possible to incorporate the correlation among the dataset from different cases. This is expected to enhance the accuracy of the H-PCFE model. Note that the information regarding mean and standard deviation are exploited here for each of the data points.

Stochastic analysis and Monte Carlo simulation

Complete probabilistic description of the mechanical properties, such as Young’s Modulus, yield stress and ultimate stress, are obtained based on MC simulations. MC methods (or MC experiments/simulations) are a broad class of computational algorithms that rely on repeated random sampling following a particular probability distribution (such as random uniform distribution) to obtain numerical results. These methods are often used in physical and mathematical problems and are most useful when it is difficult or impossible to use direct mathematical algorithms. Figure 1f presents a schematic representation of a general stochastic system having two random input parameters and one output response. In general, though MC-based analyses are capable of obtaining comprehensive results for a physical/mathematical problem, these are computationally very expensive. These methods normally require thousands of simulations/experiments to be carried out corresponding to random input sets. Thus, the entire process becomes cost intensive, especially for problems where individual simulations/experiments are very costly and time consuming such as MD simulations. To overcome this difficulty, we have employed the ML model as an efficient surrogate of the actual MD code to carry out MD simulation and subsequent sensitivity analyses. Thus, the ML model is capable of obtaining Young’s modulus, yield stress and ultimate stress corresponding to any set of values of temperature and strain rate within the considered design space.

The computational efficiency of the proposed ML-assisted framework can be quantified here in terms of the actual number of MD simulations (nd) for developing the ML models and the number of function evaluations (nf) for different analyses carried out such as probabilistic characterization and sensitivity analysis (refer to section 3.2 and 3.3). It is noted that the time taken for forming the ML models after having the training dataset ready is negligible compared to a single MD simulation. Thus, the computational efficiency in the current framework can be quantified as  = \(\frac{{n}_{d}}{{n}_{f}}\). For the combined method proposed here, the computational efficiency can be evaluated as  = \(\frac{63}{10000}\,\), which leads to efficiency more than 150 times of a purely MD simulation-based analysis without involving ML. This demonstrates that the current probabilistic analysis is practically impossible to conduct using only MD simulations.