Functions | Variables

prob/par_strat3d.c File Reference

Problem generator for non-linear streaming instability in stratified disks. More...

Go to the source code of this file.

Functions

double ran2 (long int *idum)
double Normal (long int *idum)
Real Erf (Real z)
void MultiNSH (int n, Real *tstop, Real *mratio, Real etavk, Real *uxNSH, Real *uyNSH, Real *wxNSH, Real *wyNSH)
static Real hst_rho_Vx_dVy (const Grid *pG, const int i, const int j, const int k)
static void close_ix3 (Grid *pGrid)
static void close_ox3 (Grid *pGrid)
static Real ShearingBoxPot (const Real x1, const Real x2, const Real x3)
static int property_limit (const Grain *gr, const GrainAux *grsub)
 user defined particle selection function (1: true; 0: false)
static int property_trace (const Grain *gr, const GrainAux *grsub)
 user defined particle selection function (1: true; 0: false)
static int property_type (const Grain *gr, const GrainAux *grsub)
 user defined particle selection function (1: true; 0: false)
static int property_dense (const Grain *gr, const GrainAux *grsub)
 user defined particle selection function (1: true; 0: false)
Real expr_dpar (const Grid *pG, const int i, const int j, const int k)
 Wrapper for particle density.
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)
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 vsc1
Real vsc2
int ipert
Real x1min
Real x1max
Real x2min
Real x2max
Real x3min
Real x3max
Real Lx
Real Ly
Real Lz
Real Lg
long Npar
long ntrack
long nlis
int mytype
Real dpar_thresh

Detailed Description

Problem generator for non-linear streaming instability in stratified disks.

PURPOSE: Problem generator for non-linear streaming instability in stratified disks. This code works in 3D ONLY. Isothermal eos is assumed, and the value etavk/iso_sound is fixed. MPI domain decomposition in x is allowed, but not in z.

Perturbation modes:

Should be configured using --enable-shearing-box and --with-eos=isothermal. FARGO is recommended.

Reference:

Definition in file par_strat3d.c.


Function Documentation

static void close_ix3 ( Grid *  pGrid  )  [static]

Definition at line 425 of file par_strat3d.c.

References il, iu, jl, and ju.

Referenced by problem().

Here is the caller graph for this function:

static void close_ox3 ( Grid *  pGrid  )  [static]

Definition at line 446 of file par_strat3d.c.

References il, iu, jl, and ju.

Referenced by problem().

Here is the caller graph for this function:

Real Erf ( Real  z  ) 

Definition at line 749 of file par_strat3d.c.

References il, and iu.

Real expr_dpar ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
)

Wrapper for particle density.

Definition at line 291 of file output_particle.c.

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 487 of file par_strat3d.c.

Gasfun_t get_usr_expr ( const char *  expr  ) 

Sets pointer to expression for special output data.

Definition at line 467 of file par_strat3d.c.

VGFunout_t get_usr_out_fun ( const char *  name  ) 

Returns a user defined output function pointer.

Definition at line 472 of file par_strat3d.c.

PropFun_t get_usr_par_prop ( const char *  name  ) 

Returns a user defined particle selection function.

Definition at line 477 of file par_strat3d.c.

static Real hst_rho_Vx_dVy ( const Grid *  pG,
const int  i,
const int  j,
const int  k 
) [static]

Definition at line 412 of file par_strat3d.c.

References cc_pos(), Omega_0, and qshear.

Referenced by problem(), and problem_read_restart().

Here is the call graph for this function:

Here is the caller graph for this function:

void MultiNSH ( int  n,
Real tstop,
Real mratio,
Real  etavk,
Real uxNSH,
Real uyNSH,
Real wxNSH,
Real wyNSH 
)

Definition at line 612 of file par_strat3d.c.

References calloc_1d_array(), calloc_2d_array(), free_2d_array(), InverseMatrix(), and MatrixMult().

Here is the call graph for this function:

double Normal ( long int *  idum  ) 

Definition at line 734 of file par_strat3d.c.

References ran2().

Here is the call 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 369 of file par_strat3d.c.

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

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

Definition at line 594 of file par_strat3d.c.

References GrainAux::dpar, and dpar_thresh.

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

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

Definition at line 564 of file par_strat3d.c.

References nlis.

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

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

Definition at line 574 of file par_strat3d.c.

References ntrack.

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

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

Definition at line 584 of file par_strat3d.c.

References mytype.

double ran2 ( long int *  idum  ) 

Definition at line 696 of file par_strat3d.c.

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

Definition at line 536 of file par_strat3d.c.

References Lg, Lz, Omega_0, qshear, x3max, x3min, and z0.

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 493 of file par_strat3d.c.

References fac, Lg, Lz, Omega_0, vsc1, vsc2, x3max, and x3min.

void Userwork_after_loop ( Grid *  pGrid,
Domain *  pDomain 
)

Definition at line 526 of file par_strat3d.c.

void Userwork_in_loop ( Grid *  pGrid,
Domain *  pDomain 
)

Definition at line 515 of file par_strat3d.c.


Variable Documentation

Definition at line 60 of file par_strat3d.c.

int ipert

Definition at line 52 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

int mytype

Definition at line 59 of file par_strat3d.c.

long nlis

Definition at line 58 of file par_strat3d.c.

long Npar

Definition at line 55 of file par_strat3d.c.

long ntrack

Definition at line 57 of file par_strat3d.c.

Definition at line 51 of file par_strat3d.c.

Definition at line 51 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.

Definition at line 54 of file par_strat3d.c.