[FLASH-USERS] Setting a fixed value boundary condition for MHD simulations.

Ryan Farber rjfarber at umich.edu
Wed May 3 15:21:31 EDT 2023


Hi Nishka,

Note that in setting the boundary conditions you are setting the values of
the *guard *cells. Your analysis script likely thinks of the boundary as
being the *physical* cells at the domain faces/edges/corners. See below for
an ASCII illustration (G for guard cells, I for interior cells, U for
"ultimate interior cells" -- if I was re-doing this I'd call those B). The
value of those cells are updated the same as any other cell in FLASH, and
likely is not going to stay fixed with time. I've found that's problematic
for problems including gravity with diode boundary conditions and fix the
value of the physical boundary cells. I'm not sure if that's appropriate or
not in your case or not though.

If you do want to try that, you can add a subroutine call at the beginning
of Grid_fillGuardCells to tweak the values of the physical boundary cells.

!!  GGGGGGGG

!! GUUUUUUUUG

!! GUIIIIIIUG

!! GUIIIIIIUG

!! GUIIIIIIUG

!! GUIIIIIIUG

!! GUIIIIIIUG

!! GUIIIIIIUG

!! GUUUUUUUUG

!!  GGGGGGGG

!!

!! Figure 1. G = ghost zones, I for interior zone, U is an ultimate

!! interior zone (i.e., it borders a ghost zone).

Best,
--------
Ryan


On Wed, May 3, 2023 at 8:41 PM Sheth, Nishka <phc027 at usask.ca> wrote:

> Hello Everyone,
>
> I am currently working on setting up a MHD problem in the r-z geometry
> with uniform grid using FLASH 4.7. My current goal is to keep the x_max
> boundary values fixed to their initial values throughout the simulation. To
> achieve this, I have modified the *Grid_bcApplyToRegionSpecialized.F90* file
> in a similar way to the Shu Osher problem. However, I have noticed that the
> boundary values still vary with time.
>
> To investigate this issue, I ran the Shu-Osher problem for longer than
> 1.8s, which is sufficient time for the shock front to reach the x_max
> boundary. Interestingly, I observed that the boundary values also changed
> for this simulation. I have attached snapshots of the Density vs X plot for
> the Shu Osher problem at 1.8s (as shown in the user manual) and at 2.4s,
> where the boundary value differs from the initial value.
>
> I would greatly appreciate any guidance on setting up a fixed value
> boundary condition for the MHD simulation. Additionally, could you
> recommend a reference that describes how general type of boundary
> conditions (such as Newman, Dirichlet, etc.) for all primitive variables
> are set up in FLASH for the MHD simulation?
>
> Thank you in advance for your help.
>
> Nishka Sheth
> Physics Graduate Student
> University of Saskatchewan, Canada
> phc027 at usask.ca
>
> _______________________________________________
> 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/20230503/2ffe6034/attachment.htm>


More information about the flash-users mailing list