[FLASH-USERS] Initializing B-fields on AMR domains

John ZuHone jzuhone at cfa.harvard.edu
Fri Jul 29 11:26:02 EDT 2011


Hi all,

Just a general AMR question that I have been struggling with for a while and I wanted to see if anyone here had any insights (I run both Enzo and FLASH and this *should* apply to both, I think, with subtle modifications). 

Suppose you have a general, non-analytic magnetic field configuration (say, initially tangled or something). Suppose you want to initialize it on a grid such that it is divergence-free. If you have a uniform grid, one could try:

1) Setting up a vector potential on the grid and then taking the curl
2) Setting up a magnetic field, transforming to Fourier space, and removing the divergence terms in Fourier space, then transforming back to real space.
3) The projection method using a Poisson solver 

All of these strategies have worked well for me in terms of setting up divergenceless fields on uniform grids. However, when interpolating this field onto an *initial* AMR grid, this gets tricky. I have tried modifications of the above proposals but have not really had that much luck. I always seem to end up with divergence terms at refinement boundaries. 

I have been setting up divergenceless magnetic fields in my FLASH sims so far by interpolating a low-res, uniformly-gridded field onto the minimum fully-refined level (root grid in Enzo parlance), then using the code interpolation machinery to interpolate this field to the other refinement levels. So far this has worked, but it is a tad unsatisfactory since I would prefer my initial field to sample the higher resolution elements from the get-go. Unfortunately, I need to have the grid with a non-uniform refinement from the start. 

Has anyone else had to deal with this problem, and how did you? 

Best,

John ZuHone




More information about the flash-users mailing list