CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

calculation of phi

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 21, 2009, 09:44
Post calculation of phi
  #1
New Member
 
Wolfgang Betz
Join Date: Mar 2009
Posts: 6
Rep Power: 8
wbetz is on a distinguished road
Where do I have to look (in the source code), if I want to know how phi is calculated in interFoam?
wbetz is offline   Reply With Quote

Old   August 22, 2009, 06:16
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 14
l_r_mcglashan will become famous soon enough
In createFields.H, you'll see the line include "createPhi.H". You can find this in OpenFOAM-1.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
l_r_mcglashan is offline   Reply With Quote

Old   August 22, 2009, 07:02
Default
  #3
New Member
 
Wolfgang Betz
Join Date: Mar 2009
Posts: 6
Rep Power: 8
wbetz is on a distinguished road
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)?
wbetz is offline   Reply With Quote

Old   August 22, 2009, 07:35
Default
  #4
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 14
l_r_mcglashan will become famous soon enough
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
l_r_mcglashan is offline   Reply With Quote

Reply

Tags
interfoam, phi

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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 19:56
Calculation of phi if velocity field is known ankgupta8um OpenFOAM Running, Solving & CFD 5 October 15, 2006 03:46
Warning 097- AB CD-adapco 6 November 15, 2004 05:41
Heat Flux Calculation under REPORTS Alberto Schroth FLUENT 0 May 16, 2000 08:19


All times are GMT -4. The time now is 09:24.