Skip to main content

SPlisHSPlasH Project Python Bindings

Project description


      Documentation Status

SPlisHSPlasH is an open-source library for the physically-based simulation of fluids. The simulation in this library is based on the Smoothed Particle Hydrodynamics (SPH) method which is a popular meshless Lagrangian approach to simulate complex fluid effects. The SPH formalism allows an efficient computation of a certain quantity of a fluid particle by considering only a finite set of neighboring particles. One of the most important research topics in the field of SPH methods is the simulation of incompressible fluids. SPlisHSPlasH implements current state-of-the-art pressure solvers (WCSPH, PCISPH, PBF, IISPH, DFSPH, PF) to simulate incompressibility. Moreover, the library provides different methods to simulate viscosity, surface tension and vorticity.

The library uses the following external libraries: Eigen, json, partio, zlib, cxxopts, tinyexpr, toojpeg, pybind, glfw, hapPLY, nfd, and imgui. All external dependencies are included.

Furthermore we use our own libraries:

SPlisHSPlasH can export the particle data in the partio and vtk format. If you want to import partio files in Maya or Blender, try out our plugins:

Author: Jan Bender

License

The SPlisHSPlasH library code is licensed under the MIT license. See LICENSE for details.

External dependencies are covered by separate licensing terms. See the extern folder for the code and respective licensing terms of each dependency.

Documentation

Forum

On our GitHub discussions page you can ask questions, discuss about simulation topics, and share ideas.

Build Instructions

This project is based on CMake. Simply generate project, Makefiles, etc. using CMake and compile the project with a compiler of your choice that supports C++11. The code was tested with the following configurations:

  • Windows 10 64-bit, CMake 3.18.3, Visual Studio 2019
  • Debian 11.5 64-bit, CMake 3.18.4, GCC 10.2.1.

Note: Please use a 64-bit target on a 64-bit operating system. 32-bit builds on a 64-bit OS are not supported.

Python Installation Instruction

For Windows and Linux targets there exists prebuilt python wheel files which can be installed using

pip install pysplishsplash

These are available for Python versions 3.6-3.10. See also here: pySPlisHSPlasH. If you do not meet these conditions please refer to the build instructions and to the python binding Getting started guide.

The command line simulator is available by running one of the following

splash
splash --help

Features

SPlisHSPlasH implements:

  • an open-source SPH fluid simulation (2D & 3D)
  • neighborhood search on CPU or GPU
  • supports vectorization using AVX
  • Python binding (thanks to Stefan Jeske)
  • supports embedded Python scripts
  • several implicit pressure solvers (WCSPH, PCISPH, PBF, IISPH, DFSPH, PF)
  • explicit and implicit viscosity methods
  • current surface tension approaches
  • different vorticity methods
  • computation of drag forces
  • support for multi-phase simulations
  • simulation of deformable solids
  • rigid-fluid coupling with static and dynamic bodies
  • two-way coupling with deformable solids
  • XSPH velocity filter
  • fluid emitters
  • scripted animation fields
  • a json-based scene file importer
  • automatic surface sampling
  • a tool for volume sampling of closed geometries
  • a tool to generate spray, foam and bubble particles in a postprocessing step
  • a tool to skin a visual mesh to the moving particles of an elastic solid in a postprocessing step
  • partio file export of all particle data
  • VTK file export of all particle data (enables the data import in ParaView)
  • rigid body export
  • a Maya plugin to model and generate scene files
  • a ParaView plugin to import particle data

A list of all implemented simulation methods can be found here: https://splishsplash.physics-simulation.org/features

Screenshots & Videos

https://splishsplash.physics-simulation.org/gallery

Citation

To cite SPlisHSPlasH you can use this BibTeX entry:

@software{SPlisHSPlasH_Library,
  author = {Bender, Jan and others},
  license = {MIT},
  title = {{SPlisHSPlasH Library}},
  url = {https://github.com/InteractiveComputerGraphics/SPlisHSPlasH},
}

References

  • Nadir Akinci, Gizem Akinci, and Matthias Teschner. Versatile surface tension and adhesion for SPH fluids. ACM Trans. Graph., 32(6):182:1–182:8, 2013.
  • Nadir Akinci, Markus Ihmsen, Gizem Akinci, Barbara Solenthaler, and Matthias Teschner, "Versatile rigid-fluid coupling for incompressible SPH", ACM Transactions on Graphics 31(4), 2012
  • Markus Becker and Matthias Teschner. Weakly compressible SPH for free surface flows. In Proceedings of ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 2007. Eurographics Association.
  • M. Becker, M. Ihmsen, and M. Teschner. Corotated SPH for deformable solids. Proceedings of Eurographics Conference on Natural Phenomena, 2009
  • Jan Bender and Dan Koschier. Divergence-free smoothed particle hydrodynamics. In Proceedings of ACM SIGGRAPH / Eurographics Symposium on Computer Animation, 2015. ACM.
  • Jan Bender and Dan Koschier. Divergence-free SPH for incompressible and viscous fluids. IEEE Transactions on Visualization and Computer Graphics, 2017.
  • Jan Bender, Dan Koschier, Tassilo Kugelstadt and Marcel Weiler. A Micropolar Material Model for Turbulent SPH Fluids. In Proceedings of ACM SIGGRAPH / EUROGRAPHICS Symposium on Computer Animation, 2017
  • Jan Bender, Dan Koschier, Tassilo Kugelstadt and Marcel Weiler. Turbulent Micropolar SPH Fluids with Foam. IEEE Transactions on Visualization and Computer Graphics 25(6), 2019
  • Jan Bender, Tassilo Kugelstadt, Marcel Weiler, Dan Koschier, "Volume Maps: An Implicit Boundary Representation for SPH", ACM SIGGRAPH Conference on Motion, Interaction and Games, 2019
  • Jan Bender, Tassilo Kugelstadt, Marcel Weiler, Dan Koschier, "Implicit Frictional Boundary Handling for SPH", IEEE Transactions on Visualization and Computer Graphics, 2020
  • Jan Bender, Matthias Müller, Miguel A. Otaduy, Matthias Teschner, and Miles Macklin. A survey on position-based simulation methods in computer graphics. Computer Graphics Forum, 33(6):228–251, 2014.
  • Jan Bender, Matthias Müller, and Miles Macklin. Position-based simulation methods in computer graphics. In EUROGRAPHICS 2015 Tutorials. Eurographics Association, 2015.
  • Christoph Gissler, Stefan Band, Andreas Peer, Markus Ihmsen and Matthias Teschner. Approximate Air-Fluid Interactions for SPH. In Proceedings of Virtual Reality Interactions and Physical Simulations, 2017
  • C. Gissler, A. Henne, S. Band, A. Peer and M. Teschner. An Implicit Compressible SPH Solver for Snow Simulation, ACM Transactions on Graphics 39(4), 2020.
  • Xiaowei He, Huamin Wang, Fengjun Zhang, Hongan Wang, Guoping Wang, and Kun Zhou. Robust simulation of sparsely sampled thin features in SPH-based free surface flows. ACM Trans. Graph., 34(1):7:1–7:9, December 2014.
  • Markus Ihmsen, Nadir Akinci, Gizem Akinci, Matthias Teschner. Unified spray, foam and air bubbles for particle-based fluids. The Visual Computer 28(6), 2012
  • Markus Ihmsen, Jens Cornelis, Barbara Solenthaler, Christopher Horvath, and Matthias Teschner. Implicit incompressible SPH. IEEE Transactions on Visualization and Computer Graphics, 20(3):426–435, March 2014.
  • Markus Ihmsen, Jens Orthmann, Barbara Solenthaler, Andreas Kolb, and Matthias Teschner. SPH Fluids in Computer Graphics. In Eurographics 2014 - State of the Art Reports. The Eurographics Association, 2014.
  • M. Jiang, Y. Zhou, R. Wang, R. Southern, J. J. Zhang. Blue noise sampling using an SPH-based method. ACM Transactions on Graphics, 2015
  • Dan Koschier and Jan Bender, "Density Maps for Improved SPH Boundary Handling", In Proceedings of ACM SIGGRAPH / EUROGRAPHICS Symposium on Computer Animation (SCA), 2017
  • Tassilo Kugelstadt, Jan Bender, José Antonio Fernández-Fernández, Stefan Rhys Jeske, Fabian Löschner, and Andreas Longva. Fast Corotated Elastic SPH Solids with Implicit Zero-Energy Mode Control. Proceedings of the ACM on Computer Graphics and Interactive Techniques, 2021
  • Miles Macklin and Matthias Müller. Position based fluids. ACM Trans. Graph., 32(4):104:1–104:12, July 2013.
  • Miles Macklin, Matthias Müller, Nuttapong Chentanez and Tae-Yong Kim. Unified Particle Physics for Real-Time Applications. ACM Trans. Graph., 33(4), 2014
  • J. J. Monaghan. Smoothed Particle Hydrodynamics. Annual Review of Astronomy and Astrophysics, 1992, 30, 543-574.
  • A. Peer, C. Gissler, S. Band, and M. Teschner. An Implicit SPH Formulation for Incompressible Linearly Elastic Solids. Computer Graphics Forum, 2017
  • Andreas Peer, Markus Ihmsen, Jens Cornelis, and Matthias Teschner. An Implicit Viscosity Formulation for SPH Fluids. ACM Trans. Graph., 34(4), 2015.
  • Andreas Peer and Matthias Teschner. Prescribed Velocity Gradients for Highly Viscous SPH Fluids with Vorticity Diffusion. IEEE Transactions on Visualization and Computer Graphics, 2016.
  • B. Solenthaler and R. Pajarola. Density Contrast SPH Interfaces. In Proceedings of ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 2008.
  • B. Solenthaler and R. Pajarola. Predictive-corrective incompressible SPH. ACM Trans. Graph., 28(3):40:1–40:6, July 2009.
  • Tetsuya Takahashi, Yoshinori Dobashi, Issei Fujishiro, Tomoyuki Nishita, and Ming C. Lin. Implicit Formulation for SPH-based Viscous Fluids. Computer Graphics Forum, 34, 2015.
  • Marcel Weiler, Dan Koschier and Jan Bender. Projective Fluids. Proceedings of the 9th International Conference on Motion in Games, ACM, 2016, 79-84
  • Marcel Weiler, Dan Koschier, Magnus Brand and Jan Bender. A Physically Consistent Implicit Viscosity Solver for SPH Fluids. Computer Graphics Forum (Eurographics), 37(2), 2018
  • F. Zorilla, M. Ritter, J. Sappl, W. Rauch, M. Harders. Accelerating Surface Tension Calculation in SPH via Particle Classification and Monte Carlo Integration. Computers 9, 23, 2020.

Other research projects using SPlisHSPlasH

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pySPlisHSPlasH-2.13.1-cp310-cp310-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

pySPlisHSPlasH-2.13.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

pySPlisHSPlasH-2.13.1-cp39-cp39-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

pySPlisHSPlasH-2.13.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pySPlisHSPlasH-2.13.1-cp38-cp38-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

pySPlisHSPlasH-2.13.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pySPlisHSPlasH-2.13.1-cp37-cp37m-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.7m Windows x86-64

pySPlisHSPlasH-2.13.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pySPlisHSPlasH-2.13.1-cp36-cp36m-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.6m Windows x86-64

pySPlisHSPlasH-2.13.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

File details

Details for the file pySPlisHSPlasH-2.13.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 dc79b018b5a433af67161160a32a12080def074534b214c18b0517e790433e9c
MD5 cffe55103444a089b3159edde14a91c8
BLAKE2b-256 f4727d42e33d66cb435c98d22b86dcf7e73fd9a2d6dde08f6204b591a3d9030d

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4239ef18b99033f6412787f30343f01eea60803218c8e6d91dd4a78e2474c919
MD5 c8ac8a5e0770341c99d8ea522172dbb5
BLAKE2b-256 807d621c3b22861ab55cab8247cd7a5b4f3cbabcb9fbdbd4363bf22a57772aa7

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6fb9929cc25fbe40c7ab92eb99c24f133e9038377221df76b4655c014489b16b
MD5 43958b2483361a97723738b11da8d244
BLAKE2b-256 e49d4a4af5143ed3a6ef2eb7d42ae5a92ca7fecb07c9429919b461e7e75e9292

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 85a06976f17b1e80f97453c3482023aa462ac923812179cc212482bfec549ca6
MD5 4d0d6c2aee039c41f49111287af02e09
BLAKE2b-256 477bcadb432ff1ab2737c18537fb254bc1c821409679919c24d37937aefaeed0

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 bfc6868d56dde16a8a4cb066b5e4e3a094b5018ef7b6bd401e3c70876711c5e4
MD5 9646cf4c08882f0cf1f484f9e14c0869
BLAKE2b-256 9063e97ec750380177ad03bdf3a0b247beec73a24b1b3bce78128d85e96360d1

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 87b579d187f799069728ffde9ca4439fb4fcc6f53579b34a08aea41c33b68080
MD5 2ef5b42b22441254b3991902442693a2
BLAKE2b-256 b80232cf41c580eff1117f4827e089e0605f239d3b153e7c3f80977b7bdc61a8

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 76013551ef3938026ce893d7b998ac0d14b53fa389ce245509a2464e81b019ee
MD5 e5af06cfbf8304bcf477fc2c5bac1e87
BLAKE2b-256 61eec3d6b04d1e2d8b721ed774984a3b6f2df2a29374b9430bf82d07df3ec00d

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0febd0ce14c13844d0be1aafee2161bec6ec575f56cf6c7b944778c5aae93374
MD5 4f37e33a1099fab358e83060bf2fcda3
BLAKE2b-256 ce8e84b7e7f41cf6bb60fbaecfddd63f28673452996a3d14ecc1deeb7add1c1d

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pySPlisHSPlasH-2.13.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 5404dbbd2754a2d403c30b11bf40bbbbe457196f8917f83ac45d0974a67dce02
MD5 d1ee9aeb03e49e4bb46b9714dd8fc487
BLAKE2b-256 419711753b4ab6f6d94ca7d1b32642e15981ed5a5882f52e4aa0e940f3b6fde9

See more details on using hashes here.

File details

Details for the file pySPlisHSPlasH-2.13.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pySPlisHSPlasH-2.13.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 adff4d37088a38aae30be1f6b6abe8dd57a6a8e08106cd1a3c764ee1d659b65e
MD5 70aa08a470b3440009ca3a8f007ff67d
BLAKE2b-256 3442ff2a100b90e476bc738f4fbd5aafa2660707d8e7fdc59b39b3acb9c76f03

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page