Next Article in Journal
Hybrid CFD PINN FSI Simulation in Coronary Artery Trees
Next Article in Special Issue
The Bottleneck in the Scalar Dissipation Rate Spectra: Dependence on the Schmidt Number
Previous Article in Journal
The Potential of Machine Learning Methods for Separated Turbulent Flow Simulations: Classical Versus Dynamic Methods
Previous Article in Special Issue
Investigation of Nonlinear Relations Among Flow Profiles Using Artificial Neural Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimising Physics-Informed Neural Network Solvers for Turbulence Modelling: A Study on Solver Constraints Against a Data-Driven Approach

Department of Mechanical Engineering, University of Birmingham, Birmingham B15 2TT, UK
*
Author to whom correspondence should be addressed.
Fluids 2024, 9(12), 279; https://doi.org/10.3390/fluids9120279
Submission received: 12 September 2024 / Revised: 4 November 2024 / Accepted: 7 November 2024 / Published: 25 November 2024

Abstract

:
Physics-informed neural networks (PINNs) have emerged as a promising approach for simulating nonlinear physical systems, particularly in the field of fluid dynamics and turbulence modelling. Traditional turbulence models often rely on simplifying assumptions or closed numerical models, which simplify the flow, leading to inaccurate flow predictions or long solve times. This study examines solver constraints in a PINNs solver, aiming to generate an understanding of an optimal PINNs solver with reduced constraints compared with the numerically closed models used in traditional computational fluid dynamics (CFD). PINNs were implemented in a periodic hill flow case and compared with a simple data-driven approach to neural network modelling to show the limitations of a data-driven model on a small dataset (as is common in engineering design). A standard full equation PINNs model with predicted first-order stress terms was compared against reduced-boundary models and reduced-order models, with different levels of assumptions made about the flow to monitor the effect on the flow field predictions. The results in all cases showed good agreement against direct numerical simulation (DNS) data, with only boundary conditions provided for training as in numerical modelling. The efficacy of reduced-order models was shown using a continuity only model to accurately predict the flow fields within 0.147 and 2.6 percentage errors for streamwise and transverse velocities, respectively, and a modified mixing length model was used to show the effect of poor assumptions on the model, including poor convergence at the flow boundaries, despite a reduced solve time compared with a numerically closed equation set. The results agree with contemporary literature, indicating that physics-informed neural networks are a significant improvement in solve time compared with a data-driven approach, with a novel proposition of numerically derived unclosed equation sets being a good representation of a turbulent system. In conclusion, it is shown that numerically unclosed systems can be efficiently solved using reduced-order equation sets, potentially leading to a reduced compute requirement compared with traditional solver methods.

1. Introduction

Flow modelling is an important part of the engineering design process, allowing for optimisation of the aerodynamics of a design, design validation for hydraulic or other fluid transporting components/mechanisms, and safety and power validation of complex designs including aircraft turbine engines. In many of these engineering applications, turbulent flow is a common physical phenomenon to be accounted for during flow modelling for design validation. Generally, only averaged flow calculations are performed due to the prohibitive cost of a transient numerical solver [1].
Two promising approaches for turbulent flow modelling include utilisation of neural networks, specifically data-driven modelling and a physics-informed modelling approach. A data-driven approach uses data from previous numerical solvers to create a generalised map of the nonlinear dynamics between the input geometry and the output flow fields [2] for a large set of training data. The benefit of this approach is an almost instant solve time, after an initial training phase, and provided that the model is generalisable the same model can be used to predict on several different geometries.
Physics-informed neural networks (PINNs) are a predictive solving method for per-geometry solutions, like CFD, where geometry and boundary conditions are defined rather than training on a large dataset. They are therefore not governed by comparing predictions to data, but rather to a governing set of equations. PINNs have developed from simple modelling of ODEs and PDEs [3], to solving more complex PDE systems such as the Schrodinger and Burgers equations [4]. PINNs have been used to converge using the Navier–Stokes equations to accurately solve flow cases including cylinder flow [5]. Current research involves modelling of turbulent flow, including the Falkner–Skan boundary with adverse pressure gradient, APG turbulent boundary layer, and a periodic hill [6], giving promising results for streamwise and transverse velocity predictions. Several governing equation sets were also tested on a backwards-facing step [7]; however, predictions only including boundary conditions were poor, requiring additional data to be fed to the neural network to converge to the correct solution.
In all these implementations, a mostly numerically closed system has been used to govern the loss function; however, a benefit of the backpropagation method used in a neural network architecture compared with traditional solvers is that the system does not need to be fully defined to provide a solution. This potentially allows for the equation set to be either simplified, or boundary data to be removed, to allow for a faster solve time or a more flexible solving method than a traditional numerical solver.
Reduced-order modelling (ROM) is a method used to reduce the complexity of a system of equations while still remaining representative of the dynamics of the system. It has been successfully implemented in problems such as the Helmholtz decomposition to reduce the complexity of the system by reducing the number of components to solve [8]. Reduced-order modelling (ROM) has also previously been investigated using PINNs with a data-driven component by Fu et al. [9], where an interesting approach to generating ROMs is used with snapshot data. This method is highly versatile and computationally efficient, but this generation relies on an understanding of either the geometry or having snapshot data to use in the data-driven component.
A very interesting application that will not be explored in this paper is the generation of ROMs using neural networks. It was shown by Brunton et al. [10] that neural networks are capable of parametrising parametric systems successfully and simply as the system may be traditionally defined. Neural networks have also been successfully used to reduce the dimensionality of a governing equation to simplify the characteristic function [11]. Finding a unique and simple characteristic equation for a given system using neural networks could be an interesting separate topic, but this paper will focus on a numerical approach to generating a ROM for the physical system of equations. This is to simplify the scope and ensure that results are directly comparable to numerical solutions that could be easily generated using commercial numerical solvers.
Contributions listed have been very focused on reduced-order modelling and PINNs, but a wide range of uses for PINNs have been outlined by Vinuesa and Brunton [12], including accelerating DNS models and LES modelling. ROMs are also discussed, including autoencoders, which generate a reduced coordinate system to represent a reduced dynamic system.
The aim was to analyse reduced-order models in several configurations, including a full numerically closed model, reduced-boundary-enforced model(s), a reduced-equation model, a numerically closed turbulence model with assumptions, and the same turbulence model with the least accurate assumptions removed, generated with no previous understanding of geometry or snapshots of data, only from boundary conditions similar to a numerical solver. The analysis shows the effect on the solutions and solve time, and compares this against a simple implementation of a data-driven approach. The motivation for this topic was to provide recommendations for solver inputs and equations for simple 2D incompressible flow cases, along with benchmark data for several turbulence models run using PINNs on a widely available dataset, with a direct data-driven comparable model.

Formulation of the Problem

A difficulty in turbulence modelling for flow simulations comes from the calculation and approximation of the first-order stress terms, often referred to as turbulence closure or the closure problem. The 2D incompressible Reynolds-averaged Navier–Stokes (RANS) equations are given,
u ¯ x + v ¯ y = 0
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v u y ¯ + u u x ¯ = 0
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v v y ¯ + u v x ¯ = 0
where u ¯ is the averaged flow velocity in the streamwise (x) direction, v ¯ is the averaged flow velocity in the transverse (y) direction, ρ is fluid density, p ¯ is the averaged pressure, ν is the fluid kinematic viscosity, and the prime represents fluctuating flow components. For the full derivations, see Appendix A. The first-order stress terms are given,
τ x x x + τ x y y = v u y ¯ + u u x ¯
τ y x x + τ y y y = v v y ¯ + u v x ¯
It should also be noted that, since the flow is incompressible in this case,
τ x y y = τ y x x
This can be physically interpreted as the lack of a preferred direction in the turbulent fluctuations of an incompressible flow. The turbulent fluctuations are equally likely to cause a shear stress in the x-y and y-x planes, as the flow is isotropic.
The first-order stress terms are not made up of averaged flow components, but fluctuating values of the velocity in the streamwise and transverse directions. Since the RANS equations are arranged to solve flow in terms of averaged flow quantities, these quantities must be either related to the mean flow quantities (without relying on time series data, which in this case is not available) or predicted separately as a function of geometry or other physical domain features using a turbulence closure model. This is often inaccurate when using simple models such as mixing length [13], or computationally inefficient using complex models such as RSM [14].

2. Periodic Hill

A periodic hill flow condition was chosen as the CFD benchmark case. It is commonly used in CFD benchmarks [15,16,17], partially due to well-defined geometry, simplifying setup. Additionally, the presence of rich turbulent phenomena including vortex shedding, flow separation, and reattachment and transition regions challenges traditional CFD solvers including RANS models. Due to their common use as a turbulence modelling benchmark, there are a large number of CFD data available, which are required to train a data-driven model. The dataset selected is provided by Xiao et al. [18], and the solver used is the high-order flow solver Incompact3d. This solver uses a sixth-order compact finite difference scheme on a monobloc Cartesian mesh. The source code for this solver is publicly available on GitHub [19]. From recent literature, this dataset provides the most detail on validation and solving, and was developed with data-driven models in mind, making it a suitable dataset to compare data-driven and nonlinear dynamics-informed approaches to modelling turbulence.
The DNS solve the forced incompressible Navier–Stokes equations for a fluid field. The equations are given in [18] as,
· u = 0
u t = 1 ρ p 1 2 u u + u · u + ν 2 u + f
where p is the pressure field, u is the velocity field, x is the spatial domain (from div operators), t is the temporal domain, and ⊗ denotes the vector outer-product. In this equation set, the forcing term f is used to enforce a specified mass flux at the boundary through the immersed boundary method. Incompressible here indicates that spatial variation of the fluid density is ignored in these equations as a simplification. Validation of the code can be found in [20].
It is important to note that, although the data provided from these equations are a steady-state flow case, they are not run using the RANS equations, which average the velocity and pressure fields over a discrete time. These data are provided by running a transient solver to a point of steady-state flow, which the RANS equations would give as in this dataset, and the steady-state flow condition is maintained over the observed time.
The dataset contains 29 different periodic hill flow geometries for a Reynold’s number of the flow of 5600. The geometries are parameterised by a set of third-order equations (Appendix B). A subset of the geometries are shown in Figure 1.

3. Methods

3.1. Data-Driven Model

3.1.1. Network Architecture

The architecture of the data-driven model is a simple dense multilayer perceptron (MLP) network, consisting of 9 hidden layers of varying node numbers, from 128 reduced to 8 nodes to improve the consistency of convergence of the model (shown in Table 1). This was chosen as the most basic data-driven architecture for time-averaged data, to give a basic benchmark against PINNs models, and highlight areas for improvement in this type of modelling should a data-driven approach be taken. The input to the neural network is a tensor containing six independent variables for a given nodal position in any of the training dataset. These variables include the x and y positions of the node, the calculated distance, d, between the node and the bottom wall, and three geometric parameters to describe the periodic hill geometry. These are hill slope parameter, α , domain length, l, and domain height, h, to help characterise the overall domain geometry for the nodal predictions. The output tensor of the neural network is six dependant variables, including the time-averaged streamwise velocity, u ¯ , the time-averaged transverse velocity, v ¯ , and the time-averaged pressure, p ¯ , and the first-order Reynold’s stress terms u u , u v , and v v .
For completeness, note that Table 2 presents the architecture for the data driven model, Table 3 outlines the computational settings, Table 4 includes a summary of the PINNs models implemented, and data driven metrics are presented in Table 5. The full model constraints for all models can be seen in Table 6.

3.1.2. Loss Function

A neural network loss function is the method that is used by the network to converge to the correct solution. The defining trait of a data-driven model is that the values predicted from the neural network (in this case, u ¯ , v ¯ , p ¯ , u u , u v , and v v ) are directly compared against the DNS values from the dataset. The loss function for the data-driven model is a simple MAE (mean-averaged error). The error is calculated using,
L o s s = M A E d a t a = 1 N i = 1 N Y i Y ^ p
where Y i is the value from the dataset, and Y ^ p is the predicted value from the neural network. More information on neural networks for regression can be found in Appendix C.

3.1.3. Training

When using NNs for regression, it is common to normalise the input data between 0 and 1 as the nonlinearity introduced by the activation function is also between 0 and 1, and thus the model will converge more quickly when in this range [21]. While the architecture for the data-driven model uses ReLU, which scales between 0 and infinity, this would not account for any extreme values. The backpropagation calculates Euclidean distance, which cannot be computed accurately with features of different scales [22]. Therefore, the data will be normalised between 0 and 1 before being input into the neural network, using the range of each variable as the scale for that variable only.
The dataset procured contains the flow cases for 29 periodic hill geometries, 28 of which will be used for training and the final for testing. For a data-driven model to successfully extract nonlinear dynamics, it requires sufficient inputs to characterise the fluid flow individually, as discussed previously. It also requires a large training dataset to be able to represent the general flow case correctly. It is predicted that the simple MLP dense network with this dataset will capture main flow features and make predictions that are close but miss smaller scale or less common turbulence features due to this lack of data.
Overfitting is an issue in regression tasks when the neural network testing data validation does not improve or becomes worse relative to the training validation [23]. The model will implement early stopping, where a threshold of epochs with no improvement will cause the network to finish, reverting to the weights that give the best validation loss, to prevent overfitting the model.
The learning rate will start at 1 × 10 3 , and the threshold for the learning rate reduction is 12 epochs of no improvement to the validation loss. After these 12 epochs, the learning rate will be multiplied by 0.2, with a minimum bound of 1 × 10 6 . The threshold for the early stopping is 30 epochs of no validation loss improvement, where the best weights will be restored on end. If this condition is not met, the training will finish at 100 epochs. The batch size, or percentage of data fed into the network per epoch, is 128. The validation split for the neural network is 0.2, meaning 20% of the data are used to validate the updated weights, while 80% of the data are used to train the network to update the weights.

3.2. Physics-Informed Neural Network

3.2.1. Network Architecture

As with the data-driven model, the quantities to predict in the flow are the time-averaged streamwise velocity, u ¯ , the time-averaged transverse velocity, v ¯ , and the time-averaged pressure, p ¯ . Additional requirements or compromises from these predictions will be made based on the implementation of the governing dynamics equations, seen in Section 3.2.4, Section 3.2.5, Section 3.2.6, Section 3.2.7, Section 3.2.8, Section 3.2.9 and Section 3.2.10. The network facilitates automatic backpropagation of nonlinear dynamics equations using the TensorFlow function tape.gradient, used to calculate tensor gradients such as the first-order partial differential terms in the governing flow equations.
The network architecture is adapted from a physics-informed network architecture proposed by Eivazi et al. [6]. This architecture consists of a similar dense MLP architecture as the data-driven model, but due to the nature of the loss function the convergence is less of a concern, so a stack of 8 layers with 20 hidden nodes each will be used for simplicity. The changes made to incorporate this implementation include the modification of the data loading to accommodate the dataset, and modification of the governing equations and loss function, as well as changes to boundary condition enforcement and predictions to accommodate different governing equation sets.

3.2.2. Loss Function

The loss function for the PINN is different from the data-driven model. The loss function is a combination of calculated errors,
L o s s = M S E b c + M S E p d e
There M S E b c is a mean averaged error taken at the boundary conditions, and M S E p d e is the mean squared error of the governing partial differential equations. The implementation of boundary condition enforcement is an MSE error, like the MAE formula used in the data-driven model. The formula for this MSE loss is given,
M S E b c = 1 N i = 1 N Y i Y ^ p
For any closed system to converge to a single solution, boundary conditions must be provided for each predicted variable. This does not necessarily mean that the equations cannot be solved without all variables’ boundary conditions being provided, especially in the case of a neural network that could potentially compensate for inaccurate predictions with adjustment of the nodal weights based on flow features. This will be further explored in the different models.
As proposed by Eivazi et al., the loss function will be split into two training steps, ‘supervised’ and ‘unsupervised’ steps. The supervised step will involve the MSE bc and MSE pde , for a small number of iterations to ensure that the flow fields converge to the correct flow state. When the boundary conditions are enforced, it is beneficial to remove the MSEbc enforcement condition to reduce the number of calculations per iteration, and thus reduce the solve time. After the initial training, the loss function will be reduced to only the MSEpde term, to converge the flow field to the correct solution in an unsupervised method. To monitor the impact of this, the inlet and outlet (used in this case as the boundary conditions) velocity profiles in the streamwise and transverse directions will be monitored, and if they are significantly different then the number of training iterations in the first step may be changed. It was found that 1000 epochs was generally sufficient to converge to the correct solution at the boundary, so this is used for all PINNs during testing.

3.2.3. Training

Like the data-driven model, the data will be normalised between 0 and 1 to improve convergence before being input to the neural network. Unlike the data-driven model, the only data-driven elements in this model are the data-enforced boundary conditions, with the ‘test’ data being the remaining nodes in the flow domain, governed by the governing equations. Like the data-driven model, an early stopping function is used to converge the model within a specified loss threshold, where, when no improvement is seen in a certain number of epochs, the model will stop training. This threshold is set to 50 epochs for the PINNs models. It was found that, to converge the models within the desired threshold, a learning rate scheduler was not required, so a constant learning rate of 1 × 10 3 is used for all models.

3.2.4. Direct Reynolds Stress Model

The periodic hill flow conditions given in the dataset are governed by the 2D RANS equations as given in Equations (1)–(3). These have been derived in time-averaged form to match the flow field in the dataset, and separated into single partial differentials, which can easily be calculated using the tape.gradient function from TensorFlow, the Python library used to train the models. The equations are also rearranged to be equal to 0, which allows them to be directly summed to form the partial differential loss function,
M S E p d e , 1 = M S E c o n t i n u i t y + M S E m o m e n t u m , x + M S E m o m e n t u m , y
The MSE pde for all models will be similarly formed using the governing equations for each model in Table 6. Since the PINN will minimise the loss, the first method will involve a direct prediction of first-order stress terms, to directly close the momentum equations without needing to calculate these values using a numerical method or turbulence model. The full constraints of the model can be seen in Table 6.

3.2.5. Direct Reynolds Stress Model with Reduced Boundary Enforcement

Two more tests with direct Reynolds stress are performed, with alterations to be made to which variables are enforced as part of the boundary condition. The first will include u ¯ v ¯ , and p ¯ , but not first-order Reynolds stresses in boundary enforcement. The second will include only u ¯ and v ¯ in boundary enforcement. Since the neural network will minimise the loss function and can learn flow relationships, it is predicted that the neural network will maintain correct predictions on the variables that are enforced on the boundary conditions, and converge the variables that are not enforced on the boundary to a solution that follows,
i = 1 N V b i = i = 1 N V n b i
where V b i represents the variables enforced at the boundary and V n b i represents the variables not enforced at the boundary condition. This can also be interpreted that the sum of the predicted variables for a given point will be equal, regardless of whether the boundary condition is enforced. This will only be true based on the relationship between the variables and the equations in which they are present, in this case for first-order Reynolds stresses in the first test, and pressure and first-order Reynolds stresses in the second test.
It should be noted that, since the gradient forms of these variables are all that is present in the governing flow equations, the actual predicted values will not be enforced by Equation (13), but the gradients will, and this is what will be observed from the results to validate this hypothesis. This is also likely constrained based on the convergence of the neural network, as it is inherent with neural networks that they can converge to a solution that is not entirely the same as the ground truth, and the consistency of the convergence can vary based on the neural network, architecture, and convergence problem.

3.2.6. Continuity Only Model

It is proposed that the nature of a physics-informed neural network will converge a solution provided that the system is defined correctly, but this does not require the system to be numerically closed. In a direct numerical solver, continuity would not be sufficient by itself to close the system as it contains both u ¯ and v ¯ , which both vary in space, thus requiring the additional momentum equations to solve numerically. However, assuming that predictions of time-averaged streamwise and transverse flows are sufficient for the application, it is proposed that the continuity will converge to the correct solution. The full model constraints can be seen in Table 6.

3.2.7. Mixing Length Model

As direct prediction is not possible with a traditional solver, various models have been developed to close the momentum equations. Most closure models use the Boussinesq assumption,
τ i j = μ t 2 S i j 2 3 u k x k δ i j 2 3 ρ k δ i j
where μ t is the turbulent viscosity, S i j is the stress tensor, δ i j is the Kronecker delta, and k is the turbulent kinetic energy. Derivations can be found in Appendix A.3. This equation relates the first-order stresses to a derived turbulent viscosity term. This can be rewritten for single partial derivatives as is required by the TensorFlow tape.gradient function,
τ i j ¯ = μ t u i ¯ x j + u j ¯ x i 2 3 ρ k δ i j
A model that directly predicts turbulent viscosity can be used to close the Boussinesq assumption, which in turn can close the momentum and continuity equations. One method of approximating the turbulent viscosity is using the Prandtl mixing length model. This model, as used in [24], approximates the turbulent viscosity, μ t , using the following equation,
μ t = l m 2 G
where G is the strain tensor, and l m is the mixing length,
G = 2 u ¯ x 2 + 2 v ¯ y 2 + u ¯ y + v ¯ x 2
l m = m i n 0.419 d , 0.09 d m a x
where d is the distance from the wall. When approximating the first-order stress term, a turbulent kinetic energy, k, is also required. In the mixing length model, the turbulent kinetic energy is approximated using,
k = 1 2 u i u j ¯ = 1 2 u u ¯ + v v ¯
as outlined by [25], which allows the first-order stress terms to be defined,
τ x x ¯ = 2 μ t u ¯ x + u ¯ x + v ¯ y
τ y y ¯ = 2 μ t u ¯ x + v ¯ y + v ¯ y
τ x y ¯ = τ y x ¯ = μ t u ¯ x + v ¯ y
A full derivation can be found in Appendix A. Noting that some of the equations above can be simplified further, but have been left in the form shown to more easily link to the derivation presented. The full constraints of the model can be found in Table 6.

