WorksComputer Science
LM6-CastBench: A Geometry-Aware Simulation Dataset for Transient Thermal Prediction in LM6 Sand Casting
Abstract
Transient thermal fields during solidification connect casting process conditions and cooling behaviour to the formation of defect-prone regions in aluminum cast ings. Repeatedly solving this thermal problem across geometries and process conditions is computationally expensive, motivating data-driven surrogate models. However, existing machine-learning studies on casting thermal behaviour rely on study-specific simulation databases that do not support reproducible geometry-level benchmarking. We introduce LM6-CastBench, an open simulation dataset for geometry-aware learning of transient thermal fields in LM6 aluminum sand casting, combining three geometry families, ten variants per family, five pouring tempera tures, and three mould temperatures (450 geometry-process cases in total). Each case retains CAD geometry, unstructured mesh connectivity, spatial descriptors, process metadata, and time-resolved nodal temperatures. We benchmark a point wise MLP against a spatially structured U-Net under geometry-level data splits; the U-Net reduces temperature-field errors by a large margin, with the biggest gains on geometries with localized features and abrupt section changes. LM6-CastBench gives researchers a reproducible dataset and benchmark for geometry-aware surro gate modelling of casting thermal behaviour.
Introduction
Transient thermal behaviour governs solidification and is an important factor in the formation of defects such as porosity and shrinkage-related discontinuities [16, 3]; the dataset and models in this paper target the transient temperature field under a conduction-dominated assumption and do not simulate mould filling or predict defects directly. Process conditions such as pouring temperature further affect solidification behaviour in LM6 aluminium alloy [1]. Finite-element simulation resolves these fields [17, 4], but repeated simulation across geometries and process conditions is computationally demanding, motivating surrogate models for rapid prediction [2].
Recent work has learned casting thermal behaviour directly from simulation data: Kang et al. [5, 6] use procedurally generated 2D geometries with image-like temperature fields, and Ktari et al. [7] retain finite-element nodal temperatures for a fixed casting configuration while varying only pouring temperature. Neither provides a benchmark where 3D geometry and process variation are both systematically controlled while the underlying mesh and transient field remain available; reduced-order and mesh-based casting approaches face the same limitation [18].
LM6-CastBench addresses this gap. It provides three geometry families (brake lever, flange, stepped block) with ten controlled variants each, simulated over five pouring and three mould temperatures (450 geometry-process cases), while keeping geometry, mesh, process conditions, and transient thermal response linked in a common representation rather than releasing flattened temperature tensors. To demonstrate the value of this organization, we compare a point-wise MLP against a spatially structured 3D U-Net under geometry-level splits, testing whether the retained spatial structure has a measurable effect on prediction and providing a baseline for future geometry-aware surrogates.
Our contributions are threefold: (1) a controlled 3D simulation dataset with 450 transient thermal cases spanning geometry and process variation; (2) a geometry- and process-aware data organization enabling reproducible geometry-level evaluation; (3) a benchmark showing that spatially structured prediction substantially improves thermal-field reconstruction, especially for geometries with localized features and abrupt section changes.
Dataset Generation
LM6-CastBench is built as an end-to-end simulation-to-dataset pipeline (Figure 1): controlled geometric variation, a shared process-condition grid across every geometry, the transient thermal solve, and preservation of the resulting fields together with their spatial and process descriptors.

Figure 1. End-to-end workflow for generating LM6-CastBench.
Three geometry families (brake lever, flange, stepped block) are each parametrized with ten LHS-sampled variants [12], exported as STEP models, and independently meshed with first-order tetrahedral elements (quality-checked; local refinement near holes, fillets, and curved features). Each variant is then simulated under all pouring/mould temperature combinations using an enthalpy-based finite-element formulation in Elmer FEM [11], giving 450 geometry-process cases in total. Full parameter ranges, meshing settings, and solver configuration are given in Appendices § 5 and § 6.
For each case, the released dataset retains node coordinates, mesh connectivity, signed-distance values, process parameters, and time-resolved nodal temperatures, so that geometry and its corresponding thermal response are never separated. Data are split 80/10/10 (train/val/test) at the geometry-variant level within each family – 8 of the 10 variants per family for training, 1 for validation, and 1 for test (3 held-out test geometries in total) – so timesteps from the same physical geometry never appear in both training and test sets; we note that three held-out geometries is a small test set and treat the benchmark (§ 3) as illustrative of the dataset’s utility rather than a statistically exhaustive evaluation.
Data readiness design. Each case carries a unique (geometry-family, variant, process-condition) identifier and a metadata record linking this identifier to its CAD, mesh, and field file paths, its process parameters, and its split assignment – a provenance chain (field mesh CAD process solver setting) that lets a user or agent query, filter, or regroup cases, and stratify errors by any of these fields, without re-deriving them from raw solver output. The fixed split manifest, split seed, and benchmark scripts are released with the repository so future methods can be compared against the same partitions.
Figure 2 shows representative variants across the three families together with their CAD geometry, mesh, voxelized occupancy representation, and simulated temperature snapshots. The repository contains all 450 cases as preprocessed PyTorch tensor (.pt) files, the generation and benchmark scripts, released under CC-BY-4.0: https://github.com/SuhaniKolhatkar/LM6-CastBench.

Figure 2. Geometry, spatial representations, and transient thermal fields in LM6-CastBench.
ML Benchmarking
We compare two surrogate formulations with different spatial representations under the same geometry-level splits: a point-wise MLP predicting nodal temperature from coordinates, signed-distance value, process temperatures, and time; and a grid-based 3D U-Net [15] predicting the field on a voxel grid from occupancy, signed-distance, process, and temporal channels, mapped back to FEM nodes for evaluation (Table 1). Both are trained with MSE/Adam and evaluated with NMSE, MAE, relative , P95 error, temporal correlation, and inference time. For each test case, node, and time, we compute the absolute error between predicted and reference temperature; MAE, NMSE, and relative are averaged over all test nodes, timesteps, and geometry-process cases, P95 is the 95th percentile of the resulting absolute-error distribution, and temporal correlation is the Pearson correlation between predicted and reference nodal time series, averaged over nodes and cases. Implementation and training details (parameter counts, epochs, batch size, learning rate, hardware) are given in Appendix § 6.
| Implementation | Point-wise MLP | Grid-based 3D U-Net |
| Representation | FEM nodes | voxel grid |
| Input | Occupancy, | |
| Output | Nodal temperature | 3D temperature field |
| Architecture | 3-hidden-layer MLP | 3D encoder–decoder U-Net |
Table 1. Benchmark implementation details of the point-wise MLP and grid-based 3D U-Net.
Quantitative results. Table 2 summarizes performance on held-out geometry variants. The U-Net consistently reduces error relative to the MLP, modestly for the brake geometry and substantially for flange and stepped block: MAE falls from 8.38 K to 2.19 K (brake), 36.75 K to 1.03 K (flange), and 80.71 K to 1.86 K (stepped block), with P95 error following the same pattern. The MLP is faster at inference (0.51–1.20 s vs. 2.66–8.04 s), so the benchmark separates computational cost from prediction fidelity.
| Geometry | Model | NMSE | MAE (K) | Rel. | P95 (K) | Temp. Corr. | Time (s) |
| Brake | MLP | 0.002456 | 8.382 | 0.0149 | 21.125 | 0.9996 | 0.511 |
| Brake | U-Net | 0.000200 | 2.187 | 0.0045 | 6.817 | 1.0000 | 2.662 |
| Flange | MLP | 0.0642 | 36.748 | 0.0626 | 66.151 | 0.9961 | 1.195 |
| Flange | U-Net | 7.61E-05 | 1.033 | 0.0023 | 2.431 | 1.0000 | 4.516 |
| Stepped Block | MLP | 0.2543 | 80.707 | 0.1328 | 112.097 | 0.9986 | 1.065 |
| Stepped Block | U-Net | 3.08E-04 | 1.861 | 0.0055 | 5.061 | 0.9999 | 8.041 |
Table 2. Quantitative temperature-field prediction performance of the MLP and U-Net on held-out geometry variants.
Spatial behaviour. Figure 3 compares predicted fields and absolute-error maps across the three geometries. The MLP shows larger, more persistent errors around the flange ring, bolt-hole regions, and the stepped block’s cross-sectional transitions, consistent with its point-wise (no neighbouring-context) representation; the U-Net tracks the simulated field more closely in these regions by processing neighbouring spatial locations jointly. Table 2 reports errors averaged over all test geometries, process conditions, nodes, and timesteps, whereas Appendix § 7 reports individual best/median/worst cases, which show larger instantaneous errors during the early transient but are consistent with these aggregate trends. This indicates that the geometric and spatial structure preserved in LM6-CastBench is consequential for prediction, and gives a consistent basis for evaluating further surrogates (e.g., graph networks, neural operators) against the same held-out geometries.

