Skip to content
xorespespPublic

About

A simple 2D fluid simulator implemented in C.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Fluid.c

This is a simple 2D fluid simulator, implemented from scratch in C.
It simulates the Navier-Stokes equations in a *stable* way. [refs]
With this program, you can simulate fluid dynamics in real-time, based on the given viscosity and diffusion rate.


preview1
0% viscosity, 0% diffusion
preview2
70% viscosity, 0% diffusion
preview3
0% viscosity, 70% diffusion

Supported Platforms

  • Windows 10 x64, version 1607 or later

Program Usage

Action Description
Mouse left-click Add density to the fluid.
Mouse move Add force to the fluid in moving direction.
← key Decrease the diffusion rate of the fluid.
→ key Increase the diffusion rate of the fluid.
↑ key Increase the viscosity of the fluid.
↓ key Decrease the viscosity of the fluid.
F1 key Toggle render mode. (color/gray)
F12 key Toggle verbose mode.

References

About

A simple 2D fluid simulator implemented in C.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages