[FLASH-USERS] Local CFL

Klaus Weide klaus at flash.uchicago.edu
Tue Oct 4 13:30:12 EDT 2016


On Tue, 4 Oct 2016, Jason Galyardt wrote:

> Dear FLASH Users,
> 
> FLASH 4.3 includes the facility to set the CFL factor on a local level via
> CFL_VAR, however the documentation is rather sparse on this feature. Does
> anyone know whether this variable is adjusted during the evolution of a
> simulation? For example, does the shock detection algorithm lower the CFL
> in just those areas that need it for numerical stability?

Jason,

Yes, that's the idea. Basically,

 IF CFL_VAR exists, then
   (a) Use its local value, instead of a global 'cfl' value, to compute 
       the next time step;
   (b) Lower its local value, instead of the global 'cfl' value, for 
       local reasons (like detected shocks) - if doing so is requested.

For (a) see Hydro_computeDt.F90 (under unsplit). Note that you can 
increase the 'region of influence' of a lowered local CFL value by setting 
hy_cflStencil to something > 0, which should be safer for stability;
however, that value is currently hardwired as

 integer, parameter :: hy_cflStencil = 0

in the Hydro_data module.

For (b) see in particular hy_uhd_shockDetect.F90.

The lowering of effective CFL values (whether local or global) applies 
only under some conditions. Relevant here: runtime parameters shockDetect 
and shockLowerCFL must be true.

If CFL values are changed automatically because of some detected 
condition, they will in general revert to (or towards) the default value 
in the next time step. (hy_uhd_unsplit.F90, 

If there is CFL_VAR in a simulation, you should initialize it in 
Simulation_initBlock to appropriate values.

If no automatic lowering is requested, user code is in control of 
maintaining local CFL_VAR values; so if you don't adjust them (say in 
Simulation_adjustEvolution) they remain as initialized.

Klaus



More information about the flash-users mailing list