CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Convergence Problems SimpleFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 23, 2009, 05:09
Default Convergence Problems SimpleFOAM
  #1
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
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!
Attached Files
File Type: txt fvSchemes_limited.txt (1.8 KB, 69 views)
File Type: txt fvSolution1.txt (1.8 KB, 53 views)
File Type: txt fvSolution2.txt (1.7 KB, 28 views)
Kutti is offline   Reply With Quote

Old   September 23, 2009, 05:20
Default
  #2
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
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
santos is offline   Reply With Quote

Old   September 23, 2009, 06:01
Default
  #3
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
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 k-epsilon 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?
Attached Files
File Type: txt leitapparat.txt (359 Bytes, 37 views)
Kutti is offline   Reply With Quote

Old   September 23, 2009, 06:20
Default
  #4
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
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);
    }
It should prevent inflow and possible mass conservation problems.

What about your mesh? What is the output of checkMesh? Is your y+ adequate for k-epsilon (>30)? Anyway, I would start with a coarse mesh, and only advance to a more refined one after obtaining converged results.

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   September 23, 2009, 06:48
Default
  #5
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
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 (non-closed singly connected)
OUTLET 21824 22320 ok (non-closed singly connected)
LOWER_WALL 48720 50224 ok (non-closed singly connected)
UPPER_WALL 48720 50224 ok (non-closed singly connected)
WING 90112 92160 ok (non-closed singly connected)

Checking geometry...
This is a 3-D mesh
Overall domain bounding box (-0.54196 -0.54196 -0.661576) (0.54196 0.54196 -0.312076)
Mesh (non-empty) directions (1 1 1)
Mesh (non-empty, non-wedge) dimensions 3
Boundary openness (-4.39058e-16 -4.11737e-17 3.51117e-15) Threshold = 1e-06 OK.
Max cell openness = 6.57131e-16 OK.
Max aspect ratio = 28.4517 OK.
Minumum face area = 7.47018e-07. Maximum face area = 0.000154043. Face area magnitudes OK.
Min volume = 2.52333e-09. Max volume = 5.33538e-07. Total volume = 0.232927. Cell volumes OK.
Mesh non-orthogonality Max: 67.4502 average: 41.5027 Threshold = 70
Non-orthogonality 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...?!
Kutti is offline   Reply With Quote

Old   September 23, 2009, 10:34
Default
  #6
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
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
santos is offline   Reply With Quote

Old   September 24, 2009, 06:49
Default
  #7
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
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...
Attached Images
File Type: png probesP.png (4.0 KB, 215 views)
File Type: png residuals.png (8.1 KB, 309 views)
File Type: png residuals_neu.png (5.2 KB, 349 views)
Kutti is offline   Reply With Quote

Old   September 24, 2009, 09:08
Default
  #8
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
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
santos is offline   Reply With Quote

Old   September 24, 2009, 10:18
Default
  #9
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
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
Kutti is offline   Reply With Quote

Old   September 24, 2009, 10:27
Default
  #10
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Could you just post again your U and p files?

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   September 24, 2009, 10:53
Default
  #11
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
hey....sure....here they are...and .csv file used for U, k, epsilon

regards
Attached Files
File Type: txt U.txt (1.5 KB, 95 views)
File Type: txt p.txt (1.2 KB, 62 views)
File Type: txt csv.txt (359 Bytes, 40 views)
Kutti is offline   Reply With Quote

Old   September 24, 2009, 11:03
Default
  #12
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
I dont see anything wrong with those files. Have you tried running it with uniform inlet velocity instead of your pre-defined profile and see if it works?

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   September 24, 2009, 11:16
Default
  #13
Member
 
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17
anger is on a distinguished road
Hi,

just a wild guess: is the patch type set correctly in the file polyMesh/boundary?

Br,
-Thomas
anger is offline   Reply With Quote

Old   September 24, 2009, 11:26
Default
  #14
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
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...
Kutti is offline   Reply With Quote

Old   September 27, 2009, 10:05
Default
  #15
New Member
 
scott
Join Date: Sep 2009
Posts: 5
Rep Power: 16
mugsy is on a distinguished road
try a really small delta t value in controldict. You'll probably have to make your mesh coarser.
mugsy is offline   Reply With Quote

Old   October 11, 2009, 08:37
Default
  #16
New Member
 
Fabi K.
Join Date: Sep 2009
Posts: 8
Rep Power: 16
Kutti is on a distinguished road
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..
Kutti is offline   Reply With Quote

Old   June 14, 2010, 08:12
Default
  #17
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
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 k-epsilon 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
marine is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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