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

Navier-Stokes Equation and icoFoam

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

Like Tree3Likes
  • 1 Post By kathrin_kissling
  • 2 Post By santiagomarquezd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2011, 04:00
Default Navier-Stokes Equation and icoFoam
  #1
New Member
 
Nick Mai
Join Date: Feb 2011
Posts: 5
Rep Power: 15
nickmai123 is on a distinguished road
I was wondering if anyone could help me answer a question related to the implementation of the icoFoam solver. According to the code presented here, the momentum equation as stated in the icoFoam solver is:

fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) == -fvc::grad(p).

I do not get where the term "fvm::div(phi,U)" is coming from, as the classic incompressible laminar equations typically have this term as "U.div(U)". How is the flux, phi, defined for this solver?

Also, I looked at Dr. Jasak's explanation beginning in section 3.8 of his Ph.D. thesis, and there he writes "div(UU)". How is that related to the normal definition of "U.div(U)". Is one of the U's an implied scalar?

Many thanks to all who help! I am just an undergrad, so much of this is beyond my knowledge and current understanding.
nickmai123 is offline   Reply With Quote

Old   February 1, 2011, 05:02
Default
  #2
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi nickmai!

phi is the projection of the velocity field on the face of your cells. It is defined as :

Code:
surfaceScalarField phi = linearInterpolation(U) & mesh.Sf()
It has the dimension of m^3/s (velocity * surface). It is created in createField.H either with the previous snippet or by calling:
Code:
#include "createPhi.H"
Best regards,
Cyp
Cyp is offline   Reply With Quote

Old   February 2, 2011, 04:14
Default
  #3
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 17
kathrin_kissling is on a distinguished road
Hey,

in case you need a non-code reference you can find it in Hrvoje Jasak's thesis as well. The equation is on page 80 no (3.17)

Best

Kathrin
Woj3x likes this.
kathrin_kissling is offline   Reply With Quote

Old   February 2, 2011, 21:24
Default
  #4
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Quote:
Originally Posted by nickmai123 View Post
I was wondering if anyone could help me answer a question related to the implementation of the icoFoam solver. According to the code presented here, the momentum equation as stated in the icoFoam solver is:

fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) == -fvc::grad(p).

I do not get where the term "fvm::div(phi,U)" is coming from, as the classic incompressible laminar equations typically have this term as "U.div(U)". How is the flux, phi, defined for this solver?
Let's see, NS equations reads

dU/dt + U&grad(U) = -grad(p)+nu*laplacian(U)

Where & implies dot product.

Written in this form this equation is vectorial but has tensorial terms behind it, the term grad(U) is a gradient of a vector, a tensor. Then U&grad(U) is done, which is a vector again. To do things easier we can decompose this equation in three scalar components:

du/dt + U*grad(u) = -dp/dx+nu*laplacian(u)
dv/dt + U*grad(v) = -dp/dy+nu*laplacian(v)
dw/dt + U*grad(w) = -dp/dz+nu*laplacian(w)

where U=(u,v,w)

Quote:
Originally Posted by nickmai123 View Post
I
Also, I looked at Dr. Jasak's explanation beginning in section 3.8 of his Ph.D. thesis, and there he writes "div(UU)". How is that related to the normal definition of "U.div(U)". Is one of the U's an implied scalar?.
Second term of equations or convective acceleration is really

div(U tensorial U)

which can be transformed in

U & grad(U)

The form used in icoFoam resembles the first one, but in order to avoid the non-linearity arose from (U tensorial U) data from a previous time-step is used to assemble. Following equation in Hrv thesis p. 144, line 2, you have F=phi=U^0&S_f, and U_f=U_f^n. You are using U data from time-step 0 (past) and n (actual).

Regards.
Woj3x and fhjkfhjk like this.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   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
interFoam vs icoFoam on a single-phase case nuovodna OpenFOAM Running, Solving & CFD 1 May 1, 2014 10:37
OpenFOAM wonbt solve the momentum U equation sek OpenFOAM Running, Solving & CFD 5 March 6, 2008 17:27
Equation discretisation in icoFoam kar OpenFOAM Running, Solving & CFD 3 February 10, 2008 07:34
Pressure Correction Equation morteza OpenFOAM Running, Solving & CFD 2 September 4, 2007 07:16
IcoFOAM and Navier Stokes juanduque OpenFOAM Running, Solving & CFD 0 May 8, 2007 11:43


All times are GMT -4. The time now is 04:36.