A Flow Field Super-resolution Strategy for Direct Numerical Simulation Based on Physics-informed Convolutional Neural Networks

In the computational fluid dynamics method, the discretization of the solution domain has an important impact on the calculation results. The higher resolution grid improves the solution accuracy and is accompanied by a significant increase in the calculation time. How to improve efficiency under the premise of ensuring accuracy is of great significance in engineering. To this end, we propose a super-resolution strategy for direct numerical simulation (DNS): take the numerical simulation results at low-resolution grid as the initial solution, construct a model for super-resolution utilizing the convolutional neural networks, and embed the flow governing equations in the model to modify the initial solution. The proposed method is verified in the engineering case of pipeline transportation of non-Newtonian fluids. The results show that this strategy can improve the solution accuracy and shorten the simulation time. The deviation between the high-resolution results reconstructed by the model and the high-resolution flow field simulated by DNS is 63.18% lower than that of the low-resolution one simulated by DNS, and the calculation time is saved by 84.65%.


Introduction
Direct Numerical Simulation (DNS) plays an important role in aerospace, machinery industry and other fields, which can achieve higher solution accuracy because the three-dimensional transient N-S equations are directly solved without introducing additional models [1,2].However, DNS relies on high-resolution (HR) grid, which poses a huge computational load and time cost, making it difficult to support performance evaluation during rapid iterative development processes [3].In contrast, the lowresolution (LR) grid will make it difficult to capture micro-scale details and structures in fluid behaviour, resulting in a loss of accuracy.Therefore, DNS methods have shortcoming in balancing calculation speed and accuracy.It is of great significance to shorten the simulation time while improving the simulation accuracy.
With the development of deep learning, its influence on traditional fluid mechanics methods has become increasingly profound, such as turbulence modelling, flow control, flow field feature recognition and other aspects [4][5][6].The emergence of super-resolution (SR) technology based on deep neural networks provides a new approach to address the aforementioned shortcomings [7].SR technology was first used in image processing, which refers to reconstructing corresponding HR images from LR images.This technology uses deep neural networks to learn hidden patterns and features in data, enabling the reconstruction of HR detail information [8].The refinement of flow field details is essentially a transformation from LR flow field to HR flow field, which precisely corresponds to the function of SR technology.Using a SR model to recover the detailed information of HR flow field from LR flow field can achieve a more precise description of the flow field.
According to different training paradigms, SR methods can be divided into two categories: datadriven and physics-driven.Data-driven SR methods utilize HR samples for supervised learning of neural networks.Since Fukami et al. (2019) used data-driven SR methods to reconstruct LR fluid flow images for 2D cylinder wake [9][10][11], this method has been applied to more flow problems, such as 2D decaying isotropic turbulence, 3D plumes, isotropic turbulence and anisotropic channel flow [12][13][14][15].The datadriven SR methods relies on a large amount of HR data as training samples, which is not feasible for the flow problem of high data acquisition costs.At the same time, this method is difficult to ensure that the obtained HR flow field still conforms to the original physical laws and governing equations.
The emergence of Physics-Informed Neural Networks (PINN) provides a deep learning framework driven by the fusion of data and physics [16,17].By integrating the physical model as prior information into the training process, the prediction results of the model conform to the physical laws.This improves the confidence of the results and reduces the need for HR training data.SR methods have begun to show a trend from data-driven to physics-driven.Wang et al. (2020) used a physics-informed SR technique to reconstruct HR images (4x) from HR images in an advection-diffusion model of atmospheric pollution plumes [18].Gao et al. (2021) proposed a physics-constrained CNN to achieve SR vascular flow without label data [19].Physics-driven SR techniques have also been applied to hyperelasticity problems (2022) and magnetic resonance imaging problems (2020) [20,21].
This method embeds the physical mechanism into the SR model, and uses the information of the physical mechanism to alleviate the large demand for HR sample labels, while improving the physical interpretability of the model output.However, the current research on SR methods mainly focuses on the accuracy level, ignoring the research on the computational efficiency of the method, especially the quantitative comparison with the numerical simulation.Meanwhile, current physics-driven SR methods mainly focus on idealized theoretical cases with down-sampled data, lacking verification of practical engineering cases.
In response to the above problems, this paper quantitatively studies the efficiency of the physicsdriven SR method by comparing it with the DNS simulation method, and proposes a SR Strategy for DNS: use the flow field calculated by DNS at LR grid as the initial solution, and then use the SR model embedded in the physical mechanism to correct the initial solution, and finally reconstruct the flow field that approximates the results of DNS calculation at HR grid.In this way, the solution accuracy can be improved with shorter calculation time.We verify the feasibility of this strategy on the engineering case of non-Newtonian fluid pipeline transportation.
Our study adds two contributions to the existing body of literature.First, we propose a unique physics-driven SR Strategy for DNS.Second, we verify it on an engineering case with LR simulation data instead of down-sampled data from HR simulation.
The subsequent sections of this paper are structured in the following manner.Section 2 introduces the methodology of the proposed method.Section 3 presents the results of the validation case and related analysis.Section 4 discusses the strengths of the proposed method.Section 5 concludes the paper.

Strategy Steps
The SR Strategy for DNS is mainly divided into three stages: obtaining LR simulated flow fields, constructing and training SR models, and outputting HR simulated flow fields.The specific flowchart is shown in figure 1.
The development and training process of the SR model are the core steps of the whole framework, which will be described in detail in Section 2.2 and 2.3.

Construction of SR Model Based on CNN
The function of a SR model is to construct the correspondence between LR data and HR data in terms of mapping and approximate the physical fields in the HR flow field as ( ; ) where q represents the physical fields and  represents the parameters of the model.Recorded Considering that the flow field data has a structured form similar to image data and the excellent ability of CNN to process image data [22], CNN is selected to build the SR model.In a three-dimensional CNN, the convolution formula between two adjacent layers is where (0) q is the input data of CNN, and ( _ max) l q is the output data. ( 1)  l q − and () l q represent the input and output of the layer l respectively.b is the bias, h is the filter, and ()  is the activation function.
,, i j k correspond to the three convolution directions, m corresponds to the number of channels, C represents the number of physical fields in the flow field data, and H represents the size of the filter (assuming the size is HHH ).Select SiLU( ) sigmoid( ) x x x = as the activation function.which has self-stable characteristics and can effectively suppress learning with large weights [23].
In flow field data, the distribution and magnitude of different physical fields are usually different, which is not conducive to learning with a single convolutional layer.For this reason, the SR model adopts a multi-task learning structure [24], and uses different convolutional layers for different physical fields to learn, thereby improving the representation ability of the model.The schematic diagram of the SR model is shown in figure 2.

Physics-driven Training of SR Model
Ideally, it is desirable to obtain a set of model parameters   = to make the output of the model conforms to the physical mechanism (i.e., flow governing equations).Assuming the flow governing equations are ( ) 0 q = ,   should satisfy However, in practice, equation ( 3) is extremely difficult to achieve, and more is to find a set of model parameters so that the residual error is as close to zero as possible.To this end, the norm of equation residual is used to construct the loss function Therefore, seeking model parameters   is transformed into an optimization problem as where L is the loss function, and the physical mechanism is embedded in the SR model in the form of loss function.In this way, it not only relieves the severe demand for HR samples during model training, but also ensures that the output of the model conforms to the physical mechanism.For example, if the flow governing equations embedded in the model are the N-S equations, the HR flow field obtained by the model will have a small residual for the N-S equations, which means that it satisfies the N-S equations to a large extent.

Case Validation and Analysis
In this section, we take the pipeline conveyance of fluids exhibiting non-Newtonian behavior as a case for the validation of the proposed strategy.The pipeline conveyance of fluids exhibiting non-Newtonian behavior is a common engineering challenge and is encountered across over 20 industries, such as dealing with coal slime and mine tailings in mining or managing oil residue and sludge in the petrochemical sector.With the development of modern industry, the engineering value of this problem has become more and more prominent.

Flow Governing Equations
Supposing the paste flow within the pipeline adheres to an isothermal, axisymmetric laminar pattern and is modestly compressible, neglecting circumferential velocity variations and alterations in all dependent variables, one can derive the streamlined expressions for the continuity and momentum equations governing the 2D unsteady flow of viscous fluids as where , zr represent the axial and radial coordinates of the pipeline respectively, ( , , ) u u z r t = represents the velocity field, ( , ) p p z t = represents the pressure field.The fields of velocity and pressure can be regarded as functions of time and space coordinates. represents the density, rz  represents the shear stress, g denotes the gravitational acceleration, and  denotes the inclination angle of pipeline.
Considering the continuity equation coupled with the modified bulk modulus equation of state [25], and replacing the viscous term in the momentum equation with the modified Herschel-Bulkley model [26], the new flow governing equations are obtained as follows where K denotes the corrected bulk modulus,  is the paste consistency coefficient, 0  denotes the yield stress, m is a growth-rate factor.

Computational Domain Settings
The computational domain of the flow field is shown in figure 3. The computational domain adopts a cylindrical coordinate system, where , zr represent the axial direction and the radial direction respectively.The pipe diameter   = .There are periodic pressure fluctuations at the inlet, and the outlet pressure is 0; the wall adopts no-slip boundary conditions.

