Problem generator for RT instabilty. More...
Go to the source code of this file.
Functions | |
static double | ran2 (long int *idum) |
static void | reflect_ix2 (GridS *pGrid) |
Special reflecting boundary functions in x2 for 2D sims. | |
static void | reflect_ox2 (GridS *pGrid) |
Special reflecting boundary functions in x2 for 2D sims. | |
static void | reflect_ix3 (GridS *pGrid) |
Special reflecting boundary functions in x3 for 2D sims. | |
static void | reflect_ox3 (GridS *pGrid) |
Special reflecting boundary functions in x3 for 3D sims. | |
static Real | grav_pot2 (const Real x1, const Real x2, const Real x3) |
Gravitational potential; g = 0.1. | |
static Real | grav_pot3 (const Real x1, const Real x2, const Real x3) |
Gravitational potential; g = 0.1. | |
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. |
Problem generator for RT instabilty.
PURPOSE: Problem generator for RT instabilty. Gravitational pot. is hardwired to be 0.1z. Density difference is hardwired to be 2.0 in 2D, and is set by the input parameter <problem>/rhoh in 3D (default value is 3.0). This reproduces 2D results of Liska & Wendroff, 3D results of Dimonte et al.
FOR 2D HYDRO: Problem domain should be -1/6 < x < 1/6; -0.5 < y < 0.5 with gamma=1.4 to match Liska & Wendroff. Interface is at y=0; perturbation added to Vy Gravity acts in the y-direction. Special reflecting boundary conditions added in x2 to improve hydrostatic eqm (prevents launching of weak waves) Atwood number A = (d2-d1)/(d2+d1) = 1/3
FOR 3D: Problem domain should be -.05 < x < .05; -.05 < y < .05, -.1 < z < .1 Use gamma=5/3 to match Dimonte et al. Interface is at z=0; perturbation added to Vz Gravity acts in the z-direction. Special reflecting boundary conditions added in x3 to improve hydrostatic eqm (prevents launching of weak waves) Atwood number A = (d2-d1)/(d2+d1) = 1/2
PRIVATE FUNCTION PROTOTYPES:
REFERENCE: R. Liska & B. Wendroff, SIAM J. Sci. Comput., 25, 995 (2003)
Definition in file rt.c.
ConsFun_t get_usr_expr | ( | const char * | expr | ) |
VOutFun_t get_usr_out_fun | ( | const char * | name | ) |
void problem | ( | DomainS * | pDomain | ) |
Problem initial conditions, edited for each problem.
Definition at line 71 of file rt.c.
References amp, b0, ConsS::B1c, GridS::B1i, ConsS::B2c, GridS::B2i, bvals_mhd_fun(), cc_pos(), ConsS::d, DomainS::Disp, GridS::Disp, ConsS::E, Gamma, Gamma_1, DomainS::Grid, GridS::ie, iprob, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, left_x2, left_x3, ConsS::M1, ConsS::M2, ConsS::M3, DomainS::MaxX, GridS::Nx, DomainS::Nx, par_getd(), par_getd_def(), par_geti(), ran2(), reflect_ix2(), reflect_ix3(), reflect_ox2(), reflect_ox3(), right_x2, right_x3, DomainS::RootMaxX, DomainS::RootMinX, StaticGravPot, and GridS::U.
void problem_read_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
Problem specific subroutine for use with reading restart files, Edited for each problem.
Definition at line 300 of file rt.c.
References bvals_mhd_fun(), MeshS::Domain, MeshS::DomainsPerLevel, left_x2, left_x3, MeshS::NLevels, MeshS::Nx, reflect_ix2(), reflect_ix3(), reflect_ox2(), reflect_ox3(), right_x2, right_x3, and StaticGravPot.
void problem_write_restart | ( | MeshS * | pM, | |
FILE * | fp | |||
) |
static void reflect_ix2 | ( | GridS * | pGrid | ) | [static] |
Special reflecting boundary functions in x2 for 2D sims.
Definition at line 430 of file rt.c.
References GridS::B1i, GridS::B2i, GridS::B3i, d(), GridS::dx2, ConsS::E, Gamma_1, GridS::ie, il, GridS::is, iu, GridS::js, GridS::ke, GridS::ks, ku, ConsS::M2, GridS::Nx, and GridS::U.
Referenced by problem(), and problem_read_restart().
static void reflect_ix3 | ( | GridS * | pGrid | ) | [static] |
Special reflecting boundary functions in x3 for 2D sims.
Definition at line 549 of file rt.c.
References GridS::B1i, GridS::B2i, GridS::B3i, d(), GridS::dx3, ConsS::E, Gamma_1, GridS::ie, il, GridS::is, iu, GridS::je, jl, GridS::js, ju, GridS::ks, ConsS::M3, GridS::Nx, and GridS::U.
Referenced by problem(), and problem_read_restart().
static void reflect_ox2 | ( | GridS * | pGrid | ) | [static] |
Special reflecting boundary functions in x2 for 2D sims.
Definition at line 485 of file rt.c.
References GridS::B1i, GridS::B2i, GridS::B3i, d(), GridS::dx2, ConsS::E, Gamma_1, GridS::ie, il, GridS::is, iu, GridS::je, jl, GridS::js, ju, GridS::ke, GridS::ks, ku, ConsS::M2, GridS::Nx, and GridS::U.
Referenced by problem(), and problem_read_restart().
static void reflect_ox3 | ( | GridS * | pGrid | ) | [static] |
Special reflecting boundary functions in x3 for 3D sims.
Definition at line 608 of file rt.c.
References GridS::B1i, GridS::B2i, GridS::B3i, d(), GridS::dx3, ConsS::E, Gamma_1, GridS::ie, il, GridS::is, iu, GridS::je, jl, GridS::js, ju, GridS::ke, ConsS::M3, GridS::Nx, and GridS::U.
Referenced by problem(), and problem_read_restart().
void Userwork_after_loop | ( | MeshS * | pM | ) |