A simulation of force driven vortex shedding at a Reynolds number of 140 past a square cylinder based on the lattice Boltzmann Method. The simulation was performed using code written in C. Simulation results were visualized in python.
The kinematic viscosity 0.01 was set at 0.01, the force to 1e-5, lattice constant dx to 1.0 and timestepsize of 1.0. Consequently the relaxation time tau was equal to 0.53 (note that due to low value of relaxation time accuracy may be affected). The grid resolution was (41 X 1001). The sides of the square cylinder were equal to 20 lattice units.
Periodic boundary conditions were applied for in and outlet boundaries and the free-slip condition was applied for upper and lower channel walls.
The color indicates the magnitude of vorticity, scaled logarithmically as 100log(1 + f) with f = |curl V|, where f is the magnitude of vorticity and V the local fluid velocity. The magnitude of the local fluid velocity |V| was normalized to unit length for visualization.
The code can be found at:
[ Ссылка ]
Ещё видео!