Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About equation 4 in step11 #62

Open
fidle opened this issue May 23, 2019 · 4 comments
Open

About equation 4 in step11 #62

fidle opened this issue May 23, 2019 · 4 comments

Comments

@fidle
Copy link

fidle commented May 23, 2019

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.

@labarba
Copy link
Member

labarba commented May 23, 2019

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

@JunyanL
Copy link

JunyanL commented Sep 30, 2019

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!

@mesnardo
Copy link
Member

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.)

@JunyanL
Copy link

JunyanL commented Oct 1, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants