An artificial viscosity augmented physics-informed neural network for incompressible flow

Physics-informed neural networks (PINNs) are proved methods that are effective in solving some strongly nonlinear partial differential equations (PDEs), e.g., Navier-Stokes equations, with a small amount of boundary or interior data. However, the feasibility of applying PINNs to the flow at moderate or high Reynolds numbers has rarely been reported. The present paper proposes an artificial viscosity (AV)-based PINN for solving the forward and inverse flow problems. Specifically, the AV used in PINNs is inspired by the entropy viscosity method developed in conventional computational fluid dynamics (CFD) to stabilize the simulation of flow at high Reynolds numbers. The newly developed PINN is used to solve the forward problem of the two-dimensional steady cavity flow at Re = 1 000 and the inverse problem derived from two-dimensional film boiling. The results show that the AV augmented PINN can solve both problems with good accuracy and substantially reduce the inference errors in the forward problem.


Introduction
The principle of fluid flow and heat transfer problem is widely applied in aerospace, mechanical, and chemical processes. The accurate simulation of the flow and heat transfer process is of great significance in the development of these fields. Computational fluid dynamics (CFD) employs the finite element method, the finite difference method, or the finite volume method to solve the discrete Naiver-Stokes equation [1] , and has traditionally been used to tackle the problems in flow and heat transfer with good accuracy. However, the CFD method usually requires significant computational resources for complex flow processes [2] . Moreover, the data-driven method has achieved transformative impact on science and technology with the development of computing and artificial intelligence technology [3] , and has been applied to some difficult physical problems. To this end, if the data-driven method is used as a black box to learn physical information, the results will be difficult to explain or may even violate the laws of physics [4] . Among the data-driven methods, deep neural networks (DNNs) have attracted much attention because of their powerful ability to model complex nonlinear systems. DNNs have been used to solve partial differential equations (PDEs) for better understanding of physics [5] . Specifically, the physics-informed neural networks (PINNs) proposed by Raissi et al. [6] , which encode the governing equations of the physical problem in the DNNs, have been used to solve physical problems in various research areas [7] .
PINNs solve the governing equations with initial and boundary conditions on the discrete residual points of the domain. They are less restrictive compared with CFD which relies on good-quality meshes and usually requires a significant amount of labor. Using the vorticitystream function form of the Navier-Stokes equation, Jin et al. [8] developed a PINN to predict the flow field. Based on the experimental temperature data obtained by using tomographic background oriented schlieren (Tomo-BOS), Cai et al. [9] employed a PINN to infer the entire thermal flow field. It has been found that the PINN's ability to predict is greatly affected by training. Many researchers have worked to optimize PINNs to reduce the training time and improve the prediction accuracy. Sun et al. [10] coded the boundary conditions into the PINN in a "hard" way, and proposed the so-called "hard" boundary physical information neural network (HPINN). Their results showed that the HPINN could effectively accelerate the training process and improve the training accuracy to a certain extent. Rao et al. [11] proposed a hybrid variable PINN to simulate the incompressible laminar flow. Taking the flow function as the output of the neural network can automatically satisfy the continuity equation, thus accelerating the training process. McClenny and Braga-Neto [12] proposed the adaptive PINN, which used a soft attention mechanism to accurately fit the stubborn spots in the solution to stiff PDEs. However, all the above PINNs can only improve the accuracy of prediction for specific equations or in certain application scenarios.
The lid-driven cavity flow as a benchmark problem has attracted much attention in PINNs [13] . The Reynolds number Re is the characteristic parameter of the cavity flow, and it is widely accepted that the cavity flow is steady when Re < 5 000 [14] . It is the ideal model for validating and studying the accuracy and efficiency of numerical methods as well as PINNs. However, to the best of the authors' knowledge, it has not been reported that state-of-the-art PINNs can solve the cavity flow problem at Re > 500 [15][16][17] with good accuracy.
In traditional CFD methods, the artificial viscosity (AV) has been proved to be an efficient numerical "trick" for addressing the numerical instability in solving the Navier-Stokes equation at a high Reynolds number. In this paper, the AV is introduced in the PINNs to improve the accuracy and stability of the prediction. To this end, an AV augmented PINN will be applied to the cavity flow at Re = 1 000.

