<div dir="ltr"><div><div><div><div><p dir="ltr">Hello Jon,</p>
<p dir="ltr"> There's two ways to do the EOS update. One is to call Eos_wrapped at the end of the block loop on each block you update as you go through the loop. Make sure you pass which mode you want based on the variables you updated, which here sounds like pressure and internal energy. So that would look something like:</p><p dir="ltr"><br></p><p>do blk=1, numBlocks</p><p>blockID = blockList(blk)</p><p>call Grid_getBlkLimits(blockID, blkLimits, blkLimitsGC)<br></p><p>call Grid_getBlkPtr(blockID, solnData)<br></p> do i<br> do j <br> do k<br><br> solnData(DENS_VAR,i,j,k) = stuff<br> solnData(EINT_VAR,i,j,k) = stuff<br><br>
end do<br></div> end do<br></div> end do<br><br></div> call Eos_wrapped(MODE_DENS_EI, blkLimits, blockID)<br><br></div>end do<br><div><div><div><div><div><br></div><div>The other way to do it is to:<br><br> call Grid_fillGuardCells(CENTER, ALL_DIR, LEAF, doEos=.true., eosMode=MODE_DENS_EI)<br></div><div><br></div><div>This method ensures that whatever happens next, not only is the EOS updated all values for each cell, <i>but also those values are valid in guard cells on other processors</i>. I mention this method because using the Eos_wrapped and forgetting to fill guard cells after has been a "gotcha" moment for me in the past, and was a very tricky error to track down. But guard cell filling is also expensive, so if you know its safe to not do it, Eos_wrapped is the way to go.<br><br></div><div>Hope that helps,<br><br></div><div>Josh Wall<br></div><div><br><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, May 26, 2017, 4:39 PM 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"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">To answer Sean and Ernesto's questions:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I am using the USM solver and AMR. I have now determined that div B is still 0 after the second explosion, which is not too surprising since, for this run, I have not changed the magnetic field and include div B cleaning (killdivb = .true.). So the problem is not with non-zero div B but with the large B fluctuations that are initiated. I noticed that there are small scale fluctuations in the region where the second explosion is initiated before the explosion, though the field is weak ~ 0.01 muG. The fluctuations after the explosion go from ~ -1000 muG - +1000 muG. I do expect amplification of B field fluctuations at the shock, but not to that extent.</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 way I'm initiating the second explosion is (almost) the same way I initiate the first one - I set the pressure of parcels within a given radius to a value such that the sum of the energy in those parcels is equal to the value I want for the explosion (1.E51 ergs). I set the density to a value so as to have the mass total to 8 solar masses. So all the energy is thermal at first. I'll see about calling the EOS unit, since I haven't done that. Any additional info on how to do that would be appreciated.</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">Thanks,</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 Fri, May 26, 2017 at 1:00 PM, <span dir="ltr"><<a href="mailto:flash-users-request@flash.uchicago.edu" target="_blank">flash-users-request@flash.uchicago.edu</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></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">---------- Forwarded message ----------<br>From: ERNESTO ZURBRIGGEN <<a href="mailto:ezurbriggen@unc.edu.ar" target="_blank">ezurbriggen@unc.edu.ar</a>><br>To: <a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a><br>Cc: <br>Bcc: <br>Date: Fri, 26 May 2017 10:56:45 -0300<br>Subject: Re: [FLASH-USERS] ensuring div B = 0 when adjusting evolution<br><div dir="ltr"><div>Hi Jon! </div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><div><font face="arial, helvetica, sans-serif">Have you tried to set off a less intense second supernova explosion? Have you observed the same problems in that case? The second explotion might be much too intense. </font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">On the other hand, how do you set the later explotion? I mean, applying the explotion, are you consistently modifying the thermodynamical variables? For example, if you instantaneously modify the density and the temperature, then you also should call the Eos unit to keep the consistence. I have experimented situations in which just modifying velocities and keeping the thermodynamics unaltered, I also had to call the Eos unit in order to maintain consistence</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Some runtime parameter that might help being on are 'shockDetect' and 'shockLowerCFL' (this last one I think is just in realease 4.4). </font></div></div><div><br></div><div><br></div>Best!</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">-- <br><div class="m_-7049831932289272225m_796242835017064851m_8547132186880594962gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><font face="monospace, monospace"><i><font color="#000000">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">Instituto de Astronomía Teórica y Experimental </font><font color="#274e13">(IATE)</font><font color="#444444">. </font></i></font></div><div><font face="monospace, monospace"><i><font color="#444444">Observatorio Astronómico de Córdoba </font><font color="#274e13">(OAC)</font><font color="#444444">, </font></i></font><i style="color:rgb(68,68,68);font-family:monospace,monospace;font-size:12.8px">Universidad Nacional de Córdoba </i><i style="font-family:monospace,monospace;font-size:12.8px"><font color="#274e13">(UNC)</font></i><i style="color:rgb(68,68,68);font-family:monospace,monospace;font-size:12.8px">. </i></div></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><font color="#444444"><font face="monospace, monospace"><i>Córdoba, Argentina.</i></font> </font><br></div></div></div></div></div></div></div></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">
<br><br>---------- Forwarded message ----------<br>From: "Sean M. Couch" <<a href="mailto:couch@pa.msu.edu" target="_blank">couch@pa.msu.edu</a>><br>To: "Slavin, Jonathan" <<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>>, flash-users <<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a>><br>Cc: <br>Bcc: <br>Date: Fri, 26 May 2017 14:07:22 +0000<br>Subject: Re: [FLASH-USERS] ensuring div B = 0 when adjusting evolution<br>
<div style="word-wrap:break-word">
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Hi Jon,</div>
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Can you give a little more info? Are you using the USM solver? Are you using AMR? Have you actually checked that divB>0 in the output data? A log file from a representative run would be useful.</div>
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
In my experience, the USM solver in cylindrical R-Z coordinates with AMR can be….touchy. But it should work and maintain divB=0! (See, e.g., <a href="http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2013ApJ...773..136J&link_type=EJOURNAL" target="_blank">http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2013ApJ...773..136J&link_type=EJOURNAL</a>).</div>
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Cheers,</div>
<div id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Sean</div>
<br>
<div class="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_sign" id="m_-7049831932289272225m_796242835017064851m_5462410415856234389bloop_sign_1495807385531248128">
<div style="font-family:Helvetica;font-size:14px;word-wrap:break-word">
<br>
----------------------------------------------------------------------------------------------------------<br>
Sean M. Couch</div>
<div style="font-family:Helvetica;font-size:14px;word-wrap:break-word">
Assistant Professor<br>
Department of Physics and Astronomy<br>
Department of Computational Mathematics, Science, and Engineering<br>
National Superconducting Cyclotron Laboratory/Facility for Rare Isotope Beams<br>
Michigan State University<br>
567 Wilson Rd, 3250 BPS<br>
East Lansing, MI 48824<br>
<a href="tel:(517)%20884-5035" value="+15178845035" target="_blank">(517) 884-5035</a> —— <a href="mailto:couch@pa.msu.edu" target="_blank">couch@pa.msu.edu</a> —— <a href="http://www.pa.msu.edu/~couch" target="_blank">www.pa.msu.edu/~couch</a></div>
<div style="font-family:Helvetica;font-size:14px;word-wrap:break-word">
<br>
<div><br>
<br>
</div>
</div>
</div>
<br>
<p class="m_-7049831932289272225m_796242835017064851m_5462410415856234389airmail_on">On May 25, 2017 at 4:41:45 PM, Slavin, Jonathan (<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>) wrote:</p>
<blockquote type="cite" class="m_-7049831932289272225m_796242835017064851m_5462410415856234389clean_bq"><span>
<div>
<div></div>
<div>
<div dir="ltr">
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
Hi all,</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">
I'm running MHD simulations where I set off a second supernova explosion within a pre-existing remnant. I'm using Simulation_adjustEvolution for this. However, I'm running into a problem with the magnetic field just after initiating the second explosion.
I'm getting very large pixel-to-pixel variations in Bx and By at the edge of the new expanding blast wave. I'm thinking that it could be because of non-zero div B in the region in which the explosion is generated. So my question is, does anyone have a suggestion
for div B cleaning at the point that the explosion is started, i.e. within Simulation_adjustEvolution, to prevent the problems I'm having? I don't really expect the B field to be dynamically important inside the remnant (beta >> 1), so accuracy of the B field
is probably not important there. I should add that I'm doing these calculations in 2D cylindrical symmetry (R-Z). Thanks in advance for any help.</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">
Regards,</div>
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
Jon</div>
</div></div></div></span></blockquote></div><br></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">_______________________________________________<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/mailman/listinfo/flash-users</a><br></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra">-- <br><div class="m_-7049831932289272225m_796242835017064851gmail_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: <a href="tel:(617)%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a> Cambridge, MA 02138-1516<br>cell: <a href="tel:(781)%20363-0035" value="+17813630035" target="_blank">(781) 363-0035</a> USA<br>________________________________________________________<br><br></div></div></div></div>
</div></div></blockquote></div></div></div></div></div></div></div><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>