Skip to content

how to use shearing box module

jmshi edited this page Mar 7, 2017 · 10 revisions

Configuration

The Shearing box module can be switched on with -sh option:

> python configure.py -sh

Input File

The default shearing box setup requires the x1 (radial) direction to be shearing periodic, i.e. f(x, y, z) = f(x+Lx, y-q\Omega Lx t, z), where f(x, y, z) is a given variable, Lx is the x1 (radial) extent of the computational domain, q is the shearing rate, and \Omega is the local orbital frequency. It also asks x2(azimuthal) direction to be exact periodic. In order to achieve that, one has to change the <mesh> block as follows:

<mesh>
ix1_bc     = shear_periodic   # inner-X1 boundary flag
ox1_bc     = shear_periodic   # outer-X1 boundary flag
ix2_bc     = periodic         # inner-X2 boundary flag
ox2_bc     = periodic         # outer-X2 boundary flag

The x3(vertical) boundaries may vary as the user's need. The other necessary shearing box parameters have to be specified are qshear, the shearing rate (1.5 for Keplerian rotation), and local orbital frequency Omega0, e.g.,

<problem>
Omega0     = 1.0             # orbital frequency
qshear     = 1.5             # shearing rate
shboxcoord = 1               # 1: default x-y shear; 2: 2D x-z case 

By default, the extra parameter shboxcoord is set to 1, i.e. shear in the x1-x2 (or horizontal x-y) plane; for 2D simulations in the vertical x-z plane, please set shboxcoord = 2, and ix1_bc/ox1_bc to user defined boundary types (see pgen/hb3.cpp for examples).

Example 1:

The 2D MRI test in x-z plane (shear velocity perpendicular to the plane):

> python configure.py -b -sh --prob=hb3 --flux=hlld --eos=isothermal
Example 2:

The 2D hydro shearing sheet test:

> python configure.py -sh --prob=ssheet --flux=hlle --eos=isothermal
Example 3:

The 3D MRI/shwave test:

> python configure.py -b -sh --prob=hgb --flux=hlld --eos=isothermal 

Note: mesh refinement in shearing box is not implemented yet.

Clone this wiki locally