Functions | Variables

prob/streaming2d_single.c File Reference

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]

Detailed Description

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.


Function Documentation

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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.

void gasvshift ( const Real  x1,
const Real  x2,
const Real  x3,
Real u1,
Real u2,
Real u3 
)

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

Here is the call graph for this function:

Here is the caller graph for this function:

static Real pert_even ( Real  fR,
Real  fI,
Real  x,
Real  z,
Real  t 
) [static]

even perturbation mode

Definition at line 603 of file streaming2d_single.c.

References kx, kz, omg, and s.

Referenced by problem().

Here is the caller graph for this function:

static Real pert_odd ( Real  fR,
Real  fI,
Real  x,
Real  z,
Real  t 
) [static]

odd perturbation mode

Definition at line 610 of file streaming2d_single.c.

References kx, kz, omg, and s.

Referenced by problem().

Here is the caller graph for this function:

void problem ( Grid *  pGrid,
Domain *  pDomain 
)
void problem_read_restart ( Grid *  pG,
Domain *  pD,
FILE *  fp 
)
void problem_write_restart ( Grid *  pG,
Domain *  pD,
FILE *  fp 
)

Definition at line 395 of file streaming2d_single.c.

References etavk, Imrho, Imux, Imuy, Imuz, Imwx, Imwy, Imwz, ipert, Iso_csound, kx, kz, mratio, omg, Rerho, Reux, Reuy, Reuz, Rewx, Rewy, Rewz, rho0, s, uxNSH, uyNSH, wxNSH, and wyNSH.

static int property_mybin ( const Grain *  gr,
const GrainAux grsub 
) [static]

user defined particle selection function (1: true; 0: false)

Definition at line 617 of file streaming2d_single.c.

References a, downsamp, Npar2, and Nx.

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 
) [static]

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.

References Omega_0, and qshear.

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.

References etavk, and Omega_0.

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.


Variable Documentation

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