
[Sponsors] 
August 21, 2009, 10:44 
calculation of phi

#1 
New Member
Wolfgang Betz
Join Date: Mar 2009
Posts: 6
Rep Power: 13 
Where do I have to look (in the source code), if I want to know how phi is calculated in interFoam?


August 22, 2009, 07:16 

#2 
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 19 
In createFields.H, you'll see the line include "createPhi.H". You can find this in OpenFOAM1.X/src/finiteVolume/cfdTools/incompressible
It is defined as: phi = linearInterpolate(U) & mesh.Sf() I think the best thing to do is to set up your IDE's code assistance, so that you can easily navigate through the source code.
__________________
Laurence R. McGlashan :: Website 

August 22, 2009, 08:02 

#3 
New Member
Wolfgang Betz
Join Date: Mar 2009
Posts: 6
Rep Power: 13 
If phi is calculated from U, what is the advantage of using boundary conditions like fluxCorrectedVelocity, pressureInletVelocity, pressureInletOutletVelocity  which calculate U form the flux(phi)?


August 22, 2009, 08:35 

#4 
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 19 
I've had a quick look at fluxCorrectedVelocity.
It would be used when you know the pressure at a boundary and the flux through that boundary. The BC is correcting the velocity component normal to the boundary, based on your knowledge of the flux through that boundary. I can't think of when I would use it, maybe someone else has? You could replace all instances of phi with linearInterpolate(U) & mesh.Sf(), but that would make the code messy.
__________________
Laurence R. McGlashan :: Website 

November 7, 2018, 11:21 

#5  
New Member
ghuang
Join Date: Oct 2014
Posts: 3
Rep Power: 8 
Quote:
Can anyone provide a better answer to clear things up ? 

November 8, 2018, 02:16 

#6 
Super Moderator

Hi all,
this is an ancient thread, but I want to give some hints:
Lets consider the solver pimpleFoam
Now it should be clear, that the fluxcorrected boundary conditions are useful because the fluxes are changing during the pressure equation and we recalculate the velocity from the new fluxes.
__________________
Keep foaming, Tobias Holzmann 

November 14, 2018, 06:06 

#7 
New Member
ghuang
Join Date: Oct 2014
Posts: 3
Rep Power: 8 
Thanks Tobi, it's more clear for me now. Have a nice day.


May 28, 2019, 21:04 

#8 
Senior Member
Brett
Join Date: May 2013
Posts: 169
Rep Power: 9 
Hey guys.
I know it's meant to be poor form, but this is directly relevant. Any thoughts?? Flow rate and phi not matching?? 

December 29, 2020, 06:52 

#9 
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 35
Rep Power: 6 
Hello guys,
thanks for the brilliant material. I have a related question: Suppose that I have to solve an additional transport equation for a velocity field V (which is not the standard velocity field U, but may depend on it). I understand that I have to define a new flux field (no problem to create it), but how should I ensure a correct treatment of flux and velocity provided that they don't need to satisfy a coupled pressure equation? Things should be necessarily easier than in the standard Up coupling, but I don't understand clearly what bits should I retain from a standard (S,P)IMPLE solver. For reference, the transport equation for reads like where repeated index summation notation is assumed and is a "concentration or density" field which satisfies a transport equation of the form The two equations can be implemented rather straightforwardly provided that a new correct flux is used. Upon creation it can be defined by interpolation like in a compressible solver, but how should I ensure the correct update of like it is done in a pEqn.H? Thanks in advance to everyone who has some advice 

Tags 
interfoam, phi 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Turbulence Model phi vs phi_  doug  OpenFOAM Running, Solving & CFD  4  November 10, 2009 05:33 
Another phi question  ehsan_vaghefi  OpenFOAM Running, Solving & CFD  0  October 24, 2008 20:56 
Calculation of phi if velocity field is known  ankgupta8um  OpenFOAM Running, Solving & CFD  5  October 15, 2006 04:46 
Warning 097  AB  Siemens  6  November 15, 2004 05:41 
Heat Flux Calculation under REPORTS  Alberto Schroth  FLUENT  0  May 16, 2000 09:19 