[FLASH-USERS] Magnetized inflow from HIGH boundaries with USM and Paramesh

Andy Sha Liao andy at f.energy
Mon Apr 25 17:10:09 EDT 2022


Thanks, everyone!


I have fixed the problem by editing gr_bcApplyToOneFace:

  if(regionType(axis)==LEFT_EDGE) then
     sb = blkLimits(LOW,axis)-guard
     se = blkLimits(LOW,axis)+guard-1
     if (isFaceVarNormalDir)se=se+1
  else
     sb = blkLimits(HIGH,axis)+1            !! changed
     se = blkLimits(HIGH,axis)+guard
     if(isFaceVarNormalDir) sb=sb-1
  end if

This also let me use i = 1,guard in Grid_bcApplyToRegionSpecialized.

Previously I changed it to i = 1-4,guard-4 to avoid directly painting
boundary values over interior cells, but that "fix" had side effects when
running with Paramesh4.


Andy


On Mon, Apr 25, 2022 at 11:20 AM Ernesto Zurbriggen <ezurbriggen at unc.edu.ar>
wrote:

> Hi Andy!
> If you are just having problems with the combination AMR+USM+HIGH
> x-boundary, and for example,
> not at LOW x-boundary, it's likely you are having problems managing the
> indexes in the regionData array.
>
> Remember that in the HIGH x-boundary when gridDataStruct=FACEX you have
> one extra index, i.e. NXB+1,
> while not for gridDataStruct=FACEY and FACEZ.
>
> And maybe also that if you are using units (cgs or SI) in your simulation,
> do not forget the ~4PI factor to define
> the magnetic field inside FLASH.
>
> Best!
>
>
>
>
>
>
>
>
>
>
>
> El vie, 22 abr 2022 a las 15:42, Andy Sha Liao (<andy at f.energy>) escribió:
>
>> I've been trying to use Grid_bcApplyToRegionSpecialized to inject a
>> spatially uniform, magnetized inflow into a 2D simulation from the HIGH
>> x-boundaries of the domain.
>>
>> However, I couldn't get it to work with Paramesh+USM+HIGH boundary for
>> either cartesian or cylindrical geometries.
>>
>> When I set up the problem with this combination (PM4+USM+HIGH), and only
>> this combination, the magnetic field entering from the injection boundary
>> is not uniform as I want it to be, but rather there is a modulation with
>> periodicity equal to the size of a block.
>>
>> I need this particular combination for my problem. It is the only one
>> that makes sense, but it's the only one that's not working.
>>
>> How do I fix this?
>>
>>
>> Thanks!
>>
>>
>> Andy
>>
>>
>>
>> _______________________________________________
>> flash-users mailing list
>> flash-users at flash.rochester.edu
>>
>> For list info, including unsubscribe:
>> https://flash.rochester.edu/mailman/listinfo/flash-users
>>
> _______________________________________________
> flash-users mailing list
> flash-users at flash.rochester.edu
>
> For list info, including unsubscribe:
> https://flash.rochester.edu/mailman/listinfo/flash-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20220425/ac01ee29/attachment.htm>


More information about the flash-users mailing list