[FLASH-USERS] force refinement at given time

Sean M. Couch couch at pa.msu.edu
Fri Jan 5 14:09:25 EST 2018


Hi Jon,

I’d stick a custom version of `Grid_markRefineDerefine.F90` in your Simulation directory and use time-dependent criteria to call `Grid_markRefineSpecialized` from there. You can get the simtime from Driver by calling `Driver_getSimTime`. In my experience, it’s generally best to put your custom stuff at the bottom of `Grid_markRefineDerefine.F90`.

Also, if you’re trying to force a region to DE-refine after some time, that can be tricky. FLASH is, by default, very conservative about derefining. For that, I’ve had to customize the routine `gr_markInRadius.F90` to flag that a block be derefined as well as refined.

Cheers,
Sean


On January 5, 2018 at 1:51:10 PM, Slavin, Jonathan (jslavin at cfa.harvard.edu<mailto:jslavin at cfa.harvard.edu>) wrote:

Hi all,

I'm wondering about the best approach to forcing grid refinement in a given location, but only for a particular time.  My purpose in doing this is so that when I set off a supernova explosion the grid will be well refined at the explosion site.  Once the explosion has been initiated and before the explosion time, the default refinement criteria should, and do, work fine, so I'm concerned that if I do something like use Grid_markRefineSpecialized that it will always be called. As I understand it, Grid_markRefinedSpecialized is supposed to be called from Grid_markRefineDerefine.

I'm wondering if I could use Simulation_adjustEvolution for this purpose.  So, if the time is right (explosion about to occur), force refinement in the appropriate region - though I'm not clear how to do that forcing.  I noticed that Simulation_adjustEvolution is called before source terms are applied in Driver_evolveFlash.

Any suggestions?

Regards,
Jon

--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu<mailto:jslavin at cfa.harvard.edu>       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20180105/2f76f14c/attachment.htm>


More information about the flash-users mailing list