1. Introduction
Accurately predicting fluid flow and heat transfer around complex geometries remains a fundamental challenge in computational fluid dynamics (CFD). Such predictions are essential for understanding transport phenomena, evaluating thermal–fluid performance, and guiding the design of engineering systems containing bluff bodies, internal flow passages, and heat transfer enhancement devices [
1,
2,
3]. Among these applications, pin-fin configurations are frequently used as benchmark problems due to their ability to generate complex flow features, including boundary layer development, stagnation regions, flow separation, and wake interactions. Traditional CFD solvers provide detailed and accurate predictions of these phenomena by numerically solving the governing conservation equations over a discretized domain. However, this process remains computationally expensive, particularly when repeated simulations are required for design exploration, optimization, uncertainty quantification, or surrogate model development [
4,
5,
6]. The computational burden becomes increasingly significant as mesh resolution, geometric complexity, and the size of the design space increase, motivating the development of reduced-order and data-driven modeling approaches capable of accelerating thermal–fluid analysis [
7,
8,
9].
In response to the high computational costs and iterative nature of traditional CFD, the fluid mechanics community has increasingly explored scientific machine learning (SciML) techniques as an effective means to accelerate fluid simulations and enable real-time design and optimization. Initially, SciML applications in CFD primarily involved classical surrogate modeling methods, such as Gaussian processes, polynomial chaos expansions, and various regression models, demonstrating effective predictive capabilities for relatively low-dimensional fluid flow problems, including simplified laminar flows around cylinders or basic aerofoils [
10,
11]. However, these early methods were constrained by their inability to scale effectively to high-dimensional and turbulent flow scenarios.
The advent of deep learning significantly expanded the capabilities of SciML in fluid dynamics. Architectures such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and autoencoders have been successfully applied to predict fluid and thermal behaviors, notably in structured-grid contexts. CNN-based surrogate models have shown notable success in tasks ranging from turbulence modeling and heat transfer prediction to physics-informed surrogate modeling, providing accelerated yet reasonably accurate alternatives to classical CFD methods. For instance, Morimoto et al. [
12] successfully analyzed Particle Image Velocimetry (PIV) data using CNNs, while Kochkov et al. [
13] applied end-to-end CNN models to improve approximations within CFD domains for the modeling of two-dimensional flows. Similarly, convolutional autoencoders trained with physics-informed regularizations have shown success in data compression, with none adversely affecting reconstruction quality [
14]. Despite their effectiveness, these traditional deep learning methods inherently rely on structured grid data, severely limiting their applicability to industrial CFD problems typically characterized by complex geometries and irregular, unstructured meshes.
As a result, graph neural networks (GNNs) have emerged as a promising class of models for accelerating CFD simulations [
15,
16,
17]. While conventional deep learning models like CNNs are designed for data structured on regular grids, GNNs are inherently suited for data defined over irregular domains, such as unstructured meshes [
18]. This characteristic makes GNNs particularly attractive for CFD, where the underlying discretization schemes of commercial solvers are often complex and nonuniform in nature. By operating directly on graph-based representations of the computational domain, GNNs can naturally incorporate geometric and topological information, enabling the model to learn localized physical interactions such as boundary layer development, and propagate information across the domain. Moreover, GNNs offer the flexibility to handle varying mesh resolutions and topologies without requiring explicit interpolation or remeshing steps. This capability is critical for surrogate modeling in engineering applications, where the need to simulate flows over a wide range of geometries and boundary conditions demands models that can generalize beyond a fixed spatial discretization. Landmark studies by Battaglia et al. [
19] and Pfaff et al. [
15] have demonstrated the foundational capability of GNNs to capture fluid dynamics directly from simulation-generated datasets, effectively predicting transient fluid flows with impressive accuracy and robustness. More recent advancements, such as those by Sanchez-Gonzalez et al. [
20], have further established the efficacy of GNNs in modeling turbulent fluid phenomena, explicitly demonstrating their ability to generalize across varying flow conditions and geometries, and predict complex transient behaviors. Chen et al. [
21] also successfully applied GNNs to model laminar flow around a variety of two-dimensional objects. Mihalko et al. [
22] applied GNNs to develop a graph-driven design framework where each pin-fin represented a node to predict global performance metrics.
However, several critical limitations persist, especially in capturing intricate flow phenomena and generalizing predictions across a variety of geometries. Traditional GNN architecture often struggles to accurately resolve near-wall behaviors, including boundary layers, recirculation zones, and flow separation regions [
23]. For example, Barwey et al. [
24] introduced interpretable error-tagging modules to baseline GNNs, aiming to identify and reduce prediction errors specifically in complex flow regions. Nevertheless, this approach requires a fully trained baseline GNN and substantial additional training of the interpretability module, effectively doubling the training time. Alternatively, Travnikov et al. [
25] addressed the issue of GNNs’ limited receptive fields by incorporating global pooling operations and a fully connected branch parallel to the primary GNN layers. Although this method improved overall performance, significant errors persisted, particularly in wake regions and near leading-edge boundaries of test geometries such as airfoils. Moreover, many existing GNN-based CFD models rely heavily on specific datasets, severely restricting their ability to generalize to unseen geometrical configurations [
26,
27,
28]. As a consequence, models that accurately predict flow around common shapes like NACA airfoils often falter when applied to novel or complex geometries not represented in their training sets [
24]. In summary, current GNN surrogates either (i) incur large errors in boundary-dictated regions, (ii) fail to extrapolate beyond narrowly curated training meshes, or (iii) demand two-stage training pipelines that negate their touted speedups. These persistent shortcomings indicate that purely architectural modifications, without careful integration of physical and geometric information, may be inadequate—or at least inefficient—in achieving robust, generalizable, and highly accurate predictions necessary for real-world CFD applications.
The proposed geometry-aware multiscale graph neural network (GAMS-GNN) differs from existing GNN-based CFD surrogates in several important ways. Firstly, rather than relying primarily on mesh connectivity and spatial coordinates, the framework explicitly incorporates geometry-aware information through boundary classification indicators and signed-distance-to-wall features, allowing the network to directly encode geometric proximity effects that strongly influence near-wall transport phenomena. Secondly, the proposed architecture employs a multiscale message-passing strategy that facilitates information exchange across both local and global flow regions, enabling the simultaneous representation of boundary layer physics, wake interactions, and large-scale flow structures. Thirdly, unlike many existing studies that focus on a limited set of canonical geometries, the present framework is designed to generalize across a broad family of arbitrarily shaped spline-based pin-fin geometries generated through an automated data generation pipeline. Consequently, the novelty of the proposed approach lies not solely in its application to pin-fin flows, but in the integration of geometry-aware feature encoding, multiscale graph learning, and automated geometry generalization within a unified CFD surrogate modeling framework.
To bridge this gap, the present study introduced geometry-aware multiscale graph neural network (GAMS-GNN)-based soft computing techniques, which explicitly integrated boundary-aware node and edge features, employed multiscale hierarchical message passing, and provided an adaptive framework designed specifically to resolve boundary-driven flow phenomena and generalize effectively across diverse geometries. Two-dimensional pin-fins were selected as the domain of choice—pin-fin arrays are ubiquitous in gas turbine blade cooling passages and thermal management hardware; hence, accelerating design space exploration translates directly into shorter design cycle times and rapid convergence of optimization frameworks. Additionally, these geometries involve complex flow features such as boundary layer separation, wake interactions, and stagnation zones, making them an ideal benchmark for evaluating the ability of surrogate models to capture multiscale physics.
To begin with, complex pin-fin geometries were parameterized using four connecting piecewise cubic splines, providing control over the shape and orientation. The training data were generated through an automated Design-of-Experiments (DoE) framework utilizing ANSYS Fluent, incorporating best practices such as mesh refinement and validated viscous modeling. The automated framework extracted key information such as the mesh connectivity and associated field quantities to be used for training in predicting the temperature, velocity magnitude, and pressure fields. The predictive performance of GAMS-GNN was rigorously evaluated and compared against popular state-of-the-art models such as GCN [
29,
30] and GraphSAGE [
31]. The results demonstrated that the developed GAMS-GNN achieved substantial acceleration over traditional CFD solvers but also surpassed existing SciML approaches in the accuracy, robustness, and generalization of new designs.
The remainder of the manuscript is structured as follows:
Section 2 discusses the simulation methodology, data generation, GAMS-GNN model development, and data preprocessing. The observations and ensuing discussion are delineated in
Section 3, while
Section 4 summarizes the conclusions observed.
3. Results and Discussion
The training loss trajectory of the GAMS-GNN is shown in
Figure 7, alongside horizontal reference lines that mark the terminal losses of the naive GCN and GraphSAGE baselines. GAMS-GNN achieved an MSE of ≈ 0.01, while the baselines stabilized at substantially higher values—0.11 for GraphSAGE and 0.09 for GCN—an order-of-magnitude performance gap in favor of GAMS GNN. Although the proposed network contained 11.6 million trainable parameters, roughly 15× more than the 0.79 million in each baseline, this additional capacity was well utilized: the edge-aware, multiscale architecture delivered markedly richer representations rather than over-fitting, translating directly into superior predictive accuracy.
Figure 8 presents a side-by-side comparison of the temperature, pressure, and velocity magnitude fields predicted by the three graph surrogates against the CFD ground truth. The first row,
Figure 8a–c, shows the reference CFD solution: sharp thermal gradients following the contours of the fin surface, a well-defined high-pressure velocity stagnation region on the upstream face, and a coherent recirculation region with accelerated side channel jets downstream. In the second and third rows, the naïve baselines—GCN in
Figure 8d–f and GraphSAGE in
Figure 8g–i—captured only the broad trends: temperature contours were blurred, the stagnation pressure pocket was diffuse, the wake velocity was oversmoothed, and boundary layer separation was delayed, with noticeable artifacts in the pressure field. The fourth row, GAMS-GNN in
Figure 8j–l, recovered the fine-scale details evident in the CFD: the near-wall thermal boundary layer heating in
Figure 8j, the well-defined, highly resolved, and precisely captured high-to-low-pressure transition in
Figure 8k, and the recirculation zone and shear layer jets in
Figure 8l aligned closely with their counterparts in
Figure 8a–c. By preserving sharp gradients and eliminating baseline noise, GAMS-GNN demonstrates its capability to reproduce boundary-driven, multiscale phenomena—qualitative evidence that supports the order-of-magnitude error reduction seen in the convergence plot shown in
Figure 7.
Figure 9 juxtaposes the ground truth CFD solutions with GAMS-GNN predictions for three geometrically distinct arbitrary pin-fin configurations from the test dataset. In the first set, panels
Figure 9a–c exhibit the reference temperature, pressure and velocity fields for the first pin-fin, while panels
Figure 9d–f display the corresponding GAMS-GNN outputs. The agreement is essentially pointwise: the network preserved the narrow thermal rim that formed along the upstream face, reproduced both the magnitude and spatial extent of the upstream high-pressure stagnation pocket, and captured the length and width of the recirculation zone together with its accelerated side channel jets. This first pin-fin resembled several members of the training ensemble in aspect ratio and blockage ratio, and the model’s edge-aware encoder retained the steep boundary layer gradients that characterize such fins; multiscale message-passing then disseminated this information throughout the short wake, leaving negligible room for perceptible error.
The second arbitrary pin-fin, depicted in panels
Figure 9g–i for the CFD reference and
Figure 9j–l for GAMS-GNN, posed a sterner test. A sharper nose and higher blockage ratio yielded a shorter, narrower wake in the CFD solution. While the network continued to track temperature and upstream pressure with high fidelity, it underpredicted the downstream momentum deficit: the low-velocity core in panel
Figure 9l is shorter and narrower than its counterpart in panel
Figure 9i, and the pressure dip in panel
Figure 9k recovers slightly too quickly. These discrepancies arise from two interacting factors. Firstly, the loss function weighed all nodes equally; because the recirculation zone occupied a small fraction of the domain, its contribution to the global error budget was limited, encouraging the optimizer to privilege more extensive, lower-gradient regions. Secondly, the effective receptive field of the graph, although enlarged by hierarchical message passing, still contracted with distance from the fin, so far wake nodes received attenuated information about earlier separation and recirculation patterns.
Panels
Figure 9m–r present the third fin, a bluff front design that accentuated leading-edge gradients and narrowed the shear layer. GAMS-GNN accurately reproduced the intensified boundary layer heating, matched peak wall temperatures, and resolved the sharper stagnation pressure transition. The predicted velocity field mirrored the CFD recirculation region and shear layer jets, indicating that the network’s skip connections successfully reinjected fine-scale information lost during coarsening.
A closer inspection of the four-spline design space clarifies why the “stubby’’ or “blunt” cross-section embodied by the second arbitrary pin-fin was so sparsely represented in the 1000-member training set, despite the use of LHS. Each profile was defined by five parameters: a fixed leading-edge radius
; three free radii r
2, r
3, and r
4 drawn independently from the interval [0.1, 1] mm; and a global orientation angle
uniformly distributed over [0, π]. Once the four polar control points (
) with
were set, piecewise cubic splines joined successive points, producing the closed outline shown in
Figure 1.
The streamwise chord c and cross-stream width d of the resulting body are, to first order, the differences between the largest and smallest projections of the radii onto the flow axis and its perpendicular, respectively. Achieving a low chord-to-width ratio (c/d)—the defining geometric trait of the second pin-fin—demands two statistically independent coincidences. Firstly, both radii that ultimately align with the flow direction after rotation must reside in the lower third of their admissible range, compressing c. Because LHS placed each once in every decile, the likelihood that a particular pair of radii simultaneously fell into the lowest tertile is . Secondly, the large, fixed radius must be rotated toward the cross-stream axis so that it inflates d. Orientations that satisfy this requirement occupied only a quarter of the interval (±22.5° about 90° or 270°), giving a probability of 0.25. The two events are uncorrelated under LHS; therefore, the joint probability of drawing a genuinely stubby fin is the product of the two, . On average, then, fewer than thirty of the 1000 LHS samples inhabit this low-c/d corner of the five-dimensional hypercube, whereas hundreds populate the moderate- and high-ratio region typified by the first and the third fins.
This numerical imbalance carried direct consequences for learning. During training, the global mean-squared-error loss was dominated by the plentiful, moderate-slenderness sections; weight updates therefore embedded wake recovery dynamics characteristic of those shapes. When GAMS-GNN confronted a rare stubby geometry such as the second pin-fin, it reproduced near-body gradients accurately—physics that depends mainly on local curvature, which the network has seen often—but extrapolated the downstream momentum deficit from scant experience, shortening the already brief wake and hastening pressure recovery. In essence, the model behaved as an approximately Bayesian estimator whose prior was set by the frequency distribution of the training set: it had a sharp, well-informed prior for moderate-c/d fins and a diffuse, weakly informed prior for low-c/d fins, leading to underprediction of wake length in the latter.
The variable-specific error maps of
Figure 10 reveal how geometric features drove prediction performance. The first three rows correspond to the three best-performing fins from the testing dataset;
Figure 10a–c depict the temperature error, pressure error, and velocity magnitude error, respectively, for the first fin, with the same column ordering used for the rest. Similarly, the last three rows indicate the three worst-performing fins from the test set. Interestingly, for the three best fins, the stagnation point pressure error was below 60 Pa, and the velocity magnitude error decayed rapidly as well, keeping temperature errors under 30 K throughout the wake. In contrast, all three worst-performing fins (rows 4–6) shared two features absent from most training samples: a chord-to-depth ratio (c/d < 1) and at least one acute or concave leading-edge corner. These traits triggered local pressure overshoots of 250–270 Pa—more than four times larger than in the well-represented shapes—which in turn shortened the recirculation bubble and intensified side-jet velocities. Elevated temperature errors (35–45 K) simply mirrored the misplaced convective heat paths. The pattern confirms that GAMS-GNN’s largest discrepancies stem from under-represented geometric extremes rather than intrinsic model capacity, suggesting that an active-learning loop focusing on low-c/d, high-curvature fins could systematically eliminate the remaining error hotspots.
To further validate the performance of the GAMS-GNN model in capturing key fluid dynamic behavior, spanwise profiles of velocity magnitude, temperature, and pressure were extracted at three representative streamwise locations: the inlet (1), midline (2), and outlet (3) of the computational domain. These regions are critical not only for assessing flow development and evaluating thermal–hydraulic performance but also for capturing complex physical phenomena—particularly at the midline (2), where recirculation and boundary layer evolution drive much of the local flow–thermal behavior. Accurate modeling in these regions is essential, as they significantly influence key engineering metrics such as pressure drop and heat transfer, which are often derived from area-weighted averages at critical locations such as the inlet and outlet.
Figure 11 provides a comprehensive comparison of the velocity magnitude (top row), temperature (middle row), and pressure (bottom row) profiles at these streamwise locations. The respective contour plots from ANSYS Fluent and the GAMS-GNN predictions are displayed in the left-most column for each row. On these contours, a black dotted line is present to indicate the streamwise location (1—inlet, 2—midline, 3—outlet) where these field values were extracted. On the right, the spanwise profiles of the same quantities are shown, with the
y-axis normalized using 2y/W, where y is the vertical coordinate, and W represents the width of the domain. This normalization ensured that the profiles were bound between −1 and 1, enhancing readability. The
x-axis represents the magnitude of the respective field variable in the spanwise direction.
The temperature profiles, particularly at the inlet and outlet regions, aligned closely between the GAMS-GNN predictions and ANSYS Fluent, capturing both the thermal boundary layer development and the steady-state behavior at the outlet. The GAMS-GNN also successfully represented the temperature variation near the midline, where recirculation effects are critical in determining thermal performance. Similarly, the velocity profiles showed excellent agreement, with the GAMS-GNN successfully replicating boundary layer growth at the inlet and side walls, boundary layer separation and recirculation in the midline, and the stabilization of the flow at the outlet. The pressure profiles reflect accurate predictions for GAMS-GNN, which were consistent with ANSYS Fluent. Notably, at the inlet, where the flow initially contacts the pin-fin, GAMS-GNN captured the stagnation point and the high-pressure region that forms. In the midline, the GAMS-GNN prediction not only replicated the effects of recirculation but also captured the pressure drop associated with the presence of a bluff body, as depicted by the negative values seen in the midline pressure panel.
In all, the GAMS-GNN model proved to be a robust tool for capturing key fluid dynamic and thermal–hydraulic behavior, outperforming current approaches with unparalleled accuracy across temperature, velocity, and pressure profiles, all while significantly reducing computational time. The GAMS-GNN successfully captured the steep gradients commonly found in complex flow regimes, such as those near the boundary layers, where rapid transitions between high and low values occur. Additionally, the model excelled in handling recirculation zones, where traditional models often struggle to capture the intricate flow behavior, especially in a domain where the shapes under consideration are highly complex and irregular.