Problem generator for stratified 3D shearing sheet. More...
Go to the source code of this file.
Functions | |
static double | ran2 (long int *idum) |
static Real | UnstratifiedDisk (const Real x1, const Real x2, const Real x3) |
tidal potential in 3D shearing box | |
static Real | VertGrav (const Real x1, const Real x2, const Real x3) |
potential for vertical component of gravity | |
static Real | expr_dV2 (const GridS *pG, const int i, const int j, const int k) |
Computes delta(Vy). | |
static Real | expr_beta (const GridS *pG, const int i, const int j, const int k) |
Computes beta=P/(B^2/8pi). | |
static Real | expr_ME (const GridS *pG, const int i, const int j, const int k) |
static Real | expr_KE (const GridS *pG, const int i, const int j, const int k) |
Computes dens*(Vx^2+Vy^2+Vz^2)/2. | |
static Real | hst_rho_Vx_dVy (const GridS *pG, const int i, const int j, const int k) |
Reynolds stress, added as history variable. | |
static Real | hst_rho_dVy2 (const GridS *pG, const int i, const int j, const int k) |
KE in y-velocity fluctuations. | |
static Real | hst_E_total (const GridS *pG, const int i, const int j, const int k) |
total energy (including tidal potential). | |
static Real | hst_Bx (const GridS *pG, const int i, const int j, const int k) |
x-component of magnetic field | |
static Real | hst_By (const GridS *pG, const int i, const int j, const int k) |
y-component of magnetic field | |
static Real | hst_Bz (const GridS *pG, const int i, const int j, const int k) |
z-component of magnetic field | |
static Real | hst_BxBy (const GridS *pG, const int i, const int j, const int k) |
Maxwell stress. | |
void | problem (DomainS *pDomain) |
Problem initial conditions, edited for each problem. | |
void | problem_write_restart (MeshS *pM, FILE *fp) |
Problem specific subroutine for use with writing restart files, Edited for each problem. | |
void | problem_read_restart (MeshS *pM, FILE *fp) |
Problem specific subroutine for use with reading restart files, Edited for each problem. | |
ConsFun_t | get_usr_expr (const char *expr) |
Sets pointer to expression for special output data. | |
VOutFun_t | get_usr_out_fun (const char *name) |
Returns a user defined output function pointer. | |
void | Userwork_in_loop (MeshS *pM) |
Problem work executed during each step in the main Athena loop, see main.c. | |
void | Userwork_after_loop (MeshS *pM) |
Problem work executed after the main Athena loop, see main.c Edited for each problem. | |
Variables | |
static Real | ztop |
static Real | zbtm |
Problem generator for stratified 3D shearing sheet.
PURPOSE: Problem generator for stratified 3D shearing sheet. Based on the initial conditions described in "Three-dimensional Magnetohydrodynamic Simulations of Vertically Stratified Accretion Disks" by Stone, Hawley, Gammie & Balbus.
Several different field configurations and perturbations are possible:
Code must be configured using --enable-shearing-box
REFERENCE: Stone, J., Hawley, J. & Balbus, S. A., ApJ 463, 656-673 (1996) Hawley, J. F. & Balbus, S. A., ApJ 400, 595-609 (1992)
Definition in file strat.c.
Computes beta=P/(B^2/8pi).
Definition at line 474 of file strat.c.
References ConsS::B1c, ConsS::B2c, ConsS::B3c, cc_pos(), ConsS::d, Iso_csound2, and GridS::U.
Definition at line 499 of file strat.c.
References ConsS::B1c, ConsS::B2c, ConsS::B3c, cc_pos(), and GridS::U.
ConsFun_t get_usr_expr | ( | const char * | expr | ) |
VOutFun_t get_usr_out_fun | ( | const char * | name | ) |
x-component of magnetic field
Definition at line 591 of file strat.c.
References ConsS::B1c, and GridS::U.
Referenced by problem(), and problem_read_restart().
Maxwell stress.
Definition at line 614 of file strat.c.
References ConsS::B1c, ConsS::B2c, and GridS::U.
Referenced by problem(), and problem_read_restart().
y-component of magnetic field
Definition at line 598 of file strat.c.
References ConsS::B2c, and GridS::U.
Referenced by problem(), and problem_read_restart().
z-component of magnetic field
Definition at line 606 of file strat.c.
References ConsS::B3c, and GridS::U.
Referenced by problem(), and problem_read_restart().
total energy (including tidal potential).
Definition at line 573 of file strat.c.
References cc_pos(), ConsS::d, ConsS::E, GridS::U, and UnstratifiedDisk().
Referenced by problem(), and problem_read_restart().
Reynolds stress, added as history variable.
Definition at line 542 of file strat.c.
References cc_pos(), ConsS::d, ConsS::M1, ConsS::M2, Omega_0, qshear, and GridS::U.
Referenced by problem(), and problem_read_restart().
void problem | ( | DomainS * | pDomain | ) |
Problem initial conditions, edited for each problem.
Definition at line 71 of file strat.c.
References amp, ath_error(), B0, ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, beta, cc_pos(), ConsS::d, GridS::Disp, dump_history_enroll(), ConsS::E, eta_Ohm, Gamma_1, DomainS::Grid, hst_Bx(), hst_BxBy(), hst_By(), hst_Bz(), hst_E_total(), hst_rho_dVy2(), hst_rho_Vx_dVy(), GridS::ie, ipert, GridS::is, Iso_csound2, GridS::je, GridS::js, GridS::ke, GridS::ks, kx, Lx, Ly, Lz, ConsS::M1, ConsS::M2, ConsS::M3, DomainS::Nx, GridS::Nx, Omega_0, par_getd(), par_getd_def(), par_geti_def(), qshear, ran2(), DomainS::RootMaxX, DomainS::RootMinX, ShearingBoxPot, StaticGravPot, GridS::U, xmax, xmin, zbtm, and ztop.
void problem_read_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
Problem specific subroutine for use with reading restart files, Edited for each problem.
Definition at line 283 of file strat.c.
References dump_history_enroll(), eta_Ohm, hst_Bx(), hst_BxBy(), hst_By(), hst_Bz(), hst_E_total(), hst_rho_dVy2(), hst_rho_Vx_dVy(), Omega_0, par_getd(), par_getd_def(), qshear, ShearingBoxPot, and StaticGravPot.
void problem_write_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
tidal potential in 3D shearing box
Definition at line 423 of file strat.c.
References Omega_0, and qshear.
Referenced by hst_E_total().
void Userwork_after_loop | ( | MeshS * | pM | ) |
void Userwork_in_loop | ( | MeshS * | pM | ) |