PINN method
Suppose that a PINN is used to solve the following PDEs: where N x represents a linear or nonlinear operation, x and t represent the spatial information and the time information, respectively, Ω and ∂Ω represent the internal region and the regional boundary of calculation, respectively, u(x, t) is the solution to the PDE, h(x) is the initial condition, and g(x, t) is the boundary condition.
In the PINN, u(x, t) is approximated by a fully connected network that takes (x, t) as its input and u N N (x, t) as the output. The fully connected network consists of multiple hidden layers where the output is In the above equation, w i,j and b j are the weight and the bias of the hidden layer L, respectively, which will be updated after training. σ is the activation function. Note that the commonly used activation functions include sigmoid, ReLu, hyperbolic tangent (Tanh), Softmax, Switch, and Gaussian error linear unit (GELU). The trainable parameters are updated through the back-propagation algorithm, with the goal of minimizing the loss function. As shown in Fig. 1, the PINN combines the physical law and data by means of the following loss function: where where L r is the loss of the governing equation on the residual points, L b is the loss on the boundary, and L 0 is the loss of the initial condition. N r , N b , and N 0 are the numbers of the

Boundary condition
Initial condition Equation residual Loss Fig. 1 Schematic diagram of the PINN framework (color online) residual points of the corresponding loss functions. Moreover, when new data, e.g., experimental measurements in any location of the domain, arrive, an additional loss function can be built to consider the new data information as follows:

AV method
In CFD simulation, particularly in the simulation of flow at a high Reynolds number, it is very likely that the mesh resolution will not be able to capture all the small-scale but highfrequency motions, which is a source of numerical error. To this end, the AV method is proposed to smooth out the numerical solution and use the dissipation mechanism of the viscous effect. The incompressible Navier-Stokes equation is Here, we borrow the idea of the AV to modify the original Navier-Stokes equations, the discrete form of which is smoother on the residual points, and can thus improve the training and eventually create better prediction. Nonetheless, inspired by the work of Wang et al. [18] , the residual losses of the two-dimensional Navier-Stokes equations with the AV are given by where u and v represent the velocity components in the x-and y-directions, respectively, p is the pressure, ν E is the AV, and α = 0.1 is a constant.

Validation by the benchmark problems
In this paper, the PINN is implemented on the TensorFlow and Baidu PaddleScience libraries, and the PINN training is performed on our local computers, which have a Xeon (R) 6226R CPU@2.90 GHZ, 128 G memory, and Nvidia 3080ti-12G GPU.

Cavity-driven flow
As a classical CFD problem, the lid-driven cavity flow has been well studied. Although the computational domain and boundary condition are relatively simple, they involve very complex fluid flow characteristics, such as the main vortex, the secondary vortex, the shear flow, and the boundary layer. Therefore, this problem is a frequently used benchmark case to validate the method and code. The studies presented in Refs. [17] and [19] tested a DNN to solve the cavity flow problem up to Re = 600. However, as Re increases, the forward problem of cavity flow is still a great challenge for previous PINNs. Here, we turn to the AV augmented PINN, which consists of six hidden layer neural networks, with 80 neurons in each layer. During PINN training, the Adam optimizer, 40 000 residual points for the governing equations, and 4 × 256 residual points for the boundary conditions, are employed. In the total of 100 000 + 100 000 + 100 000 + 150 000 + 150 000 epochs, the learning rates 1 × 10 −3 , 5 × 10 −4 , 1 × 10 −4 , 1 × 10 −5 , and 1 × 10 −6 are used, respectively. It is worth noting that, with the same hyper-parameters, the PINN simulation is performed five times. The time history of loss from Simulation 1 is plotted in Fig. 2, where loss-bcs. is the loss of the boundary condition, and loss-equ. is the loss of the Navier-Stokes equations. The results shown in Figs. 3-5 are from Simulation 1.

Loss-bcs.
Loss-equ.   Table 1 shows the root mean square error between the PINN prediction and the reference value that is obtained by the high-fidelity simulation using the high-order spectral element method. It can be observed that using the original Navier-Stokes equation, the PINN prediction error is more than 80%, and is reduced to less than 20% when the AV is employed. In particular, in Simulation 3, the error is less than 6%. It can be seen that the equation loss of the PINN can be reduced to the order of 10 −5 , while the final loss of the boundary condition is on the order of 10 −6 . In addition, the final value of the loss function between the PINN with and without the AV is comparable, although the predicted error has notable difference. In the simulation of an  incompressible flow, the prediction accuracy can be represented by the velocity divergence, and a large absolute value of the divergence indicates that the method has poor prediction accuracy. Figure 3 shows the comparison of the PINN prediction on the divergence with and without the AV. It could be found that the AV can substantially reduce the velocity divergence.
In the cavity flow with an increasing Re, a second-order vortex will be formed in the left and right lower corners of the square cavity, owing to the viscous effect of the solid wall. In Fig. 4, compared with the reference data, the PINN prediction shows the vortex on the right bottom well, while it barely predicts the smaller one on the left bottom. As the figure shows, the vortex cannot be predicted in the left corner. Because there is so little known information that can be used to speculate on the vortex in the left corner, creating the PINN does not solve the vortex prediction problem. Figures 5(a) and 5(b) plot the comparison of the PINN prediction and the reference data on the velocity profiles at x = 0.5 and y = 0.5, respectively. It can be observed that the PINN with the AV can predict the velocity with acceptable accuracy.

Film boiling
We now focus on the two-dimensional film boiling problem. The objective of this section is to demonstrate the feasibility of using the PINN to predict an unsteady complex flow in a deformed domain. The film boiling problem was documented in Ref. [20] as follows: initially, a thin vapor film covered the bottom wall and under the liquid. The wall temperature was kept at T w , which was higher than the liquid saturation temperature and resulted in a phase change at the vapor-liquid interface, causing heat to be absorbed from the wall through the vapor to the liquid. Therefore, the interface was pushed upward. The higher density of the liquid above the vapor triggered the Rayleigh-Taylor instability, magnified the interface disturbance, and eventually led to rising bubbles. Note that film boiling is a complex two-phase flow, but the PINN assumed that the interface was known such that the two-phase flow could be simplified as two single-phase flows, one of which was in the vapor, and the other was in the liquid. In this paper, we consider the flow in the vapor only. Nonetheless, in this section, the data for the PINN are obtained from the high-fidelity simulation by using the improved phase field method [20] . The thermophysical properties of the vapor in the simulation are shown in Table 2. Note that the vapor-liquid interface is a known boundary from the PINN's perspective, and to predict the unsteady flow, 350 snapshots of the vapor-liquid interface are used. In addition, it is assumed that the PINN can access the velocity data at five random points within the vapor. The structure of the neural networks is the same as that in the previous section, but during training, 200 + 200 + 200 + 200 + 200 epochs with the learning rates 1 × 10 −3 , 2 × 10 −4 , 1 × 10 −4 , 5 × 10 −5 , and 1 × 10 −5 are used. In summary, the errors between the PINN prediction and the reference data on the velocities u and v and the pressure p are 3.5%, 5.8%, and 9.6%, respectively. Figure 6 compares the PINN prediction of u, v, and p at t = 1.0 and the corresponding reference data. It can be observed that for the velocity, the error is mainly concentrated in the thin film close to the wall and in the bottleneck of the bubble, where drastic changes in the velocity and the pressure exist.

Conclusions
In this paper, an AV augmented PINN is proposed to improve the flow prediction at moderate or high Reynolds numbers. The newly developed PINN is validated by solving the forward problem of a steady two-dimensional lid-driven cavity flow at Re = 1 000 and the unsteady inverse problem of film boiling. The results show that the AV can substantially improve the accuracy of the PINN prediction in both forward and inverse problems.

Conflict of interest The authors declare no conflict of interest.
Open access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.