CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Pressure Term in Navier-Stokes Equations (http://www.cfd-online.com/Forums/main/74896-pressure-term-navier-stokes-equations.html)

Kastenfrosch April 11, 2010 08:53

Pressure Term in Navier-Stokes Equations
 
Hello,

in all descriptions, tutorials and implementations that dealt with Joe Stams approach of numerically simulating fluids i found that the pressure term and the conservation of mass is achieved with subtracting the gradient of the pressure (which is computed via an implicit Poisson equation).

But nowhere the timestep was considered at this step.

For Example (the best tutorial i found on web)
http://http.developer.nvidia.com/GPU...html#ch38equ01

Equation 1 states that i have to subtract the pressure gradiant to get the DERIVATIVE of the vector field, which means that i still have to multiply it with the timestep, to get my new vector field.

But in example 38 - 4, where the implementation is written down, the pressure gradiant is subracted just once, independent of the timestep.
Where is my mistake? Why is the pressure-consideration timestep-independent?

ganesh April 11, 2010 17:14

Dear KastenFrosch,

The article that you talk about gives the overall picture on how the Pressure Poisson and momentum equations are solved for, but really doesn't talk about the discretisation. Actually, as you say you need the time step both in getting the new vector field (non-divergence free) as well as in the PPE, where the discretisation of the time derivative brings in the time step, dt. The article just gives the concept behind these approaches.

Regards,

Ganesh

Kastenfrosch April 14, 2010 10:31

First of all thanks for your reply.
I'm saying sorry in advance, if i understand any advice wrong, because i'm from Germany and so perhaps i don't get every point exactly right.

Did i get you right, that you wanted to say, that the article leaves it up to the reader how to go further when having solved for pressure?

If yes: the article (like all other implementations i read) suggests

"
uNew.xy -= halfrdx * half2(pR - pL, pT - pB);
"

which says "
The Vectorfield after the pressure step is the Vectorfield before minus the gradient of the pressure.
U_new = U_old - del p
"

in other parts of the implementation (i have the code at home) the timestep is always considered like
" U_New = U_old + timestep * force"


and i don't understand why one time it is considered, but in the pressure term not...


Is the solution perhaps that i have to solve

w = u - dt * del p
respectively
del w = u - dt * del^2 p

instead of

del w = u - del p
respectively
del w = del^2 p

?

ganesh April 14, 2010 10:48

Dear Kastnefrosch,


You are right. dt is needed in both the equations, but either forms are acceptable and correct, if you assume that the article already absorbs dt into the "cp" term.

Regards,

Ganesh

ganesh April 14, 2010 10:49

Sorry, no the cp term but the delp term.

Kastenfrosch April 14, 2010 10:56

so do both equations (with or without the factor dt) yield the same result?
does it drop out during calculation?
Or how can BOTH of them be correct?

ganesh April 14, 2010 15:32

Dear Kastenfrosch,

The timestep dt is NEEDED in the equations. It might just be that the article absorbs the time step into delp, ie. delp in the article actually refers to dt*delp.

Regards,

Ganesh

Kastenfrosch April 15, 2010 12:10

Hey, Ganesh,

thanks for not letting me alone :).

What exactly do you mean with "it absorbs dt"? How can del p = del p * dt ?
Do you mean that what they DID was solving

w = u - dt * del p
respectively
del w = u - dt * del^2 p

?

otherwise, if they just solved for

w = u + del p

, they solve for p as "the (pressure)field, whichs gradient has to be subtracted ONE time (not scaled by the timestep) from the divergent vector field to yield the divergence free one.
But how can i relate my "- dt*del p " of the navier stokes equation with this "- del p" of the helmolz-decomposition?

ganesh April 15, 2010 12:47

Dear KastenFrosch,

Well, let me make it a little more clearer. The dt term is absolutely essential. If you take the momentum equation and calculate the auxiliary velocity by considering the pressure at the current time level and then write down the momentum equation for the divergence satisfying velocity and subtract them out, you would get the pressure correction equation.

If w is the div free velocity and delp is the potential, you write

u = w + grad(delp)

This is the Helmholtz decomposition.

Now take the div on both sides giving

div (u) = Lap(delp)

Now if you think of u as the auxiliary velocity from the momentum equation that is not div free and delp as delp*dt (considering a constant time step), this gives you the pressure correction equation.

In short, what I mean is the implementation follows from what we derive, and the time discretisation gives dt that needs to be used. If the dt is constant, then it can however be for sake of conciseness taken into the delp term, and written, so that the delp then actually is "dt*delp".

Hope this clarifies the point

Regards,

Ganesh

Kastenfrosch April 23, 2010 15:06

I think i got it know :).
By the way with "del p" i meant "del operator p", so "nabla p".

Thank you very much for your effort :).


All times are GMT -4. The time now is 04:40.