Flow between two stationary flat plates


I’m a newbie and this is my first post.

I’m trying to learn OpenLB by simulating a very simple flow between two flat plates. In the dimensionless system, my flat plates are 4 units long and 1 unit apart. I have chosen a Reynold’s number of 10 (dimensionless) and hence, my relaxation time, tau, is 0.8 (dimensionless). Also, I have decided to choose dx = 0.01 units (in the dimensionless system) and dt = 0.0001 units (in the dimensionless system), and the velocity in lattice units is uMax = 0.01 (in the dimensionless system). I understand that this is not the common approach, but I hope there’s nothing wrong in doing this.

My code is pretty small, so I take the liberty of posting it here. This is the part apart from all the standard declarations.

#define F(i,j,n) for(int i = 0; i < j; i++)
T rho = 1;
  T u[2] = {0,0};
  F(i,0,N) F(j,0,M) lattice.get(i,j).iniEquilibrium(rho,u);
  u[0] = uMax;

  F(k,0,100) {
    F(j,0,M) lattice.get(0,j).defineU(u);

Since my time increment is 0.0001 units and I iterate 100 times, I expect that the fluid should have moved a distance of 0.0001 x 100 x uMax = 0.0001 units. Hence, when I generate the velocity image, I expect to see an almost entirely blue rectangle (since the velocity is everywhere zero). But what I see is that the fluid has penetrated quite a distance into the plates.

It does not make any sense to me and I do not know what the problem is. Please help me understand what I’m doing wrong.


A few comments:

  • The “dimensionless relaxation time” is probably not the quantity you want to use inside the simulation. The parameter tau in the OpenLB algorithms is related to the viscosity, as measured in lattice units.
  • Reinitializing boundary nodes at their equilibrium value around a fixed velocity at every time step is a highly inaccurate way to implement a boundary condition. For better accuracy, you should use one of the standard boundary conditions implemented in OpenLB (see examples).
  • Although I am not sure, I would think that the expression “0.0001 x 100 x uMax = 0.0001” mixes two systems of units. You probably want to either use only variables from the dimensionless system, or only variables from lattice units in order to understand how far the fluid travels in either of the two systems.
  • The velocity u tells you how fast the fluid flows, physically speaking. It does not tell you how fast the simulation relaxes from a non-physical state (div(u) very different from 0) to the expected stationary state. The two quantities are certainly related (if you increase u, the simulation converges faster), but I wouldn’t think that a quantitative prediction can be made without careful considerations.