Input
This page provides detailed info on the input
file options. These arguments are passed to AMReX, not all arguments are required (see examples)
AMReX options
The AMReX options covers control of
the problem domain definition
time-stepping
gridding and load balancing
output files
checkpoint and restarting
The reference is available on AMReX's documentation.
Problem definition and time-stepping
max_step
Int
Maximum number of time steps to take
stop_time
Real
Maximum time to reach
time_step
Real
dt (base level), higher level time step is based on number of subcycles
cfl
Real
CFL (incompatible option with time_step)
geometry.is_periodic
DIM * Int
0 0 0
1 for true, 0 for false (one value for each coordinate direction)
geometry.coord_sys
Int
0
0 = Cartesian; 1 = Cylindrical; 2 = Spherical (only support Cartesian)
geometry.prob_lo
DIM * Real
0 0 0
Low corner of physical domain (physical not index space)
geometry.prob_hi
DIM * Real
High corner of physical domain (physical not index space)
geometry.prob_extent
DIM * Real
Extent of physical domain, choose between this or prob_hi
amr.n_cell
DIM * Int
Number of cells at level 0 in each coordinate direction
Gridding and load balancing
amr.max_level
Int
0
Maximum level of refinement allowed (0 when single-level)
amr.ref_ratio
Int *(nlev-1)
Refeniment ratio per level. If the number of ref_ratio
is less than the number of levels - 1, the last entry will be automatically propagated
amr.regrid_int
Int
-1
How often to regrid (in number of steps). No regridding will occur if set to < 0
amr.max_grid_size
Int
32
Maximum number of cells in each grid in all directions
amr.blocking_factor
Int
8
Each grid must be divisible by blocking_factor in all directions (must be 1 or power of 2)
amr.refine_grid_layout
Bool
1
Split grids in half until the number of grids is no less than the number of procs
amr.n_error_buf
DIM * Int
1 1 1
Buffer in added around tagged cells
amr.grid_eff
Real
0.7
Target value of the percentage of tagged cells in the grids
amr.loadbalance_level0_int
Int
2
How often to do load balance (in number of steps). For single level (i.e., amr.max_level=0) only
amr.loadbalance_with_workestimates
Bool
0
For multi-level runs, load balance is done during regrid and thus the load balance interval is controlled by regrid_int
amr.loadbalance_max_fac
Real
1.5
This controls the change in the maximum number of boxes that can be assigned to an MPI rank in load balancing
Outputs and Restarting
amr.plot_files_output
Bool
1
Output plotfile or not (redundent because one can set plot_int = -1 to disable output)
amr.plot_file
String
./plot/plt
Prefix of plotfile output
amr.plot_int
Int
-1
Frequency of plotfile output; if -1 then no plotfiles will be written
amr.derive_plot_vars
Strings
NONE
List of derived variables to plot; can use "ALL" or "NONE" to select all or none of the variables. See the full list of derived variables available in Cerisse below.
amr.checkpoint_files_output
Bool
1
Same as plot_files_output, but for checkpoint files
amr.check_file
String
chk
Prefix of checkpoint file output
amr.check_int
Int
-1
Frequency of checkpoint file output; if -1 then no plotfiles will be written
amr.restart
String
If present, then the name of checkpoint file to restart from
amr.plotfile_on_restart
Bool
0
Write a plotfile when immediately after restart or not
GPU-related parameters
amrex.the_arena_init_size
Int
3/4 of total device memory
GPU device memory allocated to The_Arena (in bytes)
Other parameters
amrex.omp_threads
String or Int
system
nosmt
: avoid using threads for virtual cores (aka Hyperthreading or SMT), as is default in OpenMP; system
: use the environment variable OMP_NUM_THREADS
. For Integer values, OMP_NUM_THREADS
is ignored.
amrex.fpe_trap_invalid
Bool
0
Produce error when invalid floating-point arthematic is detected. Helpful for debugging
Boundary conditions
# 0 = Interior 3 = Symmetry
# 1 = Inflow / UserBC 4 = SlipWall =3
# 2 = Outflow (First Order Extrapolation) 5 = NoSlipWall (adiabatic)
cns.lo_bc = 1 5 0
cns.hi_bc = 2 5 0
In the above example, the bc in x would be inflow (at lower boundary) and outflow (at upper boundary) while no specific boudnary will be defined in z
cns.lo_bc
DIM * Int
BC flags at lower boundaries in x,y,z
cns.hi_bc
DIM * Int
BC flags at upper boundaries in x,y,z
If option "0" is selected, the corresponding geometry.is_periodic
must also be set.
If option "1" is selected, the bcnormal
function in prob.H
will be activated (see boundary conditions).
Time Marching
cns.order_rk
Int
Order of RK (-2/0/1/2/3)
cns.stages_rk
Int
RK stages (1/2/3)
Runge-Kutta order options
-2
Original RK2 Scheme0
(for testing) returns RHS1
Euler scheme2
Low storage Runge-Kutta second order SSPRK(m,2) with m stages3
Third order SSP Runge-Kutta (options stages 3 or 4)
Geometry EB options
In the input file, users should specify the geometry of the embedded boundary with eb2.geom_type
, then supply the required parameters in the format of eb2.{geom_param}
.
all_regular
no EB, no additional parameters needed
plane
plane_point
- a point where the plane intersects, plane_normal
- the normal vector of the plane that points into the solid
sphere
sphere_center
, sphere_radius
, sphere_has_fluid_inside
- bool value fluid inside or outside
cylinder
cylinder_center
, cylinder_radius
, cylinder_height
, cylinder_direction
- (0,1,2) for (x,y,z), and cylinder_has_fluid_inside
box
box_lo
and box_hi
- lower and upper corners of the box, and box_has_fluid_inside
stl
stl_file
- the STL file name, stl_scale
- the scaling factor in all directions, and stl_center
- center of object in relation to the cooridinate system in the file, and stl_reverse_normal
- essentially stl_has_fluid_inside
triangles
num_tri
- number of triangles, up to 5 (change the value in custom_geometry.cpp
if needed),
for each triangle, {i}
from 0 to num_tri-1, tri_{i}
point_0
, tri
{i}
point_1
, tri
{i}_point_2
- three points that define the triangle, give the points in anti-clockwise direction to set solid inside of the triangle. The z-coordinate isn't really needed because the triangle will be extruded in the z-direction.
redistribution_type
"NoRedist"
, "FluxRedist"
, "StateRedist"
or "NewRedist"
The first one, indicates no flux redistribution (default). FluxRedist/StateRedist correspond to AMReX options. NewRedist does not use AMReX functions but it is a variant of FluxRedist
You can only choose one geometry type and one geometry. If you want to use multiple geometries, you need to define your own geometry
Below are some examples:
eb2.geom_type = all_regular
eb2.geom_type = cylinder
eb2.cylinder_direction = 2
eb2.cylinder_radius = 0.25
eb2.cylinder_center = 1.0 2.0 0.0
eb2.cylinder_has_fluid_inside = 0
eb2.geom_type = box
eb2.box_lo = -1.0 -1.0 0.0
eb2.box_hi = 1.0 2.0 0.0
eb2.box_has_fluid_inside = 0
# This gives the same geometry as the box above
eb2.geom_type = triangles
triangles.num_tri = 2
triangles.tri_0_point_0 = -1.0 1.0 0.0
triangles.tri_0_point_1 = -1.0 -1.0 0.0
triangles.tri_0_point_2 = 1.0 -1.0 0.0
triangles.tri_1_point_0 = -1.0 1.0 0.0
triangles.tri_1_point_1 = 1.0 -1.0 0.0
triangles.tri_1_point_2 = 1.0 1.0 0.0
Last updated