CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Convergence Problems SimpleFOAM (http://www.cfd-online.com/Forums/openfoam/68525-convergence-problems-simplefoam.html)

 Kutti September 23, 2009 05:09

Convergence Problems SimpleFOAM

3 Attachment(s)
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?
Tanks a lot for your help!

 santos September 23, 2009 05:20

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

 Kutti September 23, 2009 06:01

1 Attachment(s)

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

epsilon
Fields: uniform 0.1
Inlet: profile1DfixedValue; defined in .csv file: Value: 0.01073

p
Fields: uniform 0
outlet: fixedValue, uniform 0

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
walls: fixedValue (0 0 0)

Do you need something else?

 santos September 23, 2009 06:20

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.

Regards,
Jose Santos

 Kutti September 23, 2009 06:48

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

profile1DRawData:: Reading file : leitapparat.csv" in turboCSV format

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...?!

 santos September 23, 2009 10:34

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

 Kutti September 24, 2009 06:49

3 Attachment(s)
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...

 santos September 24, 2009 09:08

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

 Kutti September 24, 2009 10:18

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

 santos September 24, 2009 10:27

Could you just post again your U and p files?

Regards,
Jose Santos

 Kutti September 24, 2009 10:53

3 Attachment(s)
hey....sure....here they are...and .csv file used for U, k, epsilon

regards

 santos September 24, 2009 11:03

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

 anger September 24, 2009 11:16

Hi,

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

Br,
-Thomas

 Kutti September 24, 2009 11:26

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...

 mugsy September 27, 2009 10:05

try a really small delta t value in controldict. You'll probably have to make your mesh coarser.

 Kutti October 11, 2009 08:37

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..

 marine June 14, 2010 08:12

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

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