Hi

How is time step selected?

Hi

How is time step selected?

Usually by the grid Mach number, Ma.

Ma is proportional to the lattice speed. So dt~Ma*dx, where dt and dx are the time and space steps. The constant of proportionality (sound speed) depends on your model/lattice.

If, for example, you were looking at standard benchmark problem (such as lid driven cavity, or whatever), you might set the Reynolds number and the Mach number. You would also say that you have N points in your unit characteristic length, which defines dx. So you also have dt and tau.

Hi Pleb,

Should the characteristic length should always be 1?

Suppose, L = 0.1m

Ny = Nx = 256

Mach no. = 0.1

Reynold’s no = 100

c_s(sound speed) = c/sqrt(3)

I have a doubt is c is

c = (dx/dt) or (del_x/del_t) ? (as per Jonas Latt’s "Choice of units in LBM)

If I’m using a model of length L = 0.1, then can i assume dx = 0.1/Nx-1 => dx = 0.00039216

```
dt = Ma*dx
```

=> dt = 0.1*0.00039216

dt = 0.000039216

c(lattice speed) = dx/dt

c = 0.1

And then to choose u0 for lattice unit,

Ma = u0/c_s

= u0*sqrt(3)/c
=> u0 = Ma*c/sqrt(3)

u0 = 0.00577

Is this correct?

Is my understanding of unit conversion okay?

please can u help me out.

Many thanx…

Sorry…

c=10

which implies u0 = 0.577

…

thanx…

N is the number of points in 1 characteristic length. This can always be made to unit size if you non-dimensionalise using the characteristic length L. Then Re=(N-1)*U/nu, where U=1/c=dt/dx is the scaled velocity. So if you prescribe Re and U (or Ma) you have tau and dt. I meant the “~” sign in my above post to represent “proportional to”, not “equal to”, so sorry for being misleading. .

Thanks a lot Pleb…

Most of my doubts were cleared.

But, may i know which would be the reliable way for a D2Q9 model, to calculate dt,

- By assuming the lattice velocity (assumption) first, say for example uLB = 0.1

and then calculate dt from uLB = 1/c => dt =0.1*dx.

and then proceed with calculating Mach no

```
or
```

- By assuming the mach no. first, eg Ma = 0.1

for D2Q9 model, Ma = 3/c

```
=> dt = (Ma *dx)/3
```

and then proceed with calculating uLB using the formula uLB = 1/c (c =dx/dt)

I appreciate your interest in sharing your knowledge…

Thank you.

Both methods are the same. How you’ve written things just means the Mach number is larger in the first case because Ma=sqrt(3)/c (note the mistake in your definition of the Mach number: Ma=u/c_s, not u/(c_s^2). Ma is non-dimensional so the numerator and the denominator must have the same dimensions, ie that of speed). It’s just a question of how small you want your timestep to be (or your Ma, which is thus related to compressibility).

Hi Pleb,

C_s^2 = (c^2)/3 ==> C_s = c / sqrt(3)

which implies Ma = u0/C_s

= u0 * sqrt(3) / c

Ma = u0 * sqrt(3) * dt /dx. --------------------------------------- 1

In my second post i’ve written as just Ma = 3/c ------------------------------------2

You mean this?

If so which one is correct?

regards,

ramki

Yes, it should be sqrt(3) in (2). c=dx/dt always. So dt=dx/c. The computational velocity u (ie the characteristic velocity you use in your code) is the fluid velocity,U, scaled with the grid speed: u=U/c<<1, and Ma=U/c_s where c_s=c/sqrt(3) is the sound speed for D2Q9. If you have non-dimensionalised so that U=1, then u=dt/dx and Ma=sqrt(3)*dt/dx.

When your code has finished you can re-scale the velocity predicted by your code: U=u*c (=u*dx/dt)

Thanks Pleb.

I have understood very well now and this works well for my code also… Thanks again.

with regards ,

Ramki.