# How to choose the density in LBM?

Hello, everyone.
I’m working with the problem about the flow past a square cylinder in a channel. It’s 2D, SRT(Single Relaxation Time). The length of the side of the square(d) is 20, and the channel is 860*160. But I don’t know the phycial system. So I can’t change the dx, dt and density. But how can I know whether they are right or not, so what the relation and the limit between them? How to choose a suitable value?
The frequency of Cd is equal to Cl(twice is right). I want to ask why. I 'm looking forward to any advice. Thank you very much.

uo=0.048
sumvelo=0.0
rhoo=1.00 !density
dx=1.0
dy=dx
dt=1.0
Re=160.0
alpha=uor2/Re
print *, “alphae=”, alpha
omega=1.0/(3.*alpha+0.5)
mstep=200000

Hi there,

Density is pretty much a free parameter in LBM for flow-based problems … although it specifies the magnitude of the distribution functions used, the velocities are determined by calculating the momentum at each grid point and dividing by the density. It is therefore possible to use any density magnitude and scale up or down accordingly. However, most LBM simulations tend to use average densities of around 1.0, mainly to ensure as much precision as possible is kept during calculations. (Using higher values might affect the precision and, ultimately, the numerical stability of LBM.)

As far as grid spacing (dx) and time step (dt) are concerned, these can be connected by two physical properties. The first is the fluid’s speed of sound: the speed of sound for the lattice system is dx/dt * 1/sqrt(3), and substituting the physical values of dx and dt should give the ‘real-world’ fluid speed of sound. The second property is the kinematic viscosity of the fluid (normally denoted by nu, but I presume is ‘alpha’?), which can be related to the grid spacing, the time step and the relaxation frequency (omega) by the following expression:

alpha = (1/omega - 0.5)*(dx)^2 / (3 * dt)

These two properties can be used to determine what the physical length and time scales (dx and dt) should be. In this case, you have given a value for the Reynolds number (Re), which gives the kinematic viscosity of the fluid in lattice units. Presuming r is half the size of the channel cross-section, this would mean the kinematic viscosity is 0.048 and the relaxation frequency is 1.553 (which is acceptable for numerical stability: the limit for omega is close to 2.0).

If we assume that the fluid is water (alpha = 1.0 * 10^(-6) m^2/s, speed of sound = 1481 m/s), then we can take a guess at the real sizes of the grid spacing and time step. I reckon that dx would be 8.1210^(-9) m and dt = 3.1710^{-12) s, which are reasonably typical values for LBM.

I hope the above is helpful.

Regards,

Michael

## mikeoas Wrote:

Hi there,

Density is pretty much a free parameter in LBM for
flow-based problems … although it specifies the
magnitude of the distribution functions used, the
velocities are determined by calculating the
momentum at each grid point and dividing by the
density. It is therefore possible to use any
density magnitude and scale up or down
accordingly. However, most LBM simulations tend to
use average densities of around 1.0, mainly to
ensure as much precision as possible is kept
during calculations. (Using higher values might
affect the precision and, ultimately, the
numerical stability of LBM.)

As far as grid spacing (dx) and time step (dt) are
concerned, these can be connected by two physical
properties. The first is the fluid’s speed of
sound: the speed of sound for the lattice system
is dx/dt * 1/sqrt(3), and substituting the
physical values of dx and dt should give the
‘real-world’ fluid speed of sound. The second
property is the kinematic viscosity of the fluid
(normally denoted by nu, but I presume is
‘alpha’?), which can be related to the grid
spacing, the time step and the relaxation
frequency (omega) by the following expression:

alpha = (1/omega - 0.5)*(dx)^2 / (3 * dt)

These two properties can be used to determine what
the physical length and time scales (dx and dt)
should be. In this case, you have given a value
for the Reynolds number (Re), which gives the
kinematic viscosity of the fluid in lattice units.
Presuming r is half the size of the channel
cross-section, this would mean the kinematic
viscosity is 0.048 and the relaxation frequency is
1.553 (which is acceptable for numerical
stability: the limit for omega is close to 2.0).

If we assume that the fluid is water (alpha = 1.0

• 10^(-6) m^2/s, speed of sound = 1481 m/s), then
we can take a guess at the real sizes of the grid
spacing and time step. I reckon that dx would be
8.1210^(-9) m and dt = 3.1710^{-12) s, which are
reasonably typical values for LBM.

I hope the above is helpful.

Regards,

Michael

Hello, Michael

Thank you for your careful answer. I have changed the dx, dt, and r. Am I right? Because the value of r is 10(which is half of the size of square ).
But I have one more question: how do you get the value of dx and dt? The characteristic length is 20(the size of square cylinder) or 160(the size of the channel cross-section)?
I’m looking forward to any advice. Thank you.

Particle