boundary_shearing_mod Module Reference

Boundary module for a shearingsheet/shearingbox. (see e.g. the standard run ) More...

Data Types

type  boundary_shearing
 

Functions/Subroutines

subroutine initboundary_shearing (this, Mesh, Physics, dir, config)
 Constructor for shearing boundary conditions. More...
 
pure subroutine setboundarydata (this, Mesh, Physics, time, pvar)
 Applies the shearing boundary conditions. More...
 
subroutine finalize (this)
 Destructor for periodic boundary conditions. More...
 

Variables

character(len=32), parameter boundcond_name = "shearing"
 

Detailed Description

Boundary module for a shearingsheet/shearingbox. (see e.g. the standard run )

Author
Jannes Klee
Todo:
Implementation for shearing in third dimension is not included, yet.

Implementation of the boundaries in a shearing box. For details have a look at [hawley1995] or [gammie2001] .

The dependent variables \( f = (\Sigma, E, v_{x}, v_{y}) \) are sheared- periodic, thus for shearing in the western/eastern boundaries:

\[ f(x,y) = f(x,y+L) \\ f(x,y) = f(x+L,y-q \Omega L t). \]

There is an integral shift and a residual one. The latter is done by linear interpolation between two cells.

Attention
The shearing boundaries are either applying periodic boundaries first or assuming that periodic boundaries are applied (parallel).
boundaries_shift.png
illustration of boundary mapping
boundaries_velshift.png
velocity substraction for the v_y component

Function/Subroutine Documentation

◆ finalize()

subroutine boundary_shearing_mod::finalize ( class(boundary_shearing), intent(inout)  this)

Destructor for periodic boundary conditions.

Definition at line 302 of file boundary_shearing.f90.

◆ initboundary_shearing()

subroutine boundary_shearing_mod::initboundary_shearing ( class(boundary_shearing), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
class(physics_base), intent(in)  Physics,
integer, intent(in)  dir,
type(dict_typ), pointer  config 
)

Constructor for shearing boundary conditions.

Definition at line 96 of file boundary_shearing.f90.

◆ setboundarydata()

pure subroutine boundary_shearing_mod::setboundarydata ( class(boundary_shearing), intent(inout)  this,
class(mesh_base), intent(in)  Mesh,
class(physics_base), intent(in)  Physics,
real, intent(in)  time,
class(marray_compound), intent(inout)  pvar 
)

Applies the shearing boundary conditions.

The physical meaning of the implementation is explained in the overall module descriptions. Some of the data required for setting this boundary condition is calculated during initialization (see boundary_shearing_mod::initboundary_shearing ) and depends on whether fast advection (FARGO) (see timedisc_base_mod ) is enabled or not.

The implemenation is done in a way, that periodic boundaries are applied at the very beginning (in serial) or are already applied (in parallel). Thus, only the shifting on the same side is applied. This gives us the benefit to be able to reuse the periodic boundaries, that are automatically applied by MPI from of domain decomposition. When running on a single core the periodic boundaries are applied by hand at the beginning.

For parallel usage: currently, this implementation only works in parallel with processes along the y-axis.

                            NB
                     ----------------
                            p1
                     ----------------
                            p2
                     ----------------
                            p3
                     ----------------
                            p4
                     ----------------
                            SB

Here, NB, SB are northern and southern boundaries, respectively. p1,p2,... are the used processes. This kind of parallization goes in concordance with the parallelization used for the gravitation fourier solvers, which need full strides in one direction. We use solely the x-direction, because it is the first dimension and lies coherently behind each other for vectorization and generally fast access.

Definition at line 191 of file boundary_shearing.f90.

Variable Documentation

◆ boundcond_name

character(len=32), parameter boundary_shearing_mod::boundcond_name = "shearing"
private

Definition at line 78 of file boundary_shearing.f90.