CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   BC for rhoSimpleFoam (

uli_u September 29, 2005 13:59

Hi, first of all thanks for

first of all thanks for this great toolset!

I have finished to set up a case to simulate the steady compressible turbulent flow through a manifold (1 inlet, 1 outlet) with rhoSimpleFoam. The goal is to estimate the massflow through the geometry by specifying:

Inlet: Total pressure 1bar, Temperature 293.15K
outlet: Static pressure, 0.9bar

Everything seems be fine but I have still the problem of defining the right BC for this setup.
What should be specified at the inlet to reflect the above BC?

Thanks for any help,


maritozzo September 30, 2005 06:51

Sorry.. How do you set the rho
Sorry.. How do you set the rhoSimpleFoam solver. I compiled it but i can't find it in the FoamX case window please help me

mattijs September 30, 2005 13:15

rhoSimpleFoam is probably not
rhoSimpleFoam is probably not configured inside FoamX.

You'll have to edit the files by hand. Just copy and modify an existing tutorial case for one of the other solvers.

uli_u September 30, 2005 13:47

Hi Muzio, I have edited the
Hi Muzio,

I have edited the files by hand and started the code. The informative error messages helped me to complete the configuration.

I will send you my example by mail. Just put your own mesh in, edit the BCs and start the run by calling rhoSimpleFoam <your_root> tube.

The mesh I put in is just an example, the code will die after a few steps.

Maybe you can help me to find out the BCs for my problem (Totalpressure inlet 1bar, static pressure outlet 0.9bar).


uli_u October 3, 2005 04:52

Hi, I have tried to create

I have tried to create a FoamX configuration for rhoSimpleFoam. Just untar it under $FOAM_SOLVERS/rhoSimpleFoam which will give you the directory FoamX with all the files needed for your first steps with rhoSimpleFoam. rhoSimpleFoam_FoamX.tar.gz

As I am very new to Openfoam, there might be some mistakes in there but hopefully there is some expert out there who will fine tune this...

Have fun,

uli_u October 3, 2005 06:44

Hi again, for those who are
Hi again,

for those who are interested I will add a test case for rhoSimpleFoam. It is a curved tube (meshed with netgen) with an inlet velocity of 50m/s, T=293.15K. Outlet pressure is 1bar. Create a directory under your tutorial directory, call it rhoSimpleFoam and untar the case there.

I have not finished to run this case, after a short time the calculation crashes. Neither decrease of the p-underrelaxation factor helps nor playing with the solver tolerances. Any ideas?


uli_u October 3, 2005 06:51

Sorry, the compressed size

the compressed size of the case is 1.5MB but the board posting limit is 50k. If you are interested, drop me a mail, I will send you the case.


mattijs October 4, 2005 05:04

Hi Uli, did you try underre
Hi Uli,

did you try underrelaxing rho? Just add an entry called 'rho' to the relaxationFactors.

maritozzo October 4, 2005 08:24

Hi everybody , first of all ,
Hi everybody , first of all , thank you very much!!..the last file was good.. but now i have other problems.
I have to calculate lift and drag acting on a airfoil, I'm using liftDrag application but it always give me strange results.
For example i always obtain drag coefficient zero for every angle of attack and the lift coefficent is given as a vector while it should be a single value

I just think that it refers to three directions because OpenFoam is a 3d code, but i don't know how to explain myself the drag coefficient

Thank you

uli_u October 4, 2005 12:54

Hi Mattijs, that was a good
Hi Mattijs,

that was a good hint! I looked into the code and saw the call to rho.relax...I should have looked earlier!

After using the factor for rho the calculation ran a lot more timesteps, but there seems still to be an open still becomes unstable.

By the way, do you know the default value, when I use no detailed specification for rho-underrelaxatrion, is it 1?


mattijs October 6, 2005 15:15

Hi Uli, I did not converge
Hi Uli,

I did not converge it fully but it seemed to work with a really low underrelax for k,eps,rho (say 0.05)

Might just be that I haven't run it enough though.

uli_u October 9, 2005 14:16

Hi Mattijs, thanks for this
Hi Mattijs,

thanks for this information. I tried it and the job ran for a long time without getting unstable. I also stopped it, there was no real convergence. I think the problem itself is not a good example, I will think about a better one, maybe using a hex grid.

Nevertheless I still have the feeling that there is something wrong with the turbulence BC - especially epsilon. In several calculations I experienced that using "zeroGradient" works much better than putting a fixed value of epsilon on the inlet. I will investigate this in more detail and collect some pictures showing this behaviour.


giovanni May 29, 2007 12:33

Hi all, can anyone send me
Hi all,

can anyone send me Ulrich's test case for rhoSimpleFoam?
The one mentioned on Monday, October 03, 2005 - 04:51 am?

Thanks a lot in advance!


braennstroem July 11, 2007 05:47

Hi all, I would like to tak
Hi all,

I would like to take a look at the test case, too! Is it possible to get a small piece, without the mesh!?


lgriffiths December 15, 2007 14:38

hi could somebody email me

could somebody email me either the above rhoSimpleFoam test case, or just any test case (for rhoSimpleFoam).

mesh is not important.

this would be a huge help, and much appreciated!


jphandrigan February 10, 2009 16:24

Are there any test cases kicki
Are there any test cases kicking around for rhoSimpleFoam? If there are, I'd greatly appreciate it if someone could it to my email address at . Thank you in advance!

hellorishi March 13, 2009 11:30

Hello Everyone, Even I am i
Hello Everyone,

Even I am in the same boat...
There is no tutorial for rhoSimpleFoam in 1.5 or 1.5.x and I would like to have an example to understand the working BC,system, constant etc.

If anyone has a please help.


kcjarvis56 March 15, 2009 00:09

Rishi, Drop me an email at kc
Drop me an email at kcjarvis56 at hotmail(dot)com and I will send you a case.

hellorishi March 17, 2009 11:50

Thanks Kirk,

The case is now converging !

mihir1310 April 2, 2009 16:43


may i have the test case for rhoSimpleFoam ??

thanx & regards !!!!!!!!!

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