[FLASH-USERS] Periodic boundary conditions fordiffusion/conduction

Nitesh Attal nattal at uncc.edu
Mon Oct 12 22:55:44 EDT 2015


It looks like some work but I might try to looking into this in the coming weeks.

Thanks. 



-----Original Message-----
From: "Klaus Weide" <klaus at flash.uchicago.edu>
Sent: ‎10/‎12/‎2015 10:17 PM
To: "Attal, Nitesh" <nattal at uncc.edu>
Cc: "flash-users at flash.uchicago.edu" <flash-users at flash.uchicago.edu>
Subject: Re: [FLASH-USERS] Periodic boundary conditions fordiffusion/conduction

On Mon, 12 Oct 2015, Attal, Nitesh wrote:

> Hello,
> 
> I tried using periodic BC (in y-direction) for a 2D thermal conduction
> problem (Temperature gradient was imposed only in x-direction). I found
> that the temperature at the y-boundary drops rapidly even though there is
> no gradient present.
> I tracked down the routine (gr_hypreApplyBcToFace) responsible for applying
> the BC for HYPRE matrix. Here appropriate modification to the Bmatrix is
> made to implement Dirichlet, Vacuum and other BC.
> 
> I was wondering if there could be a quick-fix to get the wraparound
> solution variables to modify Bmatrix, i.e. a way to access appropriate
> neighbors (blocks) that contain the periodic BC.

The routine gr_hypreApplyBcToFace, called from gr_hypreCreateMatrix, 
shouldn't really have anything to do for a periodic boundary. All the work 
of coupling neigboring cells with each other should have happened earlier 
in gr_hypreCreateMatrix.

Maybe all it takes to get this right is making HYPRE aware of the 
perodicity of the index space? And maybe all THAT takes is calling 
HYPRE_SStructGridSetPeriodic with the appropriate arguments, for each 
direction that has periodic boundaries? This is at this point a completely 
untested hypothesis.

If someone wants to experiment with it:

 * Look at comments re SetPeriodic in source files like
    hypre-2.10.0b/src/sstruct_mv/HYPRE_sstruct_mv.h
    hypre-2.10.0b/src/sstruct_mv/F90_HYPRE_sstruct_grid.c
 * Better, see what the HYPRE documentation has to say about
   HYPRE_SStructGridSetPeriodic! (I haven't checked.)
 * Calls should probably go into
    gr_hypreSetupGrid.F90 .
 * Initial testing should be done with the uniform grid (UG),
   since AMR may, and probably will, add additional complications.


Klaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20151012/456fb328/attachment.htm>


More information about the flash-users mailing list