
[Sponsors] 
January 18, 2011, 12:04 
simpleFoam always diverges

#1 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
Dear CFDCommunity,
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 

January 18, 2011, 12:31 

#2 
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 200
Rep Power: 10 
Hi,
post your case files (without grid), otherwise I can't help you Regards, Christian 

January 18, 2011, 13:32 

#3 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
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 

January 18, 2011, 13:38 

#4 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
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 

January 18, 2011, 13:43 

#5 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
PS: needed to transform them into txt for upload
Got the idea to zip it: so once again 

January 18, 2011, 17:54 

#6 
New Member

Well,
The boundary files could not be understood, not in English you know. Anyways, here are few suggestions: 1. Underrelaxations : p 0.15 , U 0.5 2. divSchemes : Use upwind for 'U' You could switch to higher order schemes later as the solution stablilizes.... 

January 19, 2011, 04:38 

#7 
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 200
Rep Power: 10 
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 

January 19, 2011, 05:18 

#8 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 10 
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: 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: 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.cfdonline.com/Wiki/Turbu...ary_conditions Greetings, Felix. 

January 19, 2011, 10:23 

#9 
Member
Andreas Dietz
Join Date: Mar 2009
Location: Munich
Posts: 79
Rep Power: 9 
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! 

January 19, 2011, 10:54 

#10 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
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 Last edited by RugbyGandalf; January 19, 2011 at 11:00. Reason: wrong value for k 

January 19, 2011, 11:02 

#11 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
actual case with updated values for k  sorry for confusion


January 19, 2011, 12:44 

#12 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 10 
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 oillike 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. 

January 20, 2011, 09:48 

#13 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
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 dragcoefficient 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 

January 20, 2011, 10:52 

#14 
New Member
Join Date: Nov 2010
Posts: 6
Rep Power: 7 
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): TwoEquation EddyViscosity 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 

January 20, 2011, 12:08 

#15 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 10 
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.cfdonline.com/Wiki/Turbulent_length_scale Greetings, Felix. 

January 24, 2011, 06:35 

#16 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
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 

January 24, 2011, 12:23 

#17 
Senior Member
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 10 
Hello, Martin,
judging from your nutplot, 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. 

January 26, 2011, 05:49 

#18 
Member
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 8 
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 

January 16, 2012, 11:57 

#19 
New Member
Michael Woopen
Join Date: Nov 2010
Location: Aachen, Germany
Posts: 12
Rep Power: 7 
Would you happen to have a reference paper for that statement?


January 17, 2012, 07:13 
Hi

#20 
Senior Member
Join Date: Jun 2011
Posts: 151
Rep Power: 7 
Dear RugbyGandalf
can you upload your mesh file ? Greetings, Martin[/QUOTE] 

Thread Tools  
Display Modes  


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 ?  MoITB  OpenFOAM Running, Solving & CFD  2  June 12, 2010 13:36 
Naca0012 ke 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 