An implementation of smoothed particle hydrodynamics using OpenCL.
This code is under development and may be subject to heavy revision at any time.
The nearest-neighbour search (NNS) algorithm is derived from the method used for Fluids v3. by Rama Hoetzlein.
-
Clone this repository
git clone https://github.com/tauroid/opencl-sph
-
Edit the first line of makefile to point to your MATLAB installation
-
make
You will need OpenCL headers and libraries.
This has only been tested on linux, with gcc.
The current interface is through MATLAB - see go.m or go_fluid.m.
These implement an elastic solid based on Becker et al. 2009 and a simple pressure gradient fluid respectively.
Using particle configurations other than a cube at the moment requires manual specification in the position
field of psdata.