3.7 The runtime parameter file (flash.par)

The FLASH executable expects a flash.par file to be present in the run directory, unless another name for the runtime input file is given as a command-line option. This file contains runtime parameters, and thus provides a mechanism for partially controlling the runtime environment. The names of runtime parameters are case-insensitive. Copies of flash.par are kept in their respective Simulation directories for easy distribution.

The flash.par file for the example setup is  

# Density, pressure, and velocity on either side of interface
sim_rhoLeft = 1.
sim_rhoRight = 0.125


sim_pLeft   = 1.
sim_pRight  = 0.1
sim_uLeft   = 0.
sim_uRight  = 0.


# Angle and position of interface relative to x and y axes
sim_xangle  = 0
sim_yangle = 90.
sim_posn = 0.5


# Gas ratio of specific heats
gamma = 1.4


geometry = cartesian


# Size of computational volume
xmin = 0.
xmax = 1.
ymin = 0.
ymax = 1.


# Boundary conditions


xl_boundary_type = "outflow"
xr_boundary_type = "outflow"


yl_boundary_type = "outflow"
yr_boundary_type = "outflow"


# Simulation (grid, time, I/O) parameters
cfl = 0.8
basenm = "sod_"
restart = .false.


# checkpoint file output parameters
checkpointFileIntervalTime = 0.2
checkpointFileIntervalStep = 0
checkpointFileNumber = 0


# plotfile output parameters
plotfileIntervalTime = 0.
plotfileIntervalStep = 0
plotfileNumber = 0


nend = 1000
tmax = .2


run_comment = "Sod problem, parallel to x-axis"
log_file = "sod.log"
eint_switch = 1.e-4


plot_var_1 = "dens"
plot_var_2 = "pres"
plot_var_3 = "temp"


# AMR refinement parameters
lrefine_max = 6
refine_var_1 = "dens"


# These parameters are used only for the uniform grid
#iGridSize = 8   #defined as nxb * iprocs
#jGridSize = 8
#kGridSize = 1
iProcs = 1  #number or procs in the i direction
jProcs = 1
kProcs = 1


# When using UG, iProcs, jProcs and kProcs must be specified.
# These are the processors along each of the dimensions
#FIXEDBLOCKSIZE mode ::
# When using fixed blocksize, iGridSize etc are redundant in
# runtime parameters. These quantities are calculated as
# iGridSize = NXB*iprocs
# jGridSize = NYB*jprocs
# kGridSize = NZB*kprocs
#NONFIXEDBLOCKSIZE mode ::
# iGridSize etc must be specified. They constitute the global
# number of grid points in the physical domain without taking
# the guard cell into account. The local blocksize is calculated
# as iGridSize/iprocs  etc.

In this example, flags are set to start the simulation from scratch and to set the grid geometry, boundary conditions, and refinement. Parameters are also set for the density, pressure and velocity values on either side of the shock, and also the angles and point of intersection of the shock with the “x” axis. Additional parameters specify details of the run, such as the number of timesteps between various output files, and the initial, minimum and final values of the timestep. The comments and alternate values at the end of the file are provided to help configure uniform grid and variably-sized array situations.

When creating the flash.par file, another very helpful source of information is the setup_params file which gets written by the setup script each time a problem is setup. This file lists all possible runtime parameters and their default values from the Config files, as well as a brief description of the parameters. It is located in the object/ directory created at setup time.

Figure 3.1 shows the initial distribution of density for the 2-d Sod problem as setup by the example described in this chapter.

Figure 3.1: Image of the initial distribution of density in example setup.
Image creatingProblems_example