I was wondering if it would be possible to make a sticky post for a units example. It seems
that units can be frustrating to figure out for people new to LBM. I did an example below. I had one
question about the pressure conversion and multiplying by rho.

Units example of LBM

Have a 2-D channel flow that is 4 cm long and 1 cm wide

I like the idea of producing a show-case example for unit conversion. There are two points that are not clear to me in your post though.

You define the discrete space and time steps in such a way that they carry physical units: [dx] = cm and [dt] = s. On this assumption, a dimensional analysis of your equation which relates nu_{phys} to nu_{LB} is erroneous. Shouldnâ€™t this formula be as follows, in order to get the right units:

I am not sure which lattice Boltzmann model you are referring to. If it is BGK, then pressure and density are not independent parameters. They are related through the law of an ideal gas: p = c_s^2 rho. I have the feeling that most people who use BGK use it to simulate an incompressible fluid. In that case, the physical value of the density rho is irrelevant (although variations of rho are still relevant in simulation, as they are proportional to pressure variations). Even if you do use BGK to simulate a compressible fluid (in which case you should be aware of the many limitations, such as being constraint to a low Mach-number regime, impossibility to adjust the speed of sound, and impossibility to adjust the bulk viscosity), I am not sure if it is a good idea to adapt the LB density as a function of the physical density. In practice, everybody I know of uses a density value close to 1, and you actually run into numerical instabilities and inaccuracies when you differ too much from this value.

When you implement a boundary condition for the pressure, the translation from physical units to lattice Boltzmann units should, according to me, be as follows:

just wondering if this is really a good idea, setting tau to an arbitrary value. shouldnâ€™t it be the other way round, choose a value for delta_t, and then compute tau?

Hello everybody,
Would you please inform me, If I want to put any constant value (e.g. Boltzman constant Kb=1.38065 J/K or Gas constant R=8.314511 J/mol/K) then how can I put it. Can I just put it directly or need to convert it to LB ? With all the best

Hi,
of course you need to convert them into LB units since they have real world units. The non dimensional numbers are the only quantities you do not need to convert (it sounds quite trivial because they have no unitsâ€¦).

A potentially useful reference here might be Sukop and Thorne LB Introductory textbook, pages 56-57 on gravity-forced 2D poiseuille channel flow. This includes:

(1) A slightly reversed case to the original question: how big does the channel need to be (lattice units) in order for the flow to give the desired Re number. In this case, a target value of tau = 1 is used.

(2) How to incorporate gravity by converting from SI to lattive units: ie. have to take 9.8 m/s^2 and find its value in units of (lattice units) / (timestep)^2.

Hi malaspin,
Would you please explain how can I convert gas constant R=8.314511 J/mol/K, if I know the lb units of length, time and mass?( J=m^2*kg/s^2). What should I do about Temperature unit(K)?
Yours Truly
Mmatadu

Hi,
it depends a bit of the kind of simulation you are performing.

Usually you will convert from lb to real world units using non dimensional numbers like Reyolds, Rayleigh, â€¦

For the temperature you can use the Rayleigh number to transform your quantities between the LB and physical units. You can find details in another post by tovarish here . I hope you can get the information you want from there. If not maybe you should tell me with more details what is your physical problem.

is the problem you are trying to resolve isothermal? If the answer is yes, you wont find your answers in the post Orestis told you about.
Is your problem thermal dependent and it is such that you can define a dimensional number called Rayleigh number for it? well â€¦ then the post could be useful. In fact the Rayleigh number depend on the gradient of the temperature.

Is your problem the Couette flow with energy dissipation due to the viscous forces? then still look at the postâ€¦ we refer to a paper that could help.

By the way â€¦
The Boltzmannâ€™s constant should be defined for a reference temperatureâ€¦ no? Iâ€™m not sure but â€¦ then it would a constant that you could get rid off in LB unitsâ€¦ of course you should remember about its value when you go back to the â€śrealâ€ť world. Orestis? am I writing bullshit as usual?

or, as Orestis said, you could look for an interesting dimensionless number where R appears â€¦

really â€¦ could you please post your problem or â€¦the paper that you are looking at? Iâ€™m interested in it. To pass from real units to LB units is something that it has always been super tricky for me.
Do you find R when you define the internal energy of your system (which should depend on the temperature then)?

Hi,
in fact if you are using the standard LBGK model then the model is â€śa-thermalâ€ť, in the sense that you cannot adjust the temperature. The way to convert between temperature and lattice units is through the speed of sound and the ideal gas law.

You remember that p=c_s^2rho, and p=rhokT, then c_s^2=kT, where k is the Boltzmann constant.

I hope that if you are in one the cases mentioned by Tovarish or me.

If not just post your problem and try to help you. Btw you did not say so much bullshit ;p

Hi All,
I have a simple problem, just like a channel flow(say L=8mm, H=3mm)in which Lower plate is heated(300 K) and upper plate is maintained at a constant temperatrure(273K), however both plates are fixed .Incoming fluid (say water) velocity is controlled by Reynolds number . As a channel flow, velocity is important but most of Authors suggest me to use Rayleigh number. But we know ,in Rayleigh-Benard Convection, velocity is taken to be zero and Boussinesq approximations are used. So what should I do?
All kind of suggestions are most welcome.
Yours Truly
Sohag

As there have been many discussions around the choice of units in LB simulations, I have tried to summarize the key ideas in a pdf document. You can retrieve it from the new â€śLB Howtosâ€ť section on lbmethod.org:

The document contains also a section on thermal fluids with Boussinesq approximation. Please let me know if this answers your question. Of course, I welcome any comments or hints on possible mistakes in the document.

This question is about units on the Matlab Lattice Boltzmann Coding:

I am trying to figure out the physical interpretation of the values for uMax, as well as the grid spacing for the Matlab code in â€ścylinder.mâ€ť however the author has failed to document/comment on what the units, is the uMax = 0.02 to mean 0.02 meters/sec?

Note: I have downloaded the other matlab m-files found on this site and none of them document the units.

Hi,
all the values in the m-files are in LB units. Therefore this uMax is not in meters per second. To recover the real life units you have to do a conversion using non dimensional parameters such as Reynolds number in the cylinder case.

You should have a look at www.lbmethod.org for more informations. If itâ€™s not clear enough do not hesitate to ask more about this topic since the units in lattice boltzmann is usually tricky.

Hi, I post here because I have a problem of units with the viscosity.

I have 1 geometry where 1 fluid could have 2 different volumetric flows. So I have 2 reynolds number, but the viscosity remains the same, and I canâ€™t calculate same viscosities, from LB units â€¦

I have found in file units.h :

/// viscosity in lattice units
T getLatticeNu() const { return getLatticeU()*getResolution()/Re; }

I donâ€™t understand because :

Here : Nu_{LB}=U_{LB}.N/Re ,
with U_{LB}=dx/dt , N=1/dx
so Nu_{LB}=1/dt .

I have read that Nu_{LB} = dxÂ˛/dt â€¦

Maybe I have wrong, but someone could explain me ?

The reason for this apparent contradiction is that you are mixing up two possible interpretations of the discrete steps dx and dt. As this is a common mistake, I do suggest that you read the tutorial on lattice units to understand the subtleties behind unit conversions.

The bottom line is that the physical units of a velocity scale like Length/Time, and the physical units of a viscosity like Length^2/Time. Now, variables dx and dt in OpenLB are defined so as to restore physical units, and not lattice units. Thus, if one assumes that velocity is unity in a reference physical system, one has