An open API service indexing awesome lists of open source software.

https://github.com/juliankarrer/reyn

CUDA-based Implementation of Smoothed Particle Hydrodynamics for Fluid Simulation
https://github.com/juliankarrer/reyn

cuda fluid lagrangian simulation sph

Last synced: 7 months ago
JSON representation

CUDA-based Implementation of Smoothed Particle Hydrodynamics for Fluid Simulation

Awesome Lists containing this project

README

          

REYN - FLUID SIMULATION


A CUDA-based Implementation of Smoothed Particle Hydrodynamics for Fluid Simulation



## FEATURES
- Zero-Copy GUI thanks to CUDA <-> OpenGL buffer sharing, throttled to not impact simulation performance
- Interchangable kernel functions (Wendland C2, C6, Cubic B-Spline, Double Cosine, ...) with CRTP static polymorphism for maximum runtime performance and ergonomics of adding new functions
- GPU-friendly spatial acceleration datastructure for fixed radius neighbourhood queries with work-efficient construction and constant query time, optionally reordering particles for memory coherency
- Automatic testing of kernel functions and spatial acceleration datastructures using `doctest` and benchmarking using `nanobench`

## TODO
- [x] Test zero-copy OpenGL VBO to CUDA buffer interop
- [x] Add efficient visualization and GUI based on OpenGL interop, including ImGUI elements and single-batch billboard sphere rendering
- [x] Implement safer abstraction over device arrays (no manual `cudaMalloc` and `cudaFree`) that is interoperable `thrust` and OpenGL
- [x] Implement acceleration datastructure, e.g. [Hoetzlein, 2014] using efficient prefix scan
- [x] Add benchmarking for performance optimization
- [x] Reorder state according to space-filling curve to improve memory coherency
- [x] Colour particles according to some attribute like velocity
- [x] Use Structure of Arrays (AoS) layout for all particle attributes to improve coalescing
- [ ] Parameterize uniform grid with cell size different from search radius and benchmark for optimal grid size
- [ ] Add settings management with de-/serialization and expose solver and scene options to GUI
- [ ] Add scene management, sampling and de-/serialization
- [ ] Add boundary handling [Akinci et al. 2012]
- [ ] Add adaptive time step size calculation using efficient reductions
- [ ] Implement standard iterative Equation-of-State based solvers (splitting, PCISPH)
- [ ] Implement Jacobi-style incompressible solvers (IISPH, DFSPH, ...)
- [ ] Optimize kernel launch configurations
- [ ] Use type aliases for safety (e.g. separating vectors and positions) and flexibility (change float precision, smaller index types for smaller scenes etc.)