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

simpleFoam : how to optimize timestep and assess convergence ?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By wildfire230

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2019, 15:15
Default simpleFoam : how to optimize timestep and assess convergence ?
  #1
New Member
 
Tom Alderweireldt
Join Date: Jan 2015
Location: Schilde, Belgium
Posts: 16
Rep Power: 11
Talder is on a distinguished road
While setting up a simpleFoam case (external flue gas flow around pipes in a furnace heat recovery section). Problem size 1 meter, pipesize 0.2 meter, mesh size 200.000.
The mesh is blockmeshed, max non-ortho = 45%, max skew = 2.2, max ratio = 4.5, so a decent mesh. Reynolds : about 10.000. I set up a k-epsilon turbulence model.


1st Try:
- wildly diverging on k and epsilon. When putting relaxation to 0.1 on k and epsilon, and reducing timestep (deltaT) to much smaller numbers, it converged.


2nd Try:
- The solution didn't look good (clearly unconverged inlet zone effects), found out that 1e-3 is not good enough as convergence criterion for simpleFoam. When I set it to 1e-4 for U,k,epsilon (1e-3 for p), it started running much longer and the solution looked decent.



3rd Try:
- RelTol makes a huge difference : as soon as I reduced it from 0.1 to 0.05 (for p and U) it converged easier.



4th Try:
- tried to gain some solution time : starting from potentialFoam, adding nNonOrthogalcorrectors to simple, tweaking Reynolds a bit higher.


All next trials:
- found out I could gradually raise relaxation on k-epsilon from 0.1 to 0.3
- found out I could gradually increase timestep from 0.001 to 0.01 without unstability.



Now the questions:
1) what is the recommended simpleFoam timestep : is it related to Courant number ? some cases seem to converge with timesteps way larger than a reasonable Courant number.


2) The simpleFoam output doesn't seem to give useful information about convergence criteria. It just stops and says it converged. When I look at the solution with 1e-3 it's bad, when I use 1e-4 or smaller it looks good but runs much longer. Sometimes simpleFoam just doesn't stop and runs to time limit far below 1e-4 accuracy and the solution looks good, but why doesn't it stop below 1e-4 convergence criterion.



3) What is a reasonable relaxation factor for k-epsilon ?


Tom.
Talder is offline   Reply With Quote

Old   February 6, 2019, 15:21
Default
  #2
Senior Member
 
Join Date: Jul 2013
Posts: 124
Rep Power: 13
wildfire230 is on a distinguished road
As far as I know the simpleFoam solver does not use the timestep. Usually you should just set it to 1 and then the "time" just tells you the total number of iterations the solver has gone through. Changing the timestep in simpleFoam should have no effect on the results or convergence. When looking at convergence of simpleFoam, the solver will stop when the initial residual for each variable decreases to less than the tolerance you set. With simpleFoam you want the solver to reach convergence before it reaches the endTime, so I usually set my endTime to a large number. I'm not sure about a relaxation factor for k-epsilon, but I would guess 0.7.
Talder and MonkeyWithFox like this.
wildfire230 is offline   Reply With Quote

Old   February 15, 2019, 08:48
Default
  #3
Member
 
Join Date: Mar 2016
Posts: 73
Rep Power: 10
sufjanst is on a distinguished road
The calculation stops at the convergence criteria when you run Steady-State. The courant-number is for unseady calculations. Something is getting mixed up here. Are you running a stady or transient simulation?



You can get good relaxation factors from the tutorials.
sufjanst 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



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