[FLASH-USERS] ensuring div B = 0 when adjusting evolution

Sean M. Couch couch at pa.msu.edu
Fri May 26 13:47:02 EDT 2017


Hi Jon,

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.

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.

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...

Cheers,
Sean


On May 26, 2017 at 12:44:16 PM, Slavin, Jonathan (jslavin at cfa.harvard.edu<mailto:jslavin at cfa.harvard.edu>) wrote:

Hi Sean,

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.

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.

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.

Regards,
Jon

On Fri, May 26, 2017 at 10:07 AM, Sean M. Couch <couch at pa.msu.edu<mailto:couch at pa.msu.edu>> wrote:
Hi Jon,

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.

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., http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2013ApJ...773..136J&link_type=EJOURNAL).

Cheers,
Sean


----------------------------------------------------------------------------------------------------------
Sean M. Couch
Assistant Professor
Department of Physics and Astronomy
Department of Computational Mathematics, Science, and Engineering
National Superconducting Cyclotron Laboratory/Facility for Rare Isotope Beams
Michigan State University
567 Wilson Rd, 3250 BPS
East Lansing, MI  48824
(517) 884-5035<tel:(517)%20884-5035>    ——    couch at pa.msu.edu<mailto:couch at pa.msu.edu>    ——    www.pa.msu.edu/~couch<http://www.pa.msu.edu/~couch>





On May 25, 2017 at 4:41:45 PM, Slavin, Jonathan (jslavin at cfa.harvard.edu<mailto:jslavin at cfa.harvard.edu>) wrote:

Hi all,

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.

Regards,
Jon

--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu<mailto:jslavin at cfa.harvard.edu>       60 Garden Street, MS 83
phone: (617) 496-7981<tel:(617)%20496-7981>       Cambridge, MA 02138-1516
cell: (781) 363-0035<tel:(781)%20363-0035>             USA
________________________________________________________




--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu<mailto:jslavin at cfa.harvard.edu>       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20170526/e0992b13/attachment-0001.htm>


More information about the flash-users mailing list