<div dir="ltr"><font color="#000000"><span style="font-family:arial,helvetica,sans-serif">Stefano,</span><br></font><div><span style="font-family:arial,helvetica,sans-serif"><font color="#000000">just to add a tricky detail. </font></span></div><div><span style="font-family:arial,helvetica,sans-serif"><font color="#000000">If you are running a simulation using the unsplit hydro solver (<i>Hydro/HydroMain/unsplit/Hydro_Unsplit</i>), </font></span></div><div><font color="#000000">you have to set the runtime parameter addThermalFlux=.false. (.true. by default), o</font><span style="color:rgb(0,0,0)">therwise, you will be adding </span></div><div><span style="color:rgb(0,0,0)">the isotropic thermal conduction effect twice. </span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">You might be interested in this old post:</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><font color="#000000"><a href="http://flash.uchicago.edu/pipermail/flash-users/2017-August/002388.html">http://flash.uchicago.edu/pipermail/flash-users/2017-August/002388.html</a></font><br></div><div><font color="#000000"><br></font></div><div><font color="#000000">Best! </font></div><div><font color="#000000">Ernesto. </font></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-27 16:20 GMT-03:00 Slavin, Jonathan <span dir="ltr"><<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi Stefano,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Jon</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 1:00 PM, <span dir="ltr"><<a href="mailto:flash-users-request@flash.uchicago.edu" target="_blank">flash-users-request@flash.<wbr>uchicago.edu</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: ascenzi <<a href="mailto:stefano.ascenzi@roma2.infn.it" target="_blank">stefano.ascenzi@roma2.infn.it</a><wbr>><br>To: Flash users <<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.<wbr>edu</a>><br>Cc: <br>Bcc: <br>Date: Mon, 27 Nov 2017 12:14:01 +0100<br>Subject: [FLASH-USERS] Problem with Diffuse module<div><div class="h5"><br>Dear FLASH users,<br>
<br>
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).<br>
<br>
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.<br>
<br>
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):<br>
<br>
[gRSt] afterGeo fallback to order 1 for DIR_X at i,j= 5 1 in Block 10 @ 0<br>
[dR1St] afterGeo 3.3108486768816685 9.2775874623827751E-008 275453229333938.16 -86.817733542062342<br>
<br>
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).<br>
<br>
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.<br>
<br>
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 .<br>
<br>
Thank you very much,<br>
<br>
Stefano<br>
<br>
P.S. I am using the Unsplit diffusion but also with FluxBased the behavior is similar.<br><br></div></div>______________________________<wbr>_________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a><br>
<a href="http://flash.uchicago.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">http://flash.uchicago.edu/mail<wbr>man/listinfo/flash-users</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-6827409856233201764gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">______________________________<wbr>__________________________<br>Jonathan D. Slavin Harvard-Smithsonian CfA<br><a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>phone: (617) 496-7981 Cambridge, MA 02138-1516<br>cell: (781) 363-0035 USA<br>______________________________<wbr>__________________________<br><br></div></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="monospace, monospace"><i><font color="#000000">Dr. Ernesto Zurbriggen</font></i><i> </i></font><div><font face="monospace, monospace"><i><br></i></font><div><font face="monospace, monospace"><i><font color="#444444">Consejo Nacional de Investigaciones Científicas y Técnicas </font></i></font><i style="font-size:12.8px;font-family:monospace,monospace"><font color="#274e13">(CONICET)</font></i><i style="font-family:monospace,monospace;font-size:12.8px"><font color="#444444">, Instituto de Astronomía Teórica y Experimental </font><font color="#274e13">(IATE)</font><font color="#444444">. </font></i></div><div><i style="font-size:12.8px;color:rgb(68,68,68);font-family:monospace,monospace"><br></i></div><div><i style="font-size:12.8px;color:rgb(68,68,68);font-family:monospace,monospace">Universidad Nacional de Córdoba </i><i style="font-size:12.8px;font-family:monospace,monospace"><font color="#274e13">(UNC)</font></i><i style="font-size:12.8px;color:rgb(68,68,68);font-family:monospace,monospace">, </i><font face="monospace, monospace" style="font-size:12.8px"><i><font color="#444444">Observatorio Astronómico de Córdoba </font></i></font><i style="font-size:12.8px;font-family:monospace,monospace"><font color="#274e13">(OAC)</font></i><i style="font-size:12.8px;color:rgb(68,68,68);font-family:monospace,monospace">. </i></div></div><div><i style="color:rgb(68,68,68);font-family:monospace,monospace;font-size:12.8px"><br></i></div><div><i style="color:rgb(68,68,68);font-family:monospace,monospace;font-size:12.8px">Teléfono: +54 0351 4331064-5, interno 222. </i></div><div><span style="font-size:12.8px"><i><font color="#444444">Laprida 854, Bº Observatorio (CP 5000), Córdoba, Argentina.<br></font></i></span><font color="#444444"><br><br></font></div></div></div></div></div></div></div></div></div></div></div>
</div>