About
This is a simulation that compares the performance of CPU and GPU implementations for a shower system. Particles full under gravity, decrease in temperature over time, and merge when colliding affecting mass that can be seen visually through display options. The CPU implementation is made in Rust while the GPU implementation is in C++/CUDA. Visualisation for both projects is done with OpenGL, and the source codes can be viewed from the links above.
Design Requirements
- Size requirements
- Wall modes (sticky, reflective, toroidal)
- Thermal / mass modes
- Render stride
- FPS and floor hit counter
CPU Implementation
CPU implementation of the particle simulation was done in Rust. Simulation multi-threaded with collisions handled by mutex-protected shards.
| Particle Count | Frames Per Second (FPS) |
|---|---|
| 1 | 9 |
| 2 | 8 |
| 3 | 7 |
| 4 | 6 |
| 5 | 5 |
GPU Implementation
GPU implementation of the particle simulation was done in C++ and CUDA. Simulation parallelised with collisions handled by GPU kernels.
| Particle Count | Frames Per Second (FPS) |
|---|---|
| 1 | 9 |
| 2 | 8 |
| 3 | 7 |
| 4 | 6 |
| 5 | 5 |
Simulation Visualisation
Thermal Mode
Temperature of particles
Mass Mode
Combined mass of merged particles
Confetti Mode
Just for fun
Wall Modes
Sticky, reflective, toroidal