Skip to main content

VisualSPHysics: advanced fluid visualization for SPH models


VisualSPHysics, an open-source tool for creating realistic visualizations of smoothed particle hydrodynamics (SPH) simulations, is presented here. The proposed approach is used to import SPH simulations (from DualSPHysics code) into 3D graphics software (Blender) and supports a wide range of visual effects (realistic lighting and materials, texturing, motion blur and foam simulation). The tool features a graphical user interface that integrates into Blender for easier use. VisualSPHysics was conceived to bring advanced visual effects to scientific and engineering simulations, helping researchers to disseminate their projects.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10


  1. 1.

    Monaghan JJ (1994) Simulating free surface flows with SPH. J Comput Phys 110:399–406.

    Article  MATH  Google Scholar 

  2. 2.

    Monaghan JJ, Cas RA, Kos AM, Hallworth M (1999) Gravity currents descending a ramp in a stratified tank. J Fluid Mech 379:39–69

    Article  Google Scholar 

  3. 3.

    Gómez-Gesteira M, Dalrymple RA (2004) Using a three-dimensional smoothed particle hydrodynamics method for wave impact on a tall structure. J Waterw Port Coastal Ocean Eng 130:63–69.

    Article  Google Scholar 

  4. 4.

    Altomare C, Domínguez JM, Crespo AJC et al (2017) Long-crested wave generation and absorption for SPH-based DualSPHysics model. Coast Eng 127:37–54.

    Article  Google Scholar 

  5. 5.

    Altomare C, Crespo AJC, Domínguez JM et al (2015) Applicability of smoothed particle hydrodynamics for estimation of sea wave impact on coastal structures. Coast Eng 96:1–12.

    Article  Google Scholar 

  6. 6.

    Crespo AJC, Altomare C, Domínguez JM et al (2017) Towards simulating floating offshore oscillating water column converters with smoothed particle hydrodynamics. Coast Eng 126:11–26.

    Article  Google Scholar 

  7. 7.

    Domínguez JM, Crespo AJC, Hall M et al (2019) SPH simulation of floating structures with moorings. Coast Eng 153:103560.

    Article  Google Scholar 

  8. 8.

    Brito M, Canelas RB, García-Feal O et al (2020) A numerical tool for modelling oscillating wave surge converter with nonlinear mechanical constraints. Renew Energy 146:2024–2043.

    Article  Google Scholar 

  9. 9.

    Canelas RB, Domínguez JM, Crespo AJC et al (2017) Resolved simulation of a granular-fluid flow with a coupled SPH-DCDEM model. J Hydraul Eng 143:06017012.

    Article  Google Scholar 

  10. 10.

    SPLASH: An interactive visualisation tool for smoothed particle hydrodynamics simulations | Publications of the Astronomical Society of Australia | Cambridge Core. Accessed 3 Aug 2020

  11. 11.

    Ihmsen M, Orthmann J, Solenthaler B et al (2014) SPH Fluids Comput Gr.

    Article  Google Scholar 

  12. 12.

    Bender J, Koschier D (2017) Divergence-free SPH for incompressible and viscous fluids. IEEE Trans Visual Comput Gr 23:1193–1206.

    Article  Google Scholar 

  13. 13.

    Gissler C, Peer A, Band S et al (2019) Interlinked SPH pressure solvers for strong fluid-rigid coupling. ACM Trans Gr 38:5:1–5:13.

    Article  Google Scholar 

  14. 14.

    Blender 2.83 Reference Manual—Blender Manual. Accessed 3 Aug 2020

  15. 15.

    Crespo AJC, Domínguez JM, Rogers BD et al (2015) DualSPHysics: open-source parallel CFD solver based on smoothed particle hydrodynamics (SPH). Comput Phys Commun 187:204–216.

    Article  MATH  Google Scholar 

  16. 16.

    (2020) EPhysLab-UVigo/VisualSPHysics. Accessed 26 Oct 2020

  17. 17.

    Schroeder WJ, Avila LS, Hoffman W (2000) Visualizing with VTK: a tutorial. IEEE Comput Gr Appl 20:20–27.

    Article  Google Scholar 

  18. 18.

    Avila LS, Ayachit U, Barré S et al (2010) The VTK user’s guide, 11th edn. Kitware, Clifton Park

    Google Scholar 

  19. 19.

    NVIDIA Corporation (2020) CUDA C++ Programming Guide. Accessed 22 Jun 2020

  20. 20.

    Ahrens J, Geveci B, Law C (2005) 36 - ParaView: an end-user tool for large-data visualization. In: Hansen CD, Johnson CR (eds) Visualization handbook. Butterworth-Heinemann, Burlington, pp 717–731.

    Chapter  Google Scholar 

  21. 21.

    Ramachandran P, Varoquaux G (2011) Mayavi: 3D visualization of scientific data. Comput Sci Eng 13:40–51.

    Article  Google Scholar 

  22. 22.

    Zwicker M, Pfister H, van Baar J, Gross M (2001) Surface splatting. In: Proceedings of the 28th annual conference on computer graphics and interactive techniques. Association for Computing Machinery, New York, NY, USA, pp 371–378

  23. 23.

    Lorensen WE, Cline HE (1987) Marching cubes: a high resolution 3D surface construction algorithm. SIGGRAPH Comput Gr 21:163–169.

    Article  Google Scholar 

  24. 24.

    DualSPHysics documentation. Accessed 17 Aug 2020

  25. 25.

    Kajiya JT (1986) The rendering equation. In: Proceedings of the 13th annual conference on computer graphics and interactive techniques. Association for Computing Machinery, New York, NY, USA, pp 143–150

  26. 26.

    Lafortune E (1996) Mathematical models and Monte Carlo algorithms for physically based rendering. Department of Computer Science, Faculty of Engineering, Katholieke Universiteit Leuven 20:74–79

  27. 27.

    Immel DS, Cohen MF, Greenberg DP (1986) A radiosity method for non-diffuse environments. Acm Siggraph Comput Gr 20:133–142

    Article  Google Scholar 

  28. 28.

    Whitted T (2005) An improved illumination model for shaded display. In: ACM SIGGRAPH 2005 Courses. Association for Computing Machinery, Los Angeles, California, pp 4–es

  29. 29.

    Cook RL, Porter T, Carpenter L (1984) Distributed ray tracing. In: Proceedings of the 11th annual conference on computer graphics and interactive techniques. Association for Computing Machinery, New York, NY, USA, pp 137–145

  30. 30.

    Potmesil M, Chakravarty I (1983) Modeling motion blur in computer-generated images. SIGGRAPH Comput Gr 17:389–399.

    Article  Google Scholar 

  31. 31.

    Takahashi T, Fujii H, Kunimatsu A et al (2003) Realistic animation of fluid with splash and foam. Comput Gr Forum 22:391–400.

    Article  Google Scholar 

  32. 32.

    Bagar F, Scherzer D, Wimmer M (2010) A layered particle-based Fluid model for real-time rendering of water. Comput Gr Forum 29:1383–1389.

    Article  Google Scholar 

  33. 33.

    Ihmsen M, Akinci N, Akinci G, Teschner M (2012) Unified spray, foam and air bubbles for particle-based fluids. Vis Comput 28:669–677.

    Article  Google Scholar 

  34. 34.

    Müller M, Charypar D, Gross MH (2003) Particle-based fluid simulation for interactive applications. In: Symposium on computer animation. pp 154–159

  35. 35.

    Wendland H (1995) Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree. Adv Comput Math 4:389–396.

    MathSciNet  Article  MATH  Google Scholar 

  36. 36.

    Blinn JF (1978) Simulation of wrinkled surfaces. SIGGRAPH Comput Gr 12:286–292.

    Article  Google Scholar 

  37. 37.

    Kollig T, Keller A (2002) Efficient illumination by high dynamic range images

  38. 38.

    Debevec P (2008) Rendering synthetic objects into real scenes: bridging traditional and image-based graphics with global illumination and high dynamic range photography. In: ACM SIGGRAPH 2008 classes. Association for Computing Machinery, Los Angeles, California, pp 1–10

  39. 39.

    (2018) DualSPHysics applied to coastal engineering. Accessed 26 Oct 2020

  40. 40.

    (2015) Realistic creek with DualSPHysics & Blender. Accessed 26 Oct 2020

  41. 41.

    (2016) Promenade flooding using DualSPHysics. Accessed 26 Oct 2020

  42. 42.

    (2015) Mooring simulation with DualSPHysics (SPH on GPU). Accessed 26 Oct 2020

Download references


This work was partially financed by the Ministry of Economy and Competitiveness of the Government of Spain under project “WELCOME ENE2016-75074-C2-1-R” and financed by Xunta de Galicia (Spain) under project ED431C 2017/64″Programa de Consolidación e Estructuración de Unidades de Investigación Competitivas (Grupos de Referencia Competitiva)” co-funded by European Regional Development Fund (ERDF). O. García-Feal is supported by Xunta de Galicia grant ED481A-2017/314.

Author information



Corresponding author

Correspondence to O. García-Feal.

Ethics declarations

Conflicts of interest

The authors declare no conflict of interest.

Code availability

The code of VisualSPHysics is publicly available under GPL v3.0 license (

Additional information

Publisher's Note

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


Appendix A: List of properties for imported objects

The elements of a simulation can have different nature. These elements may require specific options to be processed correctly. Table 1 shows a list with including the most relevant options the objects imported with VisualSPHysics.

Table 1 Properties of the simulation objects imported with VisualSPHysics

Appendix B: Parameters for foam simulations

Foam simulations are executed following a series of parameters. Table 2 shows the user-configurable parameters.

Table 2 Relevant parameters for the simulation simulations performed with VisualSPHysics

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

García-Feal, O., Crespo, A.J.C. & Gómez-Gesteira, M. VisualSPHysics: advanced fluid visualization for SPH models. Comp. Part. Mech. (2021).

Download citation


  • Lagrangian methods
  • DualSPHysics
  • Blender
  • Visualization