Numerical Solution Strategy
In this paper, the Keller-Box implicit finite difference method [27] is used to directly calculate the flow governing equations.The solution program is realized by MATLAB.Literature [28] has validated the precision of the computed results by comparing with the experimental data.Therefore, the computed results on HR grid can be used as a baseline for comparison with the results obtained by the SR model.

SR Implementation
After the numerical calculation of the flow field is relatively stable, a total of 200 sets of data are taken from the 1700th to the 1900th time step period for the training of the SR model.After the training is completed, it is tested with the test set (not included in the training set), and the HR flow field predicted by the SR model is compared with the HR flow field calculated by the numerical method.
The LR simulated flow field is the input of the SR model, and the HR flow field is output from the trained SR model.The training epoch is 50,000, and the learning rate is 0.001.The decline process of the loss and the residual of equation ( 8) and equation ( 9) with the epoch is shown in figure 4.  8) and ( 9) with the epoch.
In order to validate the reliability of the proposed SR model, the velocity and pressure obtained by the SR model and the DNS method in one cycle are compared in figure 5 and figure 6.
Figure 5 shows the velocity-time curves for five typical locations of the pipeline.The most significant variations in inlet velocity occurred during the reversal of the piston pump.As one moved farther from the pipe entrance, there was a gradual reduction in the fluctuation of velocity.It can be seen from figure 5 that the velocity predicted by the SR model is similar to that of the DNS method.Figure 6 shows the pressure-time curves for three typical locations of the pipeline.The pressure oscillation diminished as the distance from the pipe entrance increased.It can be seen from figure 6 that the pressure predicted by the SR model is similar to that of the DNS method.
For the typical positions in figure 5 and figure 6, the mean absolute percentage error (MAPE) is used as an indicator to quantitatively describe the prediction results of the SR model, as shown in figure 7. The MAPE is calculated as follows   It should be noted that we use implicit time integrators for finite-difference algorithms because it can be unconditionally stable.Computations may be faster if explicit schemes are used, but also become conditionally stable.

Discussion
In this section, we explore the effect of the multi-task learning structure on the prediction accuracy of the SR model.Table 3 presents the average MAPE for velocity and pressure at all locations of the pipeline with and without the multi-task learning structure.It can be seen from table 3 that, in terms of velocity, the prediction accuracy of the SR model with multi-task learning structure is significantly better than that without it.This is mainly because the fluctuation of velocity is greater than that of pressure.When the multi-task learning structure is adopted, the SR model can better learn this change trend.

Conclusion
In this paper, the physics-driven SR method is combined with DNS, and a SR Strategy for DNS is proposed: firstly, quickly obtain the LR flow field by the DNS at LR grid; secondly, use SR model to improve its resolution; finally, reconstruct the HR flow field.The SR model in this strategy is constructed based on a CNN and adopts a multi-task learning structure, while embedding the flow governing equations into it.Compared with directly using DNS at HR grid to obtain HR flow field, this strategy can greatly shorten the calculation time and improve simulation efficiency while ensuring roughly the same accuracy.
There are some limitations of the proposed strategy.For example, when the Reynolds number is very high, the period of the LR flow field and the HR flow field will be significantly different, making this strategy inapplicable.Future work will further explore the applicability of this method and expand to the real-time online calling.

Figure 1 .
Figure 1.Flowchart of the SR Strategy for DNS.
LRGq  as the HR physical fields outputted by the SR model.

Figure 2 .
Figure 2. Multi-task SR model network architecture.The LR flow field is as the input while the corresponding HR flow field is as the output.

.
In the calculation, we use two sets of grids with different resolutions.The LR grid adopts a structured uniform grid of 40 6  , and the HR grid adopts a structured uniform grid of 1270 21 .The HR grid is about 111 times larger than the LR grid.

Figure 3 .
Figure 3. Schematic diagram of calculation domain for coal slime pipeline transportation.

Figure 4 .
Figure 4.The decline process of the loss and the residual of equation (8) and (9) with the epoch.
i th physical quantity predicted by DNS method, and i ML var denotes the i th physical quantity predicted by SR model.

Figure 7 .
Figure 7. MAPE of velocity and pressure obtained by LR DNS and SR model at different pipeline locations.

Table 1 .
To verify the efficiency of the proposed SR Strategy, table 1 shows the calculation time of HR DNS, LR DNS and SR model (including the training time of the model).The environment configuration is shown in table 2. It can be seen from table 1 that the sum of the calculation time of LR DNS and SR model is only about 20% of the calculation time of HR DNS.Calculation time for different methods.

Table 3 .
Average MAPE for velocity and pressure.