CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Divergence in simpleFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 10, 2011, 12:24
Default Divergence in simpleFoam
  #1
New Member
 
LB_K kjk
Join Date: Nov 2011
Location: Moscow, Russia
Posts: 9
Rep Power: 5
LB_K is on a distinguished road
Hello everyone.
I am a newbie in OpenFoam, so don't be too strict to me. I have a task to calculate the steady state pressure and velocity field in cylinder with 2 cylinder holes - one of them inlet, and another one is outlet. The inlet velocity in known.

I tried to use icoFoam, but after a lot of calculation steps the courant number went very high and the solution diverged. So, i changed solver to simpleFoam.

Some information about how to use simpleFoam i've got from Finally starting to explore OpenFOAM, questions on icoFoam solver...

Simplefoam looks to work well, but starting from the 300th step something strange happens.

Quote:
Time = 301

smoothSolver: Solving for Ux, Initial residual = 0.00451893, Final residual = 4.43897e-05, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.0046188, Final residual = 4.43219e-05, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.00303527, Final residual = 2.93432e-05, No Iterations 2
GAMG: Solving for p, Initial residual = 0.141931, Final residual = 9.16397e-05, No Iterations 5
GAMG: Solving for p, Initial residual = 0.0308181, Final residual = 1.08156e-05, No Iterations 5
GAMG: Solving for p, Initial residual = 0.0111861, Final residual = 8.45965e-06, No Iterations 5
GAMG: Solving for p, Initial residual = 0.00815672, Final residual = 3.46598e-06, No Iterations 6
time step continuity errors : sum local = 6.31434e-06, global = 2.92482e-09, cumulative = 7.47596e-06
ExecutionTime = 2063.25 s ClockTime = 2110 s

Time = 302

smoothSolver: Solving for Ux, Initial residual = 0.00451987, Final residual = 4.44502e-05, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.00461933, Final residual = 4.42789e-05, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.00303333, Final residual = 2.93334e-05, No Iterations 2
GAMG: Solving for p, Initial residual = 0.143248, Final residual = 8.37238e-05, No Iterations 5
GAMG: Solving for p, Initial residual = 0.0304607, Final residual = 2.76634e+08, No Iterations 100
GAMG: Solving for p, Initial residual = 0.386885, Final residual = 5.57401e+12, No Iterations 100
GAMG: Solving for p, Initial residual = 0.386885, Final residual = 5.57401e+12, No Iterations 100
time step continuity errors : sum local = 4.2355e+34, global = 7.5829e+29, cumulative = 7.5829e+29
ExecutionTime = 2147.48 s ClockTime = 2212 s
/************************************************** ******/
Geometry -


Mesh information -
Quote:
Mesh stats
points: 33093
faces: 344465
internal faces: 325947
cells: 167603
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 1

Overall number of cells of each type:
hexahedra: 0
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 167603
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Topological cell zip-up check OK.
Face-face connectivity OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology Bounding box
wall 9810 5533 ok (non-closed singly connected) (-5 -5 0) (5 5 5)
inlet 4354 2492 ok (non-closed singly connected) (2 -1 2) (4 1 2)
outlet 4354 2492 ok (non-closed singly connected) (-4 -1 2) (-2 1 2)

Checking geometry...
Overall domain bounding box (-5 -5 0) (5 5 5)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (4.74506e-17 7.24893e-20 1.1664e-16) OK.
Max cell openness = 2.50855e-16 OK.
Max aspect ratio = 4.59859 OK.
Minumum face area = 2.60582e-05. Maximum face area = 1.33205. Face area magnitudes OK.
Min volume = 8.06256e-08. Max volume = 0.49308. Total volume = 377.31. Cell volumes OK.
Mesh non-orthogonality Max: 51.5241 average: 15.8802
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.87808 OK.
Coupled point location match (average 0) OK.
Face tets OK.
Min/max edge length = 0.00677553 1.94168 OK.
All angles in faces OK.
All face flatness OK.
Cell determinant (wellposedness) : minimum: 0.0209264 average: 1.49098
Cell determinant check OK.
Concave cell check OK.

Mesh OK.
I have not got any experience, so any help will be necessary to me.

Thanks.
Attached Files
File Type: zip system.zip (5.0 KB, 10 views)
LB_K is offline   Reply With Quote

Old   December 12, 2011, 14:57
Default
  #2
New Member
 
Michael Ahlmann
Join Date: Feb 2010
Posts: 27
Rep Power: 7
danishdude is on a distinguished road
What do your boundary conditions look like? In particular, you might try an inletOutlet condition on velocity. Basically, this sets a zeroGradient condition on the boundary when flow is going out, and a fixed value when flow is attempting to go back in. I've seen similar instabilities when there is a flow reversal on the exit boundary condition with a zeroGradient on velocity.

If the problem is in fact a flow reversal, you may also be able to get rid of it by further removing your boundary condition from your flow domain (although that's often not a practical solution).
danishdude is offline   Reply With Quote

Old   December 12, 2011, 15:52
Default
  #3
New Member
 
LB_K kjk
Join Date: Nov 2011
Location: Moscow, Russia
Posts: 9
Rep Power: 5
LB_K is on a distinguished road
For velocity i use these conditions
Code:
wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    inlet
    {
        type            fixedValue;
        value           uniform (0 0 1);
    }
    outlet
    {
        type            zeroGradient;
    }
and for pressure these -
Code:
wall 
    {
        type            zeroGradient;
    }

    inlet
    {
	type 		zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }
The problem dissappeared, after i'd change the solvers and played with relaxation factors.

Solver for velocity now is PBicG, before it was SmoothSolver.
Solver for pressure is PCG before it was GAMG.

Thanks.
LB_K is offline   Reply With Quote

Old   December 14, 2011, 21:01
Default
  #4
New Member
 
LB_K kjk
Join Date: Nov 2011
Location: Moscow, Russia
Posts: 9
Rep Power: 5
LB_K is on a distinguished road
I'd like to add that i thought that my Reynold number is about 1, but it was a great mistake - Re was about million, so i've such troubles with convergence.
LB_K is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divergence problem for species transport model MY FLUENT 3 January 11, 2014 05:46
Laminar simpleFoam and inviscid simpleFoam herenger OpenFOAM Running, Solving & CFD 7 July 11, 2013 06:27
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
Naca0012 k-e mpirun gives fpe whereas simpleFoam not Pierpaolo OpenFOAM 1 May 8, 2010 03:08
divergence in MAC Method Maciej Matyka Main CFD Forum 2 December 19, 2000 11:43


All times are GMT -4. The time now is 20:55.