[FLASH-USERS] courant factor

Riccardo Ciolfi riccardo.ciolfi at oapd.inaf.it
Fri Apr 28 11:07:38 EDT 2017


 Dear Robert and Klaus, 

thank you very much for you reply. 

First, I would like to ask a clarification: does "global" delta_t mean that it is set the same in the entire block (but can still vary in different blocks) or it is the same in the entire computational domain of the simulation (i.e. in all the blocks)?  

To answer your question, my setup is purely hydro (an initial ball of matter in expansion, with a max expansion speed of 1e-4 c).
In 1D it is a spherically simmetric expansion and cfl=0.8 is fine. In 2D I use axisymmetry and cylindrical coordinates with reflective bounday conditions on R_cyl=0 and outflow-type on R_cyl_max, z_min, and z_max. 
Could it be that the cfl is required very low close to the axis, thus compromising the choice of delta_t for the entire domain?

The failure in 2D with any cfl larger than 0.1 is essentially at the beginning of the simulation. 

Thanks a lot!

 Best, 
 Riccardo 



----- Messaggio originale -----
Da: "Robert Fisher" <rfisher1 at umassd.edu>
A: "Klaus Weide" <klaus at flash.uchicago.edu>
Cc: "Riccardo Ciolfi" <riccardo.ciolfi at oapd.inaf.it>, flash-users at flash.uchicago.edu
Inviato: Venerdì, 28 aprile 2017 16:04:32
Oggetto: Re: [FLASH-USERS] courant factor

Dear Riccardo :

  As Klaus indicates, a CFL number of 0.8 is generally sufficient, and 0.5
is conservative. Requiring 0.1 may indicate some other issues in your
initial condition and/or boundary conditions, which may be physical, but
could also be a bug.

  Can you also tell us when the crash is occurring? Shortly after
initialization or well into the run?  This is an important clue as to what
is happening.

  It should be emphasized that the CFL condition is a necessary but not
sufficient condition for numerical stability of a hydrodynamics code. This
is because the condition itself is derived from a linearized analysis and
can break down during strongly nonlinear evolution. For example, a strong
acceleration or rapid cooling can drive the system unstable during a single
timestep. For this reason, you will find problems with strong gradients in
the initial condition, like shock tubes, often utilize a reduced initial
timestep, and then "relax" to CFL. A reduced timestep can be set with the
FLASH parameter dtinit.

  Best wishes,

  Bob

On Thu, Apr 27, 2017 at 8:35 PM, Klaus Weide <klaus at flash.uchicago.edu>
wrote:

> On Thu, 27 Apr 2017, Riccardo Ciolfi wrote:
>
> > I am trying to understand the definition of the variable cfl. Does it
> > correspond to the courant factor Delta_t/Delta_x * v_max?
>
> The timestep Delta_t is chosen such that
>
>    Delta_t/Delta_x * v_max  <=  cfl
>
> should be true in *each* cell (in 1D).
>
> > Is this the same at all levels, so that Delta_t is reduced by a factor
> > of 2 together with Delta_x when moving to the next refinement level?
>
> There is only one global Delta_t.  Delta_x depends on the block.
>
> You can think of it as computing a local Delta_t for each cell, and the
> global Delta_t is then the min of them.
>
> > Is there a simple way to enforce it?
>
> FLASH already does this for you.
>
> > I am using FLASH4.4 and for 1D hydro simulations I adopted the suggested
> > clf=0.8 without any problem. When I move to 2D I cannot run unless I put
> > cfl as low as 0.1. Is this expected?
>
> No, you should be able to uses larger values of cfl - as long as your
> setup is purely a hydro problem.
>
> > For coordinates with
> > Delta_x=Delta_y, shouldn't be sufficient to reduce the courant factor by
> > a factor of sqrt(2)?
>
> See Hydro_computeDt for how exactly the computation is done for 2D and 3D.
> But generally, a value of 0.8 or so should be good even for 2D.
>
> Are you using curvilinear coordinates?
> Are you using additional physics that change the solution?
> Do you have unusual or extreme initial or boundary conditions?
>
>
> Klaus
>



-- 
Dr. Robert Fisher
Associate Professor / Graduate Program Director
University of Massachusetts/Dartmouth
Department of Physics
285 Old Westport Road
North Dartmouth, Massachusetts 02747
robert.fisher at umassd.edu
http://www.novastella.org



More information about the flash-users mailing list