<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>body{font-family:Helvetica,Arial;font-size:13px}</style>
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div id="bloop_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="bloop_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="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Ok, thanks. So the USM solver does not do “divergence cleaning” per se, rather it uses constrained transport to maintain divB _at a constant level_. The last point is crucial as it requires initial conditions that are divergenceless in order for divb=0 to be
maintained. In other words, anything in your simulation outside of the USM solver that introduces divB, including the initial conditions, will lead to a persistent divB and attendant errors in the solution. Interpolation at fine-coarse boundaries can also
be problematic, but FLASH _should_ be doing this correctly.</div>
<div id="bloop_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="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Initializing the new B-field using the curl of a vector potential is a good way to ensure divB=0 initially. This is how I initialize my B-fields (except for insanely simple field geometries for which I know divB=0). This can get a bit tricky for USM because
the B-fields must be initialized at the cell _faces_ not _centers_. So the vector potential should be defined at cell edges in order to compute simple finite differences for the curl operator. I think there are several test cases in the SimulationMain/magnetoHD
directory that demonstrate this approach for initial fields. I think. If not, I can send you something. </div>
<div id="bloop_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="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
The utility of a log file in this situation is principally the header information which shows exactly which version of FLASH and exactly how the problem was setup and compiled and the values of runtime parameters. Eliminates any guessing games...</div>
<br>
<div id="bloop_sign_1495820396477175040" class="bloop_sign">Cheers,
<div>Sean</div>
</div>
<br>
<p class="airmail_on">On May 26, 2017 at 12:44:16 PM, Slavin, Jonathan (<a href="mailto:jslavin@cfa.harvard.edu">jslavin@cfa.harvard.edu</a>) wrote:</p>
<blockquote type="cite" class="clean_bq"><span>
<div>
<div></div>
<div>
<title></title>
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Hi Sean,</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">
Sorry for not being explicit enough. Yes I am using the USM solver and AMR. I haven't checked that div B > 0 and suspect that it may not be since I am using divergence cleaning. (I will check thatt though.) Still the large fluctuations in B field strength
do not seem physical. They're occurring at the shock front of the second explosion. So I was thinking that I might try a different starting condition for the magnetic field in the region where I initiating the second explosion. But to do that I would need
some way to ensure the div B = 0 in that region. </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">
I'm thinking that using a vector potential is probably the way to go, though then that requires taking its curl numerically. I expect that that procedure could introduce regions of div B > 0 though.</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">
I could include a log file, but it wouldn't be particularly enlightening for the run I have in mind, which I stopped just after the second explosion. In other runs, which crashed, I get dt = 0 errors. I could still send the log file, though if you want.</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>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, May 26, 2017 at 10:07 AM, Sean M. Couch <span dir="ltr">
<<a href="mailto:couch@pa.msu.edu" target="_blank">couch@pa.msu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div id="m_2846831776028328178bloop_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_2846831776028328178bloop_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_2846831776028328178bloop_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_2846831776028328178bloop_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_2846831776028328178bloop_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.<wbr>edu/cgi-bin/nph-data_query?<wbr>bibcode=2013ApJ...773..136J&<wbr>link_type=EJOURNAL</a>).</div>
<div id="m_2846831776028328178bloop_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_2846831776028328178bloop_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_2846831776028328178bloop_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_2846831776028328178bloop_sign" id="m_2846831776028328178bloop_sign_1495807385531248128">
<div style="font-family:Helvetica;font-size:14px;word-wrap:break-word"><br>
------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>----------------<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>
<div>
<div class="h5"><br>
<p class="m_2846831776028328178airmail_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_2846831776028328178clean_bq">
<div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<span>Hi all,</span></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<span><br>
</span></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<span>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.</span></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<span><br>
</span></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<span>Regards,</span></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<span>Jon</span></div>
<div><span><br>
</span></div>
<span>--<br>
</span>
<div class="m_2846831776028328178gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr"><span>______________________________<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: <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>
______________________________<wbr>__________________________<br>
<br>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</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">________________________________________________________<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>
</div>
</div>
</span></blockquote>
</body>
</html>