<div dir="ltr"><div dir="ltr">Thanks, everyone!<div><br></div><div><br></div><div>I have fixed the problem by editing gr_bcApplyToOneFace:</div><div><br></div><div><div><font face="monospace"> if(regionType(axis)==LEFT_EDGE) then</font></div><div><font face="monospace"> sb = blkLimits(LOW,axis)-guard</font></div><div><font face="monospace"> se = blkLimits(LOW,axis)+guard-1</font></div><div><font face="monospace"> if (isFaceVarNormalDir)se=se+1</font></div><div><font face="monospace"> else</font></div><div><font face="monospace"> sb = blkLimits(HIGH,axis)+1 !! changed </font></div><div><font face="monospace"> se = blkLimits(HIGH,axis)+guard</font></div><div><font face="monospace"> if(isFaceVarNormalDir) sb=sb-1</font></div><div><font face="monospace"> end if</font></div></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">This also let me use </font><font face="monospace">i = 1,guard</font><font face="arial, sans-serif"> in Grid_bcApplyToRegionSpecialized. <br><br></font></div><div><font face="arial, sans-serif">Previously I changed it to </font><font face="monospace">i = 1-4,guard-4</font><font face="arial, sans-serif"> to avoid directly painting boundary values over interior cells, but that "fix" had side effects when running with Paramesh4. </font></div><div><br></div><div><br></div><div>Andy</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 25, 2022 at 11:20 AM Ernesto Zurbriggen <<a href="mailto:ezurbriggen@unc.edu.ar">ezurbriggen@unc.edu.ar</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Andy! <div>If you are just having problems with the combination AMR+USM+HIGH x-boundary, and for example, </div><div>not at LOW x-boundary, it's likely you are having problems managing the indexes in the regionData array. </div><div><br></div><div>Remember that in the HIGH x-boundary when gridDataStruct=FACEX you have one extra index, i.e. NXB+1, </div><div>while not for gridDataStruct=FACEY and FACEZ. </div><div><br></div><div>And maybe also that if you are using units (cgs or SI) in your simulation, do not forget the ~4PI factor to define </div><div>the magnetic field inside FLASH. </div><div><br></div><div>Best! </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie, 22 abr 2022 a las 15:42, Andy Sha Liao (<andy@f.energy>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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. </div><div><br></div><div>However, I couldn't get it to work with Paramesh+USM+HIGH boundary for either cartesian or cylindrical geometries. </div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>How do I fix this?</div><div><br></div><div><br></div><div>Thanks!</div><div><br></div><div><br></div><div>Andy</div><div> <br></div><div><br><br></div></div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://flash.rochester.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</blockquote></div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://flash.rochester.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</blockquote></div>