Lattice Boltzmann Units

I am glad I found this forum because I have a simple question about units. I have finished writing a 2-D code, and I benchmarked it against Couette, Poiseuille, Womersley, etc. flow. Also, I made it nonNewtonian based upon the power law. In the code, it is easy to arbitrarily assign a value to the kinematic viscosity, say, 0.08. However, I am now wanted to model a particular fluid. For a simple example, take a fluid with a viscosity of 0.01 cm^2/s. How do I convert this to lattice units? Take a simple channel in which there are 100 nodes in y direction and a real height of 20 cm. This means delta y is .2 cm in real units. For simplicity, assume Cs is 30000 cm/s, then delta time is 0.2/30000 = 0.0000066667 . If I now convert the viscosity to lattice units as 0.01/(deltay*deltay)*deltatime, I get a really small value for viscosity. In one place in literature, I saw the viscosity input as cP (centipoise). How do I implement the viscosity? Thanks very much!


Hi and welcome on the forum.

In fact as you mentioned you already have the space discretization which is simply dx=L_{Phys}/L_{LB}. Then you also have the real kinematic viscosity. The only thing you are still missing is the discrete time step. You use the sound speed to recover it. The problem is that you get a small viscosity (and therefore a relaxation time very close to the stability limit of the LBM), but you also get a small characteristic velocity (u=dt/dx) in LB units. Another way to transform your units is to realize that the only thing that matters when comparing your simulation with real life data, is the Reynolds number (Re=u*L/nu). It may be easier to work with this way of doing the unit transformation. Another way would be instead of doing the transformation using the speed of sound of the lattice, would be to fix a characteristic velocity for your fluid (u=0.01 typically, which is OK for the small Mach number limit) and then adjust the relaxation time to match the correct viscosity.

Another way to transform your units would be to do simply chose a relaxation time tau and then simply adjust dt in order to match the physical kinematic viscosity :


But when doing so you should be aware of the fact that you may be in trouble with respect to the Mach number (Ma=u/c_s<<1 for incompressible flows).

The unit transformation is very tricky in general in lattice Boltzmann. The procedure that is usually followed is to use non-dimensional formulations of your equations in order to do the unit transformation. I hope I answered your question…

Hi Malaspin,

Thanks for your very informative post. I did not understand the last method you mentioned regarding adjusting the time, dt. Isn’t the dt directly linked to dx and the sound speed? The equation is dt=dx/Cs. If dt changes, wouldn’t Cs have to change, and hence, be incorrect?


I thought it might be easier if I stated exactly what I am trying to accomplish in my model. I have modeled a 2-D channel for a nonNewtonian (shear thinning) fluid. I have a grid of 32x32 and the real height of the channel is 1 cm. The pressure gradient in the flow is known. Therefore,

delx=1/32= .03125 cm;
deltime= delx/(30000)*sqrt(3) = .000001804 s;

The viscosity of the fluid is initially 0.04 cm^2/s in real units
The viscosity converted to lattice units is
nu=0.04/(.03125*.03125)*.000001804 = 0.00007389;

To now calculate Tau,

Tau = 3*.00007389+.5 = .50022167;

It is now obvious that the model may go unstable since Tau -> .5

In my model, I don’t know the reynolds number, so I can’t get the viscosity using that equation. Yet, my model is unstable if I do it the way I listed above. Any ideas on how to specifically address the viscosity? Thanks.


I think that you should not use the speed of sound to convert from physical to lattice units.

There are two independent quantities that you can chose freely to travel from physical world to lattice world. A natural choice is the dx (which is just L_{Phys}/L_{LB}) then you can chose, dt, nu_{LB}, u_{LB},… Or any quantity where dt is present. One possible choice to stay in the incompressible regime would be to chose u_{LB}=dt/dx=0.01. Therefore dt=0.0003125. Then you will have nu=0.04=nu_{LB}dt/(dxdx)=nu_{LB}0.32=0.11(tau-0.5)=>tau=0.86. Then I think you are in business (the numbers are rounded so be careful and redo the computations).

To understand why this two ways of doing things is equivalent becomes clearer when you see things from the point of view of non-dimensional numbers. In fact the only parameter that enters the NS equations is Re. In Re enter 2 independent quantities (for example dx and dt but you also have dx and nu or any other combination). Then as long as the two requirements for the recovery of the incompressible NS equations are met (Ma<<1, Kn<<1) you can chose any values you want from your two independent quantities and the physical at the end will be equivalent.

I hope it became clearer now… Or maybe Jonas will give a better answer, I think I cannot explain things better.


I understand now. Thanks very much!


I have very simple question. Would you please inform me, If I use all real units but in Lattice Boltzmann method, then this model is work properly or not?

Sorry but I do not understand your question…

In LBM code, If I donot convert physical units to LB units.i.e directly use all physical units, then this method work properly or not.
Thank you very much.


You can do that.

But then you have to keep all the delta_x and delta_t (where delta_x and delta_t are space discretization and discrete time step). You cannot say anymore that you have delta_x=delta_t=1.

Usually it is easier to do the conversions. It is also more efficient.


I have a question about convert pressure from physical to lattice unite.
I want to solve a problem that inlet pressure is 3 bar and outlet pressure is 1 bar.
how do I convert this to lattice unite?

It depends on how you define your lattice units. Let’s assume that you have defined the discrete length dx and time dt of your lattice with rererence to SI units (i.e., if you need 10 lattice sites to represent 1 meter and 10 iteration steps to represent 1 second, then you have dx=0.1m and dt=0.1s). Further, let’s take the case of an incompressible fluid, in which you assume that density is unity, because it doesn’t matter. In that case, the dimension of the pressure is Length^2/Time^2.

So here’s what to do. Convert your pressure to SI, which is Pascal, if I remember right, and call it P. Then the relation between P and the lattice pressure p is P = dx^2/dt^2 p. And the density on the lattice is computed from p=c_s^2 rho.

Hi jlatt
thanks for your post.
Why the relation between P and the lattice pressure p is “P = dx^2/dt^2 p” ?

I am unsure which part of my explanation you don’t understand. To understand how to convert between physical units and lattice units in general, you should glance into the following document:

How to chose lattice units in a LB simulation

Here’s why the units of the pressure are length^2/time^2:

[pressure] = [force] / [surface] = [mass]*[acceleration] / length^2 = ([density] * length^3) * (length / time^2) / length^2 = [density] * length^2 / time^2

Setting [density]=1 yields the expected result.

very thanks for your help

JLatt writes P = dx^2/dt^2 p. Is it P or (P/rho). I guess it should be (P/rho) = dx^2/dt^2 p or am I wrong?

Hi all,

I am also figuring out unit conversions in lattice Boltzmann.

Is it possible to define dx and dt with reference to other units or scales, such as time* = (time x thermal diffusivity) / (physical length)^2? Please advice on how I can start implement it?


What is the range of the value that tau should have for velocity relaxation and what should be the range for temperature relaxation factor in case of differently heated natural cavity ?