[FLASH-USERS] Change boundary condition for restarted simulation
Ji, Suoqing
suoqing at caltech.edu
Tue May 7 04:21:57 EDT 2019
Hi Magyar,
I think what you’ve proposed is actually to evolve the outflow BC sim to some checkpoint file first, and then use the data of the checkpoint file as your new initial condition to start a new simulation with periodic BC.
This is definitely doable, while the tricky thing is to code up the Simulation_initBlock to read in the AMR data at different refinement levels. You might want to mark some blocks as “to be refined” in Simulation_initBlock based on your new initial condition in order to get the identical grid structure.
A uniform grid setup would be very easy.
Best wishes,
—
Suoqing Ji
Sherman Fairchild Fellow
TAPIR & Walter Burke Institute for Theoretical Physics
California Institute of Technology
http://www.tapir.caltech.edu/~suoqing
On May 7, 2019, at 12:51 AM, Magyar Norbert <magyar.f.norbert at gmail.com<mailto:magyar.f.norbert at gmail.com>> wrote:
Dear Klaus, Ryan,
Thank you for your answers, suggestions. Ryan, in light of what Klaus wrote, I believe that there is not much hope to switch to periodic boundaries once the block connections are not set up that way initially.
What if I initialize a dummy simulation, with the same amount of blocks/refinement, but initially periodic. Then, I just replace the variables in this periodic checkpoint file with my variables from the checkpoint file at time t. Would that work? Is the topology consistent between identical "looking" checkpoint files (same number,size,refinement of blocks) coming from two separate setups?
Thank you very much,
Norbert
Ryan Farber <rjfarber at umich.edu<mailto:rjfarber at umich.edu>> ezt írta (időpont: 2019. máj. 6., H, 18:18):
Hi Norbert,
Which version of FLASH are you using? I'm using 4.2.2, which is rather old but I have Grid_init.F90 call RuntimeParameters_get() for the boundary types and it looks to me that Grid_init.F90 should do that whether or not restarting. Also, Driver_initFlash.F90 calls Grid_init independent of restarting. So, I haven't tested it on my end but I would expect what you're trying to do to work for me.
If you're using a more recent FLASH version and things have changed then you can "grep -in zl_boundary_type *.F90" in your object directory to see where the code reads the value from flash.par and either modify that subroutine to do it even if restarting or place a call to RuntimeParameters_get() for the boundary types near the bottom of Driver_initFlash.F90.
Best,
--------
Ryan
On Sat, May 4, 2019 at 2:36 PM Magyar Norbert <magyar.f.norbert at gmail.com<mailto:magyar.f.norbert at gmail.com>> wrote:
Dear FLASH developers,
I want to run a simulation until some time t. Then, using the checkpoint file at time t, I would like to restart the simulation, but instead of user or outflow boundary conditions as until time t, now with periodic boundaries. Is there a way to do this? The flash.par file info is not accounted for when doing a restart from a checkpoint file. I tried to manually change the string in the 'runtimeparameters' in the hdf5 file, but apparently it does not work. Any suggestions?
All the best,
Norbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20190507/7837b3e2/attachment-0001.htm>
More information about the flash-users
mailing list