Functions | Variables

prob/streaming3d_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)
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]

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


Function Documentation

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

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 526 of file streaming3d_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 502 of file streaming3d_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 536 of file streaming3d_single.c.

References cc_pos(), expr_V2par(), 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 482 of file streaming3d_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 516 of file streaming3d_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_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.

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

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.

Here is the call 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 618 of file streaming3d_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 625 of file streaming3d_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 410 of file streaming3d_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 632 of file streaming3d_single.c.

References a, downsamp, Npar3, and Nx.

double ran2 ( long int *  idum  ) 

Definition at line 735 of file streaming3d_single.c.

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

Definition at line 607 of file streaming3d_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 578 of file streaming3d_single.c.

References etavk, and Omega_0.

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.


Variable Documentation

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.