Fluid Particle Simulator
A command-line fluid particle simulation system that models the behavior of fluid dynamics using particle-based algorithms
University · Archived · –
Simulation · Command Line · C++
UC3M Advanced Computer Architecture.
Fluid flows simulation can be achieved by multiple methods. One of them is Smoothed Particle Hydrodynamics (SPH). SPH solves the Navier-Stokes equations at time steps. A fluid is modeled as a collection of particles. Those particles have interactions impacting their acceleration, position and velocity. Only particles at short distance have real interaction. To speedup simulation time, long distance interactions are discarded. To achieve this, the 3D space is divided in a grid of blocks and only particles in blocks in the nearby are considered. Simulation incldes the following steps:
Reading initial state of the simulation.
Simulation of particles for each time step or iteration:
Repositioning of particles in the grid.
Computing forces and accelerations for each particle.
Processing particle collisions with boundaries.
Particles movement.
Reprocessing box boundaries interactions.
Writing final state of the simulation.