Skip to main content
Log in

Multi-scale graph neural network for physics-informed fluid simulation

  • Research
  • Published:
The Visual Computer Aims and scope Submit manuscript


Learning-based fluid simulation has proliferated due to its ability to replicate the dynamics with substantial computational savings over traditional numerical solvers. To this end, graph neural networks (GNNs) are a suitable tool to capture fluid dynamics through local particle interactions. Nonetheless, it remains challenging to model the long-range behaviors. To tackle this, this paper models the fluid flow via graphs at different scales in succinct considerability and physical constraints. We propose a novel multi-scale GNN for physics-informed fluid simulation (MSG) by introducing a nonparametric sampling and aggregation method to combine features from graphs with different resolutions. Our design reduces the size of the learnable model and accelerates the model inference time. In addition, zero velocity divergence is explicitly incorporated as a physical constraint through the training loss function. Finally, a fusion mechanism of consecutive predictions is incorporated to alleviate the inductive bias caused by the Markovian assumption. Extensive experiments corroborate the merits over leading particle-based neural network models in terms of both one-step accuracy \((+ 6.7\%)\) and long trajectory prediction \((+ 16.9\%)\). This comes with a run-time reduction by \(2.8\%\) over the best baseline method.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others


  1. Bathe, K.J.: Finite element method. Wiley Encyclopedia of Computer Science and Engineering pp. 1–12 (2007)

  2. Battaglia, P., Pascanu, R., Lai, M., Jimenez Rezende, D.: Interaction networks for learning about objects, relations and physics. In: Advances in Neural Information Processing Systems, vol. 29 (2016)

  3. Belbute-Peres, F.D.A., Economon, T., Kolter, Z.: Combining differentiable PDE solvers and graph neural networks for fluid flow prediction. In: International Conference on Machine Learning, pp. 2402–2411 (2020)

  4. Bridson, R.: Fluid Simulation for Computer Graphics. AK Peters/CRC Press, Boca Raton (2015)

    Book  Google Scholar 

  5. Cao, Y., Chen, Y., Li, M., Yang, Y., Zhang, X., Aanjaneya, M., Jiang, C.: An efficient b-spline Lagrangian/Eulerian method for compressible flow, shock waves, and fracturing solids. ACM Trans. Graph. (TOG) 41(5), 1–13 (2022)

    Article  Google Scholar 

  6. Chentanez, N., Müller, M.: Real-time Eulerian water simulation using a restricted tall cell grid. In: ACM Special Interest Group for Computer Graphics and Interactive Techniques, pp. 1–10 (2011)

  7. Chu, J., Zafar, N.B., Yang, X.: A Schur complement preconditioner for scalable parallel fluid simulation. ACM Trans. Graph. (TOG) 36(4), 1 (2017)

    Article  Google Scholar 

  8. Fey, M., Lenssen, J.E.: Fast graph representation learning with PyTorch geometric. arXiv:1903.02428 (2019)

  9. Foster, N., Metaxas, D.: Controlling fluid animation. In: IEEE Computer Graphics International, pp. 178–188 (1997)

  10. Gao, H., Sun, L., Wang, J.X.: PhyGeoNet: Physics-informed geometry-adaptive convolutional neural networks for solving parameterized steady-state PDEs on irregular domain. J. Comput. Phys. 428, 110079 (2021)

    Article  MathSciNet  Google Scholar 

  11. Gao, M., Wang, X., Wu, K., Pradhana, A., Sifakis, E., Yuksel, C., Jiang, C.: GPU optimization of material point methods. ACM Trans. Graph. (TOG) 37(6), 1–12 (2018)

    Google Scholar 

  12. Jiang, C., Schroeder, C., Selle, A., Teran, J., Stomakhin, A.: The affine particle-in-cell method. ACM Trans. Graph. (TOG) 34(4), 1–10 (2015)

    Google Scholar 

  13. Keramat, A., Tijsseling, A., Hou, Q., Ahmadi, A.: Fluid-structure interaction with pipe-wall viscoelasticity during water hammer. J. Fluids Struct. 28, 434–455 (2012)

    Article  Google Scholar 

  14. Kim, B., Azevedo, V.C., Thuerey, N., Kim, T., Gross, M., Solenthaler, B.: Deep fluids: A generative network for parameterized fluid simulations. Comput. Graph. Forum 38, 59–70 (2019)

    Article  Google Scholar 

  15. Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. arXiv:1412.6980 (2014)

  16. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional networks. arXiv:1609.02907 (2016)

  17. Ladickỳ, L., Jeong, S., Solenthaler, B., Pollefeys, M., Gross, M.: Data-driven fluid simulations using regression forests. ACM Trans. Graph. (TOG) 34(6), 1–9 (2015)

    Article  Google Scholar 

  18. Li, Q., Han, Z., Wu, X.M.: Deeper insights into graph convolutional networks for semi-supervised learning. In: AAAI Conference on Artificial Intelligence, vol. 32 (2018)

  19. Li, Z., Farimani, A.B.: Graph neural network-accelerated Lagrangian fluid simulation. Comput. Graph. 103, 201–211 (2022)

    Article  Google Scholar 

  20. Lino, M., Fotiadis, S., Bharath, A.A., Cantwell, C.: Towards fast simulation of environmental fluid mechanics with multi-scale graph neural networks. arXiv:2205.02637 (2022)

  21. Liu, Q., Zhu, W., Jia, X., Ma, F., Gao, Y.: Fluid simulation system based on graph neural network. arXiv:2202.12619 (2022)

  22. Macklin, M., Müller, M.: Position based fluids. ACM Trans. Graph. (TOG) 32(4), 1–12 (2013)

    Article  Google Scholar 

  23. Molina-Aiz, F.D., Valera, D.L., Álvarez, A.J.: Measurement and simulation of climate inside Almeria-type greenhouses using computational fluid dynamics. Agricult. Forest Meteorol. 125(1–2), 33–51 (2004)

    Article  Google Scholar 

  24. Monaghan, J.J.: Smoothed particle hydrodynamics. Ann. Rev. Astronom. Astrophys. 30(1), 543–574 (1992)

    Article  Google Scholar 

  25. Müller, M., Heidelberger, B., Hennix, M., Ratcliff, J.: Position based dynamics. J. Visual Commun. Image Represent. 18(2), 109–118 (2007)

    Article  Google Scholar 

  26. Obiols-Sales, O., Vishnu, A., Malaya, N., Chandramowliswharan, A.: CFDNet: A deep learning-based accelerator for fluid simulations. In: ACM International Conference on Supercomputing, pp. 1–12 (2020)

  27. Oono, K., Suzuki, T.: Graph neural networks exponentially lose expressive power for node classification. arXiv:1905.10947 (2019)

  28. Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L.: PyTorch: An imperative style, high-performance deep learning library. In: Advances in Neural Information Processing Systems, vol. 32. Curran Associates, Inc. (2019)

  29. Pfaff, T., Fortunato, M., Sanchez-Gonzalez, A., Battaglia, P.W.: Learning mesh-based simulation with graph networks. arXiv:2010.03409 (2020)

  30. Sanchez-Gonzalez, A., Godwin, J., Pfaff, T., Ying, R., Leskovec, J., Battaglia, P.: Learning to simulate complex physics with graph networks. In: International Conference on Machine Learning, pp. 8459–8468 (2020)

  31. Shao, H., Kugelstadt, T., Hädrich, T., Palubicki, W., Bender, J., Pirk, S., Michels, D.L.: Accurately solving rod dynamics with graph learning. In: Advances in Neural Information Processing Systems, vol. 34, pp. 4829–4842. Curran Associates, Inc. (2021)

  32. Snoek, J., Larochelle, H., Adams, R.P.: Practical bayesian optimization of machine learning algorithms. Adv. Neural Inform. Process. Syst. 25, 2951–2959 (2012)

    Google Scholar 

  33. Tessendorf, J.: Simulating ocean water. ACM Special Interest Group Comput. Graph. Interact. Techn. 1, 5–6 (2001)

    Google Scholar 

  34. Thomas, J.W.: Numerical Partial Differential Equations: Finite Difference Methods, vol. 22. Springer Science & Business Media, Berlin (2013)

    Google Scholar 

  35. Tompson, J., Schlachter, K., Sprechmann, P., Perlin, K.: Accelerating Eulerian fluid simulation with convolutional networks. In: International Conference on Machine Learning, pp. 3424–3433 (2017)

  36. Ummenhofer, B., Prantl, L., Thuerey, N., Koltun, V.: Lagrangian fluid simulation with continuous convolutions. In: International Conference on Learning Representations (2020)

  37. Wiewel, S., Kim, B., Azevedo, V.C., Solenthaler, B., Thuerey, N.: Latent space subdivision: stable and controllable time predictions for fluid flow. Comput. Graph. Forum 39, 15–25 (2020)

    Article  Google Scholar 

  38. Xiao, X., Zhou, Y., Wang, H., Yang, X.: A novel CNN-based Poisson solver for fluid simulation. IEEE Trans. Visualiz. Comput. Graph. 26(3), 1454–1465 (2018)

    Article  Google Scholar 

  39. Zhou, K., Huang, X., Li, Y., Zha, D., Chen, R., Hu, X.: Towards deeper graph neural networks with differentiable group normalization. Adv. Neural Inform. Process. Syst. 33, 4917–4928 (2020)

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Nikolaos M. Freris.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wei, L., Freris, N.M. Multi-scale graph neural network for physics-informed fluid simulation. Vis Comput (2024).

Download citation

  • Accepted:

  • Published:

  • DOI: