All Projects → seanlth → Fluid-Solver

seanlth / Fluid-Solver

Licence: other
Rust based marker and cell fluid solver

Programming Languages

rust
11053 projects
c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Fluid-Solver

Webgl Fluid Simulation
Play with fluids in your browser (works even on mobile)
Stars: ✭ 11,621 (+55238.1%)
Mutual labels:  simulation, navier-stokes
Fluid Simulation
Self advection, external force and pressure solve to a velocity field represented by a MaC grid.
Stars: ✭ 107 (+409.52%)
Mutual labels:  navier-stokes, fluid-solver
fluid-simulator
Real-time 2D fluid simulator with lots of visualization options.
Stars: ✭ 24 (+14.29%)
Mutual labels:  simulation, navier-stokes
bht-ams-playerstage
Player/Stage SLAM
Stars: ✭ 35 (+66.67%)
Mutual labels:  simulation
DeepLocNet
WiFi based Radio-Inertial Localization
Stars: ✭ 25 (+19.05%)
Mutual labels:  simulation
TaichiGAME
GPU Accelerated Motion Engine based on Taichi Lang.
Stars: ✭ 35 (+66.67%)
Mutual labels:  simulation
differential-growth
adrianton3.github.io/differential-growth/
Stars: ✭ 27 (+28.57%)
Mutual labels:  simulation
Fat-Clouds
GPU Fluid Simulation with Volumetric Rendering
Stars: ✭ 81 (+285.71%)
Mutual labels:  navier-stokes
Omega2D
Two-dimensional flow solver with GUI using vortex particle and boundary element methods
Stars: ✭ 17 (-19.05%)
Mutual labels:  simulation
toy code
No description or website provided.
Stars: ✭ 78 (+271.43%)
Mutual labels:  simulation
virl2-client
Client library for the Cisco VIRL 2 Network Simulation Platform
Stars: ✭ 39 (+85.71%)
Mutual labels:  simulation
VENTOS Public
VEhicular NeTwork Open Simulator (VENTOS)
Stars: ✭ 46 (+119.05%)
Mutual labels:  simulation
HSTPNSim
Using for petri nets simulations
Stars: ✭ 37 (+76.19%)
Mutual labels:  simulation
MoveSim
Codes for paper in KDD 2020 (AI for COVID-19): Learning to Simulate Human Mobility
Stars: ✭ 16 (-23.81%)
Mutual labels:  simulation
nuplan-devkit
The devkit of the nuPlan dataset.
Stars: ✭ 107 (+409.52%)
Mutual labels:  simulation
shorelark
Simulation of life & evolution
Stars: ✭ 109 (+419.05%)
Mutual labels:  simulation
NDCell
A fast, flexible, and feature-rich interactive multidimensional cellular automaton simulator written in Rust
Stars: ✭ 20 (-4.76%)
Mutual labels:  simulation
MD-11
A high-quality McDonnell Douglas MD-11 simulation for the open source simulator, FlightGear
Stars: ✭ 21 (+0%)
Mutual labels:  simulation
hoomd-examples
HOOMD-blue example scripts.
Stars: ✭ 15 (-28.57%)
Mutual labels:  simulation
ss3sim
An R package for stock-assessment simulation with Stock Synthesis
Stars: ✭ 34 (+61.9%)
Mutual labels:  simulation

Staggered-Grid Fluid Solver in Rust

screenshot

Building source

  1. Dependencies

    • Rust nightly ( tested with Rust 1.8.0-nightly )
    • clang or gcc
    • OpenCL runtime
  2. Building

    • make build to build the project
  3. Examples

    • make example to build the examples
  4. Benchmarks

    • make bench to run benchmarks

Crates

  • glium for realtime visualisation
  • lodepng-rust for generating density images
  • scoped-threadpool for scoped threading
  • rust-opencl for OpenCL bindings

Project Overview

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.

Project layout

fluid_solver.rs

  • Ties together all the algorithms required
  • Contains the various fields associated with a fluid and the functions that manage the solver

advection.rs

  • Upwind advection implementation
  • Semi-Lagrangian advection implementation

interpolation.rs

  • Linear interpolation
  • Cubic interpolation
  • Catmull-Rom interpolation
  • Hermite interpolation

integrators.rs

  • Euler integrator
  • Bogacki-Shampine integrator
  • Runge-Kutta 4 integrator

linear_solvers.rs

  • Rust, C, OpenCL implementations of Jacobi relaxation

visualiser.rs

  • Density visualisation
  • Inverse density visualisation
  • Density visualisation with jet colourmap
  • Pressure visualisation with jet colourmap
  • Marker-particle visualisation
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].