Figure 3. (a) Point-wise MLP: predictions and error maps across representative LM6-CastBench geometries. (b) Grid-based 3D U-Net: predictions and error maps across representative LM6-CastBench geometries. Transient temperature-field predictions and error maps for the point-wise MLP (left) and grid-based 3D U-Net (right) across representative LM6-CastBench geometries.
Limitations and Future Scope
The dataset currently covers ten variants per family and two process parameters (pouring and mould temperature); broader geometric and process coverage, parametrized gating/riser systems, and coupled filling-solidification physics are natural extensions. The U-Net’s accuracy is also bounded by the voxel quantisation, since mesh nodes sharing a voxel receive the same prediction. The benchmark currently uses only two baseline architectures, and the dataset is intended to support broader comparisons with graph networks, neural operators, and physics-informed models [13, 9, 8, 14, 10].
Conclusion
LM6-CastBench links geometry, process conditions, mesh discretization, and transient thermal response in a single reproducible dataset of 450 cases across three geometry families. The MLP/U-Net benchmark shows that this retained spatial structure has a measurable, geometry-dependent effect on prediction accuracy, largest where geometries contain localized features and abrupt section changes. Beyond this comparison, the dataset offers a controlled space for evaluating future geometry-aware surrogate and neural-operator methods on the same underlying physics.
Large Language Model Disclosure. Large language models were used only to review, check, and verify author-written model implementation codes; all codes, modelling decisions, and final results were developed and validated by the authors.

