|
[Sponsors] |
May 19, 2015, 19:50 |
CFL Adapt parameter
|
#1 |
Member
D L
Join Date: Jun 2012
Posts: 49
Rep Power: 14 |
I've started using v3.2.9 "eagle" and I'm having some trouble understanding the CFL ADAPT PARAM.
In earlier versions this used to be CFL_RAMP and was a little more straightforward, increase CFL until you hit the specified limit. However, the new CFL_ADAPT seems to have a mind of it's own. Here are my questions: 1. The comment in config_template says the 4 parameters are (Factor down, Factor up, min CFL value, max CFL value). In the config_structure.cpp it gives additional comments saying factor down>1, factor up < 1. Why isn't this the opposite with factor down < 1 and factor up > 1? Is the internal algorithm calculating CFLnew = CFLcurrent/factor? 2. I noticed that if I give it a factor down = 1 the preamble in the screen output declares "CFL Adaptation. No." What if I'm confident in my Mesh and setup that I know I only want to ramp up? 3. By what metric is the solver adapting the CFL number? In my 3D case, I see that it changes up and down but mostly stays near the min-limit that I've given it. What's driving this? 4. Where in the source code can I find the CFL adaptation algorithm? The reason I'm investigating this CFL Adaptation is because in my 3D case it's taking a long time to converge. It's a well benchmarked case (HLPW-1) and very steady-state at lower angles yet my solution is oscillating and very slowly converging towards the Exp value. I believe the main culprit is because I set my CFL value to 0.75 to get the case initialized. Now that I've gotten past divergence issues I'd like it to converge faster but unfortunately CFL adaptation isn't helping very much and I'm having to manually stop and restart while increasing the CFL number. Last edited by DLuo; May 20, 2015 at 11:45. |
|
May 20, 2015, 19:33 |
|
#2 | |
Senior Member
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14 |
Quote:
CFL = CFL* ( RhoRes_old/RhoRes_new)^power, where "power" is the factor up/factor down, chosen depending on whether the new value of the residual is greater or less than the previous value. If you only want it to go up, set the first entry to 0. The metric driving the adaptation is the residual value. The CFL adaptation is implemented in: output_structure.cpp, COutput::SetCFL_Number |
||
May 21, 2015, 14:13 |
|
#3 |
Member
D L
Join Date: Jun 2012
Posts: 49
Rep Power: 14 |
Thanks Heather. This helps a lot.
|
|
April 13, 2018, 06:07 |
|
#4 | |
New Member
Andrea Bornaccioni
Join Date: Mar 2018
Location: Rome
Posts: 10
Rep Power: 8 |
Quote:
/*--- Compute MG factor ---*/ for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++) { if (iMesh == MESH_0) MGFactor[iMesh] = 1.0; else MGFactor[iMesh] = MGFactor[iMesh-1] * config[val_iZone]->GetCFL(iMesh)/config[val_iZone]->GetCFL(iMesh-1); } My doubt is if i set Multigrid to 0 in the .cfg file, then i use CFL ADAPTATION, the Multigrid algorithm will be still internally activated? p.s. Thank you for your post, i've found it very helpful! |
||
May 13, 2024, 04:52 |
|
#5 | |
New Member
Tomas Perez Zapico
Join Date: Mar 2023
Posts: 17
Rep Power: 3 |
Hi I am using version 8.0.1 and I thought the CFL_ADAPT followed this expression. However, having set factor_down=0 in order to increase the CFL, I see that the CFL is just multiplied by factor_up until it reaches its maximum value, but suddenly it goes back down to its minimum value and starts increasing again. Does someone know how the CFL_ADAPT parameter works in this version?
Quote:
|
||
May 13, 2024, 05:21 |
|
#6 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 679
Rep Power: 21 |
A short description of each configuration option can be found in the config_template.cfg file. Example configuration files for specific cases can be found in the Testcases directory.
|
|
May 13, 2024, 05:52 |
|
#7 |
New Member
Tomas Perez Zapico
Join Date: Mar 2023
Posts: 17
Rep Power: 3 |
Thanks for your reply. I have already looked at the configuration template but it still is not clear to me how it works as I thought that once it reached its maximum value, if the factor down is set to 0, it should stay at the maximum CFL.
|
|
May 19, 2024, 19:28 |
|
#8 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 679
Rep Power: 21 |
No, it will then simply go to CFL_min immediately.
If it converges, CFL will be increased as CFL_new = CFL*FactorUp If it does not converge, CFL will be decreased as CFL_new = CFL*FactorDown. So if it detects that it does not converge sufficiently, then the CFL_new = CFL*0 = 0 This is lower than CFL_min, so CFL_new = CFL_min |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
meshing of a compound volume in GMSH | shawn3531 | OpenFOAM | 4 | March 12, 2015 11:45 |
CFL ramp option | curky | SU2 | 1 | April 11, 2013 14:25 |
Force can not converge | colopolo | CFX | 13 | October 4, 2011 23:03 |
compile errors of boundary condition "expDirectionMixed" | liying02ts | OpenFOAM Bugs | 2 | February 1, 2010 21:11 |
Expert Parameter for compressible transient | ioannis | CFX | 0 | November 2, 2005 20:28 |