Skip to main content
Log in

VisualSPHysics: advanced fluid visualization for SPH models

  • Published:
Computational Particle Mechanics Aims and scope Submit manuscript

Abstract

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, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. Monaghan JJ (1994) Simulating free surface flows with SPH. J Comput Phys 110:399–406. https://doi.org/10.1006/jcph.1994.1034

    Article  MATH  Google Scholar 

  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. 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. https://doi.org/10.1061/(ASCE)0733-950X(2004)130:2(63)

    Article  Google Scholar 

  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. https://doi.org/10.1016/j.coastaleng.2017.06.004

    Article  Google Scholar 

  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. https://doi.org/10.1016/j.coastaleng.2014.11.001

    Article  Google Scholar 

  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. https://doi.org/10.1016/j.coastaleng.2017.05.001

    Article  Google Scholar 

  7. Domínguez JM, Crespo AJC, Hall M et al (2019) SPH simulation of floating structures with moorings. Coast Eng 153:103560. https://doi.org/10.1016/j.coastaleng.2019.103560

    Article  Google Scholar 

  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. https://doi.org/10.1016/j.renene.2019.08.034

    Article  Google Scholar 

  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. https://doi.org/10.1061/(ASCE)HY.1943-7900.0001331

    Article  Google Scholar 

  10. SPLASH: An interactive visualisation tool for smoothed particle hydrodynamics simulations | Publications of the Astronomical Society of Australia | Cambridge Core. https://www.cambridge.org/core/journals/publications-of-the-astronomical-society-of-australia/article/splash-an-interactive-visualisation-tool-for-smoothed-particle-hydrodynamics-simulations/20C22A93AB1CD3ADC1F5B8439B639A24. Accessed 3 Aug 2020

  11. Ihmsen M, Orthmann J, Solenthaler B et al (2014) SPH Fluids Comput Gr. https://doi.org/10.2312/egst.20141034

    Article  Google Scholar 

  12. Bender J, Koschier D (2017) Divergence-free SPH for incompressible and viscous fluids. IEEE Trans Visual Comput Gr 23:1193–1206. https://doi.org/10.1109/TVCG.2016.2578335

    Article  Google Scholar 

  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. https://doi.org/10.1145/3284980

    Article  Google Scholar 

  14. Blender 2.83 Reference Manual—Blender Manual. https://docs.blender.org/manual/en/latest/. Accessed 3 Aug 2020

  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. https://doi.org/10.1016/j.cpc.2014.10.004

    Article  MATH  Google Scholar 

  16. (2020) EPhysLab-UVigo/VisualSPHysics. https://github.com/EPhysLab-UVigo/VisualSPHysics. Accessed 26 Oct 2020

  17. Schroeder WJ, Avila LS, Hoffman W (2000) Visualizing with VTK: a tutorial. IEEE Comput Gr Appl 20:20–27. https://doi.org/10.1109/38.865875

    Article  Google Scholar 

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

    Google Scholar 

  19. NVIDIA Corporation (2020) CUDA C++ Programming Guide. https://docs.nvidia.com/cuda/pdf/CUDA_C_Programming_Guide.pdf. Accessed 22 Jun 2020

  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. https://doi.org/10.1016/B978-012387582-2/50038-1

    Chapter  Google Scholar 

  21. Ramachandran P, Varoquaux G (2011) Mayavi: 3D visualization of scientific data. Comput Sci Eng 13:40–51. https://doi.org/10.1109/MCSE.2011.35

    Article  Google Scholar 

  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. Lorensen WE, Cline HE (1987) Marching cubes: a high resolution 3D surface construction algorithm. SIGGRAPH Comput Gr 21:163–169. https://doi.org/10.1145/37402.37422

    Article  Google Scholar 

  24. DualSPHysics documentation. https://github.com/DualSPHysics/DualSPHysics/wiki. Accessed 17 Aug 2020

  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. 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. 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. 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. 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. Potmesil M, Chakravarty I (1983) Modeling motion blur in computer-generated images. SIGGRAPH Comput Gr 17:389–399. https://doi.org/10.1145/964967.801169

    Article  Google Scholar 

  31. Takahashi T, Fujii H, Kunimatsu A et al (2003) Realistic animation of fluid with splash and foam. Comput Gr Forum 22:391–400. https://doi.org/10.1111/1467-8659.00686

    Article  Google Scholar 

  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. https://doi.org/10.1111/j.1467-8659.2010.01734.x

    Article  Google Scholar 

  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. https://doi.org/10.1007/s00371-012-0697-9

    Article  Google Scholar 

  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. Wendland H (1995) Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree. Adv Comput Math 4:389–396. https://doi.org/10.1007/BF02123482

    Article  MathSciNet  MATH  Google Scholar 

  36. Blinn JF (1978) Simulation of wrinkled surfaces. SIGGRAPH Comput Gr 12:286–292. https://doi.org/10.1145/965139.507101

    Article  Google Scholar 

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

  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. (2018) DualSPHysics applied to coastal engineering. https://www.youtube.com/watch?v=qwmeIngBJ-E&t=238. Accessed 26 Oct 2020

  40. (2015) Realistic creek with DualSPHysics & Blender. https://www.youtube.com/watch?v=U6lloRvgoXA. Accessed 26 Oct 2020

  41. (2016) Promenade flooding using DualSPHysics. https://www.youtube.com/watch?v=EvSDFRfJToQ. Accessed 26 Oct 2020

  42. (2015) Mooring simulation with DualSPHysics (SPH on GPU). https://www.youtube.com/watch?v=IlGe341o-LE. Accessed 26 Oct 2020

Download references

Acknowledgements

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

Authors and Affiliations

Authors

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 (https://github.com/EPhysLab-UVigo/VisualSPHysics).

Additional information

Publisher's Note

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

Appendices

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

Check for updates. 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. 9, 897–910 (2022). https://doi.org/10.1007/s40571-020-00386-7

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s40571-020-00386-7

Keywords

Navigation