Figure 4. CAD Parametrization details
CAD Parametrization and Geometry Generation
The first component of the dataset is controlled geometric diversity. LM6-CastBench contains three casting geometry families – brake lever, flange, and stepped block – each represented by ten geometrically distinct variants generated from a fixed set of parametrization rules while preserving the topology of the family. Rather than generating arbitrary shapes, independent geometric parameters are sampled within their design spaces using Latin Hypercube Sampling (LHS) [12], covering the prescribed parameter space without a full factorial geometry study and retaining a recognizable relationship between variants within each family. The resulting CAD models are exported in STEP format and passed independently through the downstream meshing and simulation stages; each variant remains an identifiable geometry-level unit throughout the dataset, which makes it possible to separate geometries during evaluation and prevents different time samples from the same physical shape from being treated as independent geometries.
Table 3 summarizes the design parameters for each family, their definitions or governing relations, and the corresponding ranges or fixed values used for CAD variant generation.
| Family | Parameter | Definition / formula | Range or value |
| Stepped block | Length, layer 1 (DOE) | 470–670 mm | |
| Stepped block | Length, layer 2 (DOE) | 250–450 mm | |
| Stepped block | Length, layer 3 (DOE) | 30–230 mm | |
| Stepped block | Breadth, layers 1-3 (fixed) | 50 mm | |
| Stepped block | Thickness, layers 1-3 (fixed) | 20 mm | |
| Flange | Outer diameter (DOE) | 80–140 mm | |
| Flange | Base thickness (DOE) | 10–25 mm | |
| Flange | Bore ratio (DOE) | 0.42–0.52 | |
| Flange | Boss-wall thickness (DOE) | 6–10 mm | |
| Flange | Boss height (DOE) | 8–20 mm | |
| Flange | — | Boss taper angle (DOE) | to |
| Flange | Bolt-hole diameter (DOE) | 6–10 mm | |
| Flange | Bore diameter (derived): | derived | |
| Flange | Boss outer diameter (derived): | derived | |
| Flange | — | 4 bolt holes on the bolt circle between boss and rim, at orthogonal positions | — |
| Brake lever | Bottom-hole diameter (DOE, anchor) | 12–16 mm | |
| Brake lever | Top-hole diameter (DOE, anchor) | 10–14 mm | |
| Brake lever | Bottom outer radius (DOE, anchor) | 9.5–11.5 mm | |
| Brake lever | Top outer radius (DOE, anchor) | 9–11 mm | |
| Brake lever | Right-end diameter (DOE, anchor) | 14–18 mm | |
| Brake lever | Right-end -offset from bottom anchor (DOE) | — | |
| Brake lever | Top-hub -offset (DOE, anchor) | 18–28 mm | |
| Brake lever | — | Pad length (DOE) | 6–12 mm |
| Brake lever | — | Bottom anchor fixed as reference; top and right-end anchors repositioned by and ; all other sketch points (line ends, fillet centres, Bézier poles) displaced by inverse-distance-weighted (IDW) interpolation of the three anchor displacements, so originally coincident points remain coincident | — |
Table 3. Parametric design variables used to generate the three LM6 casting geometry families. The table lists the independent geometric parameters, their definitions or governing relations, and the corresponding design ranges or fixed values used during Latin Hypercube Sampling.
Meshing Strategy, Simulation Methodology and Material Properties
Meshing Strategy
Each geometry variant is independently meshed using first-order tetrahedral elements, with local refinement applied around geometrically complex regions such as holes, fillets, and curved features. Rather than deforming a common base mesh to represent different variants, each mesh is generated independently from its CAD geometry, so it retains the spatial differences introduced during parametrization; mesh-quality checks are applied across all three geometry families before thermal simulation so that released temperature fields remain associated with their original unstructured spatial discretization rather than being reduced to temperature values alone.
Each STEP geometry was meshed independently, with a dedicated mesh generated for every geometry instance rather than by morphing or deforming a common base mesh, preserving the geometric fidelity of individual variants and allowing local mesh refinement to follow geometry-specific features. First-order tetrahedral elements were used throughout the dataset. Surface meshing was performed using the Frontal-Delaunay algorithm, followed by volumetric meshing using the HXT algorithm.
Mesh Quality. Mesh quality was evaluated for all geometry variants using standard quality measures. The target ranges maintained during mesh generation are summarized in Table 4.
| Mesh-quality metric | Target range |
| Signed Inverse Condition Number (SICN) | 0.87–0.90 |
| Gamma | 0.80–0.90 |
| Signed Inverse Gradient Error (SIGE) | 0.10–0.40 |
Table 4. Target mesh-quality ranges used for LM6-CastBench.
Element Sizing Strategy. Element size was selected according to the characteristic dimensions of each geometry rather than using a single global mesh size. The principal geometric measures considered were the overall bounding-box dimensions, hole and fillet diameters, and minimum wall thickness. This geometry-dependent sizing strategy was complemented by curvature-based refinement in regions with significant geometric variation, including bores, fillets, and bolt holes. Consequently, finer elements were generated in curved and geometrically complex regions, while relatively coarser elements were retained in planar and geometrically simple regions.
Physical Groups. Each geometry was defined using two physical groups: one physical volume representing the complete casting domain and one physical surface representing the complete external boundary. The volume group was used for material-property assignment, while the surface group provided the boundary region required for application of the thermal boundary conditions during simulation.
| Physical group | Region represented | Purpose |
| Casting volume | Complete casting domain | Material-property assignment |
| External surface | Complete external boundary | Application of thermal boundary conditions |
Table 5. Physical groups defined for each meshed geometry.
Process-Condition Design
Every geometry variant is exposed to the same process-condition grid: five pouring temperatures and three mould temperatures, giving 15 thermal simulation cases per geometry variant and cases in total (Table 6). This design separates process variation from geometry variation and ensures balanced representation of process conditions throughout the dataset.
| Parameter | Values |
| Pouring temperature, | 953 K, 973 K, 993 K, 1013 K, 1033 K |
| Mould temperature, | 303 K, 353 K, 403 K |
| Process combinations per geometry | |
| Geometry variants | 3 families variants |
| Total simulation cases |
Table 6. Process-condition design of LM6-CastBench.
Governing Thermal Model
The transient thermal simulations were performed using the Elmer FEM solver. Heat transfer within the casting was modelled under a conduction-dominated assumption, with solidification represented using an enthalpy-based phase-change formulation; metal flow and convective transport within the molten alloy were not considered in the present baseline model. Simulations were performed in Cartesian coordinates with a second-order backward differentiation (BDF2) scheme for temporal discretization, an enthalpy-based phase-change model, a linear-system tolerance of for the heat equation and for the flux/gradient solve, and a nonlinear-system tolerance of . The initial condition was a spatially uniform temperature field at the pouring temperature (). Time stepping used a geometry-specific schedule of progressively coarsening steps (fine steps during the early transient, coarser steps as cooling slows): for the brake and stepped-block geometries, and for the flange geometry. For each geometry variant, the process space was sampled by combining five pouring-temperature levels with three mould-temperature levels, resulting in 15 thermal simulation cases per geometry variant.
The transient thermal field was governed by the enthalpy-based energy equation
where is the material density, is the effective heat capacity incorporating the phase-change contribution, and is the temperature-dependent thermal conductivity.
Heat transfer between the casting and mould was represented using a temperature-dependent convective (Robin-type) boundary condition,
where denotes the temperature-dependent heat-transfer coefficient (Table 10) and is the prescribed external/ambient temperature used in the boundary condition.
| Temperature (K) | (W m K) |
| 293 | 35 |
| 850 | 110 |
| 868 | 300 |
| 886 | 633.3 |
| 993 | 633.3 |
Table 10. Convective boundary coefficient , from the Elmer .sif solver input file (piecewise-linear between listed points).
Material Properties
The casting material was modelled as LM6 aluminium alloy (Al–Si12) with a constant density (Table 7). Tables 8-10 list the temperature-dependent specific heat , thermal conductivity , and convective boundary coefficient exactly as specified in the Elmer .sif solver input file (piecewise-linear between listed points); the full .sif files are provided in the repository. The enthalpy table used for the phase-change (latent-heat) treatment has its onset near 850 K and plateaus near 886 K; treating these as the effective solidus and liquidus temperatures gives K and K, with a latent heat of fusion obtained from the enthalpy change across this interval. These three values are inferred/derived from the enthalpy curve rather than set as explicit standalone keywords in the .sif file, and are reported here for transparency; the source enthalpy table is included in the repository so they can be independently recomputed.
| Property | Value |
| Density, | 2650 (constant) |
| Solidus temperature, (inferred) | 850 K |
| Liquidus temperature, (inferred) | 886 K |
| Latent heat of fusion, (derived) | J/kg |
| Initial condition | Uniform, |
| External/ambient temperature, | 353 K |
| Phase-change treatment | Enthalpy-based |
Table 7. General material and boundary-condition properties of LM6 used in the simulations.
The specific heat capacity is defined as:
| Temperature (K) | (J kg K) |
| 293 | 871 |
| 473 | 920 |
| 673 | 963 |
| 850 | 1050 |
| 886 | 1080 |
| 1000 | 1080 |
Table 8. Specific heat of LM6, from the Elmer .sif solver input file (piecewise-linear between listed points).
The thermal conductivity is defined as:
| Temperature (K) | (W m K) |
| 293 | 155 |
| 473 | 159 |
| 673 | 163 |
| 850 | 100 |
| 886 | 90 |
| 1000 | 90 |
Table 9. Thermal conductivity of LM6, from the Elmer .sif solver input file (piecewise-linear between listed points).
The convective heat-transfer coefficient (Eq. (2)) is defined as:
Numerical and Mesh Settings
Table 11 summarizes the solver and discretization settings; Table 12 reports mesh size for one representative variant per geometry family (node count, edge count, and number of saved timesteps, extracted with PyVista).
| Parameter | Description |
| Analysis type | Transient thermal (Elmer FEM, Heat Equation) |
| Time integration | BDF2 |
| Linear tolerance (Heat Equation) | |
| Linear tolerance (Flux/Gradient) | |
| Nonlinear tolerance | |
| Phase-change model | Spatial 2 (enthalpy-based) |
| Pouring temperature | Five levels (953-1033 K) |
| Mould temperature | Three levels (303-403 K) |
| Cases per geometry variant | 15 |
| Coordinate system | Cartesian |
| Mesh-to-solver scaling | Applied consistently |
| Linear solver | Iterative BiCGStab |
| Flux/gradient solver | Iterative CG |
| Elmer FEM version | ElmerSolver v26.1 |
| Output | VTU temperature fields |
Table 11. Summary of numerical and process settings.
| Geometry family | Nodes | Mesh edges | Saved timesteps |
| Brake | 6,144 | 67,278 | 638 |
| Flange | 12,469 | 130,906 | 1,020 |
| Stepped Block | 10,192 | 121,086 | 1,800 |
Table 12. Mesh statistics for one representative variant per geometry family.
Randomness, Seeds, and Licensing
The geometry-variant train/validation/test split (§ 2) uses a fixed random seed of 42 (sklearn.train_test_split), giving, concretely, 120/15/15 simulation cases per family for train/validation/test (8/1/1 geometry variants × 15 process conditions each). Model training used a single seed per model (not averaged over repeated seeds). The exact LHS geometry-sampling seed was not logged; since the generated STEP geometries for all 30 variants are released, the geometry set itself does not depend on it. The split-index manifest is included in the repository, and the dataset and code are released under the CC-BY-4.0 licence. Environment and dependency versions are recorded in the repository to support exact reproduction.
Model Training Details
MLP. Input ; architecture Linear(7128)-ReLU-Linear(128128)-ReLU-Linear(12864)-ReLU-Linear(641) with 25,857 trainable parameters; MSE loss on normalized values; Adam (, , ), learning rate (constant), batch size 4,096 (node, timestep) rows, 50 epochs; per-feature z-score input normalization and z-score target normalization (denormalized at inference), both using training-split statistics only.
U-Net. A separate U-Net was trained for each geometry family (brake, flange, stepped block). The three models share one architecture, one set of hyperparameters and one voxelisation; they differ only in their training data, and therefore in their normalisation statistics and best-validation epoch. Each variant is voxelised onto a grid over its node bounding box (5% padding); each voxel takes the value of its nearest mesh node (-d tree, scipy.cKDTree), and a voxel is marked occupied (= 1) only if that node lies within 1.5 voxel diagonals, otherwise empty (= 0). The 5 input channels are occupancy, SDF, , and (the last three constant over the grid); the output is 1 channel (temperature). Grid-to-node inference uses a deterministic voxel-index lookup, so nodes sharing a voxel receive the same prediction. The network is a 3D U-Net with three down-sampling stages, a bottleneck and three up-sampling stages, with skip connections by concatenation at every level. Each convolution block is two repetitions of Conv3d(, padding 1)–InstanceNorm3d–ReLU. Encoder channels are with MaxPool3d (factor 2) between stages, the bottleneck is , and the decoder uses ConvTranspose3d (, , ), each followed by a convolution block after skip concatenation, ending in a Conv3d (). The model has 1,402,289 trainable parameters (about 1.4 M), identical for all three geometries. Training uses MSE loss on normalized grid values, Adam with learning rate and no learning-rate schedule, batch size 8 (variant, timestep) grids, and 50 epochs. Inputs and target are z-score normalized per channel (occupancy excluded) using training-split statistics only. The best-validation checkpoint is used for evaluation. Because mesh nodes sharing a voxel receive identical predictions, the grid imposes a quantisation floor on U-Net accuracy even for a perfect model; the point-wise MLP, which operates at exact node positions, has no such floor.
Hardware and Inference
Training was performed on an NVIDIA Tesla T4 (16 GB VRAM, Kaggle T4×2 instance); local inference timings (Table 2) were measured on an NVIDIA RTX 4050 Laptop GPU (6 GB VRAM). MLP inference is batched point-wise (batch size 8,192 rows) with the full field assembled on CPU; U-Net inference proceeds sequentially per timestep on the voxel grid, with predictions unprojected to mesh nodes via the precomputed nearest-voxel lookup. U-Net inference times in Table 2 include voxelisation overhead.
Data Organization for Machine Learning
The final step converts the simulation outputs into machine-learning-ready samples without discarding the spatial structure that generated the thermal field. For each geometry variant, the dataset retains node coordinates, mesh connectivity, signed-distance values, process parameters, and time-resolved nodal temperatures. A temperature value without its spatial context is not enough for studying how geometry affects field prediction, and geometry without its corresponding transient field gives no learning target; by keeping both together, the dataset links what the casting looks like, how it is discretized, which process conditions it was simulated under, and how its temperature field evolves over time. Each case is additionally accompanied by a metadata record (geometry family, variant index, process parameters, split assignment, and file paths to the CAD, mesh, and field assets) so that cases can be queried and filtered without re-parsing raw solver output.
The data are partitioned at the geometry-variant level rather than at the individual timestep level, using 8 variants per family for training, 1 for validation, and 1 for test (an 80/10/10 split). Different timesteps from the same physical geometry cannot appear in both training and test sets, which prevents temporal samples from the same geometry from artificially inflating generalization performance.
ML Surrogate Benchmarking
To check whether learned surrogates can substitute for the FEM solve, two architectures, a point-wise multilayer perceptron (MLP) and a U-Net, were trained on the same dataset and evaluated against ground-truth simulation fields across all three test geometries (brake, flange, stepped block). For each geometry, three representative process-parameter variants were selected from the held-out set, labelled Best, Median, and Worst according to their surrogate-vs-ground-truth error ranking, and evaluated in two ways: (i) spatial absolute-error fields maps at four representative time steps, rendered on a single shared colour scale per architecture-geometry pair for direct visual comparison of error severity, and (ii) the mean and maximum absolute error over the full simulated duration.
Brake Geometry
For the Best, Median, and Worst test variants, the left panels show spatial absolute-error fields at representative time steps, while the middle and right panels report the evolution of mean and maximum absolute temperature error over the complete simulation interval. Both models exhibit their largest deviations during the early transient cooling period, when thermal gradients are strongest. The U-Net subsequently converges more rapidly toward low residual error, whereas the MLP retains larger errors for a longer portion of the transient response.
For the brake geometry (Figure 5), both architectures exhibit their largest errors during the early transient period ( s), coincident with the steepest thermal gradients following pouring. The MLP’s Worst-case variant reaches a mean absolute error of approximately 53 K and a maximum of 65 K within this window, before decaying to a low, stable residual of 2-6 K by the end of the simulation. The U-Net shows a comparable transient error episode (peak mean error K) but recovers markedly faster, converging to sub-2 K mean error well before the mid-point of the simulated interval. Field maps corroborate this: the MLP’s error color scale spans 0-65.2 K across the shown snapshots, versus 0-37.9 K for the U-Net, with the U-Net’s Worst-case panels visibly near-uniform (low-error) by the final time step. Both models preserve the expected Best/Median/Worst error ranking throughout, indicating that the models correctly capture relative case difficulty even where absolute accuracy differs.

Figure 5. Temporal error evolution and spatial error distributions for MLP and U-Net predictions on the brake-lever geometry.
Flange Geometry
Spatial absolute-error fields are shown for Best, Median, and Worst test variants at representative times, together with the corresponding mean and maximum absolute temperature errors over the simulated cooling history. The MLP exhibits substantially larger and more persistent errors, particularly around the flange ring and bolt-hole regions where geometric discontinuities produce localized thermal gradients. In contrast, the U-Net error decreases rapidly after the initial transient and remains comparatively low throughout the later stages of cooling.
The flange geometry (Figure 6) exposes a more substantial architectural gap. The MLP’s mean absolute error for the Worst-case variant rises sharply to K within the first 200 s and only partially relaxes thereafter, plateauing near 40 K for the remainder of the simulated window; that is, the model does not converge toward the low-error, near-isothermal condition expected at late-stage cooling. The Median-case variant shows the same qualitative behavior, plateauing near 35 K. By contrast, the U-Net exhibits only a brief, sharp error spike at ( K, consistent with initialization/discretization transients) before collapsing to approximately 1 K mean error for all three variants by s and remaining flat thereafter. The corresponding field maps show the MLP retaining visible high-error regions (yellow-green) around the bolt-hole and flange-ring discontinuities even at the final time step, while the U-Net’s final-frame panels are uniformly low-error (dark) across all variants.

Figure 6. Temporal error evolution and spatial error distributions for MLP and U-Net predictions on the flange geometry.
Stepped Block Geometry
The figure compares spatial absolute-error fields and the temporal evolution of mean and maximum absolute errors for Best, Median, and Worst test variants. The stepped-block geometry produces the largest divergence between the two surrogate architectures, with the MLP developing a persistent error plateau associated with the abrupt cross-sectional transitions. The U-Net exhibits a substantially smaller transient error and converges to low mean error during the later cooling period, demonstrating the benefit of incorporating spatial context when predicting thermal fields across geometrically discontinuous regions.
The stepped-block results (Figure 7) show the largest absolute divergence between the two architectures. The MLP’s Worst-case mean absolute error climbs to and plateaus near 230 K, with the Median-case similarly plateauing near 115 K, both well above any physically negligible residual, indicating the MLP fails to resolve the correct long-time thermal state around the geometry’s cross-sectional step change. The U-Net, in contrast, again shows only an early, transient error spike ( K) before decaying to a sub-2 K mean error across all three variants by roughly s; its maximum-error curve for the Worst-case variant settles near 20-25 K late in the simulation, an order of magnitude below the MLP’s corresponding plateau.

Figure 7. Temporal error evolution and spatial error distributions for MLP and U-Net predictions on the stepped-block geometry.
Discussion
Across all three geometries, the U-Net surrogate consistently and substantially outperforms the MLP, both in peak transient error magnitude and, more importantly, in its ability to converge toward the correct steady/late-time thermal field rather than plateauing at a persistent bias. This effect is most pronounced for the flange and stepped-block geometries, both of which contain sharp geometric discontinuities (bolt holes and a ring structure in the flange; an abrupt cross-sectional step in the stepped block) that induce localized, spatially coupled thermal gradients. The brake geometry, which has a comparatively smooth, discontinuity-free organic shape, is the one case where the MLP’s error, while still larger than the U-Net’s, does decay to a low residual rather than plateauing, suggesting that the point-wise MLP’s lack of spatial context becomes a critical limitation specifically when the underlying field has sharp local structure. The U-Net’s convolutional receptive field, by comparison, appears able to propagate and reconcile local thermal gradients across neighbouring regions of the mesh, which is plausibly what allows it to track the correct late-time solidification state that the MLP misses. In all six architecture-geometry combinations, both models preserve the relative Best/Median/Worst difficulty ranking of the sampled variants, supporting the validity of the variant-selection procedure independent of which surrogate is used to evaluate it.
References
- [1]R. Ahmad, N. A. Talib, and M. B. A. Asmael. Effect of pouring temperature on microstructure properties of al-si lm6 alloy sand casting. Applied Mechanics and Materials, 315:856–860, 2013.DOI
- [2]A. Bhosekar and M. Ierapepritou. Advances in surrogate based modeling, feasibility analysis, and optimization: A review. Computers & Chemical Engineering, 108:250–267, 2018.DOI
- [3]John Campbell. Complete Casting Handbook: Metal Casting Processes, Metallurgy, Techniques and Design. Butterworth-Heinemann, 2nd edition, 2015.
- [4]Z. Chen, Y. Li, F. Zhao, S. Li, and J. Zhang. Progress in numerical simulation of casting process. Measurement and Control, 55(5-6):257–264, 2022.DOI
- [5]J. Kang, J. Wang, X. Han, and Q. Zhao. Deep learning based heat transfer simulation of the casting process. Scientific Reports, 14:29068, 2024.DOI
- [6]J.-W. Kang, J.-X. Zhu, and Q.-C. Zhao. Temperature fields prediction for the casting process by a conditional diffusion model. China Foundry, 22(2):139–150, 2025.DOI
- [7]A. Ktari, S. Housni, J. Bourgeois, and M. El Mansori. Neural network-based machine learning model for spatiotemporal prediction of temperature and fraction solid in low-pressure sand casting. Materials Science Forum, 1188:1–10, 2026.DOI
- [8]S. Kushwaha, J. Park, S. Koric, J. He, I. Jasiuk, and D. Abueidda. Advanced deep operator networks to predict multiphysics solution fields in materials processing and additive manufacturing. Additive Manufacturing, 88:104266, 2024.
- [9]Z. Li, N. Kovachki, K. Azizzadenesheli, B. Liu, K. Bhattacharya, A. Stuart, and A. Anandkumar. Fourier neural operator for parametric partial differential equations. In International Conference on Learning Representations, 2021.
- [10]L. Lu, X. Meng, Z. Mao, and G. E. Karniadakis. Deepxde: A deep learning library for solving differential equations. SIAM Review, 63(1):208–228, 2021.DOI
- [11]M. Malinen and P. Råback. Elmer finite element solver for multiphysics and multiscale problems. In Multiscale Modelling Methods for Applications in Material Science, pages 101–113. Springer, 2013.
- [12]M. D. McKay, R. J. Beckman, and W. J. Conover. A comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics, 21(2):239–245, 1979.
- [13]T. Pfaff, M. Fortunato, A. Sanchez-Gonzalez, and P. Battaglia. Learning mesh-based simulation with graph networks. In International Conference on Learning Representations, 2021.arxiv.org/abs/2010.03409
- [14]M. Raissi, P. Perdikaris, and G. E. Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378:686–707, 2019.DOI
- [15]O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, volume 9351 of Lecture Notes in Computer Science. Springer, 2015.arxiv.org/abs/1505.04597
- [16]A. M. Samuel, E. Samuel, V. Songmene, and F. H. Samuel. A review on porosity formation in aluminum-based alloys. Materials, 16(5):2047, 2023.DOI
- [17]S. K. Verma and A. Mogra. Analysis of filling in thin section by fem based simulation for lm6 material. Materials Today: Proceedings, 5(2):5947–5954, 2018.
- [18]P. Zhang, X. Hao, H. Hong, Z. Huang, W. Yang, B. Guan, D. Wang, D. Shu, and B. Sun. Digital twin modeling for shrinkage porosity prediction of casting using reduced order model and machine learning. Advances in Engineering Software, 220:104235, 2026.DOI