[FLASH-USERS] A minor bug in FieldLoop initialization

Dongwook Lee dongwook at flash.uchicago.edu
Mon May 22 16:42:30 EDT 2017


Hi Suoqing,

I see your correction is correct! I am making this fix now and the
corrected version will be available in the next release.

Thanks for reporting this bug!

Cheers,
Dongwook

On Mon, May 22, 2017 at 1:31 PM, Suoqing Ji <suoqing at physics.ucsb.edu>
wrote:

> Hi Dongwook,
>
> Thanks for your info! I misread the code previously and I do agree with
> the cell corner vs. cell center scheme.
>
> However, now I revise my concern into the following:
>
> The i index goes up to (blkLimitsGC(HIGH,IAXIS)+1), thus xCoord(i) will go
> beyond index boundary when i=blkLimitsGC(HIGH,IAXIS)+1 (the same thing
> happens on zCoord(k)). Although cell center value should be used here, the
> boundary needs to be taken care of slightly. Say,
>
> if (i <= blkLimitsGC(HIGH,IAXIS)) then
>     x1 = (cos_ang * xCoord(i) + sin_ang * zz)
> else
>     x1 = (cos_ang * (xCoord(i-1) + dx) + sin_ang * zz)
> endif
>
> Thank you!
>
> Best wishes,
>> Suoqing Ji
> Ph.D Candidate
> Department of Physics
> University of California, Santa Barbara
> http://physics.ucsb.edu/~suoqing
>
> On May 22, 2017, 1:18 PM -0700, Dongwook Lee <dongwook at flash.uchicago.edu>,
> wrote:
>
> 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
>>
>
>


-- 

=========================================
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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20170522/ef612829/attachment-0001.htm>


More information about the flash-users mailing list