CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   SU2 (http://www.cfd-online.com/Forums/su2/)
-   -   CFL ramp option (http://www.cfd-online.com/Forums/su2/115406-cfl-ramp-option.html)

curky March 30, 2013 05:54

CFL ramp option
 
Hi,
I would like to dectrease CFL number during iterations. In the example configuration file there is an option CFL_RAMP:

% CFL ramp (factor, number of iterations, CFL limit)
CFL_RAMP= ( 1.0, 50, 2.0 )

I have tried this but it looks like CFL limit is only upper boundary.
When I set:

CFL_NUMBER= 100.0
CFL_RAMP= ( 0.8, 100, 0.1 )

program don't use ramp option and all iterations use CFL=100.

When I set:


CFL_NUMBER= 100.0
CFL_RAMP= ( 0.8, 100, 100 )

program use ramp option but in every 100 steps it change CFL. In a result I almost get convergence but CFL is so small that I can't reach it.
Is there any solution to set lower boundary of CFL number in ramp option?

Amrita Lonkar April 11, 2013 13:25

Hi,

Thanks for your question.

I understand that you are trying to decrease the CFL as the number of iterations increases. This option is not available in SU2, but it's a very easy to implement.

I suggest you go to the file config_structure.cpp in the folder trunk/Common/src

Then, go to the method, UpdateCFL of class CConfig.

The very first set of lines are:

if ((val_iter % int(CFLRamp[1]) == 0 ) && (val_iter != 0)) {
change = false;
for (iCFL = 0; iCFL <= nMultiLevel; iCFL++) {
coeff = pow(MG_CFLRedCoeff, double(iCFL));
if (Adjoint) coeff = coeff * Adj_CFLRedCoeff;

if (CFL[iCFL]*CFLRamp[0] < CFLRamp[2]*coeff) {
CFL[iCFL] = CFL[iCFL]*CFLRamp[0];
change = true;
}
}






For your case in which you want to decrease the CFL, these lines of code should be replaced by,

if ((val_iter % int(CFLRamp[1]) == 0 ) && (val_iter != 0)) {
change = false;
for (iCFL = 0; iCFL <= nMultiLevel; iCFL++) {
coeff = pow(MG_CFLRedCoeff, double(iCFL));
if (Adjoint) coeff = coeff * Adj_CFLRedCoeff;

if (CFL[iCFL]*CFLRamp[0] > CFLRamp[2]*coeff) {
CFL[iCFL] = CFL[iCFL]*CFLRamp[0];
change = true;
}
}

Hope this helps,

Amrita


All times are GMT -4. The time now is 08:14.