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

Turbulence Model phi vs phi_

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 3, 2007, 16:52
Default Hi all, I am trying to writ
  #1
Member
 
Doug Hunsaker
Join Date: Mar 2009
Location: Logan, UT
Posts: 63
Rep Power: 8
doug is on a distinguished road
Hi all,

I am trying to write my own turbulence model and am currently studying the kEpsilon model in OF 1.4 linked with simpleFoam. In the simpleFoam.C source file, it says:

phi = fvc::interpolate(U) & mesh.Sf();

I'm not exactly sure what's happening here. My best guess is that it's interpolating the vector U from the cell centers to the cell faces and storing it as the transport property phi. (What exactly is the "& mesh.Sf()?)

In the kEpsilon.C source file, the dissipation equation is solved using phi_ as the item of transport. The divergence of phi_ is calculated as part of that equation. However, I thought you could only calculate the divergence of a vector. Is phi_ somehow a vector now instead of a scalar? If so, how was it set? I'm assuming that the phi defined in simpleFoam.C is the same as the phi_ in kEpsilon.C.

Since velocity is the item of transport, could the phi_ in the turbulence model be replaced by U_? This would be a true vector.

Thanks for your help.

Doug
doug is offline   Reply With Quote

Old   July 3, 2007, 19:50
Default Hi Doug, As I understand it
  #2
Member
 
Shaun Cooper
Join Date: Mar 2009
Posts: 54
Rep Power: 8
coops is on a distinguished road
Hi Doug,

As I understand it fvc::interpolate(U) & mesh.Sf() is, as you say, the interpolation of the velocity from the cell centre to the cell face, the '&' is the dot product symbol, see programmer's guide, and meshSf() is the face area magnitudes.

So this is saying, interpolate the velocity field and take the dot product with the face area vector.

Not too sure about the rest,

Hope this helps,

Shaun
coops is offline   Reply With Quote

Old   July 4, 2007, 04:28
Default @"However, I thought you could
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
@"However, I thought you could only calculate the divergence of a vector. Is phi_ somehow a vector now instead of a scalar?": According to Gauss's theorem (http://en.wikipedia.org/wiki/Divergence_theorem) the divergence in a volume can be calculated by summing the flux on the surfaces. phi is just that (the flux on the surface). So I guess (havn't looked at the code for that) div(phi) does just that: sum up the phis on the surface and pretend it's div(U)
__________________
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   July 4, 2007, 10:20
Default Hi Bernhard, If you think (
  #4
lam
Member
 
Hoang-Lam
Join Date: Mar 2009
Location: Lausanne, Switzerland
Posts: 60
Rep Power: 8
lam is on a distinguished road
Hi Bernhard,

If you think (as Shaun) that div(phi) is something like div(U), do you think that I have well implemented:

nu*laplacian(U)=grad(div(U))/epsi
(I obtained this expression by considering:
div(U)=epsi*p, where epsi is very small
(epsi [0 -2 1 0 0 0 0] 1e-6))
and
nu*Laplacian(U)=grad(p)

by writting in Foam:

tmp<fvvectormatrix> UEqn(laplacian(nu,U));
solve(UEqn()==fvc::grad(fvc::div(phi)/epsi));

?

Lam
lam is offline   Reply With Quote

Old   November 10, 2009, 05:33
Default
  #5
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 8
isabel is on a distinguished road
Quote:
Originally Posted by gschaider View Post
@"However, I thought you could only calculate the divergence of a vector. Is phi_ somehow a vector now instead of a scalar?": According to Gauss's theorem (http://en.wikipedia.org/wiki/Divergence_theorem) the divergence in a volume can be calculated by summing the flux on the surfaces. phi is just that (the flux on the surface). So I guess (havn't looked at the code for that) div(phi) does just that: sum up the phis on the surface and pretend it's div(U)
In OpenFOAM you can compute div(U) which is correct because U is a vector.

However, phi is a "surfaceScalarField" (not a vector). What div(phi) is? And why you can compute a divergence of an scalar? By definition, divergence is applied to a vector, for a scalar it would be a gradient.
isabel is offline   Reply With Quote

Reply

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
which turbulence model to use??? Ravikanth CFX 1 April 3, 2008 18:03
Turbulence Model GG CD-adapco 3 March 3, 2008 20:06
changing model constants in k-e turbulence model Sunil CFX 3 October 3, 2006 12:12
Best Turbulence Model manish FLUENT 1 March 10, 2005 19:15
HELP! TURBULENCE k-e OR k-omega TURBULENCE MODEL? Mirek Kabacinski FLUENT 5 August 24, 2003 22:31


All times are GMT -4. The time now is 10:48.