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/)
-   -   What is phi in simpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/58443-what-phi-simplefoam.html)

ehsan_vaghefi October 21, 2008 23:39

What is phi in simpleFoam
 
Hi there

I have been using simpleFoam to solve my problem, I was wondering the what is the "phi" file that openFoam is calculating ?

a more general question , can calculate fluxes (as vectors) on each of nodes ?

Cheers. Ehsan

gschaider October 22, 2008 07:14

As this phi question creeps up
 
As this phi question creeps up every 2 weeks or so, I thought it might be a good candidate for the FAQ: http://openfoamwiki.net/index.php/Main_FAQ#What_is_the_field_phi_that_the_solver _is_writing

hawkeye321 September 7, 2011 11:31

phi Field in Momentum and Eenrgy Equations
 
Hi Everybody
I have added temperature equation to icoFoam in the manner that has been described in

http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

The main part is
fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(DT, T) );From a mathematical manipulation i founded out that phi
should be "ui + vj" here. And this vector form for phi is in complete disagreement with what has been described for the field phi in the following page
-----
"http://openfoamwiki.net/index.php/Main_FAQ"
in section "3.1.3 What is the field phi that the solver is writing"

"3.1.3 What is the field phi that the solver is writing "

The answer in this file is
the mass flow through the cell faces (http://openfoamwiki.net/images/math/...810ff5b077.png with http://openfoamwiki.net/images/math/...a9de9848ef.png the area of the face).
-----
In Summary: Do you guys know whether phi is different in the vector form of the momentum equation and scalar temperature equation! What I had founded out is that YES, it should be different. But I am NOT sure!

I would appreciate if someone helps me!!

chegdan September 7, 2011 18:25

Quote:

Originally Posted by mahdiiowa (Post 323303)
Hi Everybody
I have added temperature equation to icoFoam in the manner that has been described in

http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

The main part is
fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(DT, T) );From a mathematical manipulation i founded out that phi
should be "ui + vj" here. And this vector form for phi is in complete disagreement with what has been described for the field phi in the following page
-----
"http://openfoamwiki.net/index.php/Main_FAQ"
in section "3.1.3 What is the field phi that the solver is writing"

"3.1.3 What is the field phi that the solver is writing "

The answer in this file is
the mass flow through the cell faces (http://openfoamwiki.net/images/math/...810ff5b077.png with http://openfoamwiki.net/images/math/...a9de9848ef.png the area of the face).
-----
In Summary: Do you guys know whether phi is different in the vector form of the momentum equation and scalar temperature equation! What I had founded out is that YES, it should be different. But I am NOT sure!

I would appreciate if someone helps me!!

phi is actually a surfaceScalarField, which is different than the vector field. Phi is either interpolated from U (see $FOAM_SRC/finiteVolume/cfdTools/incompressible/createPhi.H) or is directly calculated in your PISO algorithm and then used in your energy equation if you just added it to icoFoam. so its not exactly the same as your U but is correctly used in your Teqn. Hope that helps.

Dan

srivatta July 22, 2013 11:10

The units do not seem to match
 
Hi,
Is Phi just U dotted on to A or rhoU dotted on to A as you have described on the page. The table has units cu.m/s which would fit the first description of Phi (U dotted on to A).
Thanks,
Sri

armyou September 28, 2013 02:21

I just start learning FOAM and also have the same question about phi.

In the equation of motion UEqn, phi seems to be rho*U.

But in the equation of energy TEqn, phi is U. This phi bothers me a lot. Can anyone explain it please. Thanks in advance.

wyldckat September 29, 2013 06:37

Greetings to all!

openfoamwiki.net is undergoing some changes on the FAQ section. I've updated the FAQ associated to this thread's topic: http://openfoamwiki.net/index.php/FA..._is_writing.3F

@Eric: You didn't mention which solver you were looking at, but the answer should be simple: compressible solvers use the rho field; incompressible solvers do not use the rho field.
If look at the user guide, section "2.1.1.3 Physical properties", you'll see that the fluid density is implied when using "kinematic viscosity nu": http://www.openfoam.org/docs/user/cavity.php

Best regards,
Bruno

PS: I also merged the two threads where Eric had posted, because it made sense to keep the two threads in a single discussion.

armyou September 29, 2013 11:00

Thank you very much for the explanation. I am now much clearer with this little guy phi.

:)


All times are GMT -4. The time now is 15:50.