Open fidle opened 5 years ago
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
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!
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.)
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.
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.