burakbayramli / books

Source code for 200+ books, kept here for quick reference
289 stars 188 forks source link

At the beginning, the rho=0, then the u and v become Nan. #9

Closed shan-zhong closed 3 years ago

shan-zhong commented 3 years ago

when I start to try the code in the book, the first one is the channel flow in chp8. When I run the code, the main loop end in the first step. In the beginning, the most of distribution function is zero, hence the first time to calculate the macroscopic v u and rho. The most values of rho are zero, then u and v get Nan. The code collapse.

burakbayramli commented 3 years ago

which subproject?

shan-zhong commented 3 years ago

Lattice_Boltzmann_Method_Fund_and_Engineering_Applications_with_Computer_Codes_Mohamad-ch8-channel flow.

burakbayramli commented 3 years ago

I just downloaded and saved the code, did not work with it directly. I'm afraid you'd have to contact the author for that book; He is at https://schulich.ucalgary.ca/contacts/abdulmajeed-mohamad, Id try to email him, there are others who have related GH project like here https://github.com/zmhhaha/LBM-Cplusplus-A.A.Mohamad

Good luck

shan-zhong commented 3 years ago

Many thanks. GH project gives rho the initial value as 5 instead of 0 to overcome the problem.