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

Simple question about icoFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2012, 22:42
Default Simple question about icoFoam
  #1
New Member
 
Yuri Almeida
Join Date: Jan 2012
Location: Rio de Janeiro, Brazil
Posts: 21
Rep Power: 14
Yuri Almeida is on a distinguished road
Dear all,

The momentum equation in icoFoam.C (OF21) is the following:

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);

solve(UEqn == -fvc::grad(p));

If I understood right, the equation would be:

d(U)/dt + div(rho*U*U) - laplacian((mu/rho)*U) = -grad(p) (1)

But the equation found in books is:

d(rho*U)/dt + div(rho*U*U) - laplacian(mu*U) = -grad(p) (2)

or, dividing by rho:

d(U)/dt + div(U*U) - laplacian((mu/rho)*U) = -(1/rho)*grad(p) (3)

My question is: Why are equation 2 and 3 different from 1? Probably they are not, but, where is "rho" in -fvc::grad(p) and why is it present in div(phi, U)??

Thx in advance!
Yuri Almeida is offline   Reply With Quote

Old   September 14, 2012, 04:51
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 335
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Hello,

in (1) you have rho in the convective term

Quote:
d(U)/dt + div(rho*U*U) - laplacian((mu/rho)*U) = -grad(p) (1)
Maybe that's because you misinterpreted phi. phi is the flux of a variable, rho does not come into it. So, (1) should read

d(U)/dt + div(U*U) - laplacian((mu/rho)*U) = -grad(p) (1.1)


Quote:
But the equation found in books is:

d(rho*U)/dt + div(rho*U*U) - laplacian(mu*U) = -grad(p) (2)

or, dividing by rho:

d(U)/dt + div(U*U) - laplacian((mu/rho)*U) = -(1/rho)*grad(p) (3)
If you now compare (1.1) with (3) the only difference is in p. If you check the dimensions of p in an icoFoam case (look at the file ./0/p) you will see, that with icoFoam the pressure does not have the dimension of a pressure (Force divided by area).

In an icoFoam case, the dimension of pressure is

dimensions [0 2 -2 0 0 0 0];


So, although in eq (1.1) and eq (3) the symbol p is used, the meaning of p is not the same in this equations.

In icoFoam p is a pressure that's been divided by rho.
GerhardHolzinger is online now   Reply With Quote

Old   September 14, 2012, 09:34
Default
  #3
New Member
 
Yuri Almeida
Join Date: Jan 2012
Location: Rio de Janeiro, Brazil
Posts: 21
Rep Power: 14
Yuri Almeida is on a distinguished road
Hi Gerhard,

Now I got it, I knew that the equation was right, but I didn't understand how. So, phi is flux, this makes sense, however, I saw that phi = rho*U from here:

http://www.openfoam.org/docs/user/fvSchemes.php

"The divSchemes sub-dictionary contains divergence terms. Let us discuss the syntax of the entry in reference to a typical convection term found in fluid dynamics div(rhoUU), which in OpenFOAM applications is commonly given the identifier div(phi,U), where phi refers to the flux phi = rhoU."

Thanks for the attention, Gerhard.
Yuri Almeida is offline   Reply With Quote

Old   September 14, 2012, 10:04
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 335
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I see, maybe that is the case for compressible solvers. In an incomressible case rho is eliminated.
GerhardHolzinger is online now   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Beginner User Question on 'geometry' scottimus FLUENT 5 March 27, 2012 14:17
Simple Question - or not? Florian2 Main CFD Forum 10 November 17, 2011 17:48
Question about PISO in IcoFoam titio OpenFOAM Running, Solving & CFD 5 September 17, 2010 14:31
Simple Question Regarding Symmetry Planes Atella Main CFD Forum 0 April 9, 2010 11:58
Simple icoFoam simulation gone wrong rieuk OpenFOAM Running, Solving & CFD 3 March 5, 2010 03:24


All times are GMT -4. The time now is 05:39.