CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

CFL Adapt parameter

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By DLuo
  • 3 Post By hlk
  • 1 Post By bigfootedrockmidget

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2015, 19:50
Default CFL Adapt parameter
  #1
Member
 
D L
Join Date: Jun 2012
Posts: 49
Rep Power: 14
DLuo is on a distinguished road
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.
Attached Images
File Type: png Convergence.png (6.5 KB, 81 views)
bornax likes this.

Last edited by DLuo; May 20, 2015 at 11:45.
DLuo is offline   Reply With Quote

Old   May 20, 2015, 19:33
Default
  #2
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by DLuo View Post
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.
Thank you for your question.

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
DLuo, mlooti and bornax like this.
hlk is offline   Reply With Quote

Old   May 21, 2015, 14:13
Default
  #3
Member
 
D L
Join Date: Jun 2012
Posts: 49
Rep Power: 14
DLuo is on a distinguished road
Thanks Heather. This helps a lot.
DLuo is offline   Reply With Quote

Old   April 13, 2018, 06:07
Default
  #4
New Member
 
Andrea Bornaccioni
Join Date: Mar 2018
Location: Rome
Posts: 10
Rep Power: 8
bornax is on a distinguished road
Quote:
Originally Posted by hlk View Post
Thank you for your question.

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
I see that in "COutput::SetCFL_Number" there are a couple of lines for MG factor calculation:

/*--- 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!
bornax is offline   Reply With Quote

Old   May 13, 2024, 04:52
Default
  #5
New Member
 
Tomas Perez Zapico
Join Date: Mar 2023
Posts: 17
Rep Power: 3
tomaspzapico is on a distinguished road
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:
Originally Posted by hlk View Post
Thank you for your question.

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
tomaspzapico is offline   Reply With Quote

Old   May 13, 2024, 05:21
Default
  #6
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 657
Rep Power: 19
bigfootedrockmidget is on a distinguished road
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.
bigfootedrockmidget is offline   Reply With Quote

Old   May 13, 2024, 05:52
Default
  #7
New Member
 
Tomas Perez Zapico
Join Date: Mar 2023
Posts: 17
Rep Power: 3
tomaspzapico is on a distinguished road
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.
Quote:
Originally Posted by bigfootedrockmidget View Post
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.
tomaspzapico is offline   Reply With Quote

Old   May 19, 2024, 19:28
Default
  #8
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 657
Rep Power: 19
bigfootedrockmidget is on a distinguished road
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
giovanni.medici likes this.
bigfootedrockmidget 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
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


All times are GMT -4. The time now is 10:52.