Publication Cover
Mathematical and Computer Modelling of Dynamical Systems
Methods, Tools and Applications in Engineering and Related Sciences
Volume 29, 2023 - Issue 1
2,342
Views
0
CrossRef citations to date
0
Altmetric
Research Article

Towards real-time fluid dynamics simulation: a data-driven NN-MPS method and its implementation

, , , &
Pages 95-115 | Received 18 Jul 2022, Accepted 21 Feb 2023, Published online: 06 Mar 2023

Figures & data

Figure 1. The arrangement of particles near the wall.

Figure 1. The arrangement of particles near the wall.

Figure 2. A description of a particle and its neighborhood.

Figure 2. A description of a particle and its neighborhood.

Figure 3. The velocity update scheme in the proposed NN-MPS method.

Figure 3. The velocity update scheme in the proposed NN-MPS method.

Figure 4. A description of the neural network. For each neuron in the hidden layer, the nonlinear activation function is the ReLU. Each of the first two hidden layers has eight neurons, and the last hidden layer has four neurons.

Figure 4. A description of the neural network. For each neuron in the hidden layer, the nonlinear activation function is the ReLU. Each of the first two hidden layers has eight neurons, and the last hidden layer has four neurons.

Figure 5. A Visualization of Wl and bl, l=1,2,3, in (2) after training. The vectors at the top are b and the matrices at the bottom are W. From left to right: 1st layer, 2nd layer, 3rd layer, 4th layer.

Figure 5. A Visualization of Wl and bl, l=1,2,3, in (2) after training. The vectors at the top are b and the matrices at the bottom are W. From left to right: 1st layer, 2nd layer, 3rd layer, 4th layer.

Figure 6. A visualization of the training set. From left to right: scene 1, scene 2, scene 3, scene 4.

Figure 6. A visualization of the training set. From left to right: scene 1, scene 2, scene 3, scene 4.

Table 1. Parameters of different scenes in the training set. The time step is set to 0.003 s and the simulation time of all scenes is 1.5 s (500 steps). The initial distance is set to 0.075. The size implies the number of particles, where r is the radius, h is the height, l is the length and w is the width.

Figure 7. A visualization of the dam collapse problem. Upper: NN-MPS. Lower: Original MPS. From left to right: 0.3s,0.6s,0.9s,1.2s,1.5s.

Figure 7. A visualization of the dam collapse problem. Upper: NN-MPS. Lower: Original MPS. From left to right: 0.3s,0.6s,0.9s,1.2s,1.5s.

Table 2. The parameters setting for the dam collapse problem.

Figure 8. A comparison of pressure distribution at 0.3s, 0.9s, and 1.5s (from left to right). Top row: NN-MPS; Bottom row: Original MPS.

Figure 8. A comparison of pressure distribution at 0.3s, 0.9s, and 1.5s (from left to right). Top row: NN-MPS; Bottom row: Original MPS.

Figure 9. A comparison of the position of fluid front and pressure at bottom of the left wall.

Figure 9. A comparison of the position of fluid front and pressure at bottom of the left wall.

Figure 10. The pressure and the pressure gradient of flow field. Left: With one-cylinder obstacle. Right: With a two-cylinder obstacle. Upper: Pressure at bottom of the left wall. Lower: z component of pressure gradient at bottom of the left wall.

Figure 10. The pressure and the pressure gradient of flow field. Left: With one-cylinder obstacle. Right: With a two-cylinder obstacle. Upper: Pressure at bottom of the left wall. Lower: z component of pressure gradient at bottom of the left wall.

Figure 11. A comparison of two algorithms on the problem with a one-cylinder obstacle. Top row: NN-MPS. Bottom row: MPS.

Figure 11. A comparison of two algorithms on the problem with a one-cylinder obstacle. Top row: NN-MPS. Bottom row: MPS.

Figure 12. A comparison of two algorithms on the problem with a two-cylinder obstacle. Top row: NN-MPS. Bottom row: MPS.

Figure 12. A comparison of two algorithms on the problem with a two-cylinder obstacle. Top row: NN-MPS. Bottom row: MPS.

Table 3. The parameters setting for the dam collapse problem.

Figure 13. The ratio of pressure calculation time.

Figure 13. The ratio of pressure calculation time.

Figure 14. An illustration of the multi-precision strategy used on ascend 310.

Figure 14. An illustration of the multi-precision strategy used on ascend 310.

Figure 15. A description of dividing the domain into grids and distributing the grids to different processes.

Figure 15. A description of dividing the domain into grids and distributing the grids to different processes.

Figure 16. A visualization of three testing models.

Figure 16. A visualization of three testing models.

Table 4. The model sizes and speedup.

Figure 17. Numerical results of the free-surface movement. (a) shows the definition of X and H. (b), (c) and (d) respectively show the results of models with index number 1, 2 and 3.

Figure 17. Numerical results of the free-surface movement. (a) shows the definition of X and H. (b), (c) and (d) respectively show the results of models with index number 1, 2 and 3.

Figure 18. Pressure results at left corner. (a), (b) and (c) respectively show the results of models with index number 1, 2 and 3.

Figure 18. Pressure results at left corner. (a), (b) and (c) respectively show the results of models with index number 1, 2 and 3.

Figure 19. A comparison of two different devices on the problem with case 1. Top row: CPU. Bottom row: AI Core.

Figure 19. A comparison of two different devices on the problem with case 1. Top row: CPU. Bottom row: AI Core.

Figure 20. A comparison of two different devices on the problem with case 2. Top row: CPU. Bottom row: AI Core.

Figure 20. A comparison of two different devices on the problem with case 2. Top row: CPU. Bottom row: AI Core.

Figure 21. A comparison of two different devices on the problem with case 3. Top row: CPU. Bottom row: AI Core.

Figure 21. A comparison of two different devices on the problem with case 3. Top row: CPU. Bottom row: AI Core.

Figure 22. The parallel efficiency and speedup.

Figure 22. The parallel efficiency and speedup.