Problem generator for 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 | expr_dV2 (const GridS *pG, const int i, const int j, const int k) |
Computes delta(Vy). | |
static Real | expr_Jsq (const GridS *pG, const int i, const int j, const int k) |
Computes current density square. | |
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 B-field | |
static Real | hst_By (const GridS *pG, const int i, const int j, const int k) |
y-component of B-field | |
static Real | hst_Bz (const GridS *pG, const int i, const int j, const int k) |
z-component of B-field | |
static Real | hst_BxBy (const GridS *pG, const int i, const int j, const int k) |
Maxwell stress. | |
static Real | hst_dEw2 (const GridS *pG, const int i, const int j, const int k) |
static Real | hst_dBy (const GridS *pG, const int i, const int j, const int k) |
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 | get_eta_user (GridS *pG, int i, int j, int k, Real *eta_O, Real *eta_H, Real *eta_A) |
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 | |
Real | Lx |
Real | Ly |
Real | Lz |
Problem generator for 3D shearing sheet.
PURPOSE: Problem generator for 3D shearing sheet. Based on the initial conditions described in "Local Three-dimensional Magnetohydrodynamic Simulations of Accretion Disks" by Hawley, Gammie & Balbus, or HGB.
Several different field configurations and perturbations are possible:
To run simulations of stratified disks (including vertical gravity), use the strat.c problem generator.
Code must be configured using --enable-shearing-box
REFERENCE: Hawley, J. F. & Balbus, S. A., ApJ 400, 595-609 (1992). Johnson, Guan, & Gammie, ApJSupp, (2008)
Definition in file hgb.c.
Computes current density square.
Definition at line 597 of file hgb.c.
References GridS::B1i, GridS::B2i, GridS::B3i, GridS::dx1, GridS::dx2, and GridS::dx3.
ConsFun_t get_usr_expr | ( | const char * | expr | ) |
VOutFun_t get_usr_out_fun | ( | const char * | name | ) |
x-component of B-field
Definition at line 670 of file hgb.c.
References ConsS::B1c, and GridS::U.
Referenced by problem(), and problem_read_restart().
Maxwell stress.
Definition at line 692 of file hgb.c.
References ConsS::B1c, ConsS::B2c, and GridS::U.
Referenced by problem(), and problem_read_restart().
y-component of B-field
Definition at line 677 of file hgb.c.
References ConsS::B2c, and GridS::U.
Referenced by problem(), and problem_read_restart().
z-component of B-field
Definition at line 684 of file hgb.c.
References ConsS::B3c, and GridS::U.
Referenced by problem(), and problem_read_restart().
Definition at line 697 of file hgb.c.
References ConsS::B1c, ConsS::B2c, ConsS::B3c, cc_pos(), ConsS::d, ConsS::M1, ConsS::M2, ConsS::M3, Omega_0, qshear, and GridS::U.
Referenced by problem().
total energy (including tidal potential).
Definition at line 652 of file hgb.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 621 of file hgb.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 79 of file hgb.c.
References amp, ath_error(), B0, ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, ConsS::B3c, GridS::B3i, beta, cc_pos(), ConsS::d, d_ind, GridS::Disp, dump_history_enroll(), GridS::dx1, GridS::dx2, GridS::dx3, ConsS::E, eta_Ohm, Gamma, Gamma_1, DomainS::Grid, hst_Bx(), hst_BxBy(), hst_By(), hst_Bz(), hst_dBy(), hst_dEw2(), hst_E_total(), hst_rho_dVy2(), hst_rho_Vx_dVy(), GridS::ie, ipert, GridS::is, Iso_csound, Iso_csound2, GridS::je, GridS::js, GridS::ke, GridS::ks, kx, kz, Lx, Ly, Lz, ConsS::M1, ConsS::M2, ConsS::M3, nu_aniso, nu_iso, DomainS::Nx, GridS::Nx, Omega_0, par_getd(), par_getd_def(), par_geti_def(), Q_AD, Q_Hall, qshear, ran2(), DomainS::RootMaxX, DomainS::RootMinX, ShearingBoxPot, GridS::U, xmax, and xmin.
void problem_read_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
Problem specific subroutine for use with reading restart files, Edited for each problem.
Definition at line 414 of file hgb.c.
References d_ind, dump_history_enroll(), eta_Ohm, hst_Bx(), hst_BxBy(), hst_By(), hst_Bz(), hst_E_total(), hst_rho_dVy2(), hst_rho_Vx_dVy(), nu_aniso, nu_iso, Omega_0, par_getd_def(), Q_AD, Q_Hall, qshear, and ShearingBoxPot.
void problem_write_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
tidal potential in 3D shearing box
Definition at line 567 of file hgb.c.
References Omega_0, and qshear.
Referenced by hst_E_total().
void Userwork_after_loop | ( | MeshS * | pM | ) |
void Userwork_in_loop | ( | MeshS * | pM | ) |
Definition at line 46 of file hgb.c.
Referenced by hst_dBy(), ParticlePosition(), ParticleVelocity(), problem(), problem_read_restart(), RemapEy_ix1(), RemapEy_ox1(), ShearingSheet_ix1(), ShearingSheet_ox1(), and Userwork_in_loop().