Smoothed particle hydrodynamics
Updated 23 Jul 2021
A MATLAB implementation of the smoothed particle hydrodynamics based on the Philip Mocz's paper, in both CPU and GPU.
By using a GPU, we can speed up the computation to about 10 times. Here, I am using the NVidia Tesla K20m. It is probably the cheapest Tesla card in second-hand markets. ;-) A normal GPU also works.
Please read Philip Mocz's paper here:
Although the paper stated MATLAB implementation, I can only find the Python implementation in his Github repository:
These are some examples in this repository:
SPHDemo2D_Ex2_NeighbourSearch_CPU.m uses a very simple neighbour search mechanism to reduce the execution time. We first sort all nodes based on their distances to the origin. Hence, the adjacent nodes are neighbours.
Auralius Manurung (2021). Smoothed particle hydrodynamics (https://github.com/auralius/smoothed-particle-hydrodynamics/releases/tag/1.0), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!