domain: spi math

text:
Lianfa Wang

Yvan Fournier

Jean-François Wald
email: jean-françois.wald@edf.fr

Youssef Mesri
email: youssef.mesri@mines-paristech.fr

IMPROVING CONFIDENCE ON CFD BY DEEP LEARNING

Keywords: Graph convolutional neural network, Vortex identification, CFD

Computational fluid dynamics (CFD) has been successfully applied in various industrial areas. However, the accuracy of the CFD result depends on not only the software but also the user's comprehension of the simulated flow phenomena. Compared with a CFD beginner, an expert with sufficient knowledge of both the simulated phenomenon and the computational tools can generally set a proper numerical and model parameters of the simulation, such as the turbulence model, mesh refinement, etc., which finally leads to a more accurate result. On the other hand, Deep Learning algorithms trained on validated cases can give the users confidence on the CFD results by helping them to properly configure the CFD simulation with regard to the corresponding flow phenomenon. To achieve this goal, the flow phenomena inside the simulation domain shall first be correctly identified in order to propose adequate and optimal configurations. In this paper, using carefully selected indicators of vortex location as an input dataset, a Graph Convolutional Neural Network (GCNN) algorithm is proposed to accurately detect the presence of vortices. The results show that the GCNN algorithm trained on limited cases can successfully detect the vortex location in new cases which are not included in the dataset. The datasets are generated in parallel using the code saturne open source CFD code.

INTRODUCTION

We intend to find a way to give the users of code saturne, an open-source 3D CFD code developed by EDF, the confidence on their simulated CFD results with the help of deep learning. The credibility of the CFD results highly depends on the users' mastery of the CFD code and the simulated flow phenomenon. Generally speaking, an experienced user of a certain code with sufficient knowledge of the simulated flow phenomenon tends to better choose a numerical and model configuration compared with a CFD beginner, leading to higher credible result. The users' influence on the CFD result can be minimized by integrating the experts' experience of the code and their knowledge of the corresponding flow phenomenon. It is difficult to select the optimal CFD configuration for CFD case since there are various flow phenomena, numerous geometries and lots of combinations for numerical and model parameters. However, the deep learning [START_REF] Yang | Learning by neural networks under physical constraints for simulation in fluid mechanics[END_REF] is good at finding the mapping between countless results and a huge amount of configurations when it is trained on the dataset formed by the validated CFD cases such as the ones included in the validation suite of code saturne [1].

To achieve this goal, using a deep learning algorithm, our research is scheduled in two steps: identify the flow phenomenon inside the simulated case and then propose the optimal configuration according to the detected flow phenomenon. Nowadays, many deep learning algorithms are employed to detect the flow phenomena, among which Graph Neural Networks are the most promising ones thanks to its perfect adaptability to unstructured mesh. GCNN is the most popular one of GNNs because of its simplicity. Currently focusing on the first step, the present paper introduces the GCNN detection of the location of vortex, the first of four basis flow phenomena that we intend to detectvortex, thermal stratification, boundary layer and jet.

GRAPH CONVOLUTIONAL NEURAL NETWORK ARCHITECTURE

The CFD mesh can be naturally viewed as a graph, G(V, E) where V is the set of nodes storing the flow fields information and E is the set of edges representing the connectivity between two adjacent nodes. The graph convolution can update the node features by aggregating the neighboring nodes features. In this paper, a GCNN is proposed to detect the vortex location. The architecture of the GCNN is shown in Fig. 1. The input is composed of four non-dimensional vortex indicators [START_REF] Ling | Evaluation of machine learning algorithms for prediction of regions of high Reynolds averaged Navier Stokes uncertainty[END_REF], whose definitions and physical meanings are listed in Table 1. The algorithm has eight main blocks. Each block contains a convolution block and a smoothing layer. The skip connection is added between the leading blocks and the corresponding trailing blocks which is similar to U-net architecture [START_REF] Berenjkoub | Vortex boundary identification using convolutional neural network[END_REF]. A fully connected layer is added at the end to classify the node features into non-vortex zone or vortex zone.

4

Deviation from parallel shear flow

|U k U l dU k dx l | UnUnU i dU i dx j Um dUm dx j +|U i U j dU i dx j | 3 DATASET
The dataset was formed by a 2D diffuser case which is from the code saturne validation suite. The diffuser geometry is shown in Fig. 2. The entrance is followed by an slope expansion. The flow is turbulent, the Reynolds number is 20000 based on bulk inlet velocity. A circulation zone is formed behind the slope due to the adverse pressure gradient. This case was simulated with seven combinations of different turbulence models and meshes.

TRAINING

The network is trained using the Adam optimizer for 200 epochs with cross-entropy loss as the loss function. One typical training history of the loss for is shown in Fig. 3. As can be seen, the loss for both training and validation dataset reaches the lowest level around 0.05 after 60 epochs and no longer decreases significantly with more epochs.

RESULTS

The trained GCNN model is tested on the new cases which are not include in the dataset: backward facing step case (BFS), periodical hill case (PH) and heat transfer channel with ribs (RIBS). As can be seen in Fig. 4, the trained GCNN model can predict the vortex positions with completely different geometry, different Reynolds numbers, Re = 5000, 3500, 30000 for BFS, PH and RIBS respectively and even multiple vortexes -RIB case.

Lianfa Wang, Yvan Fournier, Jean-François Wald and Youssef Mesri

CONCLUSIONS

A GCNN model was trained to detect the vortex position in the 2D flow case. With four selected non-dimensional vortex indicators as the input, the GCNN model trained on limited cases can detect the vortex with high accuracy in unseen cases with different geometries and Reynolds numbers. In the future, we intend to test the generality of the current GCNN model with more cases and other flow phenomena such as jet impingement, boundary layer and thermal stratification, and also extend its application to 3D cases.

Figure 1 :

 1 Figure 1: The architecture of GCNN.

Figure 2 :

 2 Figure 2: The geometry of diffuser case.

Figure 3 :

 3 Figure 3: The average loss hisotry of five trainings.

Figure 4 :

 4 Figure 4: The GCNN model prediction of vortex position on unseen cases. (From left to right: BFS, PH, RIB; From top to bottom: streamline plot, GCNN prediction of vortex.)

Table 1 :

 1 Four non-dimensional vortex indicators

	No.	Description		Formula
	1 2	Turbulence intensity Pressure gradient along streamline	dP dx j	k 0.5U i U i +k dP U k dx k dP dx j U i U i +|U l	dP dx l
					dP	dP
	3	Ratio of pressure normal stresses to shear stresses	dP dx j	dx i dP dx j +0.5ρ dx i	dU 2 k dx k