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) |
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_V3 (const Grid *pG, const int i, const int j, const int k) |
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. | |
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 | Npar3 |
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 3D, 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 streaming3d_single.c.
static Real expr_dVx | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
dVx
Definition at line 492 of file streaming3d_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 526 of file streaming3d_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 502 of file streaming3d_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 536 of file streaming3d_single.c.
References cc_pos(), expr_V2par(), 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 482 of file streaming3d_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 516 of file streaming3d_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_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_V3 | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) |
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 572 of file streaming3d_single.c.
Gasfun_t get_usr_expr | ( | const char * | expr | ) |
Sets pointer to expression for special output data.
Definition at line 547 of file streaming3d_single.c.
VGFunout_t get_usr_out_fun | ( | const char * | name | ) |
Returns a user defined output function pointer.
Definition at line 558 of file streaming3d_single.c.
PropFun_t get_usr_par_prop | ( | const char * | name | ) |
Returns a user defined particle selection function.
Definition at line 563 of file streaming3d_single.c.
void OutputModeAmplitude | ( | Grid * | pGrid, | |
Domain * | pDomain, | |||
Output * | pOut | |||
) |
Definition at line 655 of file streaming3d_single.c.
References ath_error(), expr_dVx(), expr_dVxpar(), expr_dVy(), expr_dVypar(), expr_rhodif(), expr_rhopardif(), expr_V3(), expr_V3par(), and name.
void problem | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 88 of file streaming3d_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, Ly, Lz, mratio, name, Npar, Npar3, 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, x2min, x3max, and x3min.
void problem_read_restart | ( | Grid * | pG, | |
Domain * | pD, | |||
FILE * | fp | |||
) |
Definition at line 431 of file streaming3d_single.c.
References amp, downsamp, etavk, Imrho, Imux, Imuy, Imuz, Imwx, Imwy, Imwz, ipert, Iso_csound, Iso_csound2, kx, kz, mratio, name, Npar, Npar3, 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 735 of file streaming3d_single.c.
Definition at line 607 of file streaming3d_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 578 of file streaming3d_single.c.
void Userwork_after_loop | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 597 of file streaming3d_single.c.
void Userwork_in_loop | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 586 of file streaming3d_single.c.
Definition at line 59 of file streaming3d_single.c.
int downsamp |
Definition at line 55 of file streaming3d_single.c.
Definition at line 53 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
int ipert |
Definition at line 60 of file streaming3d_single.c.
Definition at line 59 of file streaming3d_single.c.
Definition at line 59 of file streaming3d_single.c.
Definition at line 53 of file streaming3d_single.c.
char name[50] |
Definition at line 62 of file streaming3d_single.c.
int Npar |
Definition at line 55 of file streaming3d_single.c.
int Npar3 |
Definition at line 55 of file streaming3d_single.c.
int nwave |
Definition at line 60 of file streaming3d_single.c.
int Nx |
Definition at line 55 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 53 of file streaming3d_single.c.
Definition at line 57 of file streaming3d_single.c.
Definition at line 53 of file streaming3d_single.c.
Definition at line 53 of file streaming3d_single.c.
Definition at line 53 of file streaming3d_single.c.
Definition at line 53 of file streaming3d_single.c.