MohammadMasoudi / LBM-PF

this is a Lattice Boltzman multiphase code which is using surface energy for phase tracking
7 stars 1 forks source link

invalid value encountered in sqrt #1

Open Flyyyyyyyy22 opened 1 year ago

Flyyyyyyyy22 commented 1 year ago

Hello, when I am running these LBM-PF codes, some issues occur after several steps:

RuntimeWarning: invalid value encountered in sqrt phi[j,i] = 1/a1 * (1 + a1 - sqrt((1+a1)*2-4a1*phi[newy,newx] )) - phi[newy,newx]

how to fix the problem please?

MohammadMasoudi commented 1 year ago

looks like negative values goes under the sqrt. The problem might be from the initialization.