Skip to content

SPH Fluid Simulation - Semester Project for Physically Based Simulation Class 2015 ETHZ

License

Notifications You must be signed in to change notification settings

westlicht/pbsproject

Repository files navigation

SPH Fluid Simulation

Introduction

This code was written for the semester project of the Physically Based Simulation course in 2015 at ETHZ. The goal was to implement a basic SPH fluid simulator in C++11. Ideas for the implementation are taken from the following papers:

Features

The following features have been implemented:

  • Interactive GUI with basic OpenGL visualization
  • JSON based scene description
  • Wavefront OBJ support
  • Index-sorted uniform grid for neighbour search
  • WCSPH [1] and PCISPH [2] solvers
  • PCISPH with adaptive time-stepping [3]
  • Boundaries using boundary particles [3], [4]
    • Create boundary particles for boxes, spheres and arbitrary meshes
  • Surface tension forces [5]
  • Fluid mesh generation using marching cubes
    • Isotropic kernel
    • Anisotropic kernel (only works partially yet) [6]
  • Cache system to cache particles and meshes
  • Render application using either OpenGL visualization or SmallLuxGPU4

Results

Tsunami Demo

a few other videos are here:

Installation

The code was tested only on OSX and Linux, but should be easy to get to work on Windows as well. To compile the project on OSX/Linux use the following procedure:

git clone --recursive https://github.com/westlicht/pbsproject.git
cd pbsproject
mkdir build
cd build
cmake ..
make -j8

Now you can start the viewer using:

./viewer ../scenes/bowl.json

Third Party Code

Part of the framework was derived from the Nori codebase written by Wenzel Jakob. In addition, the following libraries have been used:

About

SPH Fluid Simulation - Semester Project for Physically Based Simulation Class 2015 ETHZ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published