moving wall

Hello,

I’m quite new to lattice boltzmann and have some trouble to implement the He/Zou boundary condition for a moving wall. In my case there are two parallel walls of which one has a velocity in x-direction. Now I have somehow managed to implement He/Zou and the results are qualitativly right but 3 times too high. Following is the Fortran-Code for Zou/He, which I implemented between propagation and collision-step:

do x=1,nx
do z=1,nz
density_temp = ftemp(0,x,z) + ftemp(1,x,z) + ftemp(3,x,z) + 2.d0 *(ftemp(4,x,z) + ftemp(7,x,z) + ftemp(8,x,z))
f(2,x,z) = ftemp(4,x,z)
f(5,x,z) = ftemp(7,x,z) - 1.d0/2.d0 * (ftemp(1,x,z) - ftemp(3,x,z)) + 1.d0/2.d0 * u_wu_x * density_temp
f(6,x,z) = ftemp(8,x,z) + 1.d0/2.d0 * (ftemp(1,x,z) - ftemp(3,x,z)) - 1.d0/2.d0 * u_wu_x * density_temp
end do
end do

This code is just applied to the lower wall. I also have to mention, that the collision step is just applied to the fluid and not to the wall. I already tried to change that, but the results were worse.

I’m stuck now and appreciate every hint or help.
Thanks in advance.

Hello,

I checked your calculations and I think they are fine. Are you sure there is nothing wrong in other parts of your code? On the other hand, I I would also suggest to take a look at Succi’s version of the sliding wall BC (Succi, “The Lattice Boltzmann Equation for fluid dynamics and beyound”, page 87-88). Another one is the regularized velocity BC of Jonas (“Straight velocity boundaries in the lattice Boltzmann method”).

Most of these BCs are usually applied in the literature for the case when the imposed velocity is perpendicular to the wall. However, lid-driven cavity simulations exist which report reasonable results even with more “brute-force” approaches, so Zou/He should really work. At which quantities are you looking?

Hope it helps,
Dragos

Hello,
in the Zou-He boundary condition you HAVE TO do the collision after the boundary condition which is on the wall.

What is the velocity you apply on the wall? What is your relaxation time?

Hello,

thanks for your hints, but still I didn’t find the error.

The velocity parallel to the wall is 0.02 (in lattice Boltzmann dimensions), tau = 0,5361 and I perform at least 10000 timesteps. I refer to the velocity in LB-units because I implemented the unit transfer by Jonas Latt into my code. The physical velocity of the wall is 10 m/s and after the calculation the transformation back to physical results yields in 30 m/s along the wall. I have to say that the velocity profile is as one would expect and so I think I implemented it the right way, as you mentioned before the collision step.

I also checked the transformation back to physical after the calculation with other bounceback-conditions and I think they are ok. Before I switched to Zou/He I used the following code:

f(1,x,z) = ftemp(3,x,z) + 2.d0 * w1 * density * 3/(c2)* e(1,1) * u_wo_x
f(2,x,z) = ftemp(4,x,z)
f(3,x,z) = ftemp(1,x,z) + 2.d0 * w1 * density * 3/(c
2)* e(1,3) * u_wo_x
f(4,x,z) = ftemp(2,x,z)
f(5,x,z) = ftemp(7,x,z) + 2.d0 * w2 * density * 3/(c2)* e(1,5) * u_wo_x
f(6,x,z) = ftemp(8,x,z) + 2.d0 * w2 * density * 3/(c
2)* e(1,6) * u_wo_x
f(7,x,z) = ftemp(5,x,z) + 2.d0 * w2 * density * 3/(c2)* e(1,7) * u_wo_x
f(8,x,z) = ftemp(6,x,z) + 2.d0 * w2 * density * 3/(c
2)* e(1,8) * u_wo_x

With this bounceback-conditions and no othe changes in the code I got as result 10 m/s at the moved wall as I specified it in the beginning.
I would still appreciate any kinds of ideas.

Concerning the book of Succi I’ll have to get it and will see what he is doing…

Thanks a lot

I suppose, you know that the sound speed squared in lattice units is 1/3. Maybe this explains the factor of 3.

Although I don’t fully understand your code, I would say that the following line does not look very Zou/He-ish:

f(2,x,z) = ftemp(4,x,z)

Is this a left-over from the old bounce-back code?

To debug your program, I would suggest that you have a look at the Matlab sample codes, which also implement Zou/He boundaries. To avoid misinterpretations, note that the index numbering in these codes starts with 1 for the rest-particle-population, whereas in your code it starts off at 0.

Hmmmm…

Jonas is right. You have to “bounce-back” the non equilibrium part of the distribution function (i.e. f(2,x,y) = f(4,x,y)-feq(4,x,y)+feq(2,x,y))

I hope it will work now.

I think the formula is ok even if it also took me by surprise because in this case
\vec{e}_{2/4,x} \cdot \vec{u} =0 --> f_2^{eq} = f_4^{eq}.

P.S: The relevant pages (87-88) of the book by S. Succi are available for preview on Google Books:

http://books.google.com/books?id=OC0Sj_xgnhAC&printsec=frontcover&dq=sauro+succi#PPA87,M1

However, I must confess that I did not test this.

Hello again,

The Zou/He-boundary conditions were implemented the right way, but the other ones were wrong. I misunderstood the meaning of c in the paper I used. Now both bounce-back conditions have the same results. Unfortunately my unit-converter is not working porperly.

Jlatt, you are right, the Zou/He-condition is:
f2 = f4 + velocity_y*…
Since I’ll never move my wall in y-direction I just neglected that part.

Thanks for your help.

^^