[FLASH-USERS] Problem with Diffuse module

ascenzi stefano.ascenzi at roma2.infn.it
Tue Nov 28 09:20:14 EST 2017


Dear Ernesto and Jon,

thank you very much for your answers. Both the suggestions helped me a 
lot, I raised dt_diff_factor and put addThermalFlux = .false. .
In this way I was able to run a much longer simulation.

Nevertheless at a certain point the simulation stops after many warning 
messages like this

[gr_hypreSolve]: Nonconv./failure ierr=0, component=0, converged=F, 
|initial RHS|^2=1.5905+100, num_iterations=500, 
final_res_norm=5.58312351294

(similar to those of the older post Ernesto linked me)

then I had the following error message

  DRIVER_ABORT: [Diffuse]: computed dt is not positive! Aborting!

  Driver_abort called. See log file for details.
  Error message is [Diffuse]: computed dt is not positive! Aborting!
  Calling MPI_Abort() for shutdown in   2 seconds!

due to the fact that dt_diffuse dropped very fast (despite the fact that 
dt_diff_factor = 1.E30).

Is it possibile that this is due to the fact that the temperature 
becomes too high (about 10^12 K)?

Moreover a further question: is there a simple way to switch on the 
diffusion only after a user-defined time or switch it off in a specific 
region of the domain regardless to the value of the density in that 
region ?

Thank you very much,

Stefano

Il 2017-11-27 22:16 ERNESTO ZURBRIGGEN ha scritto:
> Stefano,
> 
> just to add a tricky detail.
> If you are running a simulation using the unsplit hydro solver
> (_Hydro/HydroMain/unsplit/Hydro_Unsplit_),
> you have to set the runtime parameter addThermalFlux=.false. (.true.
> by default), otherwise, you will be adding
> the isotropic thermal conduction effect twice.
> 
> You might be interested in this old post:
> 
> http://flash.uchicago.edu/pipermail/flash-users/2017-August/002388.html
> [2]
> 
> Best!
> Ernesto.
> 
> 2017-11-27 16:20 GMT-03:00 Slavin, Jonathan <jslavin at cfa.harvard.edu>:
> 
>> Hi Stefano,
>> 
>> The problem that you're running into is that the timestep limitation
>> for stability of explicit diffusion calculations is typically very
>> short. However, you can get around this if you use implicit or
>> semi-implicit diffusion (Crank-Nicholson). What are you setting for
>> diff_thetaImplct? I think the default value is 0.5 which
>> corresponds to Crank-Nicholson diffusion (0 is explicit and 1 is
>> implicit). In this case the timesteip limitation should not really
>> apply and you can set dt_diff_factor to something large. That
>> multiplies the dt limit imposed by diffusion by that factor allowing
>> larger timesteps. I set it to a value large enough, 1.E10, so that
>> the dt set by the Diffuse unit doesn't limit the timestep.
>> 
>> There has been some work showing that in some cases using
>> Crank-Nicholson does not make the simulation unconditionally stable,
>> but in my experience it generally has been.
>> 
>> Regards,
>> Jon
>> 
>> On Mon, Nov 27, 2017 at 1:00 PM,
>> <flash-users-request at flash.uchicago.edu> wrote:
>> 
>>> From: ascenzi <stefano.ascenzi at roma2.infn.it>
>>> To: Flash users <flash-users at flash.uchicago.edu>
>>> Cc:
>>> Bcc:
>>> Date: Mon, 27 Nov 2017 12:14:01 +0100
>>> Subject: [FLASH-USERS] Problem with Diffuse module
>>> 
>>> Dear FLASH users,
>>> 
>>> I am trying to simulate an expanding optically thick spherical
>>> shell of matter with a source in the centre (source described by
>>> user defined boundary conditions).
>>> 
>>> I tried to switch on the thermal diffusion using a power law
>>> prescription for the conductivity in the form: sigma = K0 T**3
>>> rho**(-1) in order to reproduce the thermal radiative transfer of
>>> the star described by a diffusive approach, where the flux is F =
>>> -K0 T**-3 rho**(-1) grad T.
>>> 
>>> Unfortunately when I switch on the thermal diffusion the timestep
>>> (diffusion dt) becomes extremely small, which makes the simulation
>>> impossible to handle. Actually I notice that my dt rise
>>> monotonically until I obtain a warning message (that I had several
>>> times also at the beginning of the simulation with no diffusion):
>>> 
>>> [gRSt] afterGeo fallback to order 1 for DIR_X at i,j= 5
>>> 1 in Block 10 @ 0
>>> [dR1St] afterGeo 3.3108486768816685
>>> 9.2775874623827751E-008 275453229333938.16
>>> -86.817733542062342
>>> 
>>> At this point the dt drops, reaches a minimum and then rise again
>>> until it reach almost the same value as before and the warning
>>> message appears again, dt drops and so on in a sort of “saw
>>> tooth” fashion. (I notice also that in this “saw tooth”
>>> fashion there is a very slow drift towards higher values of dt,
>>> but this drift is still too slow to be useful).
>>> 
>>> I found that the warning message is probably called by the
>>> routine “hy_uhd_getRiemannState” and is due to the fact that
>>> the pressure is negative somewhere.
>>> 
>>> Do you know how can I solve this warning and why the timestep is
>>> so small (about 10^-8 s against 1 s of the case with no
>>> diffusion)? I put a diffusion cutoff at rho=5*10^-12 g/cm^3 .
>>> 
>>> Thank you very much,
>>> 
>>> Stefano
>>> 
>>> P.S. I am using the Unsplit diffusion but also with FluxBased the
>>> behavior is similar.
>>> 
>>> _______________________________________________
>>> flash-users mailing list
>>> flash-users at flash.uchicago.edu
>>> http://flash.uchicago.edu/mailman/listinfo/flash-users [1]
>> --
>> 
>> ________________________________________________________
>> Jonathan D. Slavin Harvard-Smithsonian CfA
>> jslavin at cfa.harvard.edu 60 Garden Street, MS 83
>> phone: (617) 496-7981 Cambridge, MA 02138-1516
>> cell: (781) 363-0035 USA
>> ________________________________________________________
> 
> --
> 
> _Dr. Ernesto Zurbriggen__ _
> 
> _Consejo Nacional de Investigaciones Científicas y Técnicas
> __(CONICET)__, Instituto de Astronomía Teórica y Experimental
> (IATE). _
> 
> _Universidad Nacional de Córdoba __(UNC)__, __Observatorio
> Astronómico de Córdoba __(OAC)__. _
> 
> _Teléfono: +54 0351 4331064-5, interno 222. _
> Laprida 854, Bº Observatorio (CP 5000), Córdoba, Argentina.
> 
> 
> 
> Links:
> ------
> [1] http://flash.uchicago.edu/mailman/listinfo/flash-users
> [2] 
> http://flash.uchicago.edu/pipermail/flash-users/2017-August/002388.html



More information about the flash-users mailing list