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

Understanding icoFoam equations

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2015, 08:41
Default Understanding icoFoam equations
  #1
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hi all,

I have a simple question that I'm sure it has been asked before but I couldn't find it anywhere in the forum. My question is regarding the Navier-Stokes equation implemented in icoFoam solver.
This is a piece extracted form icoFoam.C:

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

        solve(UEqn == -fvc::grad(p));
(...)
What is confusing me is the convective term ---> div(phi,U)

The convective termo is supposed to be (U · nabla)U Am I right?

If the second one is used units are consistent. However, I can't figure out what are the units of phi and U in order to make it meaningful. phi is supposed to have units of m³/s and U is m/s... Something must be wrong in my head...

Other option I see: If I asume that U has units of velocity, then phi must also have units of velocity to make it consistent, am I right? Then phi is not exactly the flux, is it?

I will appreciate any hint on this issue! Many thanks in advance.

Best regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   June 16, 2015, 09:38
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Did you see http://www.tfd.chalmers.se/~hani/kur.../rhiechow.pdf?
zfaraday likes this.
alexeym is offline   Reply With Quote

Old   June 16, 2015, 09:58
Default
  #3
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Many thanks Alexey!

That is really useful!

What was causing my confusion is the use of phi that OpenFOAM does, since the phi field that is created every time step has units of volume flow [m³/s]... It seems that both phi's are not the same regardless of the name...
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   June 16, 2015, 17:52
Default
  #4
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Well, after reading the paper with more concentration and doing some numbers on paper I still don't get it... in the paper it's said that phi is
Quote:
the volume velocity flux defined on the faces of each cell
At this point I don't know if it's a terminology problem or I am missing something...

As far as I know, the volume flux (or volume flow, I'm not sure about the accurate terminology in english) has units of [m³/s], as well as the mass flux (or flow, again) has units of [kg/s]. However, the concept of "volume velocity flux" is something new for me...Beside that, if I'm not mistaken the units of phi should be [m/s] in order to keep the units consistent in the equation, am I right?

Besides that, phi is computed in the createPhi.H file as
Code:
    linearInterpolate(U) & mesh.Sf()
That is, it is the dot product of U at the surface and the surface vector, which is |U|*|Sf|*cos(alpha), being alpha the angle between U and the normal to the surface.

At this stage I don't know if phi has units of velocity [m/s] or units of velocity*area [m³/s].

I know it must be something silly, but I still need some help with this...

Many thanks in advance!

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   June 17, 2015, 04:08
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

When in doubt - check Here is slightly modified icoFoam's createFields.H:

Code:
...
#   include "createPhi.H"

Info<< phi.dimensions() << endl;
...
and the output:

Code:
...
Reading/calculating face flux field phi

[0 3 -1 0 0 0 0]
...
alexeym is offline   Reply With Quote

Old   June 17, 2015, 06:39
Default
  #6
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Many thanks again Alexey. Your words helped me a lot
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Reply

Tags
equation, icofoam, phi, units


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
coupled source term in 3 transport equations mhassani OpenFOAM Running, Solving & CFD 1 September 10, 2018 10:35
[OpenFOAM] Paraview doesn't seem to be picking up data generated by icofoam MikeHersee ParaView 2 January 6, 2015 09:27
Riemann invariants of adjoint equations of shallow water equations zqb0929 Main CFD Forum 0 March 15, 2012 01:54
CFD governing equations m.gos Main CFD Forum 0 April 30, 2011 15:21
? fluctuating equations for homogenous shear turb. ff_fan Main CFD Forum 1 September 20, 2002 08:39


All times are GMT -4. The time now is 20:32.