[FLASH-USERS] A minor bug in FieldLoop initialization

Dongwook Lee dongwook at flash.uchicago.edu
Mon May 22 16:18:31 EDT 2017


Hi Souqing,

I think the code lines are correct. Please first note that the filed loop
is rotated about the y-axis, following the transformation rule:

 x1  = x*cos(ang) - z*sin(ang)
 x2  = y
 x3  = x*sin(ang) + z*cos(ang)

Now, you want to define vector potentials to define divergence-free face
magnetic fields using the following rules:

 Bx = dAz/dy - dAy/dz
 By = dAx/dz - dAz/dx
 Bz = dAy/dx - dAx/dy

When considering Ax in this case, you want to stagger (i.e., use
coordinates at faces, rather than centers) y and z coordinates for the
straightforward differencing. Since y is not rotated, you just need to
stagger z-coordinate, leaving x-coordinate at cell-centers.

Likewise, you would need to stagger x-y for Az, for which you just need
x-staggering only, keeping z-coordinates at cell-centers.

I double checked this with the code implementations in the ATHENA code
setup, and they look the same as the FLASH implementation.

Hope this helps.

Best,
Dongwook

=========================================
Dongwook Lee, Ph.D., Assistant Professor
Applied Mathematics and Statistics
University of California, Santa Cruz
Baskin Engineering, Room 353C
1156 High Street, Santa Cruz, CA 95064
https://users.soe.ucsc.edu/~dongwook/



On Fri, Apr 21, 2017 at 12:57 AM, Suoqing Ji <suoqing at physics.ucsb.edu>
wrote:

> Hi,
>
> I would like to report a very minor bug in magnetoHD/FieldLoop/Simulation_initBlock.F90:
> in line 253 and 273, the variable xCoord(i) and zCoord(k) should be
> replaced by xx and zz.
>
> With current code, depending on platforms and ways of setup, the
> simulation has a certain possibility of hanging forever at initialization
> stage without any error output (sometimes it can run successfully). I
> encounter this issue when I use FieldLoop for performance tests on Stampede.
>
> Thanks!
>
> Best wishes,
>> Suoqing Ji
> Ph.D Candidate
> Department of Physics
> University of California, Santa Barbara
> http://physics.ucsb.edu/~suoqing
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20170522/a4e9185c/attachment.htm>


More information about the flash-users mailing list