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

simpleFoam diverges at low Reynolds number

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

Like Tree3Likes
  • 3 Post By aow

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2020, 09:43
Default simpleFoam diverges at low Reynolds number
  #1
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Morning Foamers,


I used simpleFoam to simulate air flow in a complex geometry. The air flow velocity is 0.1 m/s so I thought I should use laminar flow model. It ran well (4000 iterations) and gave me result.


I then checked Reynolds number. Depending on where on the geometry, I got Reynolds number between 8,700 and 37,000. So, if it is a pipe flow, it is in turbulence regime.



But RAS k-epsilon model keeps giving me divergence result in the first 5 steps. I adjust initial value of k and epsilon (they are very low though) and relaxation factors and cannot get the problem resolved.



Any suggestion on solving low Reynolds flow problem?


Kind Regards,
Charles
Marpole is offline   Reply With Quote

Old   May 5, 2020, 13:10
Default
  #2
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 11
aow is on a distinguished road
Quote:
Originally Posted by Marpole View Post
I used simpleFoam to simulate air flow in a complex geometry.
This is the first thing that jumped out at me. Since your geometry is "complex," have you tried verifying the quality of your mesh using the checkMesh utility? The number of issues will be indicated by "Failed # mesh checks" at the end of the output. I would try this and see what you get in terms of skew and non-orthogonality values. If the skew is less than 2 and the non-orthogonality is below 60 degrees, then it's probably not the mesh, but if either value is higher than that I would try improving your mesh quality. There can be other issues besides these two, but they usually cause most numerical blow-up problems due to bad meshing.

Also, if you can post some images of the mesh, then maybe it would be easier to identify if there are issues. For instance, even if you don't get a bad output from the checkMesh utility, perhaps you still have large jumps in cell size that are causing your simulation to diverge.

Additionally, the k-espilon model can be problematic if you have flow separation in your model. If this is the case, using the k-omega SST model is a better choice.
aow is offline   Reply With Quote

Old   May 5, 2020, 13:58
Default
  #3
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Thanks Andrew.



I did check mesh. There is only one failure.


Code:
***Max skewness = 4.84351, 2 highly skew faces detected which may impair the quality of the results


As the number of cells is large (2M), it would be difficult to display the mesh in one or two images.



The first question comes to me is that, why it converges well with laminar flow (can run 4000 iteration and, maybe, forever), but diverge with RAS k-epsilon model in less than 10 iterations. I dialed down the relaxation factor to 0.2 but it still diverges with the first few steps. As the velocity is low (from 0.1 m/s to 10 m/s) and flow is inside an enclosure, I'm not expecting separation. But if k-omega is stable, I don't mind to try it out.
Marpole is offline   Reply With Quote

Old   May 5, 2020, 16:37
Default
  #4
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 11
aow is on a distinguished road
First of all, are you getting "bounding value" messages for the turbulence field variables, k and epsilon, in your solver output? This will tell you the turbulence model is the reason for the divergence, but it could be caused by a bad mesh rather than the model being inadequate for your case.

The skewness value you mentioned is rather high, but to know whether it is an issue or not I would try to identify if those cells are causing the divergence using a visualization. This video by the awesome Josef Nagy is helpful in showing how you can isolate elements that have poor mesh quality and then load them in ParaView. Note that Josef is using the .com version of OpenFOAM, which has additional checkMesh functionality compared to the .org version of OpenFOAM. More specifically, the -writeAllFields option is available only for the .com version, but all you really need is the -writeSets <surfaceFormat> option, where surfaceFormat can be either vtk or ensight.

Once you've loaded and plotted the problematic elements, then you can also load your OpenFOAM case and create a threshold filter for one of the field variables that's blowing up to see if the region where things are blowing up overlaps with the skewed cells. If they don't overlap, that's fine. The threshold filter showing where the divergence is occurring might reveal something else bad about your mesh, which might be a notable jump in cell size (you always want smooth cell size variation if possible, which can be done using the uniform grading method in your blockMeshDict file).

I also just thought of something, could you post the unmeshed geometry to show how complex it is to identify possible problem regions as well as your blockMeshDict and snappyHexMeshDict files?
acgnipper, Marpole and piotr.mecht like this.
aow is offline   Reply With Quote

Old   May 5, 2020, 17:51
Default
  #5
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
I will check out the video for identifying the skewed faces. Thanks. The mesh is not created by snappyHexMesh but by cfMesh. The dictionary is quite simple.



k and, especially, epsilon grew very quickly beyond the bounding values on the 1st and 2nd step, for most of time, on the 1st step. I agree that the divergence is when solving k and epsilon equations. It seems that these two equations are very sensitive to the cell quality. Is k-Omega a better choice?
Marpole is offline   Reply With Quote

Old   May 7, 2020, 06:58
Default
  #6
Senior Member
 
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 15
ybapat is on a distinguished road
As you have not mentioned abount BCs for k and epsilon I suggest that you check these BCs. You can use intensity based on Re and hydraulic dia or turbulence length scale for epsilon.
ybapat is offline   Reply With Quote

Old   May 7, 2020, 10:25
Default
  #7
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Thanks Yogesh. The inlet is an duct 0.9m X 1m with velocity 0.135m/s. The Reynolds number (air) is then 8,704 (> 4,000 and thus turbulent).



Inlet boundary turbulence kinetic energy k and dissipation rate epsilon are estimated 6.8e-5 and 9.5e-8, which is very small (and I guess that is the cause of divergence).



Outlet boundary condition uses inletoutlet boundary conditions with the above values.



Wall boundary layer is applied to walls.
Marpole is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam & Theater jipai OpenFOAM Running, Solving & CFD 3 June 18, 2019 10:11
SigFpe when running ANY application in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 23, 2015 14:53
low reynolds number models in Fluent doug Main CFD Forum 6 August 4, 2012 14:39
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


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