-
Dependencies
- Rust nightly ( tested with Rust 1.8.0-nightly )
- clang or gcc
- OpenCL runtime
-
Building
make build
to build the project
-
Examples
make example
to build the examples
-
Benchmarks
make bench
to run benchmarks
glium
for realtime visualisationlodepng-rust
for generating density imagesscoped-threadpool
for scoped threadingrust-opencl
for OpenCL bindings
This Eulerian solver uses the Chorin projection method on a staggered grid.
Chorin projection decouples velocity and pressure in the momentum equation allowing them to be calculated separately. The advection step can be performed using the upwind scheme or the semi-lagrangian scheme. Multiple integrators and interpolators have been implemented with varying degrees of accuracy. The pressure solve step uses the simple jacobi relaxation linear solver. It has been implemented in Rust, C and OpenCL with varying degrees of optimisation.
A staggered grid is used to prevent checkerboarding when calculating the pressure gradient.
Density, pressure and marker-particle visualisation methods have been implemented using the glium and lodepng crates.
- Ties together all the algorithms required
- Contains the various fields associated with a fluid and the functions that manage the solver
- Upwind advection implementation
- Semi-Lagrangian advection implementation
- Linear interpolation
- Cubic interpolation
- Catmull-Rom interpolation
- Hermite interpolation
- Euler integrator
- Bogacki-Shampine integrator
- Runge-Kutta 4 integrator
- Rust, C, OpenCL implementations of Jacobi relaxation
- Density visualisation
- Inverse density visualisation
- Density visualisation with jet colourmap
- Pressure visualisation with jet colourmap
- Marker-particle visualisation