Functions | Variables

prob/streaming3d_multi.c File Reference

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

Go to the source code of this file.

Functions

double ran2 (long int *idum)
void MultiNSH (int n, Real *tstop, Real *epsilon, 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)
 Reynolds stress, added as history variable.
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)
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)
static Real expr_rhopardif (const Grid *pG, const int i, const int j, const int k)
 difdpar
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
Realepsilon
Real uxNSH
Real uyNSH
RealwxNSH
RealwyNSH
int ipert
int Npar
int Npar3
int Nx
long ntrack
long nlis
int mytype

Detailed Description

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

PURPOSE: Problem generator for non-linear streaming instability in non-stratified disks. This code works in 3D ONLY. It generalizes the NSH equilibrium solution to allow multiple-species dust components. Isothermal eos is assumed, and the value etavk/iso_sound is fixed.

Perturbation modes:

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

Reference:

Definition in file streaming3d_multi.c.


Function Documentation

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.

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

difdpar

Definition at line 368 of file streaming3d_multi.c.

References cc_pos(), mratio, and rho0.

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

Gasfun_t get_usr_expr ( const char *  expr  ) 

Sets pointer to expression for special output data.

Definition at line 394 of file streaming3d_multi.c.

VGFunout_t get_usr_out_fun ( const char *  name  ) 

Returns a user defined output function pointer.

Definition at line 400 of file streaming3d_multi.c.

PropFun_t get_usr_par_prop ( const char *  name  ) 

Returns a user defined particle selection function.

Definition at line 405 of file streaming3d_multi.c.

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

Reynolds stress, added as history variable.

Definition at line 381 of file streaming3d_multi.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 epsilon,
Real  etavk,
Real uxNSH,
Real uyNSH,
Real wxNSH,
Real wyNSH 
)

Definition at line 502 of file streaming3d_multi.c.

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

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 316 of file streaming3d_multi.c.

References epsilon, etavk, mratio, rho0, uxNSH, uyNSH, wxNSH, and wyNSH.

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

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

Definition at line 464 of file streaming3d_multi.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 474 of file streaming3d_multi.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 484 of file streaming3d_multi.c.

References mytype.

double ran2 ( long int *  idum  ) 

Definition at line 587 of file streaming3d_multi.c.

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

Definition at line 453 of file streaming3d_multi.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 422 of file streaming3d_multi.c.

References etavk, and Omega_0.

void Userwork_after_loop ( Grid *  pGrid,
Domain *  pDomain 
)

Definition at line 442 of file streaming3d_multi.c.

References epsilon, wxNSH, and wyNSH.

void Userwork_in_loop ( Grid *  pGrid,
Domain *  pDomain 
)

Definition at line 431 of file streaming3d_multi.c.


Variable Documentation

Definition at line 52 of file streaming3d_multi.c.

Definition at line 52 of file streaming3d_multi.c.

int ipert

Definition at line 53 of file streaming3d_multi.c.

Definition at line 52 of file streaming3d_multi.c.

int mytype

Definition at line 59 of file streaming3d_multi.c.

long nlis

Definition at line 58 of file streaming3d_multi.c.

int Npar

Definition at line 55 of file streaming3d_multi.c.

int Npar3

Definition at line 55 of file streaming3d_multi.c.

Referenced by problem(), problem_read_restart(), and property_mybin().

long ntrack

Definition at line 57 of file streaming3d_multi.c.

int Nx

Definition at line 55 of file streaming3d_multi.c.

Definition at line 52 of file streaming3d_multi.c.

Definition at line 52 of file streaming3d_multi.c.

Definition at line 52 of file streaming3d_multi.c.

Definition at line 52 of file streaming3d_multi.c.

Definition at line 52 of file streaming3d_multi.c.