Skip to content

slehmann1/EulerianFluidSimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EulerianFluidSimulation

Overview

EulerianFluidSimulation is a Python-based numerical solver for simulating 2D incompressible and inviscid fluid flows. It uses an Eulerian grid-based approach to models fluid dynamics.


Example

Fluid Simulation Visualization


Methodology

This simulator solves 2D incompressible and inviscid flows.

  • Eulerian approach: the simulation uses a grid-based approach to modelling, as opposed to a particle based approach
  • Incompressibility: Incompressibility is enforced by modifying velocities to enforce 0 divergence per cell
  • Velocity Advection:
    • The semi-lagrangian method is used to advect velocity. This traces back in time to find source positions of fluid arriving at a cell within a given timestep
    • Velocities are interpolated (bilinear interpolation) to correctly apply velocities to fixed locations of cell boundaries.
  • Smoke Advection:
    • Smoke is advected in the same manner as velocity: the semi-lagrangian method
    • A smoke density value is stored at the centre of each cell

An excellent more detailed description of this approach is given here.


Dependencies

  1. Numpy
  2. Numba
  3. Pygame

Releases

No releases published

Packages

 
 
 

Contributors

Languages