AverageEnergy NaN with IncBGKdynamics


I’m new to LBM and Palabos. When I changed parameters in showcases “MovingWall”, I found out that if

  1. the moving speed of the wall increases, or 2. the viscosity in lattice units “nuLB” is large (nuLB=nu*dt/dx^2), the computed average energy will also be too large so that it outputs no values any more but “NaN”. The velocities tensor field gets no values either.

However when simulation nanoscale flows, the small lattice distance “dx”, which means high “nuLB” value, is unavoiadable. Unless to reduce “dt” to an incrediable small value, which makes the simulation too expensive.

My questions are:

  1. What can be a deeper reason for the failed computation of velocities? The Reynold number remains the same with smaller “dx”.
  2. How to solve this issue?

Really appreciate it a lot.


How much is Re that you choose?

Hello Lin,

Re is kept smaller than 0.1 as I simulate it with only a nanoscale domain.
I knew that large Re can lead to approxiation errors. But this seems not the case here.


Hello Qiya,

Re is kept smaller than 0.1 .I think it is never mind. Could you tell me other parameters?


Hi Lin,
sure. Parameters I used are listed below:
param.lx = 2e-7;
param.ly = 2e-7;
param.lz = 2e-7;
param.xSide = 3e-8;
param.resolution = 25;
param.dt = 0.00008;
param.maxIter = 500000;
param.statIter = 20;
param.outIter = 150;
param.startIter = 250;
param.nu = 1e-16;
param.kappa = 0.143e-6;//m2/s
param.mountPoint[0] = 1e-7;
param.mountPoint[1] = 1e-7;
param.mountPoint[2] = 1e-7;
param.ibIter = 4;
param.periodicBoundaries = true;
param.ampl = 2e-8;//50;
param.freq = 1;

This set of parameters can be computed.
But as long as I increased param.nu to 1e-6, for example, the velocity result can’t be computed Right anymore and the energy result turned out to be NaN.
It could be solved by decreasing the time step (giving a smaller param.dt), but this is obviously not a computational effective solution…


I think you should keep Re the same (similarity criteria).

In principle, yes. But my question isn’t “why the simulated results doen’t match the physical one”, rather “why a certain result can’t be computed”. I didn’t get the reason for such errors rooted in the algorithm, pure numerically. I suppose it doesn’t matter, which Re it should be physically.


very small nu means tau ~0.5 (or omega ~2). This is a limit for the numerical stability of the LBM (another would be u >= 0.1). There are better suited models in palabos to have a higher numerical stability such as CompleteRegularizedBGKdynamics for example, or Smagorinsky models.


thanks. I would try some other models.
One limit is that the velocity can’t be too large, yes.
However, another error I came across is just opposite to your describtion. It seems due to big nu. :expressionless: Interesting…

Yes large nu (large relaxation time) also fails :smiley:
It’s related with the “small” Knudsen number requirement.