CFDPython icon indicating copy to clipboard operation
CFDPython copied to clipboard

About equation 4 in step11

Open fidle opened this issue 6 years ago • 4 comments

This CFDPython lessons is the best leasons I 've ever token about CFD. I follow every step until step11. But I got stuck in equation 4 of step11 :

∂2p/∂x2+∂2p/∂y2=−ρ(∂u/∂x*∂u/∂x+2∂u/∂y*∂v/∂x+∂v/∂y*∂v/∂y)

where did the Poisson equation come from. And How to derive this equation.

I have been confused for month about this equation.

fidle avatar May 23 '19 00:05 fidle

Thanks for the kind words. There are different ways to derive the Poisson equation. See if this comment on our website helps you: https://lorenabarba.com/blog/cfd-python-12-steps-to-navier-stokes/#comment-1405089241

labarba avatar May 23 '19 05:05 labarba

Hi, Professor Barba. First of all, thank you so much for the content. It really strengthened my understanding on computational modeling. However, there are some part of the code doesn't make sense to me. On step 11: Cavity flow. When you discretized the function, why is there a '2' on the denominator when taking gradient of the pressure? Are there some steps I'm missing? Please let me know. Thank you!

JunyanL avatar Sep 30 '19 23:09 JunyanL

Hi @JunyanL

In step 11 (cavity flow), the pressure gradient is discretized using a central-difference scheme. To compute the pressure gradient in the x-direction at grid point i, we use the left (i-1) and right (i+1) pressure values. The grid spacing between those two point is 2 * dx (and this is why there is a 2 on the denominator). (Same for the pressure gradient in the y-direction.)

mesnardo avatar Sep 30 '19 23:09 mesnardo

Thank you for your timely response! And may i ask, when you discretize the expression for poisson function, where did the time dependency come from? I thought all the delta t terms were removed due to the incompressible equation.

JunyanL avatar Oct 01 '19 01:10 JunyanL