CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Arglist (https://www.cfd-online.com/Forums/openfoam-solving/59759-arglist.html)

morteza January 28, 2007 11:15

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

argList::validOptions.insert("writep","")

Thanks

morteza

gschaider January 28, 2007 17: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 08:27

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

Thanks
Morteza

morteza February 6, 2007 08:40

Hi bernard Do you know how po
 
Hi bernard
Do you know how potentialFoam solves these two equations:
div(U)=0
laplacian(p)=0
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.

Thanks

morteza

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:

http://www.cfd-online.com/cgi-bin/Op...how.cgi?1/4014

/Erik

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

/Erik


All times are GMT -4. The time now is 17:22.