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

CFL ramp option

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Amrita Lonkar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2013, 05:54
Default CFL ramp option
  #1
New Member
 
Milosz
Join Date: Jan 2013
Posts: 14
Rep Power: 13
curky is on a distinguished road
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?
curky is offline   Reply With Quote

Old   April 11, 2013, 14:25
Default
  #2
New Member
 
Amrita Lonkar
Join Date: Nov 2012
Posts: 14
Rep Power: 14
Amrita Lonkar is on a distinguished road
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
amitkamboj likes this.
Amrita Lonkar 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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32


All times are GMT -4. The time now is 07:25.