Problem generator for streaming instability test in non-stratified disks. More...
Go to the source code of this file.
Functions | |
double | ran2 (long int *idum) |
void | OutputModeAmplitude (Grid *pGrid, Domain *pDomain, Output *pOut) |
Output the perturbation amplitude function. | |
static Real | ShearingBoxPot (const Real x1, const Real x2, const Real x3) |
static Real ShearingBoxPot(const Real x1, const Real x2, const Real x3) | |
static Real | pert_even (Real fR, Real fI, Real x, Real z, Real t) |
even perturbation mode | |
static Real | pert_odd (Real fR, Real fI, Real x, Real z, Real t) |
odd perturbation mode | |
static int | property_mybin (const Grain *gr, const GrainAux *grsub) |
user defined particle selection function (1: true; 0: false) | |
Real | expr_V1par (const Grid *pG, const int i, const int j, const int k) |
Wrapper for particle 1-velocity. | |
Real | expr_V2par (const Grid *pG, const int i, const int j, const int k) |
Wrapper for particle 2-velocity. | |
Real | expr_V3par (const Grid *pG, const int i, const int j, const int k) |
Wrapper for particle 3-velocity. | |
Real | expr_V2 (const Grid *pG, const int i, const int j, const int k) |
void | problem (Grid *pGrid, Domain *pDomain) |
void | problem_write_restart (Grid *pG, Domain *pD, FILE *fp) |
void | problem_read_restart (Grid *pG, Domain *pD, FILE *fp) |
static Real | expr_rhodif (const Grid *pG, const int i, const int j, const int k) |
difd | |
static Real | expr_dVx (const Grid *pG, const int i, const int j, const int k) |
dVx | |
static Real | expr_dVy (const Grid *pG, const int i, const int j, const int k) |
dVy | |
static Real | expr_rhopardif (const Grid *pG, const int i, const int j, const int k) |
difdpar | |
static Real | expr_dVxpar (const Grid *pG, const int i, const int j, const int k) |
dVxpar | |
static Real | expr_dVypar (const Grid *pG, const int i, const int j, const int k) |
dVypar | |
Gasfun_t | get_usr_expr (const char *expr) |
Sets pointer to expression for special output data. | |
VGFunout_t | get_usr_out_fun (const char *name) |
Returns a user defined output function pointer. | |
PropFun_t | get_usr_par_prop (const char *name) |
Returns a user defined particle selection function. | |
void | gasvshift (const Real x1, const Real x2, const Real x3, Real *u1, Real *u2, Real *u3) |
Gas velocity shift. | |
void | Userforce_particle (Vector *ft, const Real x1, const Real x2, const Real x3, const Real v1, const Real v2, const Real v3) |
void | Userwork_in_loop (Grid *pGrid, Domain *pDomain) |
void | Userwork_after_loop (Grid *pGrid, Domain *pDomain) |
Variables | |
Real | rho0 |
Real | mratio |
Real | etavk |
Real | uxNSH |
Real | uyNSH |
Real | wxNSH |
Real | wyNSH |
int | Npar |
int | Npar2 |
int | downsamp |
int | Nx |
Real | Reux |
Real | Imux |
Real | Reuy |
Real | Imuy |
Real | Reuz |
Real | Imuz |
Real | Rewx |
Real | Imwx |
Real | Rewy |
Real | Imwy |
Real | Rewz |
Real | Imwz |
Real | Rerho |
Real | Imrho |
Real | omg |
Real | s |
Real | amp |
Real | kx |
Real | kz |
int | ipert |
int | nwave |
char | name [50] |
Problem generator for streaming instability test in non-stratified disks.
PURPOSE: Problem generator for streaming instability test in non-stratified disks. This code works in 2D, with single particle species ONLY. Isothermal eos is assumed, and the value etavk/iso_sound is fixed. In the case of growth rate test, since one requires an integer number of wavelengths across the grid, the isothermal sound speed is re-evaluated.
Perturbation modes:
Must be configured using --enable-shearing-box and --with-eos=isothermal. FARGO is need to establish the NSH equilibrium (ipert=0,1,2).
Reference:
Definition in file streaming2d_single.c.
static Real expr_dVx | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
dVx
Definition at line 476 of file streaming2d_single.c.
References cc_pos(), and uxNSH.
Referenced by OutputModeAmplitude().
static Real expr_dVxpar | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
dVxpar
Definition at line 511 of file streaming2d_single.c.
References cc_pos(), expr_V1par(), and wxNSH.
Referenced by OutputModeAmplitude().
static Real expr_dVy | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
dVy
Definition at line 486 of file streaming2d_single.c.
References cc_pos(), Omega_0, qshear, and uyNSH.
Referenced by OutputModeAmplitude().
static Real expr_dVypar | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
dVypar
Definition at line 521 of file streaming2d_single.c.
References cc_pos(), expr_V3par(), Omega_0, qshear, and wyNSH.
Referenced by OutputModeAmplitude().
static Real expr_rhodif | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
difd
Definition at line 467 of file streaming2d_single.c.
References cc_pos(), and rho0.
Referenced by OutputModeAmplitude().
static Real expr_rhopardif | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
difdpar
Definition at line 500 of file streaming2d_single.c.
References cc_pos(), mratio, and rho0.
Referenced by OutputModeAmplitude().
Real expr_V1par | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) |
Wrapper for particle 1-velocity.
Definition at line 312 of file output_particle.c.
Real expr_V2 | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) |
Real expr_V2par | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) |
Wrapper for particle 2-velocity.
Definition at line 319 of file output_particle.c.
Real expr_V3par | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) |
Wrapper for particle 3-velocity.
Definition at line 326 of file output_particle.c.
Gas velocity shift.
Definition at line 557 of file streaming2d_single.c.
Gasfun_t get_usr_expr | ( | const char * | expr | ) |
Sets pointer to expression for special output data.
Definition at line 532 of file streaming2d_single.c.
VGFunout_t get_usr_out_fun | ( | const char * | name | ) |
Returns a user defined output function pointer.
Definition at line 543 of file streaming2d_single.c.
PropFun_t get_usr_par_prop | ( | const char * | name | ) |
Returns a user defined particle selection function.
Definition at line 548 of file streaming2d_single.c.
void OutputModeAmplitude | ( | Grid * | pGrid, | |
Domain * | pDomain, | |||
Output * | pOut | |||
) |
Output the perturbation amplitude function.
output the perturbation amplitude
Definition at line 640 of file streaming2d_single.c.
References ath_error(), expr_dVx(), expr_dVxpar(), expr_dVy(), expr_dVypar(), expr_rhodif(), expr_rhopardif(), expr_V2(), expr_V2par(), and name.
Referenced by problem(), and problem_read_restart().
void problem | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 89 of file streaming2d_single.c.
References amp, ath_error(), ath_pout(), cc_pos(), downsamp, etavk, Imrho, Imux, Imuy, Imuz, Imwx, Imwy, Imwz, ipert, Iso_csound, Iso_csound2, kx, kz, Lx, Lz, mratio, name, Npar, Npar2, nwave, Nx, Omega(), Omega_0, omg, OutputModeAmplitude(), par_getd(), par_getd_def(), par_geti(), par_geti_def(), particle_realloc(), pert_even(), pert_odd(), property_all(), qshear, ran2(), Rerho, Reux, Reuy, Reuz, Rewx, Rewy, Rewz, rho0, s, ShearingBoxPot, StaticGravPot, tstop0, uxNSH, uyNSH, wxNSH, wyNSH, x1max, x1min, x2max, and x2min.
void problem_read_restart | ( | Grid * | pG, | |
Domain * | pD, | |||
FILE * | fp | |||
) |
Definition at line 416 of file streaming2d_single.c.
References amp, downsamp, etavk, Imrho, Imux, Imuy, Imuz, Imwx, Imwy, Imwz, ipert, Iso_csound, Iso_csound2, kx, kz, mratio, name, Npar, Npar2, Nx, Omega_0, omg, OutputModeAmplitude(), par_getd(), par_getd_def(), par_geti(), par_geti_def(), property_all(), qshear, Rerho, Reux, Reuy, Reuz, Rewx, Rewy, Rewz, rho0, s, ShearingBoxPot, StaticGravPot, uxNSH, uyNSH, wxNSH, and wyNSH.
void problem_write_restart | ( | Grid * | pG, | |
Domain * | pD, | |||
FILE * | fp | |||
) |
static int property_mybin | ( | const Grain * | gr, | |
const GrainAux * | grsub | |||
) | [static] |
double ran2 | ( | long int * | idum | ) |
Definition at line 721 of file streaming2d_single.c.
static Real ShearingBoxPot(const Real x1, const Real x2, const Real x3)
shearing box tidal gravitational potential
Definition at line 592 of file streaming2d_single.c.
void Userforce_particle | ( | Vector * | ft, | |
const Real | x1, | |||
const Real | x2, | |||
const Real | x3, | |||
const Real | v1, | |||
const Real | v2, | |||
const Real | v3 | |||
) |
Definition at line 563 of file streaming2d_single.c.
void Userwork_after_loop | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 582 of file streaming2d_single.c.
void Userwork_in_loop | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 571 of file streaming2d_single.c.
Definition at line 59 of file streaming2d_single.c.
int downsamp |
Definition at line 55 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and property_mybin().
Definition at line 53 of file streaming2d_single.c.
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
int ipert |
Definition at line 60 of file streaming2d_single.c.
Definition at line 59 of file streaming2d_single.c.
Referenced by pert_even(), pert_odd(), problem(), problem_read_restart(), problem_write_restart(), and Userwork_after_loop().
Definition at line 59 of file streaming2d_single.c.
Referenced by pert_even(), pert_odd(), problem(), problem_read_restart(), and problem_write_restart().
Definition at line 53 of file streaming2d_single.c.
char name[50] |
Definition at line 62 of file streaming2d_single.c.
int Npar |
Definition at line 55 of file streaming2d_single.c.
int Npar2 |
Definition at line 55 of file streaming2d_single.c.
int nwave |
Definition at line 60 of file streaming2d_single.c.
Referenced by problem(), and Userwork_after_loop().
int Nx |
Definition at line 55 of file streaming2d_single.c.
Referenced by init_mesh(), problem(), problem_read_restart(), and property_mybin().
Definition at line 57 of file streaming2d_single.c.
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 57 of file streaming2d_single.c.
Referenced by problem(), problem_read_restart(), and problem_write_restart().
Definition at line 53 of file streaming2d_single.c.
Definition at line 57 of file streaming2d_single.c.
Referenced by esys_prim_adb_mhd(), esys_prim_iso_mhd(), esys_roe_adb_mhd(), esys_roe_iso_mhd(), Fargo(), GET_RIEMANN_STATE(), integrate_1d_ctu(), integrate_1d_vl(), integrate_2d_ctu(), integrate_2d_vl(), integrate_3d_ctu(), integrate_3d_vl(), main(), output_pdf(), pert_even(), pert_odd(), perturb(), problem(), problem_read_restart(), problem_write_restart(), ProCon(), qsimp(), QUARTIC(), ShearingSheet_ix1(), ShearingSheet_ox1(), and Userwork_in_loop().
Definition at line 53 of file streaming2d_single.c.
Definition at line 53 of file streaming2d_single.c.
Definition at line 53 of file streaming2d_single.c.
Definition at line 53 of file streaming2d_single.c.