3.2.8. Turbulent Viscosity Model

It is known that the mixing length model is an oversimplification of the rich turbulence dynamics that occurs in fluid flow, specifically the relation of turbulent viscosity to a mixing length, implying that turbulent eddies maintain their identify over a certain distance, which is a simplification to relate mixing length to geometry. Since the physics-informed neural network will converge any included values to a solution that minimises the loss function, it is implied that the turbulent viscosity can be predicted directly by the neural network. This removes the reliance on the relation between geometry and mixing length and should improve the prediction accuracy. To test this, another model will be tested, but the turbulent viscosity will be directly predicted by the neural network. The same approximation for turbulent kinetic energy will be used as in Equation (19). The full constraints on the model can be seen in Table 6.

3.2.9. Turbulent Viscosity and Turbulent Kinetic Energy Model

The simplifications shown in Equation (19) can also be avoided by using the neural network to predict the values directly for turbulent kinetic energy as well. The first-order stress terms can then be directly predicted,
τ x x ¯ = μ t u ¯ x + u ¯ x 2 3 ρ k
τ y y ¯ = μ t u ¯ y + v ¯ x
τ x x ¯ = μ t v ¯ y + v ¯ y 2 3 ρ k
The full constraints on the model can be seen in Table 6.

3.2.10. Computation

The CPU TensorFlow instruction set was compared timewise against the CUDA instruction set running through WSL (Windows Subsystems for Linux) on an Nvidia 3070 laptop GPU, as TensorFlow 2.14.0 does not support the CUDA instruction set on Windows (NVIDIA, Santa Clara, CA, USA). The overhead from WSL leads to poor performance and issues with RAM limitations loading the dataset into the neural network, so the CPU instruction set is used for all runs on native Windows 11.

3.3. Summary of PINNs Methods

Figure 2 and Table 4 provide a summary of the PINNs models described, and the conditions under which these models have been systematically evaluated.

4. Results

4.1. Data-Driven Model

The data-driven model’s time-averaged streamwise velocity prediction in Figure 3 generally reflects the features of the DNS data. However, it fails to capture small-scale turbulence features including boundary conditions at the inlet and backflow conditions at the trailing slope, where the model has not converged. Overall, the domain error is low at 2.85%.
The transverse velocity prediction in Figure 4 exhibits a convergence towards correct dynamics in bulk flow for the transverse velocity prediction by the data-driven model. It captures features such as upflow at the leading edge but with poor accuracy and is missing an upflow condition at the trailing slope. The domain error is much higher than the streamwise velocity at 67.5%.
While there is an approximate shape of the pressure gradient shown in Figure 5, predictions are noisy and lack accuracy. The magnitude is overpredicted for negative pressure in the centre of bulk flow, and positive pressure near the trailing edge. Effects on boundaries are also missed with very noisy predictions. The domain error is very high at 215.9%.

4.2. PINNs Models

It is seen in Figure 3 that the DRSM can capture the flow much more accurately than the data-driven model. Elements that are not predicted well by the data-driven model, including the boundary condition at the inlet and outlet and the boundary at the trailing slope, are captured much more accurately, with a lower total error in the streamwise flow of 0.613%. This is evidenced visually through the streamwise velocity for PINNs models (Figure 6).
The time-averaged transverse velocity prediction of the DRSM PINN is compared against the DNS and the data-driven models in Figure 4. The DRSM predictions more accurately capture flow features including the boundary feature on the inlet and outlet, as well as central flow regions, as shown in Figure 7, Section 2. The overall domain error is lower with the DRSM, with only a 9.24% error. It is noted that there is significantly more error in the transverse velocity predictions than in the streamwise predictions.
Figure 5 shows that the DRSM PINN can predict the averaged pressure field much more accurately than the data-driven model, with a significantly lower error of 4.78%. The predictions are much more accurate in the bulk flow, and significantly improved in the boundaries and on the leading and trailing edges; however, there are still differences at the boundary of the trailing edge and the outlet condition.
The variables that were removed from the boundary conditions in the R B M u v p , u v are not correctly predicted, as can be seen in the pressure field error of 253.68% for R B M u v . However, it is interesting to note that, by reducing the enforced variables on the boundary, the predictions for the variables that were enforced improve on average, with the error for streamwise velocity reducing from 0.613% to 0.309% when not enforcing first-order Reynolds stress terms, with a further drop to 0.233% when not enforcing pressure ρ either. A similar trend is seen for transverse velocity. The effect of reducing the boundary conditions on the solve time is not clear, with a reduction and increase (Table 6).
As shown in Figure 6 and Figure 7, the COM produces the most accurate results for streamwise and transverse velocities, with overall domain errors of 0.147% and 2.562%, respectively. This includes the most accurate capturing of flow features such as the boundary flow at the leading and trailing slopes. The solve time is also comparatively low at only 0.74 h.
As shown in Figure 6, Figure 7 and Figure 8, the MLM does not converge to an accurate solution near the boundary conditions for the streamwise and transverse velocity fields, or the pressure field, with the highest PINNs method error for streamwise velocity at 6.92%, and highest enforced error for transverse velocity and pressure at 15.7% and 15.3%, respectively. The predictions capture the general flow but are particularly poor for streamwise velocity near the boundaries, especially the top boundary. The solve time however for this model is very low, at only 0.74 h.
As shown in Figure 6, Figure 7 and Figure 8, the TVM has a much higher accuracy than the MLM, with the overall streamwise error reduced to 0.64%, transverse velocity error reduced to 9.29%, and pressure field error reduced to 9.52%. The poor convergence at the boundaries seen in the MLM is not present, with much better convergence at the leading and trailing slopes. The solve time is much higher than the MLM, at 2.38 h.
The accuracy is further improved with the TVKEM, shown in Figure 6, Figure 7 and Figure 8. The overall error is further decreased from the TVM, with the streamwise velocity error reduced to 0.47%, transverse velocity error reduced to 5.62%, and pressure field error reduced to 6.19%. The solve time is still higher than the MLM at 1.63 h but is much lower than the TVM.
Figure 9 and Figure 10 show the gradient of the first-order stress terms in the momentum in x and momentum in y equations, respectively. It is shown that the bulk prediction for the gradients is similar between all models and the DNS, with discrepancies at the boundaries where large positive and negative gradients are present.

5. Discussion

5.1. Data-Driven Model

The discrepancy between the data-driven model predictions and DNS is likely due to the limited dataset. The small size of the dataset does not allow the neural network to capture the complex nonlinear dynamics between geometric inputs and flow outputs for a general case. Slices of streamwise velocity data (Appendix G) indicate similar profiles among different geometry flow cases for the inlet, supporting the hypothesis that similarity in the data leads to more accurate characterisation of flow and thus more accurate prediction. Discrepancies at the boundary conditions at the trailing edge are likely due to poor normalisation of data after concatenation into an array containing all datasets, leading to differences in position when normalised, which affect predictions, especially at domain edges.
The normalisation limitation of the data-driven model is clearer in the transverse velocity prediction, where the backflow condition at the trailing slope is entirely missed by the data-driven model. This flow feature is only present in three of the 29 flow cases (Appendix G) at this normalised x value, which suggests that this prediction failure is a result of the sparse data problem, where features that are sparse in the dataset are not captured correctly because of the equal weighting of all features. This could be potentially resolved by modification of the dataset to ensure that the domain lengths are similar after normalisation. In this case, the backflow condition on the trailing slope would be constant in position. This would aid the neural network in identification of this feature but would still leave the inaccuracy issue seen in the rest of the flow features, e.g., on the inlet flow condition.
The noisy and inaccurate predictions of the pressure field again suggest that the dataset is not sufficient to capture the dynamics required to predict the pressure field. The pressure field is significantly different in all flow cases, with similar gradients only between a few of the flow cases (Appendix G). This supports the theory that the data in this case are too different to provide accurate predictions, and more flow cases would be needed to construct an accurate pressure field.
Again, it should be noted that the methods for this data-driven model are simple as a based point of comparison; however, there are data-driven frameworks proposed in literature that can make more accurate predictions. Volpiani et al. proposed a similar data-driven architecture [26], with a larger set of input features, to allow the neural network to adapt to relevant features. This included turbulent flow features such as strain rate, rotation rate, turbulent intensity, etc., and these were separately normalised with customised factors to avoid moving turbulent features. While no error or accuracy metrics are provided, it can be seen from the graphical results that the additional neural network inputs do improve predictions, with both models tested capturing more streamwise velocity detail at the boundary conditions, particularly the bottom wall. The transverse predictions are also improved, more accurately predicting the downflow conditions at the leading slope as the domain is normalised to preserve the turbulence model’s position. However, though the predictions are improved, all models show some error compared with the proposed PINNs approaches.

5.2. PINNs Models

Comparing the error between the DRSM and RBM, the RBMs generally have a lower error in the enforced variables than the DRSM (Table 6). This is a result of the model being constrained by fewer factors, and fewer constraints allows the model to converge to a solution more quickly, as there are fewer variables that are being enforced. Since the relationship between the variables in the governing equations is based on the gradient of the variables (with respect to the streamwise or transverse direction), there is nothing to enforce the singular correct solution in the base values, which explains the high overall domain error. The results from Figure 9 and Figure 10 prove this, as the gradient values that are part of the governing equations for the bulk flow are very similar. There is still a small deviation between the models, which is likely due to the limited iterations for the PINN to converge, so the exact solution is not reached. It is hypothesised that a run that is allowed to continue training to a lower convergence threshold would see the DRSM coming closer and eventually surpassing the RBMs; however, in an engineering application, time is an important consideration. Since there is no clear benefit to reducing the boundary enforcement in terms of solve time, it is hypothesised that the reduction in time is dependent on the initial weights in the neural network from the first training step, or the ‘first guess’ at these variables. If this value is reasonably close, then the time is reduced, whereas, if the value is not close, the time is increased. Further testing is required to understand this effect, and enforcing a single or very few nodes of data and comparing the time vs full boundary enforcement for the variable would prove this hypothesis. Should this hypothesis be true, the most efficient training method would be to include the full set of boundaries at the initial 1000 epoch training, but remove them after to reduce the constraints on the model while keeping the initial values close to the correct values.
There is a significant improvement in the implementation of this neural network from [6], which produced higher errors of 2.8%, 19.7%, and 8.6% in streamwise velocity, transverse velocity, and pressure, respectively, for a periodic hill test case. This is not directly comparable, as the dataset and Reynolds number are different, and the improvement shown is likely due to a different convergence threshold; however, it is useful to note that the PINN can produce lower errors, given optimisation of the solver for the problem.
It is noted that the error in the predicted variables for the COM is the lowest of any PINNs model. Since this model contains the fewest boundaries and equations to satisfy, the solution is reached much more quickly, with each epoch taking less time as fewer gradients and equations must be calculated. An obvious limitation of this model is that, by limiting the equations, the predicted variables are also limited, as there are no predictions made for the pressure field. Since any equations that govern the flow must be correct to converge to a correct solution, and have boundary conditions provided, if these pressure predictions are required then the momentum equations must be added to the loss function. However, if only the velocity fields are needed, a continuity only model is shown to be effective with low error and solve time. This is particularly interesting, as effects of pressure and first-order stresses are being ignored in the loss function but appear to still affect the solution, likely a result of the boundary enforcement technique used during training. Further work is required to understand the difference in the nodal weight adjustment between a COM and DRSM, or further proof is required on alternative flow cases, particularly cases with heavy turbulence characteristics such as vortex shedding, flow layer separation, and backflow, such as a backwards-facing step.
The lack of accuracy of the MLM at the boundary conditions can be explained by the model and its assumptions. Prandtl’s mixing length model is known to have several limitations, including the lack of a physical basis for the assumed proportionality between the turbulent viscosity and the velocity gradients that make up the strain tensor [27,28]. The model includes an overly simplistic assumption of turbulent viscosity, which has a constant mixing length for the flow case. This is likely the largest contributor to the poor convergence near the boundaries, as the periodic hill has changing geometries on the bottom boundary. This results in the value of the mixing length calculated not being applicable across the whole domain due to the changes in geometry.
Removing this mixing length assumption and the modelling of the turbulent viscosity without relying on the strain tensor by directly predicting the values resolves the convergence issue at the boundary conditions. This indicates that this assumption is the limiting assumption in the MLM between the mixing length assumption and the turbulent kinetic energy assumption. However, the model still contains the turbulent kinetic energy assumption, which is also a simplification. Removing both assumptions leaves a model that is not numerically closed but relies only on the Boussinesq assumption. The improvement of the TVKEM from the TVM implies that the TVKEM is significantly impacting the accuracy of the model for this flow case. It is noted that using the Boussinesq assumption itself does not impact the accuracy of the model; however, the poor assumptions that are used to calculate the values required in the Boussinesq assumption should be avoided, where possible, as they impact the solver accuracy.
In our current study, there is a novel proposition of exploiting numerically derived unclosed equation sets to aid in efficient solving of problems related to turbulence. Specifically where the equation sets used to constrain PINNs are based on a numerically derived reduced order model. Existing studies which employ a reduced order model, for turbulence, can do so effectively but may require understanding of the geometry or an actual insight into the data itself under given conditions [9]. It has been shown that neural networks can reduce the dimensionality of a governing equation [11], and that they can be applied successfully to parametric systems [10]. The results obtained in this current study are broadly in agreement with literature, such as Pioch et al., 2023 [7] which indicate that physics-informed neural networks are a significant improvement in solve time compared to a data driven approach. However, so far turbulence problems have not evaluated unclosed problems, where more variables are solved than equations sets available. This approach, as used in our current study has been particularly effective when data-driven and PINNs have been combined, leading to a time-efficient and high-accuracy solution. This approach, while evaluated for a turbulence benchmark model, has wider applications where complex complex flow is involved, such as in multi-phase and multi-scale flow models which when solved using a traditional numerical modelling approach have long solution times.

6. Conclusions

This study compared a data-driven turbulence modelling approach to different configurations of a PINNs architecture to predict flow fields of a period hill of Reynolds flow 5600, governed by 2D incompressible RANS equations. It was shown that the simple data-driven model is accurate to 2.9% and 67.5% error in streamwise and transverse velocities, respectively, and that this approach is constricted by the small number of flow cases and sparse data of velocity features between the flow cases. The numerically closed DRSM PINN was shown to have a significantly reduced error (1.2% and 6.4%, respectively), with further improvement using reduced-boundary models and reduced-equation models, with the COM having a dramatically reduced solve time and error in fluid velocity predictions compared with all other approaches. It was also shown that introducing poor assumptions in the governing equations affects the convergence of the solver, with the MLM model showing significant error at the boundary conditions. The evaluation of a turbulence benchmark has enabled the effectiveness of the PINNs to be assessed. Critically, this study has evaluated a novel approach by which to implement a reduced order model. This approach is time-efficient for solving turbulence problems in cases of sparse-data using an unclosed approach to its solution. In conclusion, a numerically derived unclosed equation set can be efficiently implemented with neural networks to reliably model turbulent systems.

Author Contributions

W.F.: conceptualization, data curation, formal analysis, methodology, software, investigation, validation, writing—original draft and editing. B.S.: analysis, writing—review and editing. J.C.: conceptualization, analysis, writing—review and editing. M.C.: conceptualization, analysis, methodology, writing—review and editing. D.M.E.: conceptualization, analysis, supervision, project administration, methodology, writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

J.C. was supported by the Engineering and Physical Sciences Research Council [grant number: **EP/T517926/1**].

Data Availability Statement

Data and relevant code for this research work are stored in GitHub [29].

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PINNsPhysics-informed neural network
CFDComputational fluid dynamics
DNSDirect numerical simulation
ROMReduced-order modelling
RANSReynold’s averaged Navier–Stokes
MLPMultilayer perceptron
MAEMean averaged error
MSEMean squared error
DRSMDirect Reynold’s stress model
RBMuvpDirect Reynold’s stress model with reduced boundary enforcement of only u, v, and p
RBMuvDirect Reynold’s stress model with reduced boundary enforcement of only u and v
COMContinuity only model
MLMMixing length model
TVMTurbulent viscosity model
TVKEMTurbulent viscosity and turbulent kinetic energy model
KOMK-Omega model
x ¯ Bar indicates time-averaged component
x Prime indicates fluctuating component
u ¯ Time-averaged streamwise velocity
v ¯ Time-averaged transverse velocity
ρ Density (kg/m3)
μ Kinematic viscosity (m2/s)
τ i j First-order Reynold’s stress wrt. i and j
α Geometric slope parameter
hDomain height (m)
lDomain length (m)
Y i Dataset value
Y p Neural network predicted value
V b i Boundary-enforced variables
V n b i Non-boundary-enforced variables
p ¯ Time-averaged pressure
μ Turbulent viscosity (kg/ms)
S i j Stress tensor
δ i j Kronecker delta
kTurbulent kinetic energy
dDistance from the wall (m)
GStrain tensor
l m Mixing length

Appendix A

Appendix A.1. 2D Stationary Equations—Continuity

The 2D continuity equation for incompressible flow is given by,
u x + v y = 0
The Reynolds decomposition can be used to separate the velocities into their mean and fluctuating components,
u = v ¯ + v
u = v ¯ + v
where u ¯ and v ¯ are the mean velocity components, and the prime denotes fluctuating components.
( u ¯ + u ) x + ( v ¯ + v ) y = 0
Applying time averaging over time a,
1 t a 0 t a ( u ¯ + u ) x + ( v ¯ + v ) y d t = 0
1 t a 0 t a u ¯ x + u x + v ¯ y + v y d t = 0
The Reynolds stress decomposition implies that, for stationary flow,
1 t a 0 t a u x d t = 1 t a 0 t a v y d t = 0
Therefore,
1 t a 0 t a u ¯ x d t + 1 t a 0 t a v ¯ y d t = 0
Which simplifies to,
u ¯ x + v ¯ y = 0

Appendix A.2. 2D Stationary Equations—Momentum in x and y

The 2D momentum equation is given by,
ρ u t + u u x + v u y = p x + μ 2 u x 2 + 2 u y 2
By dividing by ρ on both sides,
u t + u u x + v u y = 1 ρ p x + ν 2 u x 2 + 2 u y 2
The Reynolds stress composition for velocity and pressure is denoted,
u = u ¯ + u
p = p ¯ + p
where u ¯ and p ¯ are the mean streamwise velocity and pressure components, respectively, and the prime denotes fluctuating components. Substituting this into the momentum equation,
( u ¯ + u ) t + ( u ¯ + u ) ( u ¯ + u ) x + ( v ¯ + v ) ( u ¯ + u ) y
= 1 ρ ( p ¯ + p ) x + ν 2 ( u ¯ + u ) x 2 + 2 ( u ¯ + u ) y 2
Time averaging both sides,
1 t a 0 t a ( u ¯ + u ) t + ( u ¯ + u ) ( u ¯ + u ) x + ( v ¯ + v ) ( u ¯ + u ) y d t
= 1 t a 0 t a 1 ρ ( p ¯ + p ) x + ν 2 ( u ¯ + u ) x 2 + 2 ( u ¯ + u ) y 2 d t
This can be decomposed to,
1 t a 0 t a u ¯ t d t + 1 t a 0 t a u t d t
+ 1 t a 0 t a u ¯ u ¯ x d t + 1 t a 0 t a u ¯ u x d t + 1 t a 0 t a u u ¯ x d t + 1 t a 0 t a u u x d t
+ 1 t a 0 t a v ¯ u ¯ y d t + 1 t a 0 t a v ¯ u y d t + 1 t a 0 t a v u ¯ y d t + 1 t a 0 t a v u y d t
= 1 t a 0 t a 1 ρ p ¯ x d t + 1 t a 0 t a 1 ρ p x d t + ν t a 0 t a 1 ρ 2 u ¯ x 2 d t
+ ν t a 0 t a 1 ρ 2 u x 2 d t + ν t a 0 t a 1 ρ 2 u ¯ y 2 d t + ν t a 0 t a 1 ρ 2 u y 2 d t
Time averages of fluctuating components as implied by the Reynolds stress decomposition,
1 t a 0 t a u t d t = u ¯ t a 0 t a u x d t = v ¯ t a 0 t a u y d t = 1 t a 0 t a 1 ρ p x d t = ν t a 0 t a 1 ρ 2 u x 2 d t
= ν t a 0 t a 1 ρ 2 u y 2 d t = 0
However, it is important to note that, while the time average of velocity and pressure fluctuation is zero, the variance is not zero. In this case,
1 t a 0 t a u u x d t 0 , 1 t a 0 t a u u x d t 0
The average velocity does not change with time,
u ¯ t = 0
Which leaves,
1 t a 0 t a u ¯ u ¯ x d t + 1 t a 0 t a u u x d t + 1 t a 0 t a v ¯ u ¯ y d t + 1 t a 0 t a v u y d t
= 1 t a 0 t a 1 ρ p ¯ x d t + ν t a 0 t a 1 ρ 2 u ¯ x 2 d t + ν t a 0 t a 1 ρ 2 u ¯ y 2 d t
This can be simplified,
u ¯ u ¯ x + v ¯ u ¯ y + u ¯ u ¯ y + u u ¯ x = 1 ρ p ¯ x + v 2 u ¯ x 2 + v 2 u ¯ y 2
This can be rearranged,
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v ¯ u ¯ y + u ¯ u ¯ x = 0
where the final two terms represent the first-order Reynolds stresses. The same can be performed for the momentum equation in y,
ρ v t + u v x + v v y = p y + μ 2 v x 2 + 2 v y 2
Which gives,
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v ¯ v ¯ y + u ¯ v ¯ x = 0

