CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Pressure instability with rhoSimpleFoam (

philipp. September 30, 2011 08:13

Pressure instability with rhoSimpleFoam
Dear all,

for my diploma thesis I am simulating a subsonic flow (Ma = 0.5) through a convergent divergent (De Laval) nozzle. For this purpose I choose to use the rhoSimpleFoam solver in OF 1.7.1. It works fine with some meshes. But on others it is not converging.

To me it appears as if it is due to the aspect ratio for the cells. To show this I uploaded two identical cases. One has a high aspect ratio (a low resolution in flow direction → see the blockMeshDict). This mesh works fine and gives a good solution in comparison to theoretical calculations (
The other has a low aspect ratio which means a high resolution in stream direction ( Surprisingly this mesh does not converge although the mesh resolution is higher. The results show that the temperature and the velocity are quite stable and only the pressure is oscillating (as seen in the case folder).
Besides the mesh the cases are completely identical. In order to solve the problem I tried several measures:

  • change of the discretization methods to limited, higher order schemes
  • change of the boundary and initial conditions
  • nonOrthogonalCorrectiors from 0 up to 10
  • I used the k-Epsilon and the k-Omega model
  • change of the relaxation factors

Non of these measures could stabilize the solution. All in all I would be grateful if somebody could help me solve the problem or explain why the rhoSimpleFoam solver cannot converge on the mesh with higher resolution.
Furthermore, I would like to know if anybody ever used the rhoSimpleFoam solver on a tetrahedral mesh. Since I ran some calculation on different tetra meshes and all of them did not converge.

Thanks for your help!


kiran October 3, 2011 01:43

Hi phillip

use SonicFoam solver instead of rhosimplefoam.

all we require is a compressible and turbulent solver.

I fell like u will not get any issues with this solver

Kiran Ambilpur

philipp. October 3, 2011 06:10

Hello Kiran!

Thanks for your reply. However, to me the sonicFoam solver seems not to be the right solver for my problem. When you check the user guide it says that the sonicFoam is a "Transient solver for trans-sonic/supersonic, laminar or turbulent flow of a compressible gas". But I got a subsonic (and steady) problem to solve. Anyway, I will try it and let you know about my results.


philipp. October 4, 2011 13:22


I tried the sonicFoam solver. By initialising "good" (fully converged) initial conditions the solver gives good results otherwise the solver needs long time to stabilize. However, the performance is not very good since I only need the steady state solution. Additionally, isn't sonicFoam an inviscid solver? For further applications I need to use a viscid solver.

Has anybody some more experience with rhoSimpleFoam, especially on tetrahedral meshes?

Regards, Philipp

Chris Lucas October 5, 2011 02:56


it will be difficult getting a solution using a steady state solver for your problem. So my suggestion, don't spend more time on rhoSimpleFoam.

About sonicFoam, I see no reason against this solver. You might want to consider changing the energy equation to a total energy equation, might increase stability.

If your simulations are too slow, try rhoPimpleFoam, but have a look at the continuity error and mass imbalance in your system. You should not relax the density and, in the last internal iteration, the pressure.

About some of the points in your first post:

"change of the discretization methods to limited, higher order schemes"
--> use upwind!

"nonOrthogonalCorrectiors from 0 up to 10"
--> Do you have a strongly nonOrthogonal grid? If not, you don't need so many nonOrthogonalCorrectiors

Best Regards,

peob October 5, 2011 14:08

2 Attachment(s)

I took your Laval-fineResolution case and ran it with version-2.0.1.
I was able to repeat the same behavior you observed.

Then I dropped the relaxation factor on "rho" from 0.05 down to 0.01, and the solution converged. Note that I didn't change anything other than the relaxation factor for "rho".

I've attached the fvSolution file and an image showing the convergence I obtained.

I also tried to increase the relaxation factor on "rho" after it converged, and the residuals rose right back up to what you were observing with "rho 0.05;".

I have no idea why the relaxation factor for "rho" should be so low... especially after the solution converges.

Phil :)

philipp. October 6, 2011 09:44

Hey Phil,

I also observed the same behavior when I initialized a converged solution. But with a relaxation factor of 0.01 for rho seems to work well even on a tetra mesh! When I was playing with the relaxation factors I just changed the factors for p and U :(.
So thank you very much!

Regards, Philipp

user_of_cfx July 27, 2015 09:31


Originally Posted by Chris Lucas (Post 326726)

If your simulations are too slow, try rhoPimpleFoam, but have a look at the continuity error and mass imbalance in your system. You should not relax the density and, in the last internal iteration, the pressure.

Hi Christian,

I am struggling with rhoPimpleFoam at the moment, my pressure specifically will not converge (sum local = ~ 0.6) after trying several mesh resolutions, boundary conditions, fvSchemes and fvSolutions adjusted based on advice in this forum (mostly Gauss upwind schemes with GAMG solver for pressure), and the results I output before the simulation crashes look funny. I am very new to OpenFOAM and any advice (or directing me to another post on this forum I may have missed?) on things to look out for when using rhoPimpleFoam will be greatly appreciated.

I am not posting my problem just yet because I know for a fact I have not tried everything yet. I am only looking for general tips.



hakolekar October 27, 2016 02:23

Hi Phil,

Thanks for your tip.

My simulation with rhoSimpleFoam was also behaving strangely - oscillating.
However, on reducing the residual of rho from 0.05 to 0.01 - the solution is converging.


huangfei October 29, 2016 06:51

Hi phillip,
I also use rhoSimpleFoam to simulate a tansonic flow in a CD nozzel. But I meet some problems that an error reported:

Maximum number of iterations exceeded

I want to download your case file for help, but I cann't link the website you upload your file. Because the website is blocked... you know ,I am in China.
So could send your case file to my

hakolekar October 29, 2016 23:31

Hi Huangfei,

Make sure that all the equation variables have a relaxation factor defined for them.'

This could be one of the issues.

Please check it out.


hakolekar October 29, 2016 23:34

Hi Bo,

Please ensure that all the variables including h and e have relaxation factors defined for them in the fvSolutions file.

Also check your BCs - make sure you are using stagation pressure BCs.

Please check it out.


huangfei October 30, 2016 02:05

Hi Harshal,
Thanks for your reply. I solve that problem by revising the BC. But a new problem occurs. The residual of p is oscillating seriously after several iterations. Could you give some advice on this problem?

hakolekar October 30, 2016 04:39

Hi Bo,

What is the relaxation factor of rho.
Make it around 0.01.

I was also experiencing a similar problem.

I reduced the relaxation factor of rho from 0.05 to 0.01 - everything converged quite well after that.

The pressure field also stopped oscillating.

Hope it helps.

All times are GMT -4. The time now is 03:38.