Functions | Variables

prob/strat.c File Reference

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

Detailed Description

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.


Function Documentation

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

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.

Here is the call graph for this function:

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

Computes delta(Vy).

Definition at line 458 of file strat.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_KE ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

Computes dens*(Vx^2+Vy^2+Vz^2)/2.

Definition at line 517 of file strat.c.

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

Here is the call graph for this function:

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

Definition at line 499 of file strat.c.

References ConsS::B1c, ConsS::B2c, ConsS::B3c, cc_pos(), and GridS::U.

Here is the call graph for this function:

ConsFun_t get_usr_expr ( const char *  expr  ) 

Sets pointer to expression for special output data.

Definition at line 319 of file strat.c.

VOutFun_t get_usr_out_fun ( const char *  name  ) 

Returns a user defined output function pointer.

Definition at line 329 of file strat.c.

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

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

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 614 of file strat.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 magnetic field

Definition at line 598 of file strat.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 magnetic field

Definition at line 606 of file strat.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_E_total ( const GridS pG,
const int  i,
const int  j,
const int  k 
) [static]

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

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 557 of file strat.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 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().

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

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 274 of file strat.c.

static double ran2 ( long int *  idum  )  [static]

Definition at line 371 of file strat.c.

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

tidal potential in 3D shearing box

Definition at line 423 of file strat.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 337 of file strat.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 333 of file strat.c.

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

potential for vertical component of gravity

Definition at line 435 of file strat.c.

References Omega_0, zbtm, and ztop.


Variable Documentation

Real zbtm [static]

Definition at line 64 of file strat.c.

Referenced by problem(), and VertGrav().

Real ztop [static]

Definition at line 64 of file strat.c.

Referenced by problem(), and VertGrav().