simpleFoam convergance problem
Hello foamers
I am trying to simulate a simple problem which includes a single straight pipe. The flow is laminar and incompressible (steady state). As for the boundary condition, I am using: inlet: pressureInlet 1333.2 Pa outlet: pressureOutlet 0 Pa I can easily get convergence on fluent in a minute. (residual order 1e6) Now when I try the same case in OpenFOAM (same mesh), it gives me a hard time to converge, as I think its going to take even a day to reach convergence tolerance.(simpleFoam solver) here is my case setup in OpenFOAM ( the case is attached): Boundary condition: Code:
/** C++ **\ Code:
/** C++ **\ Code:
/**\ Am I missing something obvious in OpenFOAM setup? you can download the case here: http://www.rodfile.com/w4xt9xwxesqo thank in advance regards 
2 Attachment(s)
Residual plots have been attached.

Hello, Daniel.
I haven't calculated the right value of friction and corresponding velocity. But I calculate max velocity restricted by laminar conditions (Re ~2000). So, velocity is about 0.6 m/s. I set this velocity as INLET boundary condition,with p=0 being set up at OUTLET, and I get average pressure at INLET about 0.1324 Pa. Looks similar to your value * 10^4. May be there is some mistake in physical settings used? 
Quote:
but in incompressible solvers, its actually p/rho, so I should have used the value of 1.3332 instead of 1333.2  Now the only problem is that p does not go lower than a specific value (order of 10^3), while the residual of U is acceptable (10^8). However, the result is the same as fluent. 
Can you show us the fvSolutionfile?

Quote:
Code:
/** C++ **\ By the way, is there anyway to use a step function (function of time) as a boundary condition? 
Some ideas:
1) In gnuplot use "plot ... using ... every 3 ..." to get an accurate residual plot of your pressure. If you use 2 orthogonal correctors, you have 3 pressure values each iteration. You just want the first one to be plotted. Then, you can also plot all variables (u,p) in the same windows. 2) Are you sure this is the correct syntax for the relaxation factors? I always use: Code:
relaxationFactors 2) Did you try to use a lower "relTol" for the pressure? Maybe you should use GAMG solver for "p" to save some time. 3) What numerical settings (discretization) did you use in Fluent? When I was comparing Fluent and OpenFoam it was always the case, that Fluent converges easily while OpenFoam had problems. Using limiters and bounding schemes at every possible location solved the problems. This lead me to the assumption that Fluent does the same... 
Quote:
1) Thanks for the tip man;) now the life is easier:) 2) I think the difference we are seeing here is because of different versions of OpenFOAM ( I am using 1.6ext) 3) Well GAMG is just faster in my case and does not help the convergence, not yet I will try to apply your suggestion. 3) in fluent: second order for pressure and second order upwind for momentum. I have already tested cellMDLimited and cellLimited schemes, is there any other schemes that you have tried? 
1 Attachment(s)
well I have tested several options, but as you can see in the log file, pressure initial residual does change any more, could something be wrong with my mesh?
Code:
Time = 0.0199 
Hey,
The mesh looks really coarse. Can you tell us the diameter of the pipe and the inlet velocity? I read, that for such systems it is better to have a velocity inlet and a pressure outlet  not two pressure b.c. like you have. But this is so simple, it should run as well with two pressure b.c... Are you sure this is laminar? 
Quote:
1) the diameter of the pipe is 10 mm 2) the length of the tube is 50 mm 3) The pressure at the inlet of the tube is 1333.2 Pa ( I am using p/rho=1.3332 as a inlet pressure ) Now I am using the totalPressure boundary condition for inlet, like fluent. 4) I have 0 Pa pressure at the outlet. That was the initial mesh, so first I have tried to test it on fluent and when there was no problem, I have decided to test it on OpenFOAM. I am using these value according to the paper I have. 
1) Can you upload the .msh file somewhere?
2) Are you 100% sure you use the same b.c. and viscosity as fluent? 
Quote:
1) here you are: http://www.rodfile.com/w4dsnlx58l1o 2) I am pretty sure, because values of both simulations are almost the same with a little difference in pressure! fluent: dynamic viscosity = 0.003 and density = 1000 pressure inlet= total Gage pressure = 1333.2 Pa OpenFOAM: kinematic viscosity = 3e6 pressure inlet= total pressure = 1.3332 [m^2/s^2] (p/rho) 
1 Attachment(s)
Hi,
I use Code:
ddtSchemes Attachment 26109 
It seems that, I can not use "bounded Gauss linearUpwind grad(U)" scheme in 1.6ext, I get the following error:
Code:
unknown convection scheme bounded 
Ok, try without it?
Why don't you install the most recent version? 
Quote:
Gauss linearUpwindV cellMDLimited Gauss linear 1.0; But As I can see in your residual plot, the pressure residual drops much faster than others, but I am still on the order of 10^3 after 2000 iteration. can you upload the case you have used? thanks for your attention regards  I am trying to simulate a Fluidsolid interaction and that solver is available in OpenFOAM1.6ext. At first I am trying to make sure that everything is OK with Fluid solver. 
1 Attachment(s)
Here it is
Attachment 26112 
Quote:
I have also changed U solver to smoothSolver. results are similar to fluent. I will upload the case. 22x version: http://www.rodfile.com/f6dwibedvb05 regards 
Great to see it worked.

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