[FLASH-USERS] Boundary condition problem

Klaus Weide klaus at flash.uchicago.edu
Mon Sep 17 16:56:38 EDT 2012


On Mon, 13 Aug 2012, Markus Haider wrote:

> Hi,
> 
> I am doing cosmological simulations of galaxy clusters with Flash 3.3. In my
> current setup, I use a PPM solver for the hydro part and want to use the
> Multigrid solver for gravity.
> 
> In the flash.par I defined the hydro boundary conditions to be "outflow" and
> for the grav_boundary_type I specified "periodic". However, when I start flash
> I then get the error message
> 
>      gr_hgMapBcType: Unexpected boundary condition requested for WORK
> array!
>      Calling MPI_Abort() for shutdown in   2 seconds!
> 
> Is this expected behaviour? The file which is responsible for the error is
> source/Grid/GridSolvers/Multigrid/gr_hgMapBcType.F90. Inspection of it shows,
> that in the case statements around line 180 there is no case for
> MG_BND_PERIODIC, is there a reason for this? If I would put a case for
> periodic boundaries there, would everything work as expected?

Hello Markus,

Since you sent this question a while ago, did you resolve this problem?

It seems you were trying to do something that is not supported: namely, to 
use boundary conditions for the Grid (xl_boundary_type, etc.) and the 
gravity Poisson solver (grav_boundary_type) that are not compatible with 
each other.

Here - and this applies in particular to the Multigrid solver - 
"compatible" means, at a minimum, that 
  * both xl_ (etc.) and grav_boundary_type are periodic; or
  * both xl_ (etc.) and grav_boundary_type are NON-periodic;
    i.e., xl_ can be "outflow" (or also "reflecting"), and
    grav_boundary_type hould then be "isolated".


You have pinpointed a specific file (gr_hgMapBcType.F90) where an 
implementation of 'case(MG_BND_PERIODIC)' is missing. This is not because 
we have just forgotten to implement it, but because there is no 'good' 
implementation for this contradictory situation. The contradiction here is 
that the neighbor relations between PARAMESH blocks have been set up as 
for a non-periodic grid (where certain blocks do not have neighbors in 
certain directions); yet the "periodic" Poisson solver assumes that there 
are no external boundaries that need to be handled specially because 
blocks at boundaries are cyclically linked.

Klaus



More information about the flash-users mailing list