Functions | Variables

prob/hgb.c File Reference

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

Detailed Description

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.


Function Documentation

static Real expr_dV2 ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

Computes delta(Vy).

Definition at line 581 of file hgb.c.

References cc_pos(), ConsS::d, ConsS::M2, Omega_0, qshear, and GridS::U.

Here is the call graph for this function:

static Real expr_Jsq ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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.

void get_eta_user ( GridS pG,
int  i,
int  j,
int  k,
Real eta_O,
Real eta_H,
Real eta_A 
)

Definition at line 467 of file hgb.c.

ConsFun_t get_usr_expr ( const char *  expr  ) 

Sets pointer to expression for special output data.

Definition at line 455 of file hgb.c.

VOutFun_t get_usr_out_fun ( const char *  name  ) 

Returns a user defined output function pointer.

Definition at line 462 of file hgb.c.

static Real hst_Bx ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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().

Here is the caller graph for this function:

static Real hst_BxBy ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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().

Here is the caller graph for this function:

static Real hst_By ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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().

Here is the caller graph for this function:

static Real hst_Bz ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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().

Here is the caller graph for this function:

static Real hst_dBy ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

Definition at line 712 of file hgb.c.

References ConsS::B2c, cc_pos(), Lx, Ly, Lz, Omega_0, qshear, GridS::time, and GridS::U.

Referenced by problem().

Here is the call graph for this function:

Here is the caller graph for this function:

static Real hst_dEw2 ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

static Real hst_E_total ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

static Real hst_rho_dVy2 ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

KE in y-velocity fluctuations.

Definition at line 636 of file hgb.c.

References cc_pos(), ConsS::d, ConsS::M2, Omega_0, qshear, and GridS::U.

Referenced by problem(), and problem_read_restart().

Here is the call graph for this function:

Here is the caller graph for this function:

static Real hst_rho_Vx_dVy ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void problem ( DomainS pDomain  ) 
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.

Here is the call graph for this function:

void problem_write_restart ( MeshS pM,
FILE *  fp 
)

Problem specific subroutine for use with writing restart files, Edited for each problem.

Definition at line 405 of file hgb.c.

double ran2 ( long int *  idum  )  [static]

Definition at line 514 of file hgb.c.

static Real UnstratifiedDisk ( const Real  x1,
const Real  x2,
const Real  x3 
) [static]

tidal potential in 3D shearing box

Definition at line 567 of file hgb.c.

References Omega_0, and qshear.

Referenced by hst_E_total().

Here is the caller graph for this function:

void Userwork_after_loop ( MeshS pM  ) 

Problem work executed after the main Athena loop, see main.c Edited for each problem.

Definition at line 482 of file hgb.c.

void Userwork_in_loop ( MeshS pM  ) 

Problem work executed during each step in the main Athena loop, see main.c.

Edited for each problem.

Definition at line 478 of file hgb.c.


Variable Documentation

Definition at line 46 of file hgb.c.

Definition at line 46 of file hgb.c.