-
Notifications
You must be signed in to change notification settings - Fork 129
Shearing Box
Nothing to do at the configuration for the shearing box.
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Ω0 L xt, 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 Ω0 is the local orbital frequency. It also requires the x2
(azimuthal) direction to be exactly periodic with uniform grid spacing. 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
x2rat = 1.0 # X2 cell aspect ratio
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.,
<orbital_advection>
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 shear_periodic
boundaries (see pgen/hb3.cpp
and input/mhd/athinput.hb3
for example).
The 2D hydro shearing sheet test:
> python configure.py --prob=ssheet --flux=hlle --eos=isothermal
The 2D MRI test in x-z plane (shear velocity perpendicular to the plane):
> python configure.py -b --prob=hb3 --flux=hlld --eos=isothermal
The 3D MRI/shwave test:
> python configure.py -b --prob=hgb --flux=hlld --eos=isothermal
Runs in the shearing box require additional computational cost compared to runs without the shearing box approximation. The cost comes from extra boundary calls and MPI communications of the sher periodic boundaries. We find only ~3% slow down, when running 3D MHD problems of 643 grid points with MeshBlock size of 323, with (hgb.cpp
) and without (shock_tube.cpp
) the shearing box boundary conditions. When compiling with the Intel compiler v18.0 and default optimization, and 8 processes are employed, the zone-cycles/second is 1.087 × 107 for the former while 1.115 × 107 for the latter.
- Passive scalar is available even in the shearing box.
- AMR is prohibited and SMR is limited in the shearing box. When using SMR in the shearing box, all the meshblocks at the same
z
facing thex1
shear-periodic boundaries are required to have the same level. - Orbital advection also works in the shearing box for
shboxcoord = 1
. See Orbital Advection. - Both the PLM reconstructions (
time/xorder=2
ortime/xorder=2c
) and the PPM reconstructions (time/xorder=3
ortime/xorder=3c
) are available in the shearing box. When givingtime/xorder=4
, however, the remapping in the shear periodic boundaries will be performed with only the 3rd-order spatial accuracy. - Neither
time/integrator=rk4
nortime/integrator=ssprk5_4
are allowed in the shearing box.
Getting Started
User Guide
- Configuring
- Compiling
- The Input File
- Problem Generators
- Boundary Conditions
- Coordinate Systems and Meshes
- Running the Code
- Outputs
- Using MPI and OpenMP
- Static Mesh Refinement
- Adaptive Mesh Refinement
- Load Balancing
- Special Relativity
- General Relativity
- Passive Scalars
- Shearing Box
- Diffusion Processes
- General Equation of State
- FFT
- Multigrid
- High-Order Methods
- Super-Time-Stepping
- Orbital Advection
- Rotating System
- Reading Data from External Files
- Non-relativistic Radiation Transport
- Cosmic Ray Transport
- Units and Constants
Programmer Guide