This page looks best with JavaScript enabled

SPH Fluid Simulation (v2)

 ·  ☕ 1 min read · 👀... views

Description

A basic implementation of SPH (Smoothed-Particle Hydrodynamics) solver with a dynamic boundary. In order to run in real time, accuracy has been heavily sacrificed for performance.

I also had another SPH simulation code which only deals with static boundary here.

Download

Magnum example page with more description
Code (github) from Magnum repository
Windows binary

WebGL Demo

Thanks Vladimír Vondruš for building the awesome WebGL application. This is part of Magnum graphics engine showcase. Note that this WebGL demo requires WebAssembly-capable browser with WebGL enabled.

Due to restriction of WebGL, this demo only runs on a single thread. The desktop app runs at much higher speed with multi-threading enabled.

Usage:
* Mouse drag rotates the camera
* Shift + mouse drag pans the camera
* Mouse wheel zooms in/out
* H shows/hides the overlaid menu
* R resets the simulation
* Space pauses/resumes the simulation

Initialization...

A screenshot of the program
A screenshot of the program
A screenshot of the program

Share on

Nghia Truong
WRITTEN BY
Nghia Truong
(Trương Trọng Nghĩa)


What's on this Page