Appendix A.3. Mixing Length Model

The 2D stationary momentum equations read,
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v ¯ u ¯ y + u ¯ u ¯ x = 0
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v ¯ v ¯ y + u ¯ v ¯ x = 0
With the first-order stress terms given by,
τ i i = u u x ¯ , τ i j = u v x ¯ , t a u j i = v u x ¯ , τ j j = v v x ¯
According to the Boussinesq assumption, the Reynolds stresses can be given,
τ i j = μ t 2 S i j 2 3 u k x k δ i j 2 3 ρ k δ i j
where, μ t is a turbulent eddy viscosity and S i j is the stress tensor, given by,
S i j = 1 2 u i x j + u j x i
The time average of the stress tensor is given,
S i j ¯ = S i j 1 3 u k x k δ i j
Taking the time average of the Boussinesq assumption by applying the Reynolds decomposition,
u k = u k ¯ + u k
τ i j ¯ = μ t 2 S i j 1 3 ( u k ¯ + u k ) x k δ i j 2 3 ( u k ¯ + u k ) x k δ i j 2 3 ρ k δ i j
τ i j ¯ = μ t 2 ( S i j ¯ ) 2 3 ρ k δ i j
τ i j ¯ = μ t u i x j + u j x i 2 3 ρ k δ i j
Since the time average of a time average is that same time average, and the equation must be written to deal with these time averages, this can be re-written,
τ i j ¯ = μ t u i ¯ x j + u j ¯ x i 2 3 ρ k δ i j
Since the no turbulent kinetic energy, k, is calculated here, it is approximated,
k = 1 2 u i u i ¯ = 1 2 ( u u ¯ + v v ¯ )
The first-order stress τ i i ¯ therefore reads,
τ i i ¯ = μ t u ¯ x + u ¯ x 2 3 ρ 1 2 ( u u ¯ + v v ¯ )
where,
u u ¯ = τ i i
v v ¯ = τ j j
Therefore,
τ i i ¯ = μ t u ¯ x + u ¯ x 2 3 ρ 1 2 ( τ i i ¯ + τ j j ¯ )
τ i i ¯ = μ t u ¯ x + u ¯ x 1 3 ρ ( τ i i ¯ + τ j j ¯ )
The first-order stress τ j j similarly reads,
τ j j ¯ = μ t v ¯ y + v ¯ y 1 3 ρ [ ( τ i i + τ j j ) ]
These equations can be reduced,
τ i i ¯ 1 1 3 ρ = τ j j ¯ 1 3 ρ + μ t u ¯ x + u ¯ x
τ j j ¯ 1 1 3 ρ = τ i i ¯ 1 3 ρ + μ t v ¯ y + v ¯ y
Therefore,
τ i i ¯ = τ j j ¯ 1 3 ρ + μ t u ¯ x + u ¯ x 1 1 3 ρ
τ j j ¯ = τ i i ¯ 1 3 ρ + μ t v ¯ y + v ¯ y 1 1 3 ρ
Substitution of τ j j ¯ into τ i i ¯ gives,
τ i i ¯ 1 1 3 ρ = τ i i ¯ 1 3 ρ + μ t v ¯ y + v ¯ y 1 1 3 ρ 1 3 ρ + μ t u ¯ x + u ¯ x
τ i i ¯ 1 1 3 ρ 1 1 3 ρ = τ i i ¯ 1 3 ρ + μ t v ¯ y + v ¯ y 1 3 ρ + μ t u ¯ x + u ¯ x 1 1 3 ρ
τ i i ¯ 1 1 3 ρ 1 1 3 ρ τ i i ¯ 1 3 ρ = μ t v ¯ y + v ¯ y 1 3 ρ + μ t u ¯ x + u ¯ x 1 1 3 ρ
τ i i ¯ 1 1 3 ρ 2 τ i i ¯ 1 3 ρ = μ t v ¯ y + v ¯ y 1 3 ρ + μ t u ¯ x + u ¯ x 1 1 3 ρ
τ i i ¯ 1 2 3 ρ 1 9 ρ 2 τ i i ¯ 1 3 ρ = μ t v ¯ y + v ¯ y 1 3 ρ + μ t u ¯ x + u ¯ x 1 1 3 ρ
Since the density of water is around 1 g/m2,
τ i i ¯ 1 2 3 1 9 τ i i ¯ 1 3 = μ t v ¯ y + v ¯ y 1 3 + μ t u ¯ x + u ¯ x 1 1 3
1 3 τ i i ¯ = 1 3 μ t v ¯ y + v ¯ y + 2 3 μ t u ¯ x + u ¯ x
τ i i ¯ = μ t v ¯ y + v ¯ y + 2 μ t u ¯ x + u ¯ x
τ i i ¯ = 2 μ t u ¯ x + u ¯ x + v ¯ y
Similarly, the first-order stress for τ j j ¯ can be derived,
τ j j ¯ = 2 μ t ( u ¯ x + v ¯ y + v ¯ y )
The first-order stresses τ i i ¯ and τ j j ¯ do not require turbulent kinetic energy terms due to the Kronecker delta. As the fluid is incompressible,
τ i j ¯ = τ j i ¯ = μ t u ¯ y + v ¯ x
The turbulent viscosity of the mixing length model is given based on the relation,
μ t = l m 2 G
where the mixing length, l m , is given,
l m = m i n 0.419 d , 0.09 d m a x
where d is the distance from the wall. The mean strain rate tensor, G, is given,
G = 2 u ¯ x 2 + 2 v ¯ y 2 + u ¯ y + v ¯ x 2

Appendix A.4. K-Omega Model

The general form of the turbulent kinetic energy, k, equation reads,
( ρ k ) t + ( ρ u j k ) x j = P β * ρ ω k + x j μ + σ k ρ k ω k x j
where the production term is given,
P = τ i j u i x j
According to the Boussinesq assumption, the Reynolds stresses can be given,
τ i j = μ t 2 S i j 2 3 u k x k δ i j 2 3 ρ k δ i j
where μ t is a turbulent eddy viscosity and S i j is the stress tensor, given by,
S i j = 1 2 u i x j + u j x i
The time average of the stress tensor,
S ¯ i j = S i j 1 3 u k x k δ i j
Taking the time average of the Boussinesq assumption by applying the Reynolds decomposition,
u k = u k ¯ + u k
τ ¯ i j = μ t 2 S i j 1 3 ( u ¯ k + u k ) x k δ i j 2 3 ( u ¯ k + u k ) x k δ i j 2 3 ρ k δ i j
τ ¯ i j = μ t 2 ( S ¯ i j ) 2 3 ρ k δ i j
τ ¯ i j = μ t u i x j + u j x i 2 3 ρ k δ i j
Since the time average of a time average is that same time average, and the equation must be written to deal with these time averages, this can be re-written,
τ i j = μ t u ¯ i x j + u ¯ j x i 2 3 ρ k δ i j
And the turbulent viscosity, μ t , is calculated,
μ t = ρ k ω ^
where,
ω ^ = m a x ω , C l i m 2 S i j S i j ¯ β * i s s i m p l i f i e d t o ω ^ = ω
This can be used to calculate the time average of the production term,
P ¯ = τ i j ¯ u i ¯ x j
This can be used to calculate the time average of the k equation,
( ρ k ¯ ) t + ( ρ u j k ¯ ) x j = P ¯ β * ρ ω k ¯ + x j μ + σ k ρ k ¯ ω k ¯ x j
In this case, since k and ω are unknowns, and their fluctuating components are not known or used, we can assume that the fluctuating components are zero, and hence leave them as they are in the equation. It should be noted that since k is the turbulent kinetic energy of averaged quantities, therefore,
ρ k t = 0
As k does not change with time. This leaves,
( ρ u ¯ j k ) x j = P ¯ β * ρ ω k + x j μ + σ k ρ k ω k x j
Which can be expanded for the 2D stationary domain into,
( ρ u ¯ k ) x + ( ρ v ¯ k ) y = τ x x u ¯ x + τ x y u ¯ y + τ y x v ¯ y + τ y y v ¯ y ¯ β * ρ ω k
+ x μ + σ k ρ k ω k x + y μ + σ k ρ k ω k y
Using the product rule,
( ρ u ¯ k ) x + ( ρ v ¯ k ) y = ρ u ¯ k x + k u ¯ x + v ¯ k y + k v ¯ y
Giving,
ρ u ¯ k x + k u ¯ x + v ¯ k y + k v ¯ y = τ ¯ x x u ¯ x + τ ¯ x y u ¯ y + τ ¯ y x v ¯ y + τ ¯ y y v ¯ y β * ρ ω k
+ x μ + σ k ρ k ω k x + y μ + σ k ρ k ω k y
The general form of the turbulent kinetic energy dissipation, ω , is given,
( ρ ω ) t + ( ρ u j ω ) x j = γ ω k P β ρ ω 2 + x j μ + σ ω ρ k ω ω x j + ρ σ d ω k x j ω x j
Which can be similarly rewritten,
ρ u ¯ ω x + ω u ¯ x + v ¯ ω y + ω v ¯ y = γ ω k τ ¯ x x u ¯ x + τ ¯ x y u ¯ y + τ ¯ y x v ¯ y + τ ¯ y y v ¯ y β ρ ω 2
+ x μ + σ ω ρ k ω ω x + ρ σ d ω k x ω x + y μ + σ ω ρ k ω ω y + ρ σ d ω k y ω y

Appendix B

Equations for the geometry, as provided in [19]
  • y ^ = m i n ( 1 : 1 + 2.42 × 10 4 x ^ 2 7.588 × 10 5 x ^ 3 ) , x ^ [ 0 , 0.3214 ]
  • y ^ = 0.8955 + 3.4844 x ^ 3.629 × 10 3 x ^ 2 + 6.749 × 10 5 x ^ 3 , x ^ [ 0.3214 , 0.5 ]
  • y ^ = 0.9213 + 2.931 × 10 2 x ^ + 3.243 × 10 3 x ^ 2 + 5.809 × 10 5 x ^ 3 , x ^ [ 0.5 , 0.7143 ]
  • y ^ = 1.445 4.927 × 10 2 x ^ + 6.95 × 10 4 x ^ 2 7.394 × 10 6 x ^ 3 , x ^ [ 0.7143 , 1.071 ]
  • y ^ = 0.6401 + 3.1123 × 10 2 x ^ + 1.988 × 10 3 x ^ 2 + 2.242 × 10 6 x ^ 3 , x ^ [ 1.071 , 1.429 ]
  • y ^ = m a x ( 0 : 2.0139 7.18 × 10 4 x ^ + 5.875 × 10 4 x ^ 2 + 9.553 × 10 7 x ^ 3 , ) x ^ [ 1.1429 , 1.929 ] where x ^ = x H and y ^ = y H are normalised horizontal and vertical coordinates, respectively.

