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

simpleFoam always diverges

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 18, 2011, 12:04
Default simpleFoam always diverges
  #1
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
Dear CFD-Community,

i am having very big problems with the simpleFoam solver.

The aim is to simulate the airflow around a streamlined body and get to know about the drag coefficient. I am using a cylindric computational space around this body...

But always - after few timeSteps, the calculation gives out abnormal results and little time later, it will collapse

I posted also some screenshots, that will show the velocity behavior...

Could someone help me?

Thank you very much in advance

RugbyGandalf
Attached Images
File Type: jpg startSolution.jpg (38.6 KB, 166 views)
File Type: jpg afterFewTimeSteps.jpg (44.1 KB, 151 views)
File Type: jpg afterFewTimeSteps2.jpg (45.2 KB, 126 views)
RugbyGandalf is offline   Reply With Quote

Old   January 18, 2011, 12:31
Default
  #2
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 8
Chris Lucas is on a distinguished road
Hi,

post your case files (without grid), otherwise I can't help you

Regards,
Christian
Chris Lucas is offline   Reply With Quote

Old   January 18, 2011, 13:32
Default
  #3
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
Dear Christian,

thank you very much for your reply...

I will upload the case files without the start velocity field, because this would be to much data for 370k cells...

this is my 0/ start directory
Attached Files
File Type: txt k.txt (1.2 KB, 50 views)
File Type: txt nut.txt (1.3 KB, 29 views)
File Type: txt omega.txt (1.3 KB, 38 views)
File Type: txt p.txt (1.2 KB, 23 views)
File Type: txt U.txt (1.2 KB, 36 views)
RugbyGandalf is offline   Reply With Quote

Old   January 18, 2011, 13:38
Default
  #4
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
i am calculating with kOmegaSST, as you may see in RASProperties, detached here:

And i also posted the system/ folder...

Would be grateful, if you are able to find the mistake...

Greetings

Rugby
Attached Files
File Type: txt RASProperties.txt (920 Bytes, 22 views)
File Type: txt transportProperties.txt (926 Bytes, 7 views)
File Type: txt controlDict.txt (2.1 KB, 2 views)
File Type: txt fvSchemes.txt (1.6 KB, 38 views)
File Type: txt fvSolution.txt (1.9 KB, 25 views)
RugbyGandalf is offline   Reply With Quote

Old   January 18, 2011, 13:43
Default
  #5
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
PS: needed to transform them into txt for upload

Got the idea to zip it:

so once again
Attached Files
File Type: zip case.zip (6.4 KB, 23 views)
RugbyGandalf is offline   Reply With Quote

Old   January 18, 2011, 17:54
Default
  #6
New Member
 
Join Date: Dec 2010
Posts: 26
Rep Power: 6
prashant.A is on a distinguished road
Send a message via Skype™ to prashant.A
Well,

The boundary files could not be understood, not in English you know.

Anyways, here are few suggestions:

1. Under-relaxations : p 0.15 , U 0.5
2. divSchemes : Use upwind for 'U'

You could switch to higher order schemes later as the solution stablilizes....
prashant.A is offline   Reply With Quote

Old   January 19, 2011, 04:38
Default
  #7
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 8
Chris Lucas is on a distinguished road
Hi,

have to tried to use a different turbulence model (e.g. k epsilon) to see if the problem is related to the kOmegaSST model? The kOmegaSST model is a bit difficult to use (at least from what I heard).

Is the slip BC really correct? I'm not familiar with this BC.

Try the fixedMeanValue BC (openfoam 1.6 ext) for the pressure outlet.

What type of grid to you use. Have you checked to quality? Maybe try to increase the nNonOrthogonalCorrectors.

Also, try faceLimited grad schemes.


Regards,
Christian
Chris Lucas is offline   Reply With Quote

Old   January 19, 2011, 05:18
Default
  #8
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello, RugbyGandalf,


does your case run with turbulence switched off (i.e. laminar)? If so, it's most likely the turbulence model causing trouble.

Can we have the results of a checkMesh run through your case?

I have a problem with the inlet BCs for the turbulent quantities, i.e. k and omega. Could you explain, why you use these values? What's troubling me: at the inlet you have set a very low value for k (0.083 mē/sē) while the velocity is quite high there (40.57 m/s). This results in a very low turbulence intensity at the inlet:

{Tu}=\sqrt{{2k}\over{3U^2}}=0.6\%

I'm guessing you're imposing a low turbulence inlet with this value. But you also have a very low value of omega at the inlet (0.814 1/s), which results in a rather big eddy viscosity ratio:

{{\nu_t}\over{\nu}} = {{k}\over{\omega \nu}}=9000

This means the turbulence viscosity is almost 5 orders of magnitude bigger than the molecular viscosity! I don't think this is physically correct and I also think this may be giving the turbulence model a hard time.

