CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   IcoFoam (

aap May 2, 2005 03:04

I want to solve the Navier-Sto
I want to solve the Navier-Stokes eq. for incompressible laminar regime and I have chosen the icoFoam solver. I am surprise that in the transportProperties file, only the viscosity is required, and the density??

hjasak May 2, 2005 03:10

That's correct. The viscosi
That's correct.

The viscosity is the kinematic viscosity (equals dynamic viscosity divided by the density); same for the pressure. This way, you only need the viscosity.



aap May 2, 2005 05:20

I have run icoFoam and one get
I have run icoFoam and one gets information about the Max. Courant number in the output. For the first time step is around 1, but for the next time steps becomes larger and larger. What does it mean? Does it mean that the cell size of the mesh and velocities do not match?

henry May 2, 2005 05:25

Have you tried with a smaller
Have you tried with a smaller time step? Have you tried running with upwind? It sounds like either your case is not setup correctly or it is unstable with a Courant number as large as 1, you will have to play around to fix it.

chafi_fatima_zohra May 13, 2005 10:36

hello, I want to couple the
I want to couple the equation of energy and the equations of Navie-Stokes in icoFoam and I want to add the appriximations of Boussinesq only in the direction of Z (push of archiméde).
my problem it is that icoFoam gives the solution of the following equation: UEqu=-grad p and me I want that only in the direction of Z, the component speed (w) must depend on grad p and gB(T-Tref). T: is has temperature
do you have an idea to add this term in the velocity equation on Z direction?


gellert May 13, 2005 11:34

Hi chafi fatima zohra, I wo
Hi chafi fatima zohra,

I would recommend to take a look into rhoSimpleFoam, there is in principal
what you want, but restricted to steady state solutions. With help of or some terms
from buoyantFoam one should be able to construct the needed solver.

gellert May 13, 2005 12:07

Hi chafi fatima zohra, me a
Hi chafi fatima zohra,

me again. Forget my former post. It was wrong, I'm sorry. rhoSimpleFoam is also
for compressible flows.


chris10 June 14, 2005 08:22

hi chafi fatima zohra, i wa
hi chafi fatima zohra,

i want to create a new solver for incompressible, laminar flow with boussinesq approximation. so i have combined "icoFoam" and "buoyantFoam". i have compiled my code successfully, but when i want to calculate an example i get the following error:

request for volScalarField rho from objectRegistry region0 failed
available objects of type volScalarField are

Did you have the same mistake? Which models do you use?

valentine August 10, 2005 10:28

Hi, I was trying to modify

I was trying to modify icoFoam solver to be able to also solve wall shear stresses for flow in pipes (laminar flow ofcourse) but am failing. would you please give me some ideas on building the code and compilation files and run it from FoamX. Please give me an example along side to look at.

Best regards.

mattijs August 10, 2005 18:09

You might want to have a look
You might want to have a look at the postProcessing/stressComponents utility to find out about the coding.

valentine August 11, 2005 06:29

Thanks for the information. I
Thanks for the information. I will try to do that.

valentine August 15, 2005 07:23

Hi, Still stack with solver

Still stack with solver compilation. I was looking at one example on a built configuration file. what does the code

instance "/export/warhol/chris/.foam/apps/FoamX/User/applications/biscuitFoam ";
mean. I was tried to follow the same so I edited it to
"/export/home/valentine/.foam/apps/FoamX/User/applications/wallShearFoam ";

but its still not working. Please help.

valentine August 15, 2005 13:52

Hi, forget about my earlier

forget about my earlier message. I have managed around that problem.

best regards.

AGIR May 27, 2012 16:13

phi term in icoFoam

I have a concern regarding the phi term in icoFoam.
I know its definition is: phi=rho*U, rho being the density.
In the icoFoam solver, a simplification is made, as there is no "rho" in the transient term, which makes sense since we consider an incompressible problem.

The problem is that if we make this simplification in a classic momentum equation from Navier Stokes system, there should not be any "rho" in the convective term, but simply "U" (velocity) instead of phi ( div(U, U) ).

My question is: what does OpenFOAM consider in this phi term ?

Here is the momentum equation solved in icoFoam:

fvVectorMatrix UEqn
fvm::ddt(U)                // transient term
+ fvm::div(phi, U)          // convective term
- fvm::laplacian(nu, U)  // viscosity
solve(UEqn == -fvc::grad(p));


alberto May 28, 2012 02:30


in incompressible solvers, where the momentum equation is divided by rho (constant), phi is defined as


surfaceScalarField phi
    linearInterpolate(U) & mesh.Sf()

You can check this in ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/cfdTools/incompressible/createPhi.H


AGIR May 28, 2012 08:30

Alright, thank you!
I checked the compressible cases, and that all makes sense now.

All times are GMT -4. The time now is 08:50.