# Understanding icoFoam equations

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

 June 16, 2015, 07:41 Understanding icoFoam equations #1 Senior Member   Alex Join Date: Oct 2013 Posts: 337 Rep Power: 19 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!

 June 16, 2015, 08:38 #2 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,930 Rep Power: 36 Hi, Did you see http://www.tfd.chalmers.se/~hani/kur.../rhiechow.pdf? zfaraday likes this.

 June 16, 2015, 08:58 #3 Senior Member   Alex Join Date: Oct 2013 Posts: 337 Rep Power: 19 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!

June 16, 2015, 16:52
#4
Senior Member

Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 19
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...

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!

 June 17, 2015, 03:08 #5 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,930 Rep Power: 36 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] ...```

 June 17, 2015, 05:39 #6 Senior Member   Alex Join Date: Oct 2013 Posts: 337 Rep Power: 19 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!

 Tags equation, icofoam, phi, units