Appendix C

Neural networks are used to model relationships between independent variables such as geometry and dependant variables such as flow fields and stress terms in the case of turbulence modelling. When referring to a neural network that makes an exact prediction rather than classification, this is known as regression.
The simplest form of neural networks used for regression are dense multilayer perceptron (MLP) or feed-forward neural networks. A dense MLP network is characterised by its unidirectional information flow from input nodes to a set of interconnected nodes that are weighted to transform data as they are passed from one node to another.
The neural network can be conceptually simplified into a simple polynomial approximation, where the hidden nodes represent the equation relating the independent variables to the dependent variables, in the same way a simple transformer might behave. The training of the neural network is simply the method of determining the correct nodal weights to correctly characterise the transformer, to ensure that it is representative of the correct nonlinear dynamics between the independent and dependent variables. This architecture is represented in a general form in Figure A1. The method of training is via calculation of some loss, as discussed in the Methods section. Backpropagation is used for optimising this loss function by adjusting weights according to gradients calculated via chain rule-based computation on losses relative to node weights and biases resulting from the backpropagation method. These gradients are then employed within an optimiser such as Adam, which uses them iteratively to recalibrate node weights, ensuring convergence towards accurate solutions.
Once the neural network has been trained, it can predict the value of independent variables from new dependant variables, and, provided that the weights have adjusted sufficiently to capture the nonlinear dynamics of the data, the predictions should be accurate and representative of the test data.
Figure A1. General dense MLP neural network architecture.
Figure A1. General dense MLP neural network architecture.
Fluids 09 00279 g0a1

Appendix D

Appendix D.1. Methods

The k omega model is a two-equation turbulence model that defines mean flow in terms of turbulence kinetic energy, k, which is closed using the kinetic energy dissipation rate, ω . The 2D stationary conservation equations are written,
( ρ k ) t + ( ρ u j k ) x j = P β * ρ ω k + x j μ + σ k ρ k ω k x j
( ρ ω ) t + ( ρ u j ω ) x j = γ ω k P β ρ ω 2 + x j μ + σ ω ρ k ω ω x j + ρ σ d ω k x j ω x j
These can be simplified and rewritten in a singular partial differential form for mean flow,
ρ u ¯ k x + k u ¯ x + v ¯ k y + k v ¯ y = τ ¯ x x u ¯ x + τ ¯ x y u ¯ y + τ ¯ y x v ¯ y + τ ¯ y y v ¯ y β * ρ ω k
+ x μ + σ k ρ k ω k x + y μ + σ k ρ k ω k y
ρ u ¯ ω x + ω u ¯ x + v ¯ ω y + ω v ¯ y = γ ω k τ ¯ x x u ¯ x + τ ¯ x y u ¯ y + τ ¯ y x v ¯ y + τ ¯ y y v ¯ y β ρ ω 2
+ x μ + σ ω ρ k ω ω x + ρ σ d ω k x ω x + y μ + σ ω ρ k ω ω y + ρ σ d ω k y ω y
Turbulent viscosity for this model is calculated,
μ t = ρ k ω ^
where,
ω ^ = m a x ω , C l i m 2 S i j S i j ¯ β * i s s i m p l i f i e d t o ω ^ = ω
A full derivation can be found in Appendix A. See Table A1 for full constraint list.

Appendix D.2. KOM Model

Table A1. KOM model summary.
Table A1. KOM model summary.
Method NameNeural Network InputsNeural Network OutputsGoverning Flow EquationsEnforced Boundaries
K-Omega x y u ¯ v ¯ k ω 2D turbulent kinetic energy stationary:
ρ u ¯ k x + k u ¯ x + v ¯ k y + k v ¯ y = τ ¯ x x u ¯ x + τ ¯ x y u ¯ y + τ ¯ y x v ¯ y + τ ¯ y y v ¯ y β * ρ ω k + x μ + σ k ρ k ω k x + y μ + σ k ρ k ω k y
2D turbulent kinetic energy dissipation stationary:
ρ u ¯ ω x + ω u ¯ x + v ¯ ω y + ω v ¯ y = γ ω k τ ¯ x x u ¯ x + τ ¯ x y u ¯ y + τ ¯ y x v ¯ y + τ ¯ y y v ¯ y β ρ ω 2 + x μ + σ ω ρ k ω ω x + ρ σ d ω k x ω x + y μ + σ ω ρ k ω ω y + ρ σ d ω k y ω y
Turbulent viscosity:
μ t = ρ k ω ^
Turbulent kinetic energy dissipation rate limit:
ω = ω ^
First-order stresses:
τ x x ¯ = μ t u ¯ x + u ¯ x 2 3 ρ k
τ y y ¯ = μ t u ¯ y + v ¯ x
τ x x ¯ = μ t v ¯ y + v ¯ y 2 3 ρ k
u ¯ v ¯
Table A2. Solver metrics and overall accuracy.
Table A2. Solver metrics and overall accuracy.
Neural Network NameNeural Network AbbreviationTraining Time (s)Prediction Time u ¯ Error (%) * v ¯ Error (%) * p ¯ Error (%) *Description
K-Omega ModelKOM1.83-0.1612.28-Learning Rate of 1 × 10−2 required for convergence, compared with 1 × 10−3 for rest. Compared with others, time should be slower than shown.
* See Appendix E for calculation method.

Appendix D.3. KOM Results

The KOM is not entirely comparable with the other results, as the KOM model failed to converge with the same solver parameters. To allow the model to solve, the learning rate was increased to 1 × 10−2 from 1 × 10−3 to provide faster initial convergence. The model has low error, close to the accuracy of the COM model, with a streamwise error of 0.161% and transverse velocity error of 2.28%. There are no pressure predictions for the KOM model, as pressure is not a variable present in the governing equations. The solve time is still much higher than the COM at 1.83 h, despite the learning rate decreasing the solve time.
Figure A2. Time-averaged streamwise velocity, u ¯ , PINNs compared with KOM.
Figure A2. Time-averaged streamwise velocity, u ¯ , PINNs compared with KOM.
Fluids 09 00279 g0a2
Figure A3. Time-averaged transverse velocity, v ¯ , PINNs compared with KOM.
Figure A3. Time-averaged transverse velocity, v ¯ , PINNs compared with KOM.
Fluids 09 00279 g0a3

Appendix D.4. KOM Discussion

The KOM results show that the continuity form of the two equation models is sufficient to govern the model, and the results shown are fairly accurate. However, it is noted that the number of unknowns in each equation is higher than any other model, and governing this many unknowns using only two equations is likely the cause of the inability to converge within the same threshold using the same small learning rate as the other models. While this means the model is not directly comparable, this model is promising, avoiding the poor assumptions as in the MLM while directly predicting k and omega. In this manner, the number of equations being solved can be reduced from the TVKEM model, but the convergence threshold or learning rate will need to be adjusted to produce results. This shows that this form is accurate, but highlights the limitations of under-constrained models with a low number of governing equations and a high number of variables across them, with convergence issues being the most important.

Appendix E

The formula used to calculate the overall error per variable in the fluid domain is given,
Total Domain Error   ( % )   = ref pred 2 , ( 1 , 2 ) ref 2 , ( 1 , 2 ) × 100
where ref and pred are the lists of reference and predicted fluid domain values, and a 2 , ( 1 , 2 ) denotes the values on the specified axis, which represent the points and variables.
It should be noted that there are several limitations with this method of calculating average domain error. This function is inherently sensitive to outliers. If there are extreme differences in the percentage error between the reference and predicted points in the domain, this can disproportionately affect the error calculation. This can lead to large errors being cancelled, skewed error, and other effects leading to a lower or higher overall percentage error than might accurately represent the flow.

Appendix F

Table A3. Data-driven metrics for all geometries. Runs 1, 2, and 3 solve time and epochs.
Table A3. Data-driven metrics for all geometries. Runs 1, 2, and 3 solve time and epochs.
Testing Geometry (Filename)Run 1 Time (hrs)Run 2 Time (hrs)Run 3 Time (hrs)Run 1 EpochsRun 2 EpochsRun 3 Epochs
05-10071-20244.14654.80442.3025647536
05-10071-30364.29176.00543.64407110060
05-10071-40486.41534.53893.64401007258
05-4071-20246.57366.59356.5516100100100
05-4071-30363.13833.37552.1277515434
05-4071-40486.40423.86534.8055985875
05-7071-20246.15106.24576.1696100100100
05-7071-30366.06192.76235.91721004495
05-7071-40486.00496.16234.49359810073
075-80355-30362.16142.02153.5191353257
10-12-20244.07142.66906.38266241100
10-12-30363.35546.18443.97545510066
10-12-40483.91533.61452.6540625743
10-6-20241.98206.60856.24233110094
10-6-30364.13234.19456.11536768100
10-6-40482.55834.52734.4232407069
10-9-20242.96536.63472.71774610041
10-9-30362.11012.41052.9650353948
10-9-40483.64852.66766.5280594298
125-99645-30366.12836.24536.0690100100100
15-10929-20244.59334.53864.1385747267
15-10929-30361.88336.05671.93853110032
15-10929-40482.39542.19752.0831403635
15-13929-20243.70732.38682.1093593733
15-13929-30362.90632.27722.6044483844
15-13929-40481.93732.00071.9445313231
15-7929-20242.22243.03693.5955344655
15-7929-30362.39231.96003.7755393261
15-7929-40483.93816.14103.5175619655
Median Average3.64852.27723.7755596961
Table A4. Data-driven metrics for all geometries. Green is the geometry used for PINNs initial testing. Red show highest error (anomalous). Runs 1, 2, and 3 errors.
Table A4. Data-driven metrics for all geometries. Green is the geometry used for PINNs initial testing. Red show highest error (anomalous). Runs 1, 2, and 3 errors.
Testing Geometry u ¯ Error (%) v ¯ Error (%) p ¯ Error (%)
(Filename) Run 1 Run 2 Run 3 Run 1 Run 2 Run 3 Run 1 Run 2 Run 3
05-10071-202410.78.17.453.639.936.0107.4108.3107.2
05-10071-30363.82.43.625.316.919.6109.1111.3110.9
05-10071-40482.42.43.923.715.830.9117.2115.9114.7
05-4071-20249.110.010.169.361.168.4157.6166.3146.5
05-4071-30362.84.13.567.566.664.0213.9222.6215.8
05-4071-40482.93.56.160.764.784.8253.9241.9251.6
05-7071-20245.35.96.039.636.744.6110.4110.1111.9
05-7071-30362.93.42.530.033.323.6123.3125.1122.3
05-7071-40482.21.81.923.824.923.8135.1133.4130.5
075-80355-303619.215.113.1127.6109.594.0130.5127.6112.5
10-12-20248226.033.734.25213.0113.8116.57328.0111.4111.8
10-12-303619.315.614.977.786.961.3113.0110.9111.8
10-12-404818.415.018.1103.684.492.2114.7113.2113.7
10-6-202417.416.915.6117.0114.0112.5118.2117.7118.0
10-6-30369.86.29.795.460.9101.4147.0146.9147.4
10-6-404810.09.49.3146.4133.7135.0174.7175.0178.9
10-9-202421.021.421.081.379.894.3106.6108.5108.6
10-9-303614.814.010.090.088.449.9114.9114.0114.6
10-9-404810.69.96.383.481.356.7119.9120.9119.1
125-99645-30361169.534.728.61431.7110.7126.61372.396.5102.4
15-10929-202412.010.110.439.233.939.0103.6103.6103.3
15-10929-303618.45.04.687.329.126.0106.3106.9106.3
15-10929-40485.55.45.330.226.431.6106.6107.5108.5
15-13929-202431.47519.2146,994.1109.986,986.4135,865.8108.928,905.0417,257.2
15-13929-303625.227.920.095.5105.6110.7108.4109.9106.4
15-13929-404830.720.8120.3103.2105.56150.2110.5110.7184.9
15-7929-202425.425.523.698.698.691.0104.4104.7105.4
15-7929-303617.718.918.097.997.899.0111.8110.1111.6
15-7929-404814.014.314.9110.394.298.7119.5118.3116.7
Median Average12.010.010.083.480.568.4114.7112.3112.5

