output velocity units

HI,
i am pretty new to LBM and palabos, i started with basic cylinder 2d example. i am not sure where to find out my output velocity from. my basic assumption is that the velocity can be found in Paraview, but than after getting velocity output, I am not sure if the velocity i got is in lattice units or non dimensional system, since all the parameters used in the code are in non dimensional system. the palabos data file in tmp folder gives me the same velocity i input, which i think is the charecteristic velocity. i would be really glad if some one can clarify me if my output velocity from paraview is in lattice units or non dimensional system.

thanks in advance.
help would be seriously appreciated.

Dear Chaitanya,

the code converts to lattice units and sets up the simulation in lattice units. The whole ouput in the vtk file however is in dimensionless units. You can check this by adding the following lines after your simulation loop:

[code=“cpp”]
MultiTensorField2D<T,2> velocity (parameters.getNx(),parameters.getNy()) ;
MultiScalarField2D velocityNorm (parameters.getNx(),parameters.getNy()) ;

computeVelocity(lattice,velocity,lattice.getBoundingBox()) ;
computeNorm(velocity,velocityNorm,lattice.getBoundingBox()) ;

plint someX = 450 ;
plint someY = 50 ;

pcout << "This is the velocity in lattice units at " << someX << " " << someY << ": " << velocityNorm.get(someX,someY) << endl ;
pcout << "This is the non-domensional velocity at " << someX << " " << someY << ": " << velocityNorm.get(someX,someY)*parameters.getDeltaX()/parameters.getDeltaT() << endl ;



You can then probe your vtk output at x=4.5, y=0.5 (non-dimensional lengths!) and compare the velocities, which will result in the dimensionless velocity.

(This assumes that you have not changed anything concerning the geometry of the example)


Regards,

kk

Hi kk,
Thanks for the reply. that helped a lot, I have one more problem now, I tried to change the Reynolds number for the simulation to 1000. it give me the following error message

convert.im6: invalid pixel `./tmp/u036120.ppm’ @ error/pnm.c/ConstrainPixel/143.

I am not sure what to do now.
Help would be seriously appreciated.

Regards
Chaitanya

Dear Chaitanya,

when I run the example and only (!) change the Reynolds number to 1000 the simulation works (checked until step 160 000). Could it be that you have changed something besides the Reynolds number?

Generally, in this example, when you increase the Reynolds number the relaxation time tau will be closer to 0.5. You can look at it using

[code=“cpp”]
pcout << "tau = " << (T)1/parameters.getOmega() << endl ;



If tau becomes very small, you will run into stability problems. If the simulation becomes unstable, there will be NaN values in the velocity field, which cannot be used to create an output gif. That is what the error message is telling you. So probably your simulation is unstable.
If you want to do high Re simulations, you have to pick another Dynamics class (see implemented fluid models and other examples for how to do that).


Regards,

kk

Dear KK,
I forgot to mention, I did change the lx and ly values. I changed them from 6 and 1 to 12 and 2. Is there any other changes I am supposed to do to the code when i do this? So that the simulation doesnt become Unstable. I even changed the total time for simulation from 20 to 1024. That is all the changes i made.

Regards
Chaitanya

Dear Chaitanya,

that does make a difference!

The Reynolds number is defined as

Re = u_char * l_char / nu

with (in LBM) the kinematic viscosity

nu = c_s^2 ( tau - 0.5 )

and c_s^2 = 1/3.

Now, by doubling all the lengths, you double the characteristic length l_char. Thus, to get to the same Reynolds number while keeping u_char as before, tau has to be smaller compared to 1*6 case. Otherwise you would arrive at a different Re.

If you want stable simulations at high Re, you need to change the dynamics of the simulation. Take a look a the following example

./examples/codesByTopic/navierStokesModels

Regards,

kk

EDIT: Just realised, increasing l_char while keeping the same Re should actually INCREASE the relaxation time. So this cannot be the reason for the instability.

Dear Kk,
Thanks for the prompt response, that worked perfectly well, sorry for bothering you more, but I am planning on hanging the geometry, in the same example. from cylinder to a different geometry. is that possible? how can i approach to that?

Regards,
Chaitanya.