-
Adam Nyberg authoredAdam Nyberg authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README.md 1.60 KiB
TSBK03 project
This is a SPH fluid simulation as part of a university projeect course.
Thee fluid simulation is parallelized on the GPU using CUDA and visualize using openGl.
SPH
Parameters
The following parameters control the fluid behavior:
-
Particle Mass:
PARTICLE_MASS
-
Rest Density:
REST_DENSITY
-
Gas Constant:
h_GAS_CONSTANT
-
Viscosity:
h_VISCOSITY
-
Smoothing Radius:
h_H
These values are adjustable within the code and can be fine-tuned based on desired fluid dynamics.
Compile & Run
Dependencies
- CUDA Toolkit – for CUDA language support, GPU parallelization, and CUDA/OpenGL interoperability
- GLEW – for OpenGL Extension Wrangler Library
- GLFW
- Thrust – for high-performance parallel algorithms (comes with the CUDA Toolkit)
Build Instructions for Ubuntu
Dependencies
Install all required dependencies using the following command:
sudo apt update && sudo apt install -y build-essential cmake libglew-dev libglfw3-dev mesa-common-dev libx11-dev
- CUDA Toolkit: Download and install NVIDIA CUDA Toolkit.
Building the Project
-
Clone the repository and navigate to the project directory:
git clone https://github.com/your_username/your_project.git cd your_project
-
Create a build directory:
mkdir build cd build
-
Configure and build the project:
cmake .. make
Running the Application
Run the application from the build directory:
./fluidSimulator