PLUTO
|
Shearing Box setup. More...
#include "pluto.h"
Go to the source code of this file.
Functions | |
void | Init (double *v, double x, double y, double z) |
void | Analysis (const Data *d, Grid *grid) |
void | UserDefBoundary (const Data *d, RBox *box, int side, Grid *grid) |
void | BodyForceVector (double *v, double *g, double x, double y, double z) |
double | BodyForcePotential (double x, double y, double z) |
double | FARGO_SetVelocity (double x1, double x2) |
Shearing Box setup.
Set initial conditions for a shearing box model in two or three dimensions:
where, by default, the angular rotation frequency is while the shear parameter is
(Keplerian rotation). In the stratified case the scale height is given by
. The parameters controlling the model are the elements of the array
g_inputParam:
g_inputParam[BETA]
: sets the plasma beta (midplane), g_inputParam[CSOUND]
: sets the speed of sound The additional constants NET_FLUX
and STRATIFICATION
are defined inside definitions.h
and are used to:
NET_FLUX
(YES/NO
)
: set the magnetic field configuration corresponding to a net magnetic flux (YES
) or zero-net flux (NO
);STRATIFICATION
(YES/NO
)
: enable or disable stratified shearing box models. With stratification, density and vertical gravity are changed.The Shearing_Box/
directory contains several configurations for different purposes:
Conf. | DIM | NET_FLUX | STRAT. | T. STEPPING | RECONSTR. | EOS | Ref |
---|---|---|---|---|---|---|---|
#01 | 2 | YES | NO | HANCOCK | LINEAR | ISOTHERMAL | - |
#02 | 2 | YES | NO | ChTr | PARABOLIC | ISOTHERMAL | - |
#03 | 3 | YES | NO | RK2 | LINEAR | ISOTHERMAL | [Bod08] |
#04 | 3 | YES | NO | RK2 | LINEAR | ISOTHERMAL | [Bod08] |
#05 | 3 | YES | NO | ChTr | PARABOLIC | ISOTHERMAL | [Bod08] |
#06 | 3 | YES | NO | ChTr | PARABOLIC | ISOTHERMAL | [Bod08] |
#07 | 3 | NO | NO | RK2 | LINEAR | ISOTHERMAL | [Mig12] |
#08 | 3 | NO | NO | RK2 | LINEAR | ISOTHERMAL | [Mig12] (*) |
#09 | 3 | NO | NO | ChTr | PARABOLIC | ISOTHERMAL | [Mig12] |
#10 | 3 | NO | NO | ChTr | PARABOLIC | ISOTHERMAL | [Mig12] (*) |
#11 | 3 | NO | YES | HANCOCK | LINEAR | ISOTHERMAL | [Bod14] |
#12 | 3 | NO | YES | HANCOCK | LINEAR | IDEAL | [Bod12] (^) |
#13 | 3 | NO | NO | HANCOCK | LINEAR | IDEAL | (**) |
#14 | 3 | YES | NO | RK3 | WENO3 | IDEAL | (**) |
(*) used with FARGO to be compared to the previous configurations.
(**) as conf. #9 but with IDEAL eos and FARGO.
(^) This a simplified version of the [Bod12] setup. The actual configuration was also modifying the Riemann solver flux to guarantee zero mass flux across top and bottom boundary.
References:
Definition in file init.c.
Compute volume-integrated magnetic pressure, Maxwell and Reynolds stresses. Save them to "averages.dat"
Definition at line 212 of file init.c.
double BodyForcePotential | ( | double | x, |
double | y, | ||
double | z | ||
) |
void BodyForceVector | ( | double * | v, |
double * | g, | ||
double | x, | ||
double | y, | ||
double | z | ||
) |
double FARGO_SetVelocity | ( | double | x1, |
double | x2 | ||
) |
void Init | ( | double * | v, |
double | x, | ||
double | y, | ||
double | z | ||
) |
The Init() function can be used to assign initial conditions as as a function of spatial position.
[out] | v | a pointer to a vector of primitive variables |
[in] | x1 | coordinate point in the 1st dimension |
[in] | x2 | coordinate point in the 2nd dimension |
[in] | x3 | coordinate point in the 3rdt dimension |
The meaning of x1, x2 and x3 depends on the geometry:
Variable names are accessed by means of an index v[nv], where nv = RHO is density, nv = PRS is pressure, nv = (VX1, VX2, VX3) are the three components of velocity, and so forth.
Definition at line 96 of file init.c.
The user-defined boundary is used to impose stress-free boundary and purely vertical magnetic field at the top and bottom boundaries, as done in Bodo et al. (2012). In addition, constant temperature and hydrostatic balance are imposed. For instance, at the bottom boundary, one has:
where is the value of gravity at the lower boundary. Solving for
at the bottom boundary where
gives:
where, for simplicity, we keep constant temperature in the ghost zones rather than at the boundary interface (this seems to give a more stable behavior and avoids negative densities). A similar treatment holds at the top boundary.
Definition at line 316 of file init.c.