amrex.fpe_trap_invalid=1

max_step  = 100
stop_time = 0.2

geometry.is_periodic = 0 0 0
geometry.coord_sys   = 0  # 0 => cart, 1 => RZ  2=>spherical
geometry.prob_lo     =   0.0     0.0     0.0
geometry.prob_hi     =   1.0     1.0     1.0
amr.n_cell           =    64      64      64

# >>>>>>>>>>>>>  BC FLAGS <<<<<<<<<<<<<<<<
# 0 = Interior           3 = Symmetry
# 1 = Inflow             4 = SlipWall
# 2 = Outflow            5 = NoSlipWall
# >>>>>>>>>>>>>  BC FLAGS <<<<<<<<<<<<<<<<
cns.lo_bc       =  2   5   5
cns.hi_bc       =  2   5   5

cns.cfl = 0.3  # cfl number for hyperbolic system

cns.v = 2
amr.v = 1

# LOAD BALANCE
amr.loadbalance_with_workestimates = 1
amr.loadbalance_level0_int = 1000

# REFINEMENT / REGRIDDING 
amr.max_level       = 1       # maximum level number allowed

amr.ref_ratio       = 2 2 2 2 # refinement ratio
amr.regrid_int      = 2 2 2 2 # how often to regrid
amr.blocking_factor = 8
amr.max_grid_size   = 16
amr.n_error_buf     = 0 0 0 0 # number of buffer cells in error est
amr.grid_eff        = 0.99     # what constitutes an efficient grid

# CHECKPOINT FILES
amr.checkpoint_files_output = 0
amr.check_file              = chk    # root name of checkpoint file
amr.check_int               = 100    # number of timesteps between checkpoints

# PLOTFILES
amr.plot_files_output = 1
amr.plot_file         = plt     # root name of plotfile
amr.plot_int          = 10      # number of timesteps between plotfiles
amr.derive_plot_vars  = pressure x_velocity y_velocity z_velocity

# EB
eb2.sphere_radius = 0.125
#eb2.sphere_center = 0.45  0.65  0.54
#eb2.sphere_center = 0.5  0.5  0.5
eb2.sphere_center = 0.7 0.5 0.5
eb2.sphere_has_fluid_inside = 0

eb2.geom_type = sphere
#eb2.geom_type = all_regular

cns.refine_cutcells = 0

cns.do_visc = true
#cns.use_const_visc = false
#cns.const_visc_mu  = 0.001
#cns.const_visc_ki  = 0.0
#cns.const_lambda   = 0.0

# case 1: a single box at the top y-boundary
#cns.refine_box_lo_0 = 0.45 0.90 0.45
#cns.refine_box_hi_0 = 0.55 0.92 0.55

# case 2: two boxes, one at the top, the other at the bottom
cns.refine_box_lo_0 = 0.45 0.85 0.45
cns.refine_box_hi_0 = 0.55 0.99 0.55

# case 3: similar to case 2, but the bottom box is wider
#cns.refine_box_lo_0 = 0.45 0.85 0.45
#cns.refine_box_hi_0 = 0.55 0.99 0.55
#
#cns.refine_box_lo_1 = 0.45 0.08 0.35
#cns.refine_box_hi_1 = 0.55 0.10 0.65

# case 4: at the corner
#cns.refine_box_lo_0 = 0.85 0.85 0.85
#cns.refine_box_hi_0 = 0.99 0.99 0.99

# case 5 : very wide box
#cns.refine_box_lo_0 = 0.0 0.90 0.0
#cns.refine_box_hi_0 = 1.0 0.92 1.0

# case 6 : a box at the center
cns.refine_box_lo_0 = 0.48 0.48 0.48
cns.refine_box_hi_0 = 0.52 0.52 0.52
amr.blocking_factor = 16
amr.max_grid_size   = 64

# case 7 : refine everywhere
#cns.refine_box_lo_0 = 0. 0. 0.
#cns.refine_box_hi_0 = 1. 1. 1.
#geometry.is_periodic = 0 0 0
#cns.lo_bc       =  2   2   2
#cns.hi_bc       =  2   2   2

#
cns.refine_box_lo_0 = 0.55 0.5  0.3
cns.refine_box_hi_0 = 0.85 0.65 0.7
amr.blocking_factor = 16
amr.max_grid_size   = 64

# problem specific parameter
prob.p_l   = 1.0 
prob.p_r   = 0.1
prob.rho_l = 1.0
prob.rho_r = 0.125
prob.u_l   = 0.0
prob.u_r   = 0.0

