I have been trying to reproduce the second order convergence rate with the lattice spacing of a 2D poiseuille flow using BGK, velocity and pressure Zou-He BCs at inlet and outlet and mid-way bounce back at the walls.
Taking as a starting point the J.Latt’s code http://www.lbmethod.org/_media/numerics:cylinder.m, I have fixed tau=1, uMax= 0.1 and computed the norm of the difference of the solution with the analytical solution. The rate of convergence I compute is lower than 1st order.
If uMax is fixed to a lower value (smaller Ma), the error is lower, but still the convergence rate is lower than 1st order.
I would like to ask the community if there is anyone that has reproduced the 2nd order convergence of a 2D poiseuille flow using Zou-He BCs at the inlet and outlet and BB conditions at the walls and who is willing to give some tips on where I could have gone wrong.
Thank you in advance for all comments.
Two additional comments:
- a special tratment of the corner nodes could perhaps improve a bit the situation, but in the original article of Zou-He (Phys Fluids, 1997), p.1595, right column explicitly say that they do not specially treat them
- as Alex has pointed out in the http://www.lbmethod.org/forum/read.php?3,2124,2150#msg-2150 post, the effective height is somehow different from the computed one for a midway BB, but even though, the correction is quite small for tau=1 and decreasing rapidly by refining the lattice
first of all what you are doing is not really testing the rate of convergence of the error with respect to space discretization. To do so you should always simulate the same Re number. From what I understand you are keeping fixed the velocity uMax and the relaxation time tau. Therefore when increasing the number of nodes of your simulation you also increase the Reynolds number. The Re number fixed has to be kept fixed when testing the accuracy of your scheme.
A second remark now.
As you can read in J. Latt’s thesis you have three error sources in the LBM. One due to space discretization of the Boltzmann equationm E_x, one due to the time discretization error, E_t, and finally the compressibility error E_m. The total error has therefore to be evaluated in the following way
E = E_x+E_t+E_m.
The discretization is second order in space and time. Since you are considering a steady state simulation you will have E_t=0. SO you have to evaluate the E_m. The compressibility error scales like Ma^2=(u/c_s)^2 in the LBM. Since u~dt/dx you have that your overall error is given by
You are therefore left with different possibilities about your time discretization. Either it can scale like dx and you therefore have that E=O(dx^2)+O(1) and therefore the error will scale like dx^2 until some plateau is reached for a given dx and the error will not decrease anymore afterwards. The other possibility is to have dt~dx^2 and then you will indeed have
To enforce this condition what you basically have to do is to chose some reference resolution N0 and a reference velocity uMax0 and scale your actual uMax with respect to your actual resolution N
uMax = uMax0 * N0/N.
I hope it helps,
Thank you very much for the prompt answer. It does help a lot but I am a bit confised, so before I go on, could you please confirm that the equation u~dt/dx holds (as you have written) and not u~dx/dt?
Thank you for the help. Now reading J.Latt´s thesis things got much clearer.