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

Weird results k-epsilon with simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By icaroaccordi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2014, 17:30
Default Weird results k-epsilon with simpleFoam
  #1
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
Hi,
I run a simulation on a three-elements wing to find the lift and drag forces on them. The value for lift and drag make sense but are a bit low. When you look at the k field, you can see that there is no spreading of the k values. I find it weird since the turbulent kinetic energy should spread behind the wing.

The velocity is 20m/s
Initial value of k is 0.375
Initial value of epsilon is 0.14

I use upwind schemes for k and epsilon and velocity. I also have to use a fair amount of under-relaxation for stability.

0.3 for U
0.3 for the rest.

Has anyone any idea why this is happening. Or is it just me who is wrong in my interpretations? I say my values are low, this is comparing them with various other simulations from star-ccm+ and ansys fluent which gives values 300N higher (around 630N vs my 350N).

Thank you.
Attached Images
File Type: jpg kinetic energy.jpg (34.0 KB, 103 views)
Alfalfa is offline   Reply With Quote

Old   January 4, 2014, 22:58
Default Converged ?
  #2
Member
 
skyinventorbt's Avatar
 
Dr. B T KANNAN
Join Date: Jul 2011
Location: CHENNAI (MADRAS), INDIA
Posts: 55
Rep Power: 14
skyinventorbt is on a distinguished road
Quote:
Originally Posted by Alfalfa View Post
Hi,
I run a simulation on a three-elements wing to find the lift and drag forces on them. The value for lift and drag make sense but are a bit low. When you look at the k field, you can see that there is no spreading of the k values. I find it weird since the turbulent kinetic energy should spread behind the wing.

The velocity is 20m/s
Initial value of k is 0.375
Initial value of epsilon is 0.14

I use upwind schemes for k and epsilon and velocity. I also have to use a fair amount of under-relaxation for stability.

0.3 for U
0.3 for the rest.

Has anyone any idea why this is happening. Or is it just me who is wrong in my interpretations? I say my values are low, this is comparing them with various other simulations from star-ccm+ and ansys fluent which gives values 300N higher (around 630N vs my 350N).

Thank you.
Whether solutions converged ?
If so, what is the level (E-05 or E-06)?

--
KANNAN B T
skyinventorbt is offline   Reply With Quote

Old   January 4, 2014, 23:06
Default
  #3
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
The solver is not converged, but residuals are really low and the values of Cd and Cl are not changing anymore.
Alfalfa is offline   Reply With Quote

Old   January 5, 2014, 13:12
Default
  #4
Member
 
Icaro A. Accordi
Join Date: Oct 2010
Posts: 31
Rep Power: 15
icaroaccordi is on a distinguished road
I think it is only a scale problem in your results. Usually standard k-e is not good option for airfoils simulations due the stagnation point and adverse pressure gradient. If you have detachment point it is going to be worse. A good option would be SST model. In high-Re is good to get y+ between 30 and 100. If you are going to use low-Re try to achieve y+ < 2. I’ve used Apalart-Alamaras as well with some success. I would recommend SFCD to all convection schemes. It is stable and second order accurate. Another option is linearUpwind. Some testes that I’ve made with a model based in SST, linearUpwind showed some advantages among SFCD only for omega. In some cases I needed to use upwind for omega to avoid spurious oscillation. Your flow seems to be attached and won’t be difficult to get convergence in attached flows. Usually multi-elements have detachment points. For angles near stool I do as you do, see the stability of the cl and cd values instead the convergence of the solver. It is not the ideal but is what we can do in steady simulations. Usually I use 0.3 for p. I use 0.7 up to 0.9 for U. For turbulence quantities I use 0.7. In some simulations I use 0.5 for omega. If you cannot have convergence (eg: e-5) in an attached flow, try to see the quality of your mesh and follow these tricks in:
http://www.dicat.unige.it/guerrero/o...sandtricks.pdf
I hope I could help you.
Best regards
jploz and Mehdi Rami like this.
icaroaccordi is offline   Reply With Quote

Old   January 5, 2014, 14:09
Default
  #5
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
Hi, thank you for the good answer. The reason I use k-epsilon is because it is the one that has been used with the other software and I want to see if I can reproduce those results (or at least be fairly close to it).

As for the y+, it is really hard to keep them in the good range since I don't have any boundary layers. I had skewed faces when I added boundary layers and the simulation was blowing up every time. Now I figured a way to add the boundary layers without having too much skewness (I have like 9 skewed faces and the max is around 4.8 from the checkMesh). I am currently running this simulation to see if at least I can make it work with boundary layers. then I will be able to control y+ better. For now, I use the same schemes and everything but I still get really high values of pressure (in the 10000 range) and velocity (this one is not so bad) but it seems to stabilize slowly. Also, when I look at the fields in paraview, I don't see anything wrong so I guess it will slowly converge to a solution. This simulation is laminar and I will turn on the turbulence when I will get a decent solution for laminar. The only other concern for now is that the values for Cd and Cl oscillate between 3000 and -3000. I think it will stabilize after a while but it is kinda weird.

Las thing for the schemes and UR factors, I can't use a higher UR factor than 0.2 for turbulences and something like 0.3 for velocity and pressure otherwise the simulation just blows up. Also, I tried to use linearUpwind, but OpenFOAM gave me an error "attempt to read beyond eof" and the solver would crash. I use it like this:

Code:
div(phi,k)      bounded Gauss linearUpwind;
div(phi,epsilon) bounded Gauss linear Upwind;
and this gives me the error. Therefore, I simply use upwind.


Finally, I read a bit about it, and I think the reason I cannot get an answer close to the one of Star-CCM+ might be because it does not uses the standard k-epsilon turbulence model but a different one. Also, one guy who works with me says that in his simulations with Star-CCM+, no matter what turbulence model, or even if he uses a laminar flow, he always gets the same results, which I find a bit weird.

I will continue to investigate, any other help would be appreciated, OpenFOAM is hard, but fun to learn
Alfalfa is offline   Reply With Quote

Old   January 5, 2014, 23:35
Default
  #6
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
I tried today a new simulation with this geometry. I start laminar and plan to switch turbulences on later. But now I have a convergence problem. After around 200 iterations, the residuals won't go any lower and the Cl and Cd are just oscillating. When I look at the solution, I can see a weird pressure point right in front of the third element (see picture). I have a low pressure on the top and high pressure on the bottom. This pressure zone is oscillating between high and low pressure and that is what is causing (I think) the oscillation in the values of Cl and Cd. The checkMesh gives me 13 skewed faces (max 4.19) but I don't think it is the problem. I will try a higher order scheme (I currently use upwind) to see if it helps, but I'm not sure it will make any difference (it will probably even be worst). I might also try with a finer mesh to see if it makes any difference. Sadly I cannot upload the case since it is too big, but if anyone has any idea of what is happening here, please let me know. I will put a picture of the mesh also to look if it could be the problem. This behaviour does not make any sense therefore it is a problem with my simulation.
Attached Images
File Type: jpg pressure2.jpg (34.4 KB, 51 views)
File Type: jpg Mesh.jpg (96.6 KB, 47 views)
Alfalfa is offline   Reply With Quote

Old   January 6, 2014, 06:48
Default
  #7
Member
 
Icaro A. Accordi
Join Date: Oct 2010
Posts: 31
Rep Power: 15
icaroaccordi is on a distinguished road
Hi Gabriel,
It is hard to get convergence using laminar flow when you have Re that lead to transition. This kind of pressure fluctuation is not so bizarre due the lack of turbulence model. What I can remember about Star-CCM, the default turbulence model is a two layer realizable k-e model. There is not such model in OF and it would be more stable with coarse mesh. What I could see, your mesh is too coarse. Any way I think you are only comparing the softwares. You can try to refine at the leading edge and insert at least 5 layers in your boundary layer. I`m not sure, but I think that you could choice the standard k-e in Star and set standard wall functions to compare with OF. In Star I`ve only used SST because I was dealing with aerodynamics. About the scheme you need to set the gradSchemes that you are using with limitedLinear, e.g.:

gradSchemes
{
someWord Gauss linear;
}


divSchemes
{
Xxx bounded Gauss limitedLinear someWord;
}
icaroaccordi is offline   Reply With Quote

Old   January 6, 2014, 08:42
Default
  #8
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
Hi Icaro, I will try to run it with the turbulences on and see what I can get from that. After I will try a finer mesh. It is kinda hard to not get a too coarse mesh with snappy without having too much cells. This one already has something like 3.6M cells. If I refine more, it will take even more time to run.

As for Star-CCM, you are right, they don't use the standard model automatically, and the wall fonction neither. You have to chose them manually.
Alfalfa is offline   Reply With Quote

Old   January 7, 2014, 06:13
Default
  #9
Member
 
Icaro A. Accordi
Join Date: Oct 2010
Posts: 31
Rep Power: 15
icaroaccordi is on a distinguished road
Are you doing it as 3D? If you are doing a 2D simulation, you can use extrudeMesh after the snappyHexMesh and get a mesh with much less elements. You are going to need the extrudeMeshDict as well.
icaroaccordi is offline   Reply With Quote

Old   January 7, 2014, 09:59
Default
  #10
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
It is a 3d simulation as the Star-CCM+ one is also 3D. Is it possible to compare both if I'm not doing it 3D for OpenFOAM and 3D for Star-CCM+? The values for drag and lift will be really different I guess.
Alfalfa is offline   Reply With Quote

Old   January 24, 2014, 18:05
Default
  #11
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
Ok, I tried enabling the turbulences but now the simulation blow up after 2-3 iterations. the values for k and epsilon just blow up. The problem seems to come from the same place where the values of P and U oscillate (see image on previous post). I really don't understand what is going on there, my mesh has some skewed faces but nothing major.

Anybody has an idea?
Alfalfa 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
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 16 March 4, 2017 08:30
Problem with SimpleFoam for a solution around an OneraM6 wing gara1988 OpenFOAM Running, Solving & CFD 3 November 13, 2012 05:47
Weird results with simpleFoam cwang5 OpenFOAM Running, Solving & CFD 0 November 24, 2010 06:51
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 1 November 25, 2008 20:21


All times are GMT -4. The time now is 15:09.