Appendix G

Figure A4. DNS compared for steamwise velocity at x = 0, x = 3.
Figure A4. DNS compared for steamwise velocity at x = 0, x = 3.
Fluids 09 00279 g0a4
Figure A5. DNS compared for transverse velocity at x = 0, x = 3.
Figure A5. DNS compared for transverse velocity at x = 0, x = 3.
Fluids 09 00279 g0a5
Figure A6. DNS compared for pressure at x = 0, x = 3.
Figure A6. DNS compared for pressure at x = 0, x = 3.
Fluids 09 00279 g0a6

Appendix H

Figure A7. Data distribution for alph05-4071-3036.dat.
Figure A7. Data distribution for alph05-4071-3036.dat.
Fluids 09 00279 g0a7

References

  1. Balakumar, P. Direct Numerical Simulation of Flows over an NACA-0012 Airfoil at Low and Moderate Reynolds Numbers. In Proceedings of the 47th AIAA Fluid Dynamics Conference, Hampton, VA, USA, 5–9 June 2017. [Google Scholar]
  2. Cenedese, M.; Axas, J.; Bauerlein, B.; Avila, K.; Haller, G. Data-driven modeling and prediction of non-linearizable dynamics via spectral submanifolds. Nat. Commun. 2022, 13, 872. [Google Scholar] [CrossRef] [PubMed]
  3. Lagaris, I.; Likas, A.; Fotiadis, D. Artificial neural networks for solving ordinary and partial differential equations. IEEE Trans. Neural Netw. 1998, 9, 987–1000. [Google Scholar] [CrossRef]
  4. Maissi, M.; Perdikaris, P.; Karniadakis, G. Physics Informed Deep Learning (Part I): Data-driven Solutions of Nonlinear Partial Differential Equations. arXiv 2017, arXiv:1711.10561. [Google Scholar]
  5. Jin, X.; Cai, S.; Li, H.; Karniadakis, G. NSFnets (Navier-Stokes flow nets): Physics-informed neural networks for the incompressible Navier-Stokes equations. J. Comput. Phys. 2021, 426, 109951. [Google Scholar] [CrossRef]
  6. Eivazi, H.; Tahani, M.; Schlatter, P.; Vinuesa, R. Physics-informed neural networks for solving Reynolds-averaged Navier-Stokes equations. Phys. Fluids 2022, 34, 07511. [Google Scholar] [CrossRef]
  7. Pioch, F.; Harmening, J.; Muller, A.; Peitzmann, F.; Schramm, D.; el Moctar, O. Turbulence Modeling for Physics-Informed Neural Networks: Comparison of Different RANS Models for the Backward-Facing Step Flow. Fluids 2023, 8, 43. [Google Scholar] [CrossRef]
  8. Lucas, H.; Bollhöfer, M.; Römer, U. Statistical reduced order modelling for the parametric Helmholtz equation. arXiv 2024, arXiv:2407.04438. [Google Scholar] [CrossRef]
  9. Fu, J.; Xiao, D.; Fu, R.; Li, C.; Zhu, C.; Arcucci, R.; Navon, I.M. Physics-Data Combined Machine Learning for Parametric Reduced-Order Modelling of Nonlinear Dynamical Systems in Small-Data Regimes; Zienkiewicz Centre for Computational Engineering, Swansea University: Swansea, UK, 2022. [Google Scholar]
  10. Brunton, S.L.; Proctor, J.L.; Kutz, J.N. Discovering Governing Equations from Data: Sparse Identification of Nonlinear Dynamical Systems. arXiv 2015, arXiv:1509.03580. [Google Scholar] [CrossRef] [PubMed]
  11. Martina, B.; Manojlović, I.; Muha, B.; Vlah, D. Deep Learning Reduced Order Modelling on Parametric and Data-driven Domains. arXiv 2024, arXiv:2407.17171. [Google Scholar] [CrossRef]
  12. Vinuesa, R.; Brunton, S.L. Enhancing Computational Fluid Dynamics with Machine Learning. FLOW, Engineering Mechanics; KTH Royal Institute of Technology: Stockholm, Sweden; Swedish e-Science Research Centre (SeRC): Stockholm, Sweden; Department of Mechanical Engineering, University of Washington: Seattle, WA, USA, 2022. [Google Scholar]
  13. Rudy, D.H.; Bushnell, D.M. A Rational Approach to the use of Prandtl’s Mixing Length Model in Free Turbulent Shear Flow Calculations. Nasa Langley Res. Cent. 1973, 1. [Google Scholar]
  14. Chipongo, K.; Khiadani, M.; Sookhak Lari, K. Comparison and verification of turbulence Reynolds-averaged Navier—Stokes closures to model spatially varied flows. Sci. Rep. 2020, 10, 19059. [Google Scholar] [CrossRef] [PubMed]
  15. Breuer, M.; Peller, N.; Rapp, C.; Manhart, M. Flow over periodic hills—Numerical and experimental study in a wide range of Reynolds numbers. Comput. Fluids 2009, 28, 433–457. [Google Scholar] [CrossRef]
  16. Mellen, C.; Froehlich, J.; Rodi, W. Large eddy simulation of the flow over periodic hills. In Proceedings of the 16th IMACS World Congress, Lausanne, Switzerland, 21–25 August 2000. [Google Scholar]
  17. Temmerman, L.; Leschziner, M. Large Eddy Simulation of Separated Flow in a Streamwise Periodic Channel Constriction. In Second Symposium on Turbulence and Shear Flow Phenomena; Begel House Inc.: Stockholm, Sweden, 2001. [Google Scholar]
  18. Xiano, H.; Wu, J.-L.; Laizet, S.; Duan, L. Flows over periodic hills of parameterized geometries: A dataset for data-driven turbulence modeling from direct simulations. Comput. Fluids 2020, 200, 104431. [Google Scholar]
  19. Laizet, S. Github. Available online: https://github.com/xcompact3d/Incompact3d (accessed on 11 March 2024).
  20. Laizet, S.; Lamballais, E. High-order compact schemes for incompressible flows: A simple and efficient method with quasi-spectral accuracy. J. Comput. Phys. 2009, 228, 5989–6015. [Google Scholar] [CrossRef]
  21. Huang, L.; Qin, J.; Zhou, F.; Liu, L.; Shao, L. Normalization Techniques in Training DNNs: Methodology, Analysis and Application. IEEE Trans. Pattern Anal. Mach. Intell. 2023, 45, 10173–10196. [Google Scholar] [CrossRef] [PubMed]
  22. Aksu, G.; Guzeller, C.O.; Eser, M.T. The Effect of the Normalization Method used in Different Sample Sizes on the Success of Artificial Neural Network Model. Int. J. Assess. Tools Educ. 2019, 6, 170–192. [Google Scholar] [CrossRef]
  23. Xu, C.; Coen-Pirani, P.; Jiang, X. Empirical Study of Overfitting in Deep Learning for Predicting Breast Cancer Metastasis. Cancers 2023, 15, 1969. [Google Scholar] [CrossRef] [PubMed]
  24. Hennigh, O.; Narasimhan, S.; Nabian, M.A.; Subramaniam, A.; Tangasali, K.; Rietmann, M.; del Aguila Ferrandis, J.; Byeon, W.; Fang, Z.; Choudhry, S. NVIDIA SimNet™: An AI-Accelerated Multi-Physics Simulation Framework. arXiv 2020, arXiv:2012.07938. [Google Scholar]
  25. Wadcock, A.J. Simple Turbulence Models and Their Application to Boundary Layer Separation; NASA Contractor Report 3283; Contract NAS2-10093; NASA: Washington, DC, USA, 1980.
  26. Volpiani, P.S.; Meyer, M.; Franceschini, L.; Dandois, J.; Renac, F.; Martin, E.; Marquet, O.; Sipp, D. Machine learning-augmented turbulence modeling for. Phys. Rev. Fluids 2021, 6, 064607. [Google Scholar] [CrossRef]
  27. Versteeg, H.; Malalasekera, W. An Introduction to Computational Fluid Dynamics, The Finite Volume Method; Pearson: London, UK, 2007. [Google Scholar]
  28. Hutchinson, A.J.; Hale, N.; Mason, D.P. Prandtl’s extended mixing length model applied to the two-dimensional turbulent classical far wake. Math. Phys. Eng. Sci. 2021, 477, 20200875. [Google Scholar] [CrossRef]
  29. Available online: https://github.com/willfox1/PINNS_Turbulence (accessed on 11 March 2024).
Figure 1. Geometries varying a parameter defining the slope characteristics, α , and a parameter defining the domain length, l. Five of 25 examples shown, varying slope and domain length. More information provided by [19].
Figure 1. Geometries varying a parameter defining the slope characteristics, α , and a parameter defining the domain length, l. Five of 25 examples shown, varying slope and domain length. More information provided by [19].
Fluids 09 00279 g001
Figure 2. Methods summary. First approach to reduce number of governing equations by taking advantage of the ability to solve a numerically open system (right). Second approach by introducing turbulence modelling assumptions to simplify predictions (left).
Figure 2. Methods summary. First approach to reduce number of governing equations by taking advantage of the ability to solve a numerically open system (right). Second approach by introducing turbulence modelling assumptions to simplify predictions (left).
Fluids 09 00279 g002
Figure 3. Time-averaged streamwise velocity, u ¯ , data driven vs. DRSM vs. DNS.
Figure 3. Time-averaged streamwise velocity, u ¯ , data driven vs. DRSM vs. DNS.
Fluids 09 00279 g003
Figure 4. Time-averaged transverse velocity, v ¯ , data driven vs. DRSM vs. DNS.
Figure 4. Time-averaged transverse velocity, v ¯ , data driven vs. DRSM vs. DNS.
Fluids 09 00279 g004
Figure 5. Time-averaged pressure, p ¯ , data driven vs. DRSM vs. DNS.
Figure 5. Time-averaged pressure, p ¯ , data driven vs. DRSM vs. DNS.
Fluids 09 00279 g005
Figure 6. Time-averaged streamwise velocity, u ¯ , PINNs compared.
Figure 6. Time-averaged streamwise velocity, u ¯ , PINNs compared.
Fluids 09 00279 g006
Figure 7. Time-averaged transverse velocity, v ¯ , PINNs compared.
Figure 7. Time-averaged transverse velocity, v ¯ , PINNs compared.
Fluids 09 00279 g007
Figure 8. Time-averaged pressure, p ¯ , PINNs compared.
Figure 8. Time-averaged pressure, p ¯ , PINNs compared.
Fluids 09 00279 g008
Figure 9. Gradient of u u and u v first-order stresses from x momentum equation for RBM models.
Figure 9. Gradient of u u and u v first-order stresses from x momentum equation for RBM models.
Fluids 09 00279 g009
Figure 10. Gradient of u u and u v first-order stresses from y momentum equation for RBM models.
Figure 10. Gradient of u u and u v first-order stresses from y momentum equation for RBM models.
Fluids 09 00279 g010
Table 1. Data-driven neural network architecture.
Table 1. Data-driven neural network architecture.
Layer TypeOutput ShapeActivation FunctionBatch Normalisation
Input Layer(6,)
Dense(128,)ReLUYes
Dense(64,)ReLUYes
Dense(64,)ReLUYes
Dense(32,)ReLUYes
Dense(32,)ReLUYes
Dense(16,)ReLUYes
Dense(16,)ReLUYes
Dense(8,)ReLUYes
Dense(8,)ReLUYes
Output Layer(6,)
Table 2. Data-driven neural network architecture.
Table 2. Data-driven neural network architecture.
Layer TypeOutput ShapeActivation FunctionBatch Normalisation
Input Layer(input shape,)
Dense(20,)tanhNo
Dense(20,)tanhNo
Dense(20,)tanhNo
Dense(20,)tanhNo
Dense(20,)tanhNo
Dense(20,)tanhNo
Dense(20,)tanhNo
Dense(20,)tanhNo
Output Layer(output shape,)
Table 3. Computational settings.
Table 3. Computational settings.
ComputerAORUS 15P XD Laptop (Singapore, Rep. Singapore)
Processor11th Gen Intel ® Core i7-11800H (Intel, Santa Clara, CA, USA)
RAM32 GB
OSWindows 11 23H2
ModulesTensorFlow 2.14.0
pyDOE 0.3.8
keras 2.14.0
numpy 1.26.0
matplotlib 3.8.0
scipy 1.11.3
Instruction SetCPU
Table 4. PINNs methods summary.
Table 4. PINNs methods summary.
Method NameNeural Network InputsNeural Network OutputsGoverning Flow EquationsEnforced Boundaries
Direct Reynolds Stress x y u ¯ v ¯ p ¯ u u u v v v 2D incompressible Continuity, Momentum in x,
Momentum in y
u ¯ x + v ¯ y = 0
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v u y ¯ + u u x ¯ = 0
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v v y ¯ + u v x ¯ = 0
u ¯ v ¯ p ¯ u u u v v v
Direct Reynolds Stress with Reduced Boundary Enforcement x y u ¯ v ¯ p ¯ u u u v v v 2D incompressible Continuity, Momentum in x,
Momentum in y
u ¯ x + v ¯ y = 0
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v u y ¯ + u u x ¯ = 0
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v v y ¯ + u v x ¯ = 0
u ¯ v ¯ p ¯
u ¯ v ¯
Continuity Only Model x y u ¯ v ¯ 2D incompressible Continuity
u ¯ x + v ¯ y = 0
u ¯ v ¯
Mixing Length x y d u ¯ v ¯ p ¯ 2D incompressible Continuity, Momentum in x,
Momentum in y, First-order Stresses, Turbulent Viscosity, Mixing Length, Strain Tensor
u ¯ x + v ¯ y = 0
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v u y ¯ + u u x ¯ = 0
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v v y ¯ + u v x ¯ = 0   τ x x ¯ = 2 μ t u ¯ x + u ¯ x + v ¯ y
τ y y ¯ = 2 μ t u ¯ x + v ¯ y + v ¯ y
τ x y ¯ = τ y x ¯ = μ t u ¯ x + v ¯ y   μ t = l m 2 G
l m = m i n 0.419 d , 0.09 d m a x
G = 2 u ¯ x 2 + 2 v ¯ y 2 + u ¯ y + v ¯ x 2
u ¯ v ¯ p ¯
Turbulent Viscosity x y u ¯ v ¯ p ¯ μ t 2D incompressible Continuity, Momentum in x,
Momentum in y, First-order Stresses, Turbulent Viscosity, Mixing Length, Strain Tensor
u ¯ x + v ¯ y = 0
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v u y ¯ + u u x ¯ = 0
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v v y ¯ + u v x ¯ = 0   τ x x ¯ = 2 μ t u ¯ x + u ¯ x + v ¯ y
τ y y ¯ = 2 μ t u ¯ x + v ¯ y + v ¯ y
τ x y ¯ = τ y x ¯ = μ t u ¯ x + v ¯ y
u ¯ v ¯ p ¯
Turbulent Viscosity and Turbulent Kinetic Energy x y u ¯ v ¯ p ¯ μ t 2D incompressible Continuity, Momentum in x,
Momentum in y, First-order Stresses, Turbulent Viscosity, Mixing Length, Strain Tensor
u ¯ x + v ¯ y = 0
u ¯ u ¯ x + v ¯ u ¯ y 1 ρ p ¯ x ν 2 u ¯ x 2 + 2 u ¯ y 2 + v u y ¯ + u u x ¯ = 0
u ¯ v ¯ x + v ¯ v ¯ y 1 ρ p ¯ y ν 2 v ¯ x 2 + 2 v ¯ y 2 + v v y ¯ + u v x ¯ = 0   τ x x ¯ = μ t u ¯ x + u ¯ x 2 3 ρ k
τ y y ¯ = μ t u ¯ y + v ¯ x
τ x x ¯ = μ t v ¯ y + v ¯ y 2 3 ρ k
u ¯ v ¯ p ¯
Table 5. Data-driven metrics for all dataset geometries. Runs 2 and 3 can be found in Appendix F *.
Table 5. Data-driven metrics for all dataset geometries. Runs 2 and 3 can be found in Appendix F *.
Slope ParameterDomain Length (m)Domain Height (m)Solve Time (hrs)Epochs to Converge u ¯ Error (%) v ¯ Error (%) p ¯ Error (%)
510.07102.02404.146410.753.6107.4
510.07103.03604.30713.825.3109.1
510.07104.04806.431002.423.7117.2
54.07102.02406.571009.169.3157.6
54.07103.03603.14512.867.5215.9
54.07104.04806.40982.960.7253.9
57.07102.02406.151005.339.6110.4
57.07103.03606.071002.930.0123.3
57.07104.04806.00982.223.8135.1
7.58.03553.03602.163519.2127.6130.5
1012.00002.02404.07628226.052,713.07328.0
1012.00003.03603.365519.377.7113.0
1012.00004.04803.916218.4103.6114.7
106.00002.02401.983117.4117.0118.2
106.00003.03604.14679.895.4147.0
106.00004.04802.564010.0146.4174.7
109.00002.02402.974621.081.3106.6
109.00003.03602.113514.890.0114.9
109.00004.04803.655910.683.4119.9
12.59.96453.03606.131001169.51431.71372.3
1510.90902.02404.597412.039.2103.6
1510.90903.03601.893118.487.3106.3
1510.90904.04802.40405.530.2106.6
1510.90902.02403.705931.4109.9108.9
1513.92903.03602.904825.295.5108.4
1513.92904.04801.943130.7103.2110.5
157.92902.02402.223425.498.6104.4
157.92903.03602.393917.797.9111.8
157.92904.04803.936114.0110.3119.5
Median Average 3.70 ± 1.5159 ± 2512.0 ± 8.7383.4 ± 34.5114.7 ± 35.6
* See Appendix E for calculation method.
Table 6. Solver metrics and overall accuracy.
Table 6. Solver metrics and overall accuracy.
Neural Network NameNeural Network AbbreviationTraining Time (hrs)Prediction Time u ¯ Error (%) * v ¯ Error (%) * p ¯ Error (%) *Description
Dense MLP Data DrivenData Driven3.1411.02.8567.512215.897See Section 3.1
Direct Reynold’s Stress ModelDRSM1.61-0.6139.2444.78See Section 3.2.4
Direct Reynold’s Stress Model—Reduced Boundary Enforcement, u , v , p EnforcementRBMuvp1.36-0.3093.4875.783See Section 3.2.5
Direct Reynold’s Stress Model—Reduced Boundary Enforcement, u , v enforcementRBMuv1.82-0.2333.28253.675See Section 3.2.5
Continuity Only ModelCOM0.74-0.1472.563-See Section 3.2.6
Mixing Length ModelMLM0.83-6.92315.69215.255See Section 3.2.7
Turbulent Viscosity ModelTVM2.38-0.6369.3949.52See Section 3.2.8
Turbulent Viscosity and Turbulent Kinetic Energy ModelTVKEM1.63-0.475.6166.186See Section 3.2.9
* See Appendix E for calculation method.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Fox, W.; Sharma, B.; Chen, J.; Castellani, M.; Espino, D.M. Optimising Physics-Informed Neural Network Solvers for Turbulence Modelling: A Study on Solver Constraints Against a Data-Driven Approach. Fluids 2024, 9, 279. https://doi.org/10.3390/fluids9120279

AMA Style

Fox W, Sharma B, Chen J, Castellani M, Espino DM. Optimising Physics-Informed Neural Network Solvers for Turbulence Modelling: A Study on Solver Constraints Against a Data-Driven Approach. Fluids. 2024; 9(12):279. https://doi.org/10.3390/fluids9120279

Chicago/Turabian Style

Fox, William, Bharath Sharma, Jianhua Chen, Marco Castellani, and Daniel M. Espino. 2024. "Optimising Physics-Informed Neural Network Solvers for Turbulence Modelling: A Study on Solver Constraints Against a Data-Driven Approach" Fluids 9, no. 12: 279. https://doi.org/10.3390/fluids9120279

APA Style

Fox, W., Sharma, B., Chen, J., Castellani, M., & Espino, D. M. (2024). Optimising Physics-Informed Neural Network Solvers for Turbulence Modelling: A Study on Solver Constraints Against a Data-Driven Approach. Fluids, 9(12), 279. https://doi.org/10.3390/fluids9120279

Article Metrics

Back to TopTop