CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Arglist (

morteza January 28, 2007 12:15

Hi i am studing about the pr
i am studing about the programming in openfoam and i don't know the effect of this line at the potentialFoam.C solver:




gschaider January 28, 2007 18:58

Start potentialFoam with no ca
Start potentialFoam with no case and no directory and you will be enlightend: in addition to complainig about the missing case/directory it will tell you that -writep is a perfectly valid option for that command. And why is it valid? Because the solver has been told so in the program line you mentioned.

What the option switches on/off, I don't know.

morteza February 6, 2007 09:27

Thank you Bernhard. I started
Thank you Bernhard.
I started potentialFoam with no case and directory and found what you say.


morteza February 6, 2007 09:40

Hi bernard Do you know how po
Hi bernard
Do you know how potentialFoam solves these two equations:
as mentioned at programmers guide.
at programmers guide we have this main line for solving these two equations:

laplacian([0 0 1 0 0 0 ],p)=div(phi)
where phi is U.A.



Erik March 30, 2007 06:10

Hello morteza! This might b
Hello morteza!

This might be a bit late but its a discusion on this on the following thread:


Erik March 30, 2007 06:13

Sorry the link didnt lead wher
Sorry the link didnt lead where I thought it would.

Here is a thread I saved from the forum:

Continuity Eq: div(U) = 0
and with source term: div(U) = S

Discretised momentum eq. A*U = H - grad(p)
U = H/A -(1/A)*grad(p) = Ustar - (1/A)*grad(p)
H/A is the momentum-predictor value of U, ie Ustar.
if we insert this in the continuity eq. it yields

div(U) = div(Ustar - (1/A)*grad(p)) = S
div(Ustar) - laplacian(1/A, p) = S
laplacian(1/A, p) = -S + div(phi)
where phi is Ustar evaluated on faces.
have a look at icoFoam and you will easily see where to insert S.


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