1. Introduction
Structural parts in the automotive and aerospace industries must achieve a high strength-to-weight ratio and strong resistance to corrosion. Additionally, these properties must be delivered in large quantities and complex geometries [
1,
2]. Considering this, aluminum alloys are the best candidates for lightweight structures as they provide the required strength-to-weight ratio together with corrosion resistance, and aluminum casting is one of the most widely used production methods for delivering large, complex, nearly net-shaped components [
3,
4]. However, producing primary aluminum is an energy-intensive procedure, accounting for approximately 2% of all greenhouse gas emissions in recent years [
5]. On the other hand, recycling of aluminum scraps consumes only 5% of the energy compared to the production of primary aluminum [
6]. Therefore, the use of recycled aluminum to produce casting parts is essential to reduce the carbon footprint of the industry, moving toward a greener future to meet the EU Green Deal objectives [
7]. However, the increasing use of secondary alloys introduced new challenges in maintaining uniform material quality. In cast aluminum parts, both global and local mechanical properties are inherently nonuniform and are heavily influenced by the alloy microstructure, which itself depends on the solidification dynamics and the heat transfer map during casting. In addition, maintaining consistent mechanical properties becomes more challenging while using recycled aluminum, which introduces variation in alloy composition. Although conventional simulation tools are available for predicting mechanical properties during the design phase [
8], they are often calibrated for nominal alloy composition. Consequently, performing new simulations for every possible compositional variant becomes computationally expensive and time-consuming. This motivates a microstructure-centric approach in which the solidification history is summarized by key descriptors that control mechanical response.
From a microstructural control perspective, the SDAS can be expressed with well-established scaling relations to the local thermal path, typically as:
where
is the cooling rate and
K is a material dependent constant. In aluminum alloys, exponents commonly cluster around
–
[
9]. This relation motivates a physics-guided strategy in which thermal parameters are treated as first-order drivers, and composition is analyzed as a bounded secondary effect. In this context, SDAS serves as a measurable microstructural target that links the thermal history imposed by the process to the mechanical behavior of the casting. Therefore, SDAS prediction is a fundamental requirement for controlling casting quality. Recent investigations further indicated that variations in alloying composition, such as Mg, Si, Sr, and Fe, can affect the SDAS by changing the solidification behavior and dendrite growth mechanism. For example, in a combined experimental–numerical study on cylindrical A356 coupons, Bayoğlu et al. showed that increasing the Fe content leads to a reduction in SDAS, but simultaneously degrades overall tensile performance due to the higher fraction of brittle
-AlFeSi intermetallics [
10]. Fracchia et al. [
11] investigated the role of Si (alongside Fe, Mg, and Cu) SDAS in Al–Si cast alloys, reporting a parabolic dependence for unmodified alloys between SDAS and the averaged alloying content. Furthermore, after addition of Sr, SDAS decreases across all alloys, with the strongest reduction observed for low-Si compositions. Zhang et al. [
12] provided evidence that SDAS follows the classical coarsening form:
Moreover, under a rotating magnetic field, the ripening exponent increases to
for AlSi7; in the Fe-bearing alloy AlSi7Fe1, however, the formation of
-Al
5FeSi suppresses interdendritic flow and the coarsening law remains at
. Additionally, several studies have demonstrated that SDAS directly affects mechanical properties, such as tensile strength, ductility, and fatigue resistance, proving that a finer SDAS usually increases mechanical strength and ductility by refining the microstructure, whereas larger SDAS often results in decreased mechanical performance [
13,
14,
15,
16,
17,
18].
Building on prior evidence, SDAS can be treated as the operative microstructural length scale in a Hall–Petch-type framework, where strength increases as the dendrite size decreases. In cast Al–Si alloys, the classic Hall–Petch relation for size strengthening written as
. Ghassemali et al. studied an Al-10Si cast alloy with Sr-modified Si and Al-5Ti-1B grain refiner under different cooling rates, producing SDAS ≈ 6–35
m and grain sizes ≈ 138–300
m. They also performed conventional tensile tests plus in situ SEM-EBSD to track cracking and deformation. It was concluded that SDAS (not grain size) is the physically meaningful length scale in a Hall–Petch relation for flow stress, and that observed cracks occurred mainly at dendrite/eutectic boundaries with trans-granular propagation [
19]. This SDAS-based Hall–Petch framing aligns with broader size-effect mechanics in which mechanical response scales with the inverse square root of a controlling microstructural length [
20].
Beyond thermal control, composition can be compactly summarized by the growth-restriction factor:
which captures how solutes impede dendrite/grain growth through liquidus slope
and partitioning
at concentration
[
21,
22,
23]. Published tables and reviews for Al alloys report element-wise
Q contributions (e.g., Ti, Si, Mg, Fe), enabling a practical, physics-based chemistry descriptor that complements SDAS and the thermal path [
24,
25]. In this work,
Q (alongside composition flags) is used as a bounded chemistry feature together with the thermal SDAS law to quantify how realistic composition variability can shift SDAS within the operating window.
Together with physics-based relations, data-driven machine learning (ML) models are also used in recent studies to capture residual and non-linear material behavior in casting industry. Lan et al., for example, used neural networks to estimate the strength and elongation of A380 from composition, cooling rate, and porosity [
1]. To accurately predict the yield strength and ultimate tensile strength of various aluminum alloys, Merayo et al. used a feedforward ANN model [
26]. Additionally, Srivastava et al. developed an ANN model to predict the mechanical properties of Al–MWCNT–RHA composites, achieving a regression accuracy greater than 99 % [
27]. Jimenez-Martinez et al. used neural network models to assist with the design of secondary aluminum alloys with optimized fatigue life, highlighting the capability of ML to support material design purposes [
28]. Shabani and Mazahery used ANN-FEM models to predict A356 alloy mechanical behavior, focusing on macroscopic properties like yield and tensile strength, without addressing dendritic features such as SDAS [
29]. Similarly, Oh et al. utilized neural networks to optimize mechanical properties in titanium alloys, demonstrating the broader applicability of ML in alloy systems, yet without addressing microstructural attributes like SDAS [
30]. More recently, Dorbane et al. used neural networks and Gaussian process regression to model stress–strain curves of Al6061 across temperatures, focusing on mechanical response rather than microstructural features like SDAS [
31].
Although the effect of SDAS on the final mechanical properties is widely explored and ML models are capable of predicting the mechanical properties of casting parts, few models are capable of predicting SDAS in secondary aluminum alloys while cleanly separating thermal effects from composition changes. Unlike prior ML studies, which focus primarily on predicting macroscopic mechanical properties, the present work introduces a physics-informed machine learning (PIML) framework to target SDAS as the primary microstructural descriptor. By integrating standard Finite Volume Method (FVM) thermal simulations with analytical solute-coarsening theories, this study establishes a computational surrogate model that explicitly accounts for realistic composition variability in secondary AlSi7 casting, bridging the gap between macroscopic process simulation and microscopic physical theory.
2. Materials and Methods
This study adopts a PIML method to enhance the predictive capabilities of standard casting simulations. By integrating FVM simulations with analytical solidification theories, the proposed framework explicitly captures the influence of alloy composition on microstructural evolution. The overall workflow, illustrated in
Figure 1, replaces traditional experimental validation with a robust ground-truth dataset derived from solute-dependent coarsening physics. The following subsections detail the computational DoE, the analytical framework, and the ML architecture utilized to construct this predictive surrogate model.
2.1. Computational Design of Experiments (DoE)
To decouple the effects of thermal history and composition on microstructural evolution, a comprehensive DoE was generated using the commercial casting simulation software Magmasoft
® (Version 6). A virtual dataset consisting of 500 unique simulations was conducted to map the solidification behavior of secondary AlSi7 alloys using a cylindrical mold design with different cylinder diameters to simulate different solidification times, as shown in
Figure 2.
To ensure a uniform and unbiased coverage of the multi-dimensional compositional space, the input variables (Si, Fe, Mg, Ti) were sampled using a Sobol quasi-random sequence. Unlike standard Monte Carlo sampling, the Sobol sequence minimizes the clustering of data points, ensuring that the boundaries of the operational window are explored as thoroughly as the center. The range of compositional variations investigated in the DoE is detailed in
Table 1. A fine compositional resolution was selected to explicitly resolve the steep, non-linear gradients associated with titanium-driven growth restriction, which would otherwise be obscured by coarser sampling strategies. To achieve this high-fidelity coverage across the multi-dimensional solute space without computationally prohibitive costs, a Sobol low-discrepancy sequence was utilized.
The simulations utilized a stepped casting geometry (cylindrical moduli of 4, 6, 8, 10 and 12 mm) to generate a wide range of cooling rates. Thermal history data (, ) were extracted from the geometric center of each cylinder to serve as the macroscopic input for the predictive model.
2.2. Physics-Based Hybrid Modeling Framework
To overcome the solute-sensitivity limitations of the commercial FVM solver, this study establishes a hybrid ground truth that integrates macroscopic thermal history with microscopic solute kinetics. Although the commercial solver accurately computes the thermal field (), it utilizes a simplified power law () that neglects complex solute interactions. To correct this, we calculate the target SDAS () using a rigorous semi-empirical adaptation of the solute-dependent coarsening model.
It is critical to distinguish the proposed model from the classical framework of Easton and StJohn [
21]. Although Easton and StJohn identified the growth restriction factor (
Q) as the governing thermodynamic parameter, their original model (
) describes nucleation-driven grain refinement. In contrast, SDAS is governed by Ostwald Ripening (diffusion-driven coarsening). Consequently, we integrated the
Q-factor into the cubic coarsening kinetics established by Roósz and Exner [
32], yielding an adapted constitutive law that respects both the chemical thermodynamics and the diffusive physics:
where
is the local cooling rate extracted from the FVM simulation, and
is the summation of the growth restriction effects of all alloying elements mentioned in Equation (
3). The solute parameters
m and
k for the Al-Si-Fe-Mg-Ti system are summarized in
Table 2.
Crucially, the coarsening coefficient
is not an arbitrary fitting parameter. To ensure the hybrid model remains consistent with established industrial standards,
was determined via a Baseline Anchoring Strategy. The coefficient was mathematically derived by equating Equation (
4) to the commercial solver’s output specifically for the standard binary alloy (Al-Si7Mg with
wt%). This calibration ensures that the hybrid model reproduces the trusted commercial baseline for standard alloys (
), isolating the ML task to predicting the discrepancy caused by potent grain refiners like titanium.
2.3. Physics-Informed Machine Learning Architecture
To address the solute sensitivity limitations of the commercial finite element solver, this study employs a PIML framework. Unlike traditional black-box machine learning which maps inputs directly to outputs without physical constraints, or standard Physics-Informed Neural Networks (PINNs) which embed physical laws as soft penalties, the proposed architecture utilizes a hard-constraint hybrid approach. This method leverages the FVM simulation (
) as a baseline for thermal history and geometry, while employing an analytical physics model (
) to serve as the ground truth for microstructural kinetics. The machine learning model is strictly tasked with learning the
discrepancy (or residual) between the thermal-only simulation and the solute-aware physics. While the target dataset in this study is generated via an analytical relationship (Equation (
4)), the introduction of a ML surrogate serves a dual purpose. First, it ensures computational efficiency: rather than extracting node-by-node thermal data from the 3D FVM mesh to manually compute Equation (
4) for every new scrap composition, the ML model learns a universal relative correction factor that can be instantly applied to the static FVM baseline. Second, this residual learning architecture future-proofs the framework. Analytical models are idealized. by establishing a surrogate model capable of handling synthetic noise (representing measurement uncertainty), the architecture is primed to be fine-tuned with empirical, noisy industrial data in future iterations, capturing complex thermodynamic interactions that strict analytical equations may oversimplify.
The distinction between the standard PINN approach and the residual learning approach used in this work is mathematically fundamental. A standard PINN operates by minimizing a composite loss function where the physics is treated as a regularization term (soft constraint) [
34]:
where
represents the differential equation governing the system. While effective for solving partial differential equations with sparse data, PINNs are computationally inefficient for this application because the analytical solution for growth restriction is already known. In contrast, our PIML framework formally defines the final predicted SDAS as the sum of the simulation baseline and a learned correction term [
35]:
where
represents the input vector of alloying elements (Si, Fe, Mg, Ti) and local cooling conditions. Input data for training the PIML algorithm is listed as follows:
The target residual
for training is derived directly from the discrepancy between the analytical physics model (Equation (
4)) and the simulation output:
By training the gradient boosting regressor to approximate this specific residual (
), the model effectively “injects” the missing solute physics (specifically the growth restriction factor,
Q) into the 3D simulation results. This architecture ensures that the final prediction retains the macroscopic accuracy of the commercial solver (e.g., heat transfer in complex geometries) while enforcing the correct microstructural response to potent grain refiners like titanium, which are otherwise ignored by the baseline solver.
To implement the regression function , this study utilized a Gradient Boosting Regressor (GBR). Unlike deep neural networks which often require massive datasets to converge, ensemble tree-based methods are well-suited for tabular metallurgical data where the interaction between features (e.g., cooling rate vs. solute content) is highly non-linear but the dataset size is finite. The model was constructed using a sequential additive training process, where each subsequent decision tree corrects the residual errors of its predecessor.
To ensure the ML model captures the underlying physical trends rather than simply memorizing the training data (overfitting), its settings were optimized using a grid search with 5-fold cross-validation. A range of values was systematically tested for four key parameters: the number of trees (100, 300, and 500), the maximum depth of each tree (3, 4, and 5), the learning rate (0.01, 0.05, and 0.1), and the minimum number of samples required to split a node (2, 5, and 10). All these combinations were evaluated to identify the configuration that produced the lowest Mean Absolute Error (MAE). For the standard dataset, the optimal settings were determined to be 300 trees, a maximum depth of 4, a minimum split of 2, and a learning rate of 0.05. Furthermore, to evaluate how the model handles real-world experimental uncertainty, random Gaussian noise (representing a typical measurement error of about 1.5%) was artificially added to the training data. When exposed to this noisy dataset, the grid search automatically adapted by selecting more restricted settings: 500 trees, a shallower maximum depth of 3, a minimum split of 5, and a slower learning rate of 0.01. This practical test demonstrates that the grid search process successfully restricts the model’s flexibility, forcing it to learn the actual thermodynamic relationships instead of just copying random experimental errors.
For validation, the dataset was partitioned using a stratified 80/20 train–test split. To rigorously test the robustness of the PIML framework, synthetic Gaussian noise (m) was injected into the test set target variables. This procedure simulates the inherent measurement uncertainty of optical microscopy, forcing the model to learn the underlying solute-refinement signal rather than fitting the clean analytical curve.
3. Results
3.1. Thermal History and Nominal Simulation Baseline
The casting process simulation was initialized using the standard gravity die casting parameters summarized in
Table 3, representing the nominal processing window for Al-Si7Mg alloys.
The computational DoE successfully mapped the fluid dynamics and subsequent solidification conditions across the varying mold geometries.
Figure 3 illustrates the filling sequence, confirming a quiescent bottom-filling pattern that minimizes turbulence and air entrapment.
Following the filling analysis, the thermal history was characterized to define the local solidification conditions. To ensure a consistent quantitative baseline, the local cooling rate (
) was derived specifically from the simulated cooling curves at the geometric center of each step.
Figure 4 illustrates the typical thermal profile observed in the simulations. The solidification interval (
) was determined by the difference between the liquidus temperature (
C) and the solidus temperature (
C), as shown in
Figure 4, yielding a characteristic interval of (
K) for the Al-Si7Mg alloy system. The local cooling rate is thus defined as
where
is the time required for the specific section to pass through the solidification range. This definition allows for a direct correlation between the thermal simulation outputs and the microstructural measurements. To ensure data consistency, all quantitative measurements (solidification time and SDAS) were virtually probed at the geometric center of each step section (
4,
6,
8,
10, and
12 mm). This specific sampling location was selected to isolate the bulk cooling behavior and eliminate edge effects or chill-zone artifacts near the mold walls.
3.2. Finite Volume Method Analysis
The step-mold configuration generated a broad spectrum of local cooling rates (
), ranging from approximately
K/s in the thickest 12 mm section to over
K/s in the thinnest 4 mm section.
Figure 5 visualizes the fraction solid evolution and the resulting microstructural variation across the geometry.
Figure 6 presents the aggregated SDAS prediction extracted directly from the MAGMAsoft at these center points. The software efficiently calculates the microstructural trend using a standard calibration for the AlSi7 alloy class. As expected for a macroscopic process simulation, the predicted SDAS follows a consistent power-law curve dependent on the local cooling rate:
This baseline accurately represents the behavior of a nominal binary composition, providing a reference point for the general solidification trend. However, strictly relying on thermal history implies that the software is insensitive to variations in solute-driven growth restriction.
3.3. Sensitivity to Solute-Driven Refinement
While the commercial solver robustly captures the macroscopic thermal trends (
Figure 6), its standard calibration is designed to represent a nominal alloy composition.
Figure 7 isolates the specific influence of titanium variation on the predicted microstructure for the 12 mm section (
K/s).
The FVM prediction (red dashed line) remains statistically invariant () across the analyzed compositional range (0.10–0.50 wt% Ti). This behavior reflects the standard formulation of macroscopic process simulations. Consequently, the model relies primarily on local cooling conditions to predict microstructural scale, assuming a constant chemical baseline.
In contrast, the PIML model (blue curve) accounts for the thermodynamic impact of solute segregation. As the titanium content increases from 0.10% to 0.50%, the growth restriction factor rises significantly, driving a corresponding reduction in SDAS from down to ≈13.5 . The divergence between the two curves highlights the scope for enhanced precision in secondary alloy modeling: while the standard thermal approach is sufficient for stable primary alloys, capturing the fluctuations inherent in recycled batches requires accounting for the non-linear thermodynamic effects of trace elements.
In this work, we refer to the solute sensitivity gap as the systematic difference between SDAS predicted by the commercial FVM solver and SDAS predicted by a solute-aware model when the thermal history is the same. The FVM solver uses a calibrated SDAS power-law that depends mainly on cooling conditions and assumes a fixed chemical baseline, so it is largely insensitive to batch-to-batch composition changes. In contrast, the PIML model includes the effect of solute segregation through the growth restriction factor (
Q). Therefore, when trace elements change (especially titanium in our alloy window),
Q changes and the predicted SDAS shifts, while the FVM prediction remains nearly constant.
Figure 7 illustrates this directly: the shaded region represents the solute sensitivity gap (i.e., the SDAS mismatch caused by solute blindness).
It is important to note that the experimental range of titanium (0.10–0.50 wt%) was selected to extend beyond typical industrial limits (<0.15 wt%) intentionally. In secondary aluminum processing, scrap variability can lead to unexpected spikes in trace element concentrations. By expanding the DoE to include these higher-than-usual levels, the study effectively “scales up” the microstructural response. This allows for a clear mathematical resolution of the non-linear saturation point of the growth restriction factor (Q), ensuring that the model captures the full asymptotic behavior of the alloy system rather than just a linear approximation near the baseline.
3.4. Physics-Informed Machine Learning Performance
To bridge the gap between the static commercial solver and the dynamic physical reality, the PIML model was trained to predict the Relative Refinement Factor (
). This target variable isolates the chemical contribution from the thermal scale, allowing the model to learn a universal correction rule independent of the local solidification time:
The model performance was evaluated on a held-out test set (20% of the data) with synthetic Gaussian noise (
) added to represent measurement-like variability.
Figure 8 presents the parity plot comparing the PIML-corrected predictions against the ground truth. The model achieves a coefficient of determination (
) of 0.95, indicating that the chemical correction factor can be predicted with high precision using composition as inputs.
To understand the value of the PIML framework, it is helpful to consider the limitations of standard machine learning. Traditional data-driven models attempt to map inputs directly to outputs without any knowledge of underlying physical laws. Because they rely entirely on data, these models typically require massive datasets to train effectively and often struggle to make accurate predictions when the alloy composition falls outside the normal training range. In contrast, the PIML approach uses known thermodynamic equations as a reliable baseline. Instead of learning the entire process from scratch, the algorithm is only tasked with learning the residual difference between the thermal simulation and the actual physical behavior. This greatly reduces the amount of training data needed and ensures that the final predictions remain physically realistic, even when dealing with the highly variable compositions typical of recycled aluminum alloys.
The error analysis is further detailed in
Figure 9, which shows the distribution of prediction residuals. The errors follow a Gaussian distribution centered at zero, supporting that the GBR has captured key physical trends with limited systematic bias, even in the presence of noise. The robustness of the model is validated through the feature importance analysis (
Figure 9). The feature importance analysis (
Figure 9b) shows that the correction is mainly controlled by the solidification time and the growth restriction factor
Q. Among the individual composition flags, Ti is the most influential element, consistent with its high growth-restriction potency, but most of its effect is already summarized in
Q. This confirms that the PIML algorithm is showing limited signs of overfitting considering the fact that the grid search method has been implemented to the hyperparameter tuning.
3.5. Sensitivity and Robustness Analysis
To address the robustness of the solute sensitivity gap, a systematic sensitivity analysis was performed to verify that the PIML model specifically targets potent grain refiners without introducing spurious corrections for standard alloying elements.
Figure 10 presents the model’s predicted refinement impact (relative to the FVM baseline) as the concentration of each key element (Si, Fe, Mg, Ti) is swept across its entire experimental range (normalized from 0 to 1).
The analysis reveals a stark contrast in model behavior. For titanium (red solid line), the model predicts a steep refinement trajectory, reducing the SDAS by up to 25% as the concentration increases from 0.0% to 0.5%. This response is physically consistent with the high growth restriction factor of Ti ( K/wt%). Conversely, for the baseline alloying elements—silicon (6.5–7.5%), iron (0.1–0.6%), and magnesium (0.2–0.5%)—the model’s response is effectively flat (near 0% impact). When sweeping Si/Fe/Mg, Ti is held at its reference value (e.g., dataset mean 0.30 wt%), so the predicted correction includes the baseline Ti-driven refinement; hence, the curves are offset but show negligible sensitivity to Si/Fe/Mg. This result provides critical validation of the model’s robustness: the PIML framework shows low sensitivity to the noise of standard specification variations, isolating and correcting only the thermodynamically potent impurity fluctuations that drive the discrepancy between simulation and reality.
5. Conclusions
This study successfully developed and validated a PIML framework designed to enhance the predictive accuracy of commercial casting simulations for secondary AlSi7 alloys. By integrating macroscopic FVM thermal data with microscopic analytical solidification physics, the proposed model effectively bridges the gap between process simulation and solute-driven microstructural evolution.
A key finding of this research is the identification and quantification of the solute sensitivity gap. Standard thermal-only casting simulations do not inherently account for batch-to-batch chemical variations, leading to a potential miscalculation of SDAS in highly alloyed or recycled batches. To address this, the trained Gradient Boosting Regressor demonstrated high predictive capability. The model achieved a coefficient of determination () of 0.95 and an MAE of m on unseen test data featuring synthetic noise, showing its robustness against typical measurement uncertainty.
Furthermore, feature importance analysis confirmed that microstructural evolution can be decoupled into a thermal scaling factor and a chemical driving factor. While the local solidification time establishes the baseline SDAS scale, accounting for 51.0% of the model’s predictive weight, the thermodynamic growth restriction factor (Q) dictates the non-linear refinement slope, accounting for 46.3%. The study particularly highlights the notable influence of titanium trace elements in recycled aluminum. Variations in titanium can drive a non-linear reduction in SDAS by up to 25%, a phenomenon that traditional quality control and simulation tools may not fully capture when the element exceeds standard nominal thresholds.
By learning a universal relative correction factor, the PIML architecture allows for rapid, composition-specific microstructural predictions. This reduces the need to perform computationally expensive 3D FVM recalculations for every new secondary aluminum composition variant. Ultimately, this hybrid modeling approach provides a scalable tool for the aluminum casting industry, supporting the broader adoption of secondary alloys by ensuring reliable microstructural prediction despite inherent scrap variability. Future work will focus on the empirical validation of these synthetic findings using real-world industrial casting data, alongside extending the framework to predict macroscopic mechanical properties based on the resolved microstructure.