/wlb

A code for simulating fluid dynamics using the Lattice-Boltzmann method.

Primary LanguageC++

A Lattice-Boltzmann code for solving coupled equations in electrohydrodynamics. 
Three collision operators are implemented for the (incompressible) Navier-Stokes, 
Nernst-Planck (advection-diffusion) and Poission's equation for electrostatics 
respectively. Various implementations of Dirichlet/Neumann boundary conditions 
are also available. The code deals (so far) only with 2D systems.

This code is part of a  master thesis project carried out at Chalmers University, 
Gothenburg. The accompanying report is available upon request (email me).
 
Example of computed (steady state) velocity field in some geometry 
(no electrical effects here):
https://raw.github.com/weierstrass/wlb/master/example.png

Another example showing a Karman vortex street:
http://www.youtube.com/watch?v=azrFJ8qbrKM

Technical overview:
 Collision operators:
   BGK:
    + Navier-Stokes
     - Shan-Chen force implementation
    + Advection-diffusion
    + Poisson's equation
 Boundary conditions:
  + Bounce back (Full way implementation)
  + Slip (Mirror reflection)
  + Periodic
  + He/Zou Constant density
  + He/Zou Constant velocity
 Boundary conditions (Not yet fully implemented)
  + LPM Neumann (From Wang paper) [NYFI]
  + He/Zou Constant velocity [NYFI]
  + BFL (Bouzidi's rule) [NYFI]

Examples:
 + Poiseuille flow
  - Driven by pressure grad.
  - Constant velocity driven
  - Force driven
 + Taylor-Green Vortex
 + Cylindrical obstacle
  - Bounce back
  - BFL 
 + 1D Poison-Boltzmann vs. Nernst-Planck
 + 2D Helmholtz equation (Wang+Chai)
 + 1D Advection-diffusion of point mass

Compile library:
 1. $ make
 
Compile and run example file:
 1. $ make (link to library libwlb.so)
 2. ./a.out > output.txt
 

Further notes:
 Old dirichlet boudary conditions for the Poisson solver are not accurate and will be removed soon.