[FLASH-USERS] Boundary conditions of the Multigrid Solver/Gravity

Anshu Dubey dubey at flash.uchicago.edu
Wed May 14 14:46:39 EDT 2008


Hi Josef,

The answers to your questions are inlined

On Wed, May 14, 2008 at 3:25 AM, Josef Stöckl <josef.stoeckl at uibk.ac.at>
wrote:

> Hello,
>
> I'm having a small problem with the Multigrid solver or the Gravity
> Multigrid unit respectively. According to the manual, the supported boundary
> conditions for the Multigrid gravity unit are "periodic, Dirichlet,
> given-value, and isolated". However, when I try to use any value other than
> periodic or isolated for the "grav_boundary_type", I get the following error
> message:


>
> Gravity_init: unrecognized or unsupported gravity boundary type
>
> Looking at Gravity_init.F90 one can see that the routine only allows
> isolated or periodic at the moment. So I'm wondering if the other boundary
> conditions are still to be implemented or if there is any version with those
> enabled available?

There is implementation for Dirichlet and Neumann boundary conditions, but
they have never been used by any setup in FLASH,
so they haven't been tested as thoroughly as we'd like. You can enable them
by modifying the Gravity_init routine.

>
>
> I also wonder, if it is possible to have independent boundary conditions
> for the Hydro, Gravity and Particles units? So far I have found that the
> [xyz][lr]_boundary_type controls the overall boundary conditions for the
> Hydro, but the gravity part of the Hydro is controlled by grav_boundary_type
> (which makes a lot of sense). In gr_hgMapBcType.F90 of the Multigrid solver
> however only very few of the possible combinations of these two settings are
> handled. So I'm wondering, if it would be possible to extend this to handle
> those settings more independently/generally or if there were some problems
> arising when adapting this routine to accept more cases?
>
> Would it require a great change in the MG solver to e.g. combine a Hydro
> "outflow" (or inflow) condition, so that material with low density and
> temperature can come in and out of the computational domain, with a gravity
> "periodic" condition?


Gravity and Hydro first; you can combine all available Hydro boundaries with
Gravity boundaries as long as neither is periodic.
This is a current paramesh limitation where  if boundary conditions for the
mesh are specified as periodic, control is never
passed to the user. And there is no way of specifying different boundary
conditions for different data structures. You can extend
the possible combinations of other boundary types by getting rid of the test
for the mesh boundary conditions in gr_hgMapBcType.
Specifically the outer case statement that checks for bcTypeFromGrid. We are
looking at the possibility of enabling periodic
boundary conditions in multigrid even when the mesh has some other boundary
conditions. That may take a little time because
it is non-trivial.

As for the particles, it will be relatively easy to do in terms of the code
since they are not moved by paramesh at all. We can
modify the code where by default particles get the boundary conditions from
the grid, but have a combination of runtime
parameters, one that specifies that grid boundaries should be overridden,
and then six more to specify the actual conditions.
Please let me know how urgently you need this capability, we will respond
accordingly.

>
>
> Thanks in advance and best regards,
>
> Josef
>

Anshu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20080514/228a5a9c/attachment.htm>


More information about the flash-users mailing list