CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   rhoPimpleFoam Fatal error (https://www.cfd-online.com/Forums/openfoam-solving/98171-rhopimplefoam-fatal-error.html)

Ancioi March 5, 2012 04:54

rhoPimpleFoam Fatal error
 
Hello everybody,

I'm trying to get used to OpenFoam, because I would like to perform a numerical simulation for my PhD thesis.

So I decided to run some tutorials and standard cases. Then I created a 2D mesh, using gmsh, the same I want to use for my thesis and tryied to run a standard solver for this new geometry. In particular, I tryied to run "rhoPimpleFoam".

I didn't change anything in the code, only the mesh...but after some time steps it crashes down and I got a fatal error: "maximum number of iteration exceeded".

From this forum I learned that could be related to a converegence problem, but I'm a newbie in this field so I don't know what could I change to fix it.

I hope someone will help me. If you are intersted I can send you by mail my case folder, I can't upload it beacuse exceeds the max limit of the forum.
Thanks in advance

calim_cfd March 5, 2012 06:01

Quote:

Originally Posted by Ancioi (Post 347654)
Hello everybody,

I'm trying to get used to OpenFoam, because I would like to perform a numerical simulation for my PhD thesis.

So I decided to run some tutorials and standard cases. Then I created a 2D mesh, using gmsh, the same I want to use for my thesis and tryied to run a standard solver for this new geometry. In particular, I tryied to run "rhoPimpleFoam".

I didn't change anything in the code, only the mesh...but after some time steps it crashes down and I got a fatal error: "maximum number of iteration exceeded".

From this forum I learned that could be related to a converegence problem, but I'm a newbie in this field so I don't know what could I change to fix it.

I hope someone will help me. If you are intersted I can send you by mail my case folder, I can't upload it beacuse exceeds the max limit of the forum.
Thanks in advance

type: checkMesh at your case directory and report it here..
also your running a transient case.. the settings for this case are always harder to work with... run easier transient cases (those within icoFoam directory, or pimpleFoam) to get the hang of it.... but i rly think you should get more theory b4 trying out random settings..

Ancioi March 5, 2012 06:43

checkMesh failed
 
1 Attachment(s)
Thanks for your advice,

I didn't check the mesh before...this is what I got: Failed 1 mesh checks. I upload in attachment the details of checkMesh.

Unfortunately I don't know how to fix it, when I try to optimise 3D mesh with netgen using gmsh it crashes down. :confused:

Are there mesh tools in OpenFoam that could be helpful?

calim_cfd March 5, 2012 09:41

Hi!

your topology seems to be have problems

Code:

Checking topology...
    Boundary definition OK.
 ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.

check your boundary file in the constant/polymesh directory and see if you got a consistent patch settings.. i mean walls are type wall, inlet/oulet are patch types.. and so on

gl
;)

Ancioi March 6, 2012 11:07

Mesh Ok!
 
Hi!

thanks, you were right...the problem was related to the mesh, but not about boundary... the problem was related to the physical groups I had defined in gmsh. Actually I generated a new 3D mesh with gmsh, imported in OpenFoam, checked and run rhoPimpleFoam.

But after while I get still the same error, probably the initial boundary conditions are not suitable for the new geometry. When I look the results, it seems that when the turbulence is going to start the simulation crashs.

Goutam March 6, 2012 11:20

Its better to import mesh file from fluent. It works fine. I am using fluent for meshing. I used Gmsh before and it creates the same problem like you.

calim_cfd March 6, 2012 11:35

if the mesh is ok then you gotta work on the case...

and it should be a transient one since ur pimple*FOAM

so try running a steady state simulation to make sure u have consistent BC then move back to the transient case. If you cannot map the results from the ss simulation then at least you can have a look at what the dimensions and order of your variables so you can set ur transient case w/o blowing it

Ancioi March 12, 2012 05:55

Standard case it's working
 
2 Attachment(s)
Dear all,

thanks to your advices I got a working rhoPimpleFoam for my 3D mesh.

Now I'm trying to move some steps forward and again I got troubles. What I want to do is to customize the problem to fit my case. I have a fixed value of flow at inlet (1.75e-3 m/s) and a fixed value of pressure at the outlet (atmospheric pressure).

I changed the thermophysical properties, inserting values related to my gas mixture and my boundary condition (only files: p, T, U).
And again when I run my simulation after few steps it crashes down. I upload my 0 time folder and the thermophysical properties file.

Thanks in advance

calim_cfd March 13, 2012 05:17

Hi !

ok you said 1.75e-3m/s in the forums but wrote

Code:

type        fixedValue;
    value        uniform (1.75 0 0);

in the U file.. i'd start with that..
then i guess we should know if ur flow is turbulent and how turbulent it is and which models your using...:)

Ancioi March 13, 2012 05:51

Hi calim,

sorry! Nevertheless I modified the value in the U file but doesn't work anyway.

About flow turbulence, I don't have much experience in fuid dynamic but it should be a turbulent flow... I did a calculation of the Reynolds number, using the formula I found in wikipedia for a flow in a pipe, and it's about 1000.

Concerning the models, I don't know exactly, but as I told you previously I didn't change anything in rhoPimpleFoam except for the mesh...so I guess it's the default model used in rhoPimpleFoam.

calim_cfd March 13, 2012 11:46

it seems that you're a bit confused rhoPimpleFoam handles:
Code:

Transient solver for laminar or turbulent flow of compressible fluids
    for HVAC and similar applications.

the examples at :/opt/OpenFOAM-2.1.0/applications/solvers/compressible/rhoPimpleFoam

are either ras or les type. I'd suggest you to read a bit more on turbulence b4 trying this transient simulation if you're looking for let's say..decent results..

your reynolds number, if right, points the need for a low re turbulence model / transition models... which require a bit of attention.. so pls take your time and investigate these topics..

GL! :)

Ancioi March 14, 2012 04:43

About turbulence...
 
Dear Calim

you are right, as I told you before I don't have experience about fluid dynamic and turbulence.
I read several times the OpenFoam user's guide and the programmer's guide, but there isn't much about the physics of fluids and turbulence.

The reason why I choose rhoPimpleFoam is that checking the standard solvers provided by OpenFoam, I thought it was the closest to my system.

I have a gas mixture continuosly flowing trough a cylindric pipe, where the central region has a bigger diameter (kind of pumping chamber). Using a valves system I have a fixed value of flow at the inlet and atmospheric pressure at the outlet.

Being a gas-continuous flow, with turbulence, I thought to use a transient solver for compressible flow, this is the reason why I choose rhoPimpleFoam.

What do you suggest? Do you have papers to suggest me? Or should I use a different solver?

Thanks!

calim_cfd March 14, 2012 08:42

Hi!

first check whether you need compressible effects or not..
then you need to know if you need the transient response or the steady-state(ss) one

if no is the answer for both questions, then i guess simpleFoam is your best option

the user's guide tells you which are compressible and which are not, same for transient or ss

about turbulence then you need some theory.. but since your case doesnt have a very high turbulence then i guess a laminar case is ok for you to start with. change the simulationType in the RASProperties to laminar! (RASModel laminar;)


play a bit with the tutorials @ /tutorials/incompressible/simpleFoam/

GL

Ancioi March 15, 2012 05:44

Incompressible flow
 
Hi Calim,

again your tips have been really helpful... I checked the Mach number and it's really really low, so I guess I can use an incompressible model.
Concerning steady state or transient, I need the second one...so I choose the standard solver pisoFoam.

About pisoFoam I would ask you what are CrossPowerLawCoeffs and BirdCarreaufCoeffs? How can I estimate these for my gas mixture?

Thanks a lot!!!

calim_cfd March 15, 2012 06:05

those are "viscosity models", for when you need to simulate a fluid whose stress behavior is not linear. the transport model should be (4 water) :
Code:

transportModel Newtonian;
        nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
        rho rho [ 1 -3 0 0 0 0 0 ] 1000;

you will only use those other model with very particular cases...


again.. i think you need to study a bit more.. i work with foam for sometime now and there's not a day go by that i dont learn sth new with foam or about it.. so i rly think you should read a bit more..

later

sihaqqi August 28, 2013 08:12

Hello Ancioi

How did you resolve this issue of max number of iterations exceeded. I have it in my rhoPimpleFoam case for air flowing in a pipe. Air is compressible. Can anyone advise please as I am trying to resolve this error for the last 8 days to no avail.

Regards

gxy200992243 July 11, 2014 16:02

Hi, Sihaqqi!

Have you figured out the reason for the exceeded maximum iteration number? I am now facing the same problem. I have posted the description of my case.

http://www.cfd-online.com/Forums/ope...tml#post501196

Could you please help me with it?

Thank you in advance.

sihaqqi July 11, 2014 18:04

I tried several options but then I had to lave the compressible flow. The solver was not working for my case but this does not mean that it will not work in your case as well.


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