[FLASH-USERS] questions about boundary conditions

guido g.granda at irya.unam.mx
Wed Oct 30 11:37:03 EDT 2019


Hello,

Thank you for your answers, they were really helpful.

Regards,

On 29/10/19 14:41, Eddie Hansen wrote:
> In general, here is how periodic boundaries work...
>
> Just consider the x-direction and say you are using xl_boundary_type = 
> "periodic" and xr_boundary_type = "periodic". Let's number the cells 
> starting at n and going up to m, so we have n, n+1, n+2, ... , m-1, m. 
> The "guard cells" are those cells outside the domain to the left of n 
> and to the right of m. With periodic conditions, the values of guard 
> cell n-1 are set to the values of the interior cell m. Likewise, 
> values of guard cell m+1 are set to values of interior cell n. 
> Depending on the solver order, more guard cells will be filled 
> accordingly. For example, the values of guard cell n-2 are set to 
> values of interior cell m-1, and so on.
>
> This effectively makes any flux on the right boundary equal to the 
> flux on the left boundary. In other words, if material leaves the grid 
> on the right, it will enter on the left, and vice-versa. You can think 
> of it as "wrapping around".
>
> Hopefully that answers your question about periodic boundary 
> conditions. To do something like keep a constant magnetic field value 
> at a boundary, you have to implement a user-defined boundary like Ryan 
> mentioned.
>
>
> On Tue, Oct 29, 2019 at 3:13 PM Ryan Farber <rjfarber at umich.edu 
> <mailto:rjfarber at umich.edu>> wrote:
>
>     Hi Guido,
>
>     I'm not sure how periodic boundary conditions work, but to respond
>     to your last paragraph on static boundary conditions:
>     you can set xl_boundary_type (etc.) in flash.par to "user" and
>     you can modify Grid_bcApplyToRegionSpecialized.F90
>     "case(USER_DEFINED)" to set variables to a constant value.
>
>     Best,
>     --------
>     Ryan
>
>
>     On Tue, Oct 29, 2019 at 11:59 AM guido <g.granda at irya.unam.mx
>     <mailto:g.granda at irya.unam.mx>> wrote:
>
>         Hi Flash users,
>
>         I've been trying to find out how boundary cells properties are
>         filled
>         when periodic boundary conditions are used. Do you know if
>         these cells'
>         properties like
>
>         magnetic field, velocity, etc, are filled when periodic boundary
>         conditions are used. Let's say our initial condition has uniform
>         magnetic field or uniform density,
>
>         does boundary cells have the same value of these properties or
>         these are
>         set to zero or sth else ?
>
>         Could you please give me a hint of how to set static boundary
>         conditions
>         for a simulation, e.g. a constant magnetic field at the
>         computational
>         volume boundary edges.
>
>         Cheers,
>
>
>
>
> -- 
> Eddie Hansen, PhD
> Postdoctoral Scholar
> University of Chicago
> 607-341-6126 | Flash Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20191030/6ec1ec4e/attachment-0001.htm>


More information about the flash-users mailing list