1. Introduction
In computational fluid dynamics (CFD), accurately and efficiently modeling turbulent flow fields presents a formidable challenge. In the ever-continuing goal of improving the prediction veracity of CFD models, machine learning (ML) presents a promising solution by creating adaptable statistical models. ML involves developing statistical models that can tailor their predictions to the data presented during training. The models ‘learn’ incrementally as more data are added to the training set, much in the same way that a human learns [
1]. This incremental learning capability enables the ML model to adjust its predictions to better fit the training dataset and improve its accuracy without human intervention.
ML models can be broadly classified into two categories based on the type of training data they use: supervised learners and unsupervised learners. Supervised learners use labeled training data, meaning that each training instance has an associated ‘correct’ answer. The ML dataset comprises features (the inputs to the model) and targets (the desired outputs of the model). During training, the model makes predictions that are compared to the known outputs (targets). The error between the predicted and actual values is then used to adjust the model until the desired accuracy is achieved. In contrast, unsupervised learning does not use labeled targets. Instead, the model identifies patterns and groups the data into clusters based on trends observed in the training features. During training, the unsupervised model optimizes a loss function, typically a distance metric, to group the data effectively. Again, applications of ML models in supervised learning fall into two categories: regression, where a continuous output is predicted, and classification, where a discrete output is predicted. Unsupervised models are typically applied to clustering problems, where the objective is to group the data into clusters and learn from these groupings.
Linear regression is perhaps the simplest form of an ML model. It uses supervised learning to create a regression method, where each feature is combined in a linear sum, as shown in Equation (
1). In this model, each input is multiplied by a weight and then summed with the other features to produce the final output. While this model is very simple, it does hold an additional advantage: it is interpretable. In the context of ML, an interpretable model is one where the inner structure and weights of the model can be used to explain in human terms the relationship of the features to the output of the model [
2].
Interpretability in models is highly desired because it enables researchers to troubleshoot more effectively by detecting biases and gaining insights into the real-world system being modeled. This enhanced understanding results in greater trust among end-users, ultimately leading to increased adoption. For an ML model to be acceptable, its predictions need to be explained. Humans naturally seek order and develop notions of how things should occur, making the ability to explain predictions crucial for understanding and trust [
3]. If a model contradicts the user’s preconceived notions, they will expect an explanation for this discrepancy to reconcile with their understanding. The challenge is that as model complexity increases, its ability to capture more complex trends and solve harder problems improves, but its interpretability decreases. At the extreme, the model becomes a black box, meaning only the inputs and outputs are visible to the user. In many real-world applications, model complexity has surpassed the point of being interpretable to meet the demands of the application. This lack of interpretability is often highlighted as a significant concern by many researchers. For example, Guidotti et al. [
4] discussed how, in the 1970s, ML black-box models were discriminating against ethnic communities, even when no ethnic information was provided as a feature. The model used surnames as a proxy for ethnicity, highlighting how models can discover unintended trends in the data. For critical applications, a model should not be fully trusted until it can be explained. Guidotti et al. further stated that the explanation of a model can serve two primary purposes: to validate the model by revealing biases and to uncover the reasoning behind predictions so that actions based on those predictions can be better understood. Thus, the need for interpretability in complex models has led to the study of explainability. In the ML context, explainability is the process of explaining, in human terms, the relationship between a model’s features and outputs without revealing its inner weights and structure.
The present work focuses on model-agnostic approaches of explainability, since they can be applied to any model, including CFD models. Although CFD models are not black boxes, they are often not easy to interpret due to their complexity, particularly due to the non-linear interactions of the parameters involved in the transport and modeled equations. While their inner structure can be analyzed, explaining them in terms and simplicity so that humans can understand can be very challenging. Some may argue that CFD models are interpretable, but Doshi-Velez et al. [
2] and Ribeiro et al. [
5,
6] emphasize that for true explainability, humans must be able to understand it easily. This means that if a model has too many parameters or a formulation that is too complex, like CFD governing equations, even an inherently interpretable model, such as a linear model, can become uninterpretable.
One of the first model-agnostic methods of explainability to gain great popularity is popularly known as the local interpretable model-agnostic explanations, or LIME for short, which was introduced by Ribeiro et al. [
5,
6] as a solution for explaining a model’s prediction based on a given feature set
X. LIME takes random samples of the model around the prediction to be explained by perturbing the feature set. The samples are then weighted based on their distance from the prediction of interest, with closer samples being given more weight. These weighted samples are then used to find a sparse linear model, known as the explainer model, that fits the perturbations by optimizing a loss function. Once the model has been fit to the data, the inherent interpretable nature of linear models is leveraged to explain the more complex model. This is done by using the weights of the linear model, which can directly relate the inputs to the output. To keep the number of features low when selecting a linear model, a penalty function is introduced, which penalizes explainer models that use many features. By penalizing models that use many features, LIME can present concise explanations that can be easily explained to a human. LIME has been successfully applied in various fields such as picture classification, text topic recognition, and ensemble-based decision trees.
Another earlier approach to creating model-agnostic explanations comes from Štrumbelj et al. [
7,
8,
9], who proposed that Shapley values, a concept from game theory [
10], could be utilized to generate model-agnostic explanations. Shapley values are a method of determining a player’s (a feature) marginal contribution to the outcome (the model’s output) of a game (the model) when participating in a coalition (a set of features). Although not a ML algorithm, Shapley values can serve as a tool to explain the predictions of a model. However, this Shapley value approach proved to be a very costly way to calculate the explanations. This led Štrumbelj et al. to develop an efficient sampling technique to approximate the Shapley values [
8]. They proposed that the Shapley values approximation can be generated by sampling the training dataset without the need to retrain the model, which is a very important step for models that have long training times. This approach significantly reduces the sampling required for traditional Shapley values; however, a large dataset is still necessary to explain the model’s predictions.
Lundberg et al. [
11,
12] introduced a model-agnostic approach to explainability known as Shapley additive explanations (SHAP) that utilized the concepts of additive feature attribution (AFA) methods. In this work, Lundberg et al. demonstrated that many of the popular model explanation methods, such as LIME, deepLIFT [
13], and Shapely values, are all based on the same framework of AFA. They were then able to build on this framework of AFAs and show that Shapley values are the key solution to the principle postulates of AFAs. Therefore, methods that do not follow the Shapley values principles are not true AFA methods, and sacrifice accuracy in their explanations. From this, they proposed SHAP, a modified version of LIME that aligns with the principles of Shapley value game theory. This adaptation led to a marked improvement in sampling efficiency compared to prior methods, along with greater congruence with human intuition than the standard LIME methodology. This caused SHAP to quickly become one of the most popular explainability methods in the ML space.
To better understand the context of this paper and the subsequent discussions, it is essential to review the current advancements and challenges in the field of external aerodynamics for ground vehicles, particularly regarding the accuracy and applicability of CFD approaches and best practices. In the past three decades, CFD has gained significant traction as a complementary tool to traditional wind tunnel testing for optimizing ground vehicle aerodynamic design. This trend is driven by CFD’s lower operational costs and faster turnaround times, which facilitate the rapid iteration and development of aerodynamic concepts without the need for expensive physical prototypes. Furthermore, CFD provides a comprehensive analysis of flow fields, offering insights into local flow phenomena that are not easily captured by wind tunnel tests, which typically focus on macroscopic aerodynamic properties such as force and moment coefficients. Despite these advantages, several challenges remain in the application of CFD to ground vehicle aerodynamics. These include the accurate modeling of complex turbulent flows, the need for high-fidelity simulations to capture intricate flow details, and the validation of CFD results against experimental data to ensure reliability. Addressing these challenges is critical for enhancing the predictive capability of CFD and ensuring its effective integration into the aerodynamic design process.
Recent advancements in computing power, particularly in terms of cost and affordability, combined with increasing demand from various industries, have led to a significant surge in the implementation of artificial intelligence (AI) and machine learning (ML) technologies in general. Following a similar trend, the field of computational fluid dynamics (CFD) is also beginning to incorporate ML, proving valuable in improving predictions and assisting with post-processing tasks. Despite its potential, the full extent of ML’s capabilities in CFD has yet to be fully explored and exploited. Most applications of ML in CFD have focused on developing new, high-fidelity turbulence models [
14,
15,
16,
17,
18] or enhancing CFD discretization schemes [
19,
20] or solvers [
21,
22]. While these areas show great promise, they also have significant challenges. New models require vast amounts of high-fidelity data, which are often impractical to obtain, and improvements in solvers remain largely untested in real CFD applications. In contrast, the potential of using ML and AI to aid in traditional CFD processes and turbulence model development has shown promise but remains largely untapped. This paper aims to demonstrate the utility of one such ML/AI tool through a practical example of CFD turbulence model closure coefficient tuning. Specifically, the authors intend to highlight the power of explainability and ML as tools for CFD development by focusing on the problem of the Reynolds-averaged Navier–Stokes (RANS) turbulence model closure coefficient tuning.
The Reynolds-averaged Navier–Stokes (RANS) approach stands as one of the most extensively employed methodologies in CFD, enjoying wide prevalence across an array of engineering applications. However, it is acknowledged that RANS, while offering computational efficiency and speed, is relatively less precise for automotive flow simulations in comparison to alternative strategies like variants of detached eddy simulation (DES), a point underscored by Ashton [
23,
24]. Moreover, the efficacy of RANS can be compromised by issues pertaining to accuracy and repeatability, stemming from artifacts associated with the parallelization paradigm inherent in finite volume-based computational methods (refer to the work by Misar et al. [
25]). Despite these acknowledged limitations, the computational efficiency intrinsic to RANS allows for simulations to be run within reasonable timeframes, aligning well with the swift design cycles necessitated by the automotive industry, particularly in the realm of motorsports encompassing entities like FIA Formula 1 and NASCAR. However, it is noteworthy that while RANS enjoys popularity, advancements in RANS modeling have been relatively stagnant in recent years in spite of the proactive endeavors spearheaded by the National Aeronautics and Space Administration (NASA) aimed at fostering and propelling technological evolution; see Slotnick et al. [
26]. Prominently, recent efforts to improve RANS modeling have hinged on augmenting the precision and reliability of RANS predictions for complex turbulent flows and have exhibited promise through the integration of machine learning-based methodologies [
18,
27,
28,
29,
30]. These methodologies entail the incorporation of corrective source terms into the transport equations or the introduction of modifications to the modeling terms. However, as noted previously, these initiatives, despite their potential, remain predominantly confined to the academic realm of development and have yet to be seamlessly integrated into a production-oriented workflow.
Some efforts to improve RANS predictions of turbulent flows for simplified and realistic road vehicle geometries have focused on tuning the model closure coefficients. As the coefficients used in popular RANS turbulence models are rather ad hoc (as stated by Pope [
31]), tuning them for specific geometries has been necessary. For instance, Fu et al. [
32,
33] and Zhang et al. [
34] tuned the model closure coefficients for the
SST turbulence model applied to a Gen-6 NASCAR Cup racecar and a fully detailed automotive passenger vehicle, respectively. By varying the coefficient independently and then grouping the `best performing’ coefficients, these studies found an overall improvement in the lift and drag force predictions when compared to wind tunnel data. Other studies have followed similar approaches for predicting flows over simplified geometries like the Ahmed body and wall-mounted cubes, varying the coefficients independently and grouping the best-performing ones (see Dangeti [
35] and Bounds et al. [
36,
37]).
Dangeti’s [
35] research demonstrated that when using tuned coefficients, both force and velocity profile measurements showed closer matches to experimental work for the Ahmed body. However, these coefficients were specific to the geometry and could not be applied to other angles. One potential flaw that arises from the tuning method mentioned is that changing coefficients independently does not account for complex interactions that may occur when coefficients are varied simultaneously. The use of AI and ML approaches in parametric optimization could potentially improve predictability by optimizing turbulence closure coefficients simultaneously to account for possible complex interactions. Da Ronch et al. [
38] used an adaptive design of experiment (ADOE) method to test the entire design space of closure coefficients and generated optimized coefficients for predicting flow over a 2D airfoil geometry. Some success was then seen in using these modified coefficients on more complex geometries such as the ONERA-M6 wing, but it still needs further testing to see the extent to which the modified coefficients can be used. Though this method proved effective, it required a large number of simulations and may prove difficult to implement in many workflows. Yarlanki et al. [
39] used feedforward neural networks to predict force coefficients for the
turbulence model, but this model also required a large number of simulations to produce the training data. Barkalov et al. [
40], Klavaris at al. [
41], and Schlichter et al. [
42] demonstrated how ML models can be used as surrogate models for the CFD prediction results. Barkalov et al. and Klavaris et al. both explored this subject further, showing how these surrogate models can be used with optimization methods to tune the coefficients of the RANS CFD model without the need for the optimization method to query the CFD model directly.
This study extends the authors’ previous work [
43], which utilized the 25-degree Ahmed body simulated using the SST
turbulence model (SST hereinafter) developed by Menter and coworkers [
44,
45], to demonstrate how ML methods could elucidate the relationship between turbulence model closure coefficients and the lift and drag predictions for the vehicle body. The prior research leveraged these insights to optimize the closure coefficients, achieving optimal lift and drag predictions. In this work, we further explore the capabilities of ML tools by applying them to the 40-degree Ahmed body, providing a detailed explanation of how drag and lift predictions depend on the values of the turbulence model closure coefficients. Using Shapley values, explainer ML models, and the SHAP method, this research delves deeper into understanding aerodynamic characteristic prediction. This approach results in a significant improvement in the accuracy of lift and drag predictions and is expected to simultaneously enhance the overall fidelity of the turbulence model in capturing complex flow phenomena. By extending the analysis to the 40-degree Ahmed body and employing advanced ML techniques, we aim to provide a more comprehensive understanding of the intricate relationships within aerodynamic modeling.
The rationale for this research is compelling due to several factors. Firstly, accurately modeling and predicting aerodynamic properties is crucial for the design and optimization of ground vehicles. Improved turbulence models can lead to significant advancements in vehicle performance, fuel efficiency, and safety. Secondly, integrating ML and AI in CFD processes represents a cutting-edge approach that overcomes the limitations of traditional methods, offering new insights and efficiencies. Lastly, by addressing both macro-scale measurements and detailed flow features, this study bridges the gap between high-level aerodynamic performance and intricate flow dynamics, providing a comprehensive approach to turbulence modeling. In a nutshell, this work intends to demonstrate the powerful potential of ML and AI tools in advancing CFD methodologies, particularly in turbulence model development and optimization. Thus, it aims to pave the way for future innovations in the field.