CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

What is phi in simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes
  • 11 Post By gschaider
  • 2 Post By chegdan
  • 1 Post By armyou
  • 3 Post By wyldckat
  • 1 Post By armyou

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2008, 00:39
Default What is phi in simpleFoam
  #1
New Member
 
ehsan vaghefi
Join Date: Mar 2009
Posts: 9
Rep Power: 17
ehsan_vaghefi is on a distinguished road
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
ehsan_vaghefi is offline   Reply With Quote

Old   October 22, 2008, 08:14
Default As this phi question creeps up
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 7, 2011, 12:31
Default phi Field in Momentum and Eenrgy Equations
  #3
Member
 
,...
Join Date: Apr 2011
Posts: 92
Rep Power: 14
hawkeye321 is an unknown quantity at this point
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 ( with 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!!
hawkeye321 is offline   Reply With Quote

Old   September 7, 2011, 19:25
Default
  #4
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Quote:
Originally Posted by mahdiiowa View Post
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 ( with 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
Kummi and lpz456 like this.
chegdan is offline   Reply With Quote

Old   July 22, 2013, 12:10
Default The units do not seem to match
  #5
New Member
 
Sri
Join Date: Nov 2012
Posts: 10
Rep Power: 14
srivatta is on a distinguished road
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
srivatta is offline   Reply With Quote

Old   September 28, 2013, 03:21
Default
  #6
New Member
 
eric
Join Date: Nov 2010
Location: Vancouver, Canada
Posts: 16
Rep Power: 16
armyou is on a distinguished road
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.
lpz456 likes this.
armyou is offline   Reply With Quote

Old   September 29, 2013, 07:37
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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.
EleCr, rafa13 and vishal0 like this.
__________________
wyldckat is offline   Reply With Quote

Old   September 29, 2013, 12:00
Default
  #8
New Member
 
eric
Join Date: Nov 2010
Location: Vancouver, Canada
Posts: 16
Rep Power: 16
armyou is on a distinguished road
Thank you very much for the explanation. I am now much clearer with this little guy phi.

rafa13 likes this.
armyou is offline   Reply With Quote

Old   July 19, 2024, 17:01
Default
  #9
ARG
New Member
 
Masoud Rvn
Join Date: Sep 2023
Posts: 9
Rep Power: 3
ARG is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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
It is still creeping...
ARG is offline   Reply With Quote

Old   October 5, 2024, 08:49
Default
  #10
New Member
 
Pouya Namakshenas
Join Date: Oct 2024
Posts: 1
Rep Power: 0
pouyaAMC is on a distinguished road
If you look at the solver code for instance in $FOAM_SOLVERS/basic/scalarTransportFoam/createFields.H, you can see that it reads createPhi.H, and if you refer to $FOAM_SRC/finiteVolume/cfdTools/incompressible/createPhi.H, you see

surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(U) & mesh.Sf()
);

so for the solvers such as scalarTransport and the ones consider incompressible fluid
phi = U*Sf [m³/s]

However, for compressible solvers like rhoPimpleFoam it reads compressibleCreatePhi.H instead of createPhi.H and if you refer to that you can see

surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(rho*U) & mesh.Sf()
);
hence,
phi = rho*U*Sf [kg/s] for compressible solvers.

I hope it helps
pouyaAMC is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam nutilda an R linnemann OpenFOAM Running, Solving & CFD 13 October 9, 2014 09:14
Problems with the RSM in simpleFoam sberg OpenFOAM Running, Solving & CFD 10 February 25, 2014 20:39
NACA0012 with simpleFOAM nuovodna OpenFOAM Running, Solving & CFD 7 May 19, 2010 05:58
Using simpleFoam with water nico765 OpenFOAM Running, Solving & CFD 7 October 23, 2007 06:39
SimpleFoam woes msrinath80 OpenFOAM Bugs 2 April 13, 2007 11:15


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