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

What does fvc::interpolate(U) & mesh.Sf() stand for?

Register Blogs Community New Posts Updated Threads Search

Like Tree63Likes
  • 3 Post By CellZone
  • 60 Post By Bloerb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2016, 04:03
Question What does fvc::interpolate(U) & mesh.Sf() stand for?
  #1
Member
 
Join Date: Apr 2016
Posts: 91
Rep Power: 10
CellZone is on a distinguished road
Hi,

I am looking at the source code of potential foam:

1. when I open createFields.H of potential foam it says:

"surfaceScalarField phi"

What does this stand for? And how can I imagine this?

2. then it is said
fvc::interpolate(U) & mesh.Sf()

What does this mean? Phi is interpolated of U and?

3. For volVectorFields it is normaly replaced by "mesh" . What does this mean?

I allready read wiki etc. but I don't get it. It's hard to find a documentation about it.

Thank you
msaravia, Kummi and nepomnyi like this.
CellZone is offline   Reply With Quote

Old   July 29, 2016, 09:19
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
phi is the flux. The flux is for compressible solvers rho*u*A or otherwise u*A on the faces. Or more precisely the flux between cells. Your velocity field u in your timestep folders is saved at the center of each cell. The flux on the other hand is the value on the faces between cells. It is the flow from one cell to the next. Therefore it is a surfaceScalarField and not a volScalarField like u. You can calculate your flux with different methods (upwind linear etc).

now to your method here:

Code:
fvc::interpolate(U) & mesh.Sf()
fvc:: is finite volume calculus and is used for calculations on those fields. fvm on the other hand is used for equation systems. So interpolate(U) gives you the velocity on the patch. mesh.Sf is the surface vector (area and normal of the face) and & is the scalar product. Hence the scalar product of u and the surface vector gives you the flux. While u is m/s your 0/phi file tells you the flux is m^3/s.
Bloerb 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
phi -= pEqn.flux() vs. linearInterpolate(U) & mesh.Sf() santiagomarquezd OpenFOAM Programming & Development 33 October 15, 2019 11:24


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