Skip to content

shadercodes/a-toy-fluid-engine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myFluid

A repo that trys to reimplement Euler based fluid simluation

The project is based on Taichi, a programming language that embed both gpu and cpu parrellel computing.

Taichi Installation

python3 -m pip install taichi
python exp_my_fluid.py

Left: simulate adding dye in fluid, Right: velocity.

Implement reference: NVIDIA DEVELOP ZONE, taichi official example

Advection Scheme

change this line to

import config.stable_fluid_fixed as m_cfg

Here we try diffierent advection schemes:

implement reference: offcial tutorial

framework reference: Efficient and Conservative Fluids with Bidirectional Mapping

Semi-Lagragian

Left: rk = 1, Right: rk = 2.

Left: rk = 1, Right: rk = 2.

Solver Scheme

Above is all about advection-projection.

Both running in RK=2.

Left: Semi-lagrangion, Right: MacCormack

Projection:

Above results is all about jacobi iteration projection solver run in 30 iterations.

Ref: Cornell_class_slides

Both run in RK=2, with advection-projection scheme and 30 iterations.

Left: Semi-lagrangion, Right: MacCormack

Current problem:

  1. Have no idea whether it is implemented in the right way since the basic semi-lagrangian with RK 1 advection would bend too early 0.0

  1. The macCormack advection would cause

    [control_flow_graph.cpp:dead_store_elimination@464] Identical load elimination failed.

About

try to reimplement Euler based fluid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%