flow2d_rs 0.1.0

A computational fluid dynamics (CFD) library
Documentation
  • Coverage
  • 0%
    0 out of 66 items documented0 out of 42 items with examples
  • Size
  • Source code size: 147.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.26 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 22s Average build duration of successful builds.
  • all releases: 22s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • khanhn201/flow2d-rs
    11 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 1n0r1

flow2d-rs

Computational fluid dynamics library written in Rust

https://github.com/1n0r1/flow2d-rs/assets/80285371/36516766-5e4f-436e-8b6b-90dad9e28668

Backward facing step

Cylinder cross flow

Lid-driven cavity

Features

  • 2D viscous incompressible Newtonian fluid flow
  • Solve Navier-Stokes equations using Euler's Method on staggered grid
  • Solve Poisson equation with Successive Over-relaxation method
  • Calculate and visualize pressure, speed and stream function
  • Different types of boundary conditions:
    • Moving no-slip boundary condition
    • Free slip boundary condition
    • Inflow and outflow condition
  • Planned features:
    • Contour plot for stream function
    • Free boundary value simulation
    • HDF5 data export
    • Use other method to solve Poisson equation (possibly Multigrid)
    • Optimize to run on GPU
    • Energy/Heat flow simulation
    • Extension to 3D
  • The theory and algorithm can be found in Numerical simulation in fluid dynamics: a practical introduction[1]

Quick start

  git clone https://github.com/1n0r1/flow2d-rs.git
  cd flow2d-rs
  cargo run --example gui

Refer to ./src/presets.rs for setting up other simulations.

Dependencies

References

[1] Michael Griebel, Thomas Dornseifer, and Tilman Neunhoeffer. 1998. Numerical simulation in fluid dynamics: a practical introduction. SIAM