<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Josh,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">That's an interesting approach and one that's nicely containable within Simulation_initBlock. Would you be willing to share that code? I was wrong, by the way, about the on/off switch regarding pressure. In fact what is done is a linear interpolation (see around line 250 in Simulation_initiBlock.F90 in the Sedov directory). However, the inadequacy of that approximation is shown by the substantial discrepancy between the actual energy and sim_expEnergy.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">An alternative approach that I thought of that could be applied to the thermal energy only case is to, after all blocks have been initialized, 1) total up the thermal energy, 2) calculate the ratio sim_expEnergy/E_total and 3) adjust the pressure in all the zones in which the pressure is above the ambient pressure by multiplying by that factor.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">While I think I could write the code to calculate the ratio and apply it, I don't fully understand the structure of FLASH, so I'm not sure where it would need to be called from. One advantage to this approach is that one is pretty much guaranteed that the explosion energy will be what is desired.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Any suggestions on this approach would be appreciated.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Jon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 10:04 PM, Joshua Wall <span dir="ltr"><<a href="mailto:joshua.e.wall@gmail.com" target="_blank">joshua.e.wall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Jon,<br><br></div> After I saw your statement: <br><div><div><div><br><div class="gmail_quote"><span class=""><div dir="ltr">On Tue, Jul 26, 2016 at 11:48 AM Slavin, Jonathan <<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">One thing that occurred to me is that Simulation_initBlock uses a simple on/off switch to determine if the pressure in a zone should be set to the high explosion pressure or the ambient pressure. If the grid does not match up well with the sim_rInit, that is, if the edge of a zone does not align with sim_rInit, then part of a zone that should contain a pressure above ambient could be left out of the explosion. I'm looking over the code now to see if that could be the case.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div></blockquote><div><br><br></div></span><div> I thought I would mention that one way I've used to inject energy (thermal and kinetic) into the Cartesian grid in spherical regions at the edge of the sphere was to do a simple Monte Carlo integration of the overlapping volume by just sampling the cell over a uniform mesh to see if its inside or outside the sphere. Its one way to quickly get the overlap fraction, which I've used to scale thermal energy or momentum I've put down on the grid. Maybe you try something similar to put the pressure or thermal energy on the grid to "smooth" it out at the edges?<br><br></div><div>Cordially,<br><br></div><div>Josh<br></div><div><div class="h5"><div><br><br><br> </div><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"></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 26, 2016 at 11:00 AM, Robert Fisher <span dir="ltr"><<a href="mailto:rfisher1@umassd.edu" target="_blank">rfisher1@umassd.edu</a>></span> wrote:<br></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jonathan :<div><br></div><div> I've recently been looking into the Sedov problem as a test case for some remnant work I am doing. The Sedov problem is easy to set up as a point blast and get "sort of" correct, but because of its self-similar nature, it is singular at <img alt="t = 0" title="t = 0" src="https://latex.codecogs.com/gif.latex?%5Cdpi%7B300%7D%5Cinline%09t%09=%090" style="display:inline" height="11" width="35">, and consequently it is extremely challenging to get precisely correct in all its details.</div><div><br></div><div> By default, FLASH initializes a point-like energy deposition in the central zones, in an approximation to a delta function. Firstly, if you carefully read through the code, you will find that the explosion energy parameter is not actually used in this case at all -- the code is simply initializing density and pressure. Additionally, adding more resolution is a somewhat better approximation to the delta function, but is still not quite what you may need if you are looking to do a very accurate initialization. A better procedure is to set the initial time (<span>t</span><span>init</span><span>ial in flash.par)</span> to a small but non-zero value. This will kick in a second piece of the initialization code in Simulation_initBlock.F90, which initializes the exact solution at the specified time, and actually <i>does use the explosion energy parameter sim_expEnergy</i>, though this code is currently hard-coded to work only for <img alt="\gamma = 7/5" title="\gamma = 7/5" src="https://latex.codecogs.com/gif.latex?%5Cdpi%7B300%7D%5Cinline%09%5Cgamma%09=%097/5" style="display:inline;vertical-align:-3.667px" height="16" width="56"> and for 3D. This initialization procedure has the advantage of avoiding the initial singularity of the solution. In this case I believe you will find better convergence behavior with added resolution, but there are limitations in the hardcoded solution. </div><div><br></div><div> Lastly, depending on what sort of accuracy you may be demanding, there are also some errors in the well-known texts on this problem which will reveal themselves as you test against the exact solutions. There is much more on these issues on Frank Timmes website : <a href="http://cococubed.asu.edu/research_pages/sedov.shtml" target="_blank">http://cococubed.asu.edu/research_pages/sedov.shtml</a>, where you can also find a highly-accurate initialization method which can be used as an initialization. </div><div><br></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div> Best wishes,</div><div><br></div><div> Bob</div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Jul 26, 2016 at 10:48 AM, Marissa Adams <span dir="ltr"><<a href="mailto:madams@pas.rochester.edu" target="_blank">madams@pas.rochester.edu</a>></span> wrote:<br></span></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;font-size:small">Hi Jonathan,<br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">I have also noticed this problem.<br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">The energy one sees in the .dat file is typically less than the input energy for sim_expEnergy. Also noticed that this is geometry dependent.<br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">I input on the order of 1e10 ergs, and in cartesian I get out 9.2e9; for cylindrical I get even less! 3.2e8... which is huge. Note I am going based off of memory here. I cannot get into my HPC system now.<br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">If I am remembering things correctly: seems that in the source code's volume function in Simulation_init.f90 doesn't always choose the volume you're choosing to distribute the energy over.<br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">I think it is the section where you'll find a comment that notes the code will calculate the initial volume and interior pressure. It is assuming pi r^2 for to get the energy density... where as you may want something different for other chosen geometries.<br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">If I remember correctly the output energy also changes depending where you put the hotspot.<br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Sorry for the haphazard e-mail, but I am experiencing similar issues!<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Best,<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Marissa<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br><br> <br></div></div></span></blockquote></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div><div><br><div class="gmail_quote"><span>On Tue, Jul 26, 2016 at 10:30 AM, Slavin, Jonathan <span dir="ltr"><<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>></span> wrote:<br></span><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">Hi all,</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">I've been running supernova remnant evolution simulations. The initialization is done with code taken from the supplied Sedov simulation with certain small changes. One issue that I've run into is that the total energy is not very accurate. That is, though the energy is conserved, the total energy, initially input as thermal energy, is below that which is given in the sim_expEnergy parameter by ~5%. Has anyone else run into this? I don't think that it has to do with any of the changes that I've made to Simulation_initBlock or Simulation_init. I'm wondering if increasing the sim_nsubzones parameter might help. Any advice would be appreciated.</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">Thanks,</div><div style="font-family:arial,helvetica,sans-serif">Jon</div><span><font color="#888888"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">________________________________________________________<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: <a href="tel:%28617%29%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a> Cambridge, MA 02138-1516<br>cell: <a href="tel:%28781%29%20363-0035" value="+17813630035" target="_blank">(781) 363-0035</a> USA<br>________________________________________________________<br><br></div></div></div></div>
</font></span></div>
</blockquote></div></div></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><font size="1"><span style="color:rgb(0,0,0)"><span style="font-family:monospace,monospace"><span><div>Marissa Adams <span><font size="1"><span style="color:rgb(0,0,0)"><span style="font-family:monospace,monospace">E-mail:</span></span><span style="color:rgb(0,0,0)"><span style="font-family:monospace,monospace"><a> </a><a href="mailto:madams@pas.rochester.edu" target="_blank">madams@pas.rochester.edu</a></span></span></font></span><br>Graduate Student <span><font size="1"><span style="color:rgb(0,0,0)"><span style="font-family:monospace,monospace">Ph: <a href="tel:%28585%29%20402-5779" value="+15854025779" target="_blank">(585) 402-5779</a></span></span></font></span></div><div>Department of Physics & Astronomy <span><font size="1"><span style="color:rgb(0,0,0)"><span style="font-family:monospace,monospace">Website: <a href="http://www.pas.rochester.edu/%7Emadams/" target="_blank">http://www.pas.rochester.edu/~madams/</a></span></span></font></span></div>University of Rochester<br>478 Bausch & Lomb Hall<br>P.O. Box 270171<br clear="all"><div><br></div></span><span><font color="#888888">-- <br><div data-smartmail="gmail_signature"><div dir="ltr">Dr. Robert Fisher<br>Associate Professor / Graduate Program Director<br>University of Massachusetts/Dartmouth<br>Department of Physics<br>285 Old Westport Road<br>North Dartmouth, Massachusetts 02747<br><a href="mailto:robert.fisher@umassd.edu" target="_blank">robert.fisher@umassd.edu</a><br><a href="http://www.novastella.org" target="_blank">http://www.novastella.org</a></div></div></font></span></span></span></font></span></div></div></div></div></div></div></div></div></font></span></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></div></div></div></div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><div><div>Joshua Wall<br></div>Doctoral Candidate<br></div>Department of Physics<br></div>Drexel University<br></div>3141 Chestnut Street<br></div>Philadelphia, PA 19104<br></div></div>
</font></span></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">________________________________________________________<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>________________________________________________________<br><br></div></div></div></div>
</div>