Average energy: nan

Hello palabos Users and Developers!
I am trying to use aneurysm case with a different .STL file . I have created stl file of the pipe . I am not a pro-programmer so I ran into some issues that i can’t understand.The code compiles just fine. However, everytime I try to run the code I get : Average energy: nan. I would really appreciate any help.
Thanks and Regards,
Guo Weiqi

Reynolds number, based on provided inlet diameter: 64.7736

Running new simulation at level 0
uLB=557
nuLB=0.62
tau=2.36
dx=0.00145631
dt=0.0888462
Inner radius of inlet 0 : 1.28571 lattice nodes
Size of the multi-block: 99-by-81-by-206
Number of atomic-blocks: 58
Smallest atomic-block: 25-by-20-by-20
Largest atomic-block: 25-by-20-by-21
Number of allocated cells: 0.59648 million
Fraction of allocated domain: 36.1084 percent

Number of fluid cells: 53554
T= 0; Average energy: 0
T= 17.7692; Average energy: nan
T= 35.5385; Average energy: -nan
T= 53.3077; Average energy: -nan
T= 71.077; Average energy: nan

Hello Weiqi,

Your value of uLB is way too high, the simulation cannot be numerically stable and probably crashes immediately. Its value depends on what you put in the “param.xml” file. Something below 0.1 would be better. You can find useful information about how to chose simulations parameters in this paper:
https://dokk.org/library/Choice_of_units_in_lattice_Boltzmann_simulations_(Latt_2008)

Best,
Philippe

Thank you for your reply Philippe. Sorry, could’nt mail u back earlier. I tried the solution that you propose by reducing uLB to 0.07.But the problem remains.

pirun -np 4 ./airway param.xml
Reynolds number, based on provided inlet diameter: 10564.7

Running new simulation at level 0
uLB=0.0759779
nuLB=0.0002
tau=0.5006
dx=0.000582525
dt=4.84765e-06
Inner radius of inlet 0 : 3.21547 lattice nodes
Size of the multi-block: 239-by-192-by-506
Number of atomic-blocks: 379
Smallest atomic-block: 22-by-21-by-20
Largest atomic-block: 22-by-21-by-21
Number of allocated cells: 3.55074 million
Fraction of allocated domain: 15.2922 percent

Number of fluid cells: 837950
T= 0; Average energy: 0
T= 0.000969529; Average energy: 0.0658544
T= 0.00193906; Average energy: 0.0433916
T= 0.00290859; Average energy: 0.0717836
T= 0.00387812; Average energy: 0.0387843
T= 0.00484765; Average energy: 0.0642453
T= 0.00581718; Average energy: 0.0598973
T= 0.00678671; Average energy: -nan
T= 0.00775624; Average energy: -nan
T= 0.00872577; Average energy: -nan
T= 0.00969529; Average energy: -nan
T= 0.0106648; Average energy: -nan
T= 0.0116344; Average energy: -nan
T= 0.0126039; Average energy: -nan
T= 0.0135734; Average energy: -nan
T= 0.0145429; Average energy: -nan
T= 0.0155125; Average energy: -nan
T= 0.016482; Average energy: -nan
T= 0.0174515; Average energy: -nan
Thank’s

Dear Weiqi,

There is a slight improvement as the simulation does not crashes at the first iteration !

Also, the size of the inlet radius seems very small.

You could extract some images from the simulation to understand where the problem comes from. If you did not yet, I recommend practicing on simpler tutorial showcases.

Best,
Philippe

It might be that your simulation is unstable, check the output vtk file to see if it.
Your tau value is very close the lower limit of stability so my guess it’s a stability issue.

Dear Catsgomeow
Thank you for your reply. I checked the VTK file and found no result.Could you please tell me how to solve the stability problem?

Sorry for the late reply @gwqsz.
If you haven’t edited the example much there’s also a high chance that the location that is saved for the VTK is outside of the area of your simulation so check that. as for the stability take a look at this post Numerical stability as the stability is nicely described by jonas and orestis