A Few More LBM Boundary Conditions Key paper
A Few More LBM Boundary Conditions
Key paper: • Zou, Q. and X. He, 1997, On pressure and velocity boundary conditions for the lattice Boltzmann BGK model, Phys. Fluids 9, 1591 -1598.
Choices • Specify density (i. e. , pressure via EOS) – Velocity computed – Dirichlet • Johann Peter Gustav Lejeune Dirichlet, • 13 February 1805 – 5 May 1859, German mathematician • Specify velocity – Density/pressure computed – Neumann • Carl Gottfried Neumann, • May 7, 1832 - March 27, 1925, German mathematician • Lots of temporal/spatial flexibility
D 2 Q 9 BCs • For example: Out In – f(4, 7, 8) = function of f(1, 2, 3, 5, 6) and BC type
Velocity/Flux BCs • Need to solve for r, f 4, f 7, f 8 • Need 4 equations • The macroscopic density formula is one equation:
Velocity/Flux BCs • The macroscopic velocity formula gives two equations: Components of ea are all unit vectors • x-direction: • y-direction: Assuming ux = 0
Velocity/Flux BCs • Finally, we assume bounceback of nonequilibrium part of f perpendicular to boundary for a fourth equation:
Velocity/Flux BCs • Two equations have the directional density unknowns f 4, f 7 and f 8 in common, so rewrite them with those variables on the left hand side:
Velocity/Flux BCs • Equating them gives: • Solving for r:
Velocity/Flux BCs • Solving the bounceback equation for f 4: • In detail, part of this is:
Velocity/Flux BCs • Solving …:
Velocity/Flux BCs • Solving …:
Velocity/Flux BCs • // Zou and He velocity BCs on north side. • for( i=0; i<ni; i++) • { • fi = ftemp[nj-1][i]; • rho 0 = ( fi[0] + fi[1] + fi[3] • + 2. *( fi[2] + fi[5] + fi[6])) / ( 1. + uy 0); • ru = rho 0*uy 0; • fi[4] = fi[2] - (2. /3. )*ru; • fi[7] = fi[5] - (1. /6. )*ru + (1. /2. )*( fi[1]-fi[3]); • fi[8] = fi[6] - (1. /6. )*ru + (1. /2. )*( fi[3]-fi[1]); • }
Pressure/Density Boundaries • Dirichlet boundary conditions constrain the pressure/density at the boundaries • Solution is closely related to that for velocity boundaries • A density r 0 is specified and velocity is computed • Specifying density is equivalent to specifying pressure since there is an equation of state (EOS) relating them directly – For single component D 2 Q 9 model, the relationship is simply P = RTr with RT = 1/3. – More complex EOS applies to single component multiphase models – We assume that velocity tangent to the boundary is zero and solve for the component of velocity normal to the boundary.
Pressure/Density Boundaries • Assume that velocity tangent to the boundary is zero and solve for the component of velocity normal to the boundary • Need to solve for v, f 4, f 7 and f 8
Pressure/Density Boundaries
Pressure/Density Boundaries
Pressure/Density Boundaries • // Zou and He pressure boundary on north side. • for( i=0; i<ni; i++) • { • fi = ftemp[nj-1][i]; • uy 0 = -1. + ( fi[0] + fi[1] + fi[3] • + 2. *( fi[2] + fi[5] + fi[6])) / rho 0; • ru = rho 0*uy 0; • fi[4] = fi[2] - (2. /3. )*ru; • fi[7] = fi[5] - (1. /6. )*ru + (1. /2. )*( fi[1]-fi[3]); • fi[8] = fi[6] - (1. /6. )*ru + (1. /2. )*( fi[3]-fi[1]); • }
Exercise • Create a new version of your code that includes constant pressure boundaries at x = 0 and x = Lx. • Plot the observations and expected Poiseuille velocity profile on the same graph
- Slides: 19