[FLASH-USERS] 3D spherical with PPM?

Klaus Weide klaus at flash.uchicago.edu
Wed Apr 29 13:56:57 EDT 2009


On Wed, 29 Apr 2009, Rodrigo Fernandez wrote:

> I'm interested in performing 3D PPM simulations in spherical coordinates
> (r,theta,phi). The FLASH 3.1.1 user's guide indicates that, even though the
> grid in principle allows this configuration (Table 8.5), the Grid unit and PPM
> only support 1D and 2D spherical (section 8.10.4).

Dear Rodrigo,

Note that there is no definite statement in section 8.10.4 that PPM does 
not support 3D spherical coordinates - at least I did not find one!

There are some statements in chapter 13 (Hydrodynamics Units) that 
describe limited support for geometries, but none of them are in the 
section on PPM.  In fact, there is a good chance that the Hydro PPM 
implementation as released already has the support for 3D spherical
that your need.

> A superficial look at the PPM source code indicates that the only routine that
> explicitly rejects 3D spherical is Hydro_detectShock.F90; other routines such
> as hy_ppm_completeGeomFactors.F90 account for a phi coordinate. 

Note that Hydro_detectShock.F90 isn't needed in all simulations; if the 
runtime parameter hybrid_riemann is false, it should never actually get 
called. Even if you want to use the hybrid_rieman setting, it may be 
straightforward to add support for 3D spherical to that subroutine.

> Aside from the
> "quadratic_spherical" prolongation subroutines, many Paramesh 2.0 subroutines
> seem to account for phi but are manually prevented from doing so via a
> Driver_abortFlash.

You should really be using a paramesh4 implementation instead of
Paramesh 2.0 (use +pm40 or +pm4dev on the setup command line and omit
references to Paramesh2). Then by default, grid prolongation will use
the "monotonic" Grid interpolation (implemented in umap.F) which
should handle all geometries listed in the UG's Grid chapter.  The
paramesh4 Grid as provided with FLASH "should" also already handle
restriction and flux correction operations correctly for all these
geometries.

> Is there any other reason (aside from the shock detection algorithm and
> spherical prolongation) why FLASH3.1.1 does not officially support 3D
> spherical PPM?

The major reason is that we (at the Flash Center) have not tested it.

There may be some other places in the code where Driver_abortFlash is 
called unnecessarily when certain combinations of dimensionality and 
geometry are encountered.

There are other places where certain geometries are definitely NOT
supported and support cannot be trivially added.  Among them are
various (actually, all...) implementations of self-gravity.  Various
Hydro implementations other than PPM have limited support.  Particles
also should only be used with Cartesian coordinates.

> In other words, which other parts of the code should I focus on if I want to
> implement this capability?

If the straightforward approach works:  Focus on testing :)

Please let us know what you find.

If we get some contributed test problems for this, especially one(s) that 
can be run regularly and automatically for regression purposes, FLASH will 
likely be able to support this kind of geometry more "officially" / for 
more code Units in the future.


Klaus



More information about the flash-users mailing list