CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Two fundamental questions about icoFoam while updating the velocities and pressure (

dbxmcf May 27, 2007 01:02

(1) In typical CFD literature,
(1) In typical CFD literature, after the pressure correction equation is solved, the velocity is updated by adding the initial tentative velocity U* solved from the UEqn == -fvc::grad(p*), here p* is the initial pressure and the velocity correction U' from the pressure correction -rUA*fvc::grad(p'),i.e. U=U*+U'---------(a)
However from icoFoam code, it seems that the velocity is updated using:
U = rUA*UEqn.H()-rUA*fvc::grad(p')----------(b)
the difference between (a) and (b) is rUA*grad(p*), which is the gradient of initial pressure gradient, is there any reference for this difference?
(2) I didn't find the code for updating the pressure field which, in typical CFD literature, is p=p*+p', it seems that icoFoam is using the pressure correction value as the pressure value: p=p'?

I wonder if I have made my question clear, am I misunderstanding some basic concepts? Thanks a lot!

hjasak May 27, 2007 04:00

This is pretty basic stuff - h
This is pretty basic stuff - have a look at my Thesis:

- we solve for the pressure and not pressure correction
- the derivation of the pressure laplacian is given in detail in the Thesis.



dbxmcf May 27, 2007 04:43

Thanks, actually I already rea
Thanks, actually I already read your thesis section 3.8.1, and I know that the pressure laplacian correction is from Eqn 3.141, because I read the wiki page:

it says:
// take a Jacobi pass and update U. See Hrv Jasak's thesis eqn. 3.137 and Henrik Rusche's thesis, eqn. 2.43
// UEqn.H is the right-hand side of the UEqn minus the product of (the off-diagonal terms and U).
// See Eqn. 7.37 of Ferziger and Peric.
U = rUA*UEqn.H();
Ferziger's 7.37,7.39 is a pressure correction p'
Do you mean that your equation 3.137, 3.141 is the pressure p and not p'? And therefore the PISO loop is different (or slightly different) from the procedure by Ferziger?

I know this is quite fundamental, thanks for your reply.

schmidt_d May 31, 2007 09:40

Roy, You are right that the

You are right that the icoFoam implementation differs slightly from Feriger and Peric. The reference to Eqn. 7.37 in the Wiki comments is also misleading (mea culpa).

So the pressure Equation is Eqn. 7.35 from Ferziger and Peric; e.g. it is for the whole pressure, not just the correction to the estimated pressure field.

If this explanation makes sense, and you think you could improve the Wiki text, feel free to correct it.


dbxmcf May 31, 2007 15:58

Thanks, in fact I plan to make
Thanks, in fact I plan to make a step by step explanation of the icoFoam with PISO, the wiki page seems too simple an explanation for beginners. So far I still have some problem about one line:

adjustPhi(phi, U, p);

hjasak May 31, 2007 16:41

Consider a case which has zero
Consider a case which has zero gradient boundary condition on the pressure all the way around, like a pipe wit zero gradient outlet. In such a case, the pressure equation will not guarantee global continuity.

At the same time, if the mass flux in is not identical to mass flux out, the pressure equation (= continuity condition) will not have a solution.

adjustPhi will look for cases where p has got no fixed boundary condition and adjust total outflow from the domain after the momentum predictor to match the total inflow. Standard practice, slightly unusual packing :-)



Friederike April 12, 2016 16:05

Another very basic question
Hey FOAMers
I've been wondering for a while why the simple algorithm is implemented in that way. What are the advantages or disadvantages of both formulations? Is it about avoiding to implement Rhie & Chow??? Are there side effects or is it simply simpler (:D) to do it the Jasak way???
Thanks a lot in advance!!!

All times are GMT -4. The time now is 01:51.