
[Sponsors] 
September 23, 2009, 05:09 
Convergence Problems SimpleFOAM

#1 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
hi
I'm more or less new to OpenFoam but I am doing a simulation of a Kaplan hydraulic machine at my University Right now I'm just working with the guide vanes and my first step is that I wand to do a SteadyState simulation with SimpleFoam my Mesh (of guide vanes) is ~2,2 Mio nodes. In most cases I am calculating in parallel with 4cpus Until now I tried a lot of things and read a lot about SimpleFoam problems and Solutions in this Forum but still I get no convergence. Don't know what else to try.... U(mag) at Inlet is about 3 m/s length of Guide vane is about 20 cm ........just that you get an idea of the case I tried nearly all combinations of the following settings: (files attached below) 1. U initializations with potentialFOAM 2. No initialization with potentialFoam 3. fvSolution1 with GAMG for p (like Ercoftac centrifugalPump testcase) 4.fvSolution2 with standard settings (from tutorial case) 5.fvSchemes3 with laplacian limited 6. fvSchemes with laplacian corrected (like Standard tutorial case) brings always a divergence after 15 iterations (does anyone know why???) "Because I am pretty new to CFD I also don't know the difference between Gauss linear limited and Gauss linear corrected for laplacian schemes." 7. Different Relaxation Factors for the fvSolution Standard Settings a) p0,3 others0,7 b) p0,35 others0,65 c) p0,2 U0,7 k,e0,5 rest0,7 I did always 10.000 Iterations but it never converged.... Sometimes it diverged at about 8000 Iterations Residuals never go below 0.0001 and in most cases doing waves ;( Massflow difference between in and out is always ~0 So for about 2 weeks I read a lot of threads in the Forum and tried everythin that came in my mind....So right now I don't know what else to do... Can someone give me a hint? Do you need more information? I can provide everything. Tanks a lot for your help! 

September 23, 2009, 05:20 

#2 
Senior Member

Hi,
I think that you need to provide additional info on your setup: Is your flow laminar or turbulent? If its turbulent, which turbulence model have you used? What are your boundary conditions on U and p? Regards, Jose Santos 

September 23, 2009, 06:01 

#3 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
ok no problem, thanks for your advice.
more information: Also tried playing with nonOrthogonalCorrectors: tried 1, 5, 15....takes a lot of time, and Pressure Residual is jumping... hight of Inlet: 26 cm flow is turbulent:i'm using kepsilon model Boundary: K Fields: uniform 0.1 Inlet: profile1DfixedValue; defined in .csv file Value 0.0545 outlet, walls: zeroGradient epsilon Fields: uniform 0.1 Inlet: profile1DfixedValue; defined in .csv file: Value: 0.01073 outlet, walls: zeroGradient p Fields: uniform 0 inlet: zerogradient outlet: fixedValue, uniform 0 walls: zeroGradient U Fields: uniform (0 0 0) Inlet: profile1DfixedValue; defined in .csv file Value: URadial:2.431 UCircumf.: 2.939 > U(mag) 3,814 CSV file attached Outlet: zerogradient walls: fixedValue (0 0 0) Do you need something else? 

September 23, 2009, 06:20 

#4 
Senior Member

Hi,
Try the following boundary condition for U at the outlet: Code:
outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } What about your mesh? What is the output of checkMesh? Is your y+ adequate for kepsilon (>30)? Anyway, I would start with a coarse mesh, and only advance to a more refined one after obtaining converged results. Regards, Jose Santos 

September 23, 2009, 06:48 

#5 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
Hey Santos,
thank you very much for the advice. I will give it a try ... Can you explain me why It's better to switch between this Neumann BC (zeroGradient) and Diriclet BC (fixedValue) with inflow and outflow? This is what InletOutlet does right? CheckMesh: Mesh stats points: 2260080 faces: 6546640 internal faces: 6315440 cells: 2143680 boundary patches: 5 point zones: 0 face zones: 0 cell zones: 0 Number of cells of each type: hexahedra: 2143680 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface topology INLET 21824 22320 ok (nonclosed singly connected) OUTLET 21824 22320 ok (nonclosed singly connected) LOWER_WALL 48720 50224 ok (nonclosed singly connected) UPPER_WALL 48720 50224 ok (nonclosed singly connected) WING 90112 92160 ok (nonclosed singly connected) Checking geometry... This is a 3D mesh Overall domain bounding box (0.54196 0.54196 0.661576) (0.54196 0.54196 0.312076) Mesh (nonempty) directions (1 1 1) Mesh (nonempty, nonwedge) dimensions 3 Boundary openness (4.39058e16 4.11737e17 3.51117e15) Threshold = 1e06 OK. Max cell openness = 6.57131e16 OK. Max aspect ratio = 28.4517 OK. Minumum face area = 7.47018e07. Maximum face area = 0.000154043. Face area magnitudes OK. Min volume = 2.52333e09. Max volume = 5.33538e07. Total volume = 0.232927. Cell volumes OK. Mesh nonorthogonality Max: 67.4502 average: 41.5027 Threshold = 70 Nonorthogonality check OK. Face pyramids OK. Max skewness = 2.98773 OK. Mesh OK. yPlusRAS: Time = 0 Reading field U profile1DRawData:: Reading file : leitapparat.csv" in turboCSV format Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting RAS turbulence model kEpsilon profile1DRawData:: Reading file :leitapparat.csv" in turboCSV format profile1DRawData:: Reading file : leitapparat.csv" in turboCSV format kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; alphaEps 0.76923; } Patch 2 named LOWER_WALL y+ : min: 15.4357 max: 30.0358 average: 25.7408 Patch 3 named UPPER_WALL y+ : min: 19.9892 max: 37.275 average: 30.5525 Patch 4 named WING y+ : min: 9.87674 max: 45.2133 average: 19.7872 End ok this y+ is definetly under 30 in some parts..... how do I improve it? More Cells near the wall or less cells near the wall? Could this be the problem? Would it be better to use SST turbulence model? but its also RAS no...?! 

September 23, 2009, 10:34 

#6 
Senior Member

Hi,
I think your mesh is OK, maybe you could decrease your mesh density near the walls a little for having y+>30 everywhere. Regarding the inletOutlet, is prevents inflow through your outlet boundary by setting inflow mass flow rate to zero. You mentioned that you could not obtain converged results. Can you post a figure of your residuals? How low do they go? In a recent work, I obtained oscillatory residuals using simpleFoam, that were a consequence of physical oscillations in the flow. I got converged results using upwind on div schemes, but when I switched to 2nd order on div schemes the residuals did not reach the tolerance I specified. Regards, Jose Santos 

September 24, 2009, 06:49 

#7 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
Hey santos,
Residuals which I got before I used InletOutlet are attached .... now the Residuals and Masslflow and velocity in 4 test points are looking good...looks like it converged....(until now I only got 2000 Iterations) But now I've got a strange thing.... If you look at the pressure in the 4 Points all values are around 1200... Should be p/rho So I guess its normalized with rho=1000 (is it like this??) so this means 1200000Pa or 12 bar...uh thats tooo much. Also the value is negative, but should be positive....mhh strange... 

September 24, 2009, 09:08 

#8 
Senior Member

Hi,
Your residuals seem fine now. Yes, p is m^2/s^2 so you need to multiply it by your fluid density to get Pascal. Not sure though what may be the cause of your p values. Maybe you could analyse your velocity distribution, and check whether it makes sense. Regards, Jose Santos 

September 24, 2009, 10:18 

#9 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
mh ...thanks for your help!
but solution doesn't make any sense at all..... Pressure should be Positive, less than 1 bar.... when viewing in Paraview the Velocitiy at the Outlet ist always 0! this could be the Problem. Looks like it has been calculating if there was a wall at my outlet and therefore the pressure rises(lowers??) that much.... Must have something to do with the inletOutlet BC...but I don't get it....I applied as you said and I think should be correct.... Regards Fabi 

September 24, 2009, 10:27 

#10 
Senior Member

Could you just post again your U and p files?
Regards, Jose Santos 

September 24, 2009, 10:53 

#11 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
hey....sure....here they are...and .csv file used for U, k, epsilon
regards 

September 24, 2009, 11:03 

#12 
Senior Member

I dont see anything wrong with those files. Have you tried running it with uniform inlet velocity instead of your predefined profile and see if it works?
Regards, Jose Santos 

September 24, 2009, 11:16 

#13 
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 60
Rep Power: 8 
Hi,
just a wild guess: is the patch type set correctly in the file polyMesh/boundary? Br, Thomas 

September 24, 2009, 11:26 

#14 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
no no patch types are set correctly
ok I try something with my fvschemes...maybe there was an error....if doesn't help i try with a uniform inlet velocity....I'll post my expercience here... 

September 27, 2009, 10:05 

#15 
New Member
scott
Join Date: Sep 2009
Posts: 5
Rep Power: 7 
try a really small delta t value in controldict. You'll probably have to make your mesh coarser.


October 11, 2009, 08:37 

#16 
New Member
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 7 
hi there
sorry for not writing for a long time.... @mugsy: changing delta t? it's steadystate....as far as i think this doesn't have any affect at all? am i wrong? so after a lot of different tries, I still got the same problem... I tried different discret. Schemes and different Solver Settings (without precond.) If I use the InletOutlet boundary condition it converges fine: BUT: my p values are always around 1200 which is too much... for example, if i use InletOutlet on U until it converged and the change it back to zeroGradient, the p values change rapidly to values around 10 (like it should be) but then the U values begin changeing as well and my residuals don't converge... So I am at a point, I don't know else what to do... maybe there is no steady solution, and I have to continue doing a trancient one.... Or does anyone have a hint? for example regarding the high p values with the InletOutlet boundary condition? Best Regards.. 

June 14, 2010, 08:12 

#17 
Member
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 7 
Hello !
I have the same kind of problem with simleFoam : my simulation works with a first order divergence scheme but the continuity residuals explode when I switch to a second order (div(phi,U)=linear). I'm using a kepsilon turbulent model (my Y+ is about 30 but not everywhere), it's a steadystate simulation concerning an external flow around a ship. Did you manage to solve your problem? did you find a 2nd order scheme which made your simulation work with good results? thank you very much, Marine 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
SimpleFoam convergence problems  brahim  OpenFOAM Running, Solving & CFD  20  June 9, 2015 09:09 
Problems with convergence with an easy system  franzdrs  Main CFD Forum  0  June 15, 2009 18:17 
SimpleFoam convergence problems  schnitzlein  OpenFOAM Running, Solving & CFD  6  June 24, 2005 09:51 
Convergence problems  Chetan  FLUENT  3  April 15, 2004 19:13 
Convergence problems  Emilien  FLUENT  3  May 3, 2002 08:43 