CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Tutorial, Pressure initial conditions (

Wormer June 17, 2012 12:11

Tutorial, Pressure initial conditions
Dear Forum,

I've been going over the 2.1 icoFoam tutorial. It is stated there that for an incompressible flow, we identify pressure as kinematic pressure.

Hence, in the pressure initial conditions file, we specify it as m^2/s^2.

I've been going over my old incompressible aerodynamics noteboot and can't seem to find out the reason why.

Am I to worry or simply accept that the program accepts:
- kinematic pressure for incompressible cases
- regular pressure for compressible

Thanks in advance,


wyldckat June 17, 2012 12:48

Greetings Alexey and welcome to the forum!

Basically it's explainable this way:
  1. Here's the incompressible Navier-Stokes equation:

    Originally Posted by
    \rho \frac{Du_{i}}{Dt} = - \nabla p + \rho \textbf{g} + \mu \nabla^{2} \textbf{u}

    ... equation (16).
  2. Given that \rho is constant, we can simplify by dividing the whole equation by \rho and voilą, 2 multiplications have been removed from the code, making it 5-10% (don't know the real value) faster for solving and also reduce cumulative numerical errors.
This isn't the only situation where OpenFOAM has simplified equations, because there are equation components that don't add much to the solution... and since people want solutions as fast as possible, then simplification is key! :)
edit: Which is why I don't simply state that compressible solvers will use regular pressure ;)

This also implies that one should take some time to study the solvers one is using, because sometimes there are simplifications that simply cannot be applied to the case one is trying to solve! This is why OpenFOAM can be very good: you've gotta get your hands dirty to really know if things are going the way they should :D

Best regards,

Wormer June 18, 2012 05:33

Thanks Bruno :),

So in general, when working with OpenFoam I should formulate the problem at hand, then choose a solver and then get to know it (by that realizing all the simplifications possibly made in it)?

Thanks again :).

wyldckat June 18, 2012 15:10

Hi Alexey,

You're welcome. And yes, the idea is to formulate and understand the problem you're trying to solve.

This is also the idea that is given right on the first tutorial: - the first time I was reading the tutorial, I thought to myself (didn't have any CFD experience at the time): "Why on Earth do I need to know the Courant Number and what it means?"

Sometimes, you might also end up having to create (copy-paste-change) a solver yourself, either due to those simplifications, or simply because - as a wild example - you might need multiphase flows with radiation and electromagnetic fields! Although sometimes someone has already made such a solver and has either made a paper about it and/or posted the code somewhere :)

Best regards,

All times are GMT -4. The time now is 22:00.