CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Lid Driven Cavity (https://www.cfd-online.com/Forums/main/226727-lid-driven-cavity.html)

Mudit2208 May 6, 2020 09:07

Lid Driven Cavity
 
I am working on Lid driven cavtiy problem using SIMPLE Method in python. My code is working and giving correct results for reynolds number 100. But when i run it for reynolds number 1000, it gives this:

RuntimeWarning: invalid value encountered in double_scalars:
vp[i, j] = dv[i, j] * (pp[i, j] - pp[i, j + 1])

RuntimeWarning: overflow encountered in double_scalars
i, j] * pp[i, j - 1]) + pb[i, j])) / pap[i, j]

and i have no clue why. Please help

donatello May 6, 2020 13:09

What you are seeing is likely a divide by 0 error, probably from your iterative solver. Maybe take a look at how your residuals are computed.

FMDenaro May 6, 2020 15:20

Quote:

Originally Posted by Mudit2208 (Post 769020)
I am working on Lid driven cavtiy problem using SIMPLE Method in python. My code is working and giving correct results for reynolds number 100. But when i run it for reynolds number 1000, it gives this:

RuntimeWarning: invalid value encountered in double_scalars:
vp[i, j] = dv[i, j] * (pp[i, j] - pp[i, j + 1])

RuntimeWarning: overflow encountered in double_scalars
i, j] * pp[i, j - 1]) + pb[i, j])) / pap[i, j]

and i have no clue why. Please help




I suggest to consider increasing the grid resolution according to the Re number. But go step by step, solve Re=100, 200, 400 and check the solutions

IbizaFR January 28, 2021 04:53

In many papers when we numerically study the lid driven flow problem especially in two dimensions, we ignore the gravity acceleration in the Navier-Stokes equations. Is there any explanation for this ?

Thank you.

sbaffini January 28, 2021 05:31

Quote:

Originally Posted by IbizaFR (Post 794648)
In many papers when we numerically study the lid driven flow problem especially in two dimensions, we ignore the gravity acceleration in the Navier-Stokes equations. Is there any explanation for this ?

Thank you.

Whatever equation you use/solve, especially for simple homework cases like the lid driven cavity, is a model for what you want to study.

Now, while it might look like a simple addition to code, gravity has, indeed, its own peculiarities requiring both a specific model equation (varying density, which is quite more difficult than the constant case, or the Boussinesq approximation, which still is another equation) and numerical treatment for stability (as most homework codes are typically explicit, gravity is gonna hurt if not correctly treated).

However, in general, it is the dimensional analysis of the problem that drives conclusions on what terms to keep in the equations. For example, most external aerodynamic problems don't use gravity as well.

For papers, the lid driven cavity is typically considered a benchmark, and this benchmark hasn't historically used gravity. But there are analogous cases where it is instead considered (i.e., thermally driven cavity).


All times are GMT -4. The time now is 07:35.