[FLASH-USERS] Change boundary condition for restarted simulation

Klaus Weide klaus at flash.uchicago.edu
Mon May 6 13:27:45 EDT 2019


On Sat, 4 May 2019, Magyar Norbert 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. 

What you are trying to do may work (I haven't tested it) for switching 
boundary conditions from outflow to, say, reflecting or user, but not to 
periodic. This is because for periodic BCs, the linking among blocks by 
neighbor relations is different from what is the case with other BCs. 
Different kinds of links between blocks, including parent/child and 
neighbor relations, are stored in checkpoint files, and are used as stored 
in the checkpoint when reconstructing the grid on restart.

If you restart with a parfile that has *_boundary_type values that 
do not match the state of the grid stored in the checkpoint, then FLASH 
will be in an inconsistent state - some parts of the code may believe
that the boundary conditions are one thing, while other parts don't
agree. Not recommended. (FLASH doesn't generally detect such mismatches
as errors; it is generally assumed that a restart parfile will match
the original parfile, except for parameters that are "safe" to change.)

> I tried to
> manually change the string in the 'runtimeparameters' in the hdf5 file, but
> apparently it does not work. Any suggestions?

It may be possible to manipulate a checkpoint file enough so that it 
will have valid links for a changed Grid topology, but that would not be 
trivial. It would go way beyond just modifying the value of some runtime 
parameters. At a minimum you would have to modify the "gid" dataset, 
and modify or remove the "gsurr_blks" dataset.

Klaus



More information about the flash-users mailing list