Please read this article if you'd like to redo your turbulence boundary conditions: http://www.cfd-online.com/Wiki/Turbu...ary_conditions


Greetings,
Felix.
FelixL is offline   Reply With Quote

Old   January 19, 2011, 10:23
Default
  #9
Member
 
lord_kossity's Avatar
 
Andreas Dietz
Join Date: Mar 2009
Location: Munich
Posts: 79
Rep Power: 8
lord_kossity is on a distinguished road
Rugby,

there are 3 issues, here listed according to their importance:

1) Never ever initialize k, omega (or epsilon) with fixedValue 0 on solid bodies. Therewith you provoke a division by 0. For high reynolds models like 'kOmegaSST' use zeroGradient on your body.

2) The tolerance for p should not be greater than for U, k, omega (,epsilon).

3) I prefer to initialize with (0 0 0) as internalField for U.

Respecting 1) should tremendously improve your case!
jeffchan likes this.
lord_kossity is offline   Reply With Quote

Old   January 19, 2011, 10:54
Default
  #10
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
Hello again and thank you very much for your hints...

the calculation is still not correct, even after changing the parameters

i will upload the actual case...

i have done the following:

- set relaxion factors for p to 0.15 and for U to 0.3
- using Gauss upwind for U divSchemes
- faceLimited Gauss linear 1 GradSchemes
- used english expressions for BC / Grid

fixedMeanValue BC is not available for OpenFOAM 1.7.1

I am also posting the checkMesh Result

@ lord_kossity: i am trying with your hints, after posting this !!!
@ Felix, you were right, i mixed the files of another case, accidentally - i got the (it seems to me) right values for k and omega now... sorry for that - unfortunately it will not work with them neither

Thank you very much so far

Greetings

RugbyGandalf

k file in 0/ directory has been updated - case_act.zip
Attached Files
File Type: zip case.zip (6.4 KB, 11 views)
File Type: txt checkMesh.txt (2.6 KB, 24 views)

Last edited by RugbyGandalf; January 19, 2011 at 11:00. Reason: wrong value for k
RugbyGandalf is offline   Reply With Quote

Old   January 19, 2011, 11:02
Default
  #11
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
actual case with updated values for k - sorry for confusion
Attached Files
File Type: zip case_act.zip (8.4 KB, 14 views)
RugbyGandalf is offline   Reply With Quote

Old   January 19, 2011, 12:44
Default
  #12
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello, RugbyGandalf,


your checkMesh looks OK, so there probably isn't a problem related to the mesh.

Have you already tried running the case without turbulence modeling?

Thanks for posting your updated parameters, but now the eddy viscosity ratio is twice as high as it was before! Do you really want to have values for the eddy viscosity at the inlet of the order of 0.1 mē/s? This is an oil-like viscosity and judging from your transportProperties dictionairy you're trying to simulate an air flow case, am I right?

Please try a value of 30000 for omega at the inlet and the initial field. This leads to a much, much lower eddy viscosity and hopefully the solver is able to handle this. Unless of course it is your intention to have so big eddy viscosity values at the inlet.

The fixedValue 0 settings for omega and k shouldn't pose a problem - if so, the simulation would've already crashed before finishing even one iteration.


Greetings,
Felix.
FelixL is offline   Reply With Quote

Old   January 20, 2011, 09:48
Default
  #13
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
Dear Felix, thank you very much for your reply...

now i got the case working - with the parameters of the new postet cas_working.zip

i also posted two screenshots - showing the velocity and the pressure! Both look correct for the first view...

I am wondering about you high value suggestion for omega - i calculated omega and k from the following formulars:

k = 0.5*(Ux')^2
Ux' = TU*Ux where TU for our wind tunnel is 0.02 and Ux is the main stream velocity
so i got:
k = 0.5 (0.02 * 40.57)^2 = 0.32918

for epsilon:

epsilon = (Cmu ^ 0.75 * k ^ 1.5)/l where Cmu is 0.09 and l is 0.65 for our wind tunnel
epsilon = 0.0477

so i will get for omega = epsilon / (Cmu * k) = 1.6124

i got these formulars from my projekt - supervisor...

I also calculated those values with the formulas from your link - the values are a little bit different, but overall in the same range...

As i mentioned: the calculation works now - but i will get the wrong drag-coefficient
it has to be around 0.06 - and i get a value of 1.7 - 1.9

Do you have any idea, what causes those problems?

Greetings

Martin
Attached Images
File Type: jpg velocity.jpg (12.5 KB, 68 views)
File Type: jpg pressure.jpg (9.3 KB, 54 views)
Attached Files
File Type: zip case_working.zip (6.4 KB, 34 views)
RugbyGandalf is offline   Reply With Quote

Old   January 20, 2011, 10:52
Default
  #14
New Member
 
Join Date: Nov 2010
Posts: 6
Rep Power: 6
Gerard is on a distinguished road
Hi Martin,

I am relative new to CFD and OpenFOAM, but maybe it helps, if you was using inlet conditions for kOmegaSST as proposed in Menter (1994): Two-Equation Eddy-Viscosity Turbulence Models for Engineering Applications. This way you will get quite low turbulence at the inlet, but the turbulent viscosity ratio is not that high.

Looking forward to your progresses.

Gerard
Gerard is offline   Reply With Quote

Old   January 20, 2011, 12:08
Default
  #15
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello, Martin,


could you post a contour plot of the eddy viscosity (nut) and the other turbulent quantities with numerical scales, please? Might give a better idea about the much too high drag coefficient.

And by the way: I still can't reproduce your turbulence dissipation values. You wrote l is 0.65m for your wind tunnel. What's the dimension of your model and wind tunnel? Have a read here: http://www.cfd-online.com/Wiki/Turbulent_length_scale


Greetings,
Felix.
FelixL is offline   Reply With Quote

Old   January 24, 2011, 06:35
Default
  #16
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
I posted my screenshots of omega, k and nut here...

omega and k seem to have the same value for the whole field, except near the body, that is why i zoomed it...

The dimension are the following:

the streamlined body has a length of 0.2 m, It's diameter at the biggest position is 0.078 m.
The wind tunnel is rectangular with a length of 1 m a side. The experimental values have not been token inside, but as you can see on the plan - screenshot (sorry for the bad painting quality) on a gap of this tunnel.

I am going through your given lecture links now and try to get to know how to calculate the right values...

If you have any new hints, please let me know

Regards,

RugbyGandalf
Attached Images
File Type: jpg nut.jpg (22.2 KB, 86 views)
File Type: jpg k.jpg (20.4 KB, 57 views)
File Type: jpg omega.jpg (19.7 KB, 44 views)
File Type: png plan.png (6.2 KB, 44 views)
RugbyGandalf is offline   Reply With Quote

Old   January 24, 2011, 12:23
Default
  #17
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 9
FelixL is on a distinguished road
Hello, Martin,


judging from your nut-plot, the eddy viscosity is way too high (like I suspected). Please select a value for the turbulent length scale L, which is much more reasonable. 0.65m is clearly too high. Please read the links I posted above to better understand this property of turbulent flow.

There's another way to calculate omega: with the eddy viscosity ratio (nut/nu) you can specify omega at the inlet. The eddy viscosity ratio for wind tunnel experiments should be in the order of 1.


Greetings,
Felix.
Alhasan likes this.
FelixL is offline   Reply With Quote

Old   January 26, 2011, 05:49
Default
  #18
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 7
RugbyGandalf is on a distinguished road
Dear Felix,

i tried various values for k and omega in different combinations...

i will open a new thread for the drag coefficient problem, because the first problem - simpleFoam always diverges - has been solved with all your grateful help - thank you all very much...

By the way, at least the calculation also worked with a starting velocity in the hole field.
I set down the timeStep in controlDict to a very small value manage the CourantNumber request.

Thank you very much

Greetings,

Martin
RugbyGandalf is offline   Reply With Quote

Old   January 16, 2012, 11:57
Default
  #19
New Member
 
Michael Woopen
Join Date: Nov 2010
Location: Aachen, Germany
Posts: 11
Rep Power: 6
akOOma is on a distinguished road
Send a message via ICQ to akOOma Send a message via Skype™ to akOOma
Quote:
Originally Posted by FelixL View Post

There's another way to calculate omega: with the eddy viscosity ratio (nut/nu) you can specify omega at the inlet. The eddy viscosity ratio for wind tunnel experiments should be in the order of 1.


Greetings,
Felix.
Would you happen to have a reference paper for that statement?
akOOma is offline   Reply With Quote

Old   January 17, 2012, 07:13
Default Hi
  #20
Senior Member
 
Join Date: Jun 2011
Posts: 141
Rep Power: 6
mechy is on a distinguished road
Dear RugbyGandalf

can you upload your mesh file ?
Greetings,

Martin[/QUOTE]
mechy 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
Laminar simpleFoam and inviscid simpleFoam herenger OpenFOAM Running, Solving & CFD 7 July 11, 2013 06:27
MPI Error - simpleFoam - Floating Point Exception scott OpenFOAM Running, Solving & CFD 3 April 13, 2012 16:34
simpleFoam ddt Euler ? Mo-ITB OpenFOAM Running, Solving & CFD 2 June 12, 2010 13:36
Naca0012 k-e mpirun gives fpe whereas simpleFoam not Pierpaolo OpenFOAM 1 May 8, 2010 03:08
Error running simpleFoam in parallel skabilan OpenFOAM Running, Solving & CFD 2 August 29, 2008 09:42


All times are GMT -4. The time now is 21:26.