fluids v.3
A fast, GPU-based, smooth particle hydrodynamics (SPH) fluid simulator. Rama Hoetzlein (c) 2007-2025
Project Website: https://ramakarl.com/fluids3
Fluids v.3 was the first very fast, interactive >1 million particle, Smooth Particle Hydrodynamic simulator.
This repository contains the complete history of Fluids.
NEW (2025): The latest Fluids 5.0 has been published in Nov 2025!
The current version is even faster, uses the CUDA Driver API, can handle >4 million particles, uses full smart CPU/GPU pointers, buffer-based structure of arrays, integrated CPU/GPU switching, with cleaner, simplified code.
Date: 11/23/2025
Hardware: GeForce RTX 4090
# Particles: 4,000,000
(same hardware & num particles for all versions)
I recommend you build the latest Fluids v5.0.
Run CMake on the Fluids v5.0 folder.
The CUDA Toolchain must be setup correctly for your Graphics Cards model, CUDA Toolkit version and NVIDIA Driver.
Set the CUDA_ARCH_BIN and CUDA_ARCH_PTX cmake variables to match your hardware.
For example: GeForce RTX 5060, CUDA 13.0, NV Driver 581.80 => CUDA_ARCH_BIN=compute_120, CUDA_ARCH_PTX=sm_120
Use ChatGPT to help install the proper toolchain for your specific hardware, or if you don't know what I'm talking about.
Fluids 5.0
Fluids 4.0
Fluids 3.9
Fluids 3.2
Fluids 3.0
Fluids 2
Fluids 1
H Turn scene info on/off
N, M Change number of particles
[, ] Change example scene (loaded from scene.xml)
F, G Change algorithm (CPU, GPU, etc.)
J Change rendering mode (points, sprites, spheres)
C Adjust camera (using mouse)
L Adjust light (using mouse)
A,S,W,D Move camera target
1 Draw acceleration grid
2 Draw particle IDs (be sure # < 4096 first)
~ Start video capture to disk (tilde key)
-, + Change grid densityAll parameters are permitted in either Fluid or Scene sections.
…Feel free to contact me if you have any questions, comments or suggestions:
Rama Hoetzlein
Website: ramakarl.com
Email: [email protected]
MIT License
FLUIDS - SPH Fluid Simulator for CPU and GPU
Copyright (c) 2007-2023. Rama Hoetzlein
No open issues yet, or sync has not completed.