Problem generator for oblique linear waves with Lagrangian particles. More...
Go to the source code of this file.
Functions | |
int | GetPosition (Grain *gr) |
get particle status (grid/crossing) | |
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 | ScalarDen (const Grid *pG, const int i, const int j, const int k) |
|fn static Real ScalarDen(const Grid *pG, const int i, const int j, const int k) | |
static Real | dratio (const Grid *pG, const int i, const int j, const int k) |
Density ratio. | |
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) |
Problem generator for oblique linear waves with Lagrangian particles.
PURPOSE: Problem generator for oblique linear waves with Lagrangian particles. Only works for 2D grid. The angle the wave propagates to the grid is automatically computed to be tan^{-1} (X/Y), so that periodic boundary conditions can be used. Particles can be initialized either with uniform density or with the same density profile as gas.
Note angle=0 or 90 [grid aligned waves] is not allowed in this routine. Use linearwave1d for grid aligned wave on 1D/2D/3D grids.
Can be used for either standing (problem/vflow=1.0) or travelling (problem/vflow=0.0) waves.
Definition in file par_linearwave2d.c.
static Real dratio | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
Density ratio.
Definition at line 231 of file par_linearwave2d.c.
Gas velocity shift.
Definition at line 262 of file par_linearwave2d.c.
Gasfun_t get_usr_expr | ( | const char * | expr | ) |
Sets pointer to expression for special output data.
Definition at line 241 of file par_linearwave2d.c.
VGFunout_t get_usr_out_fun | ( | const char * | name | ) |
Returns a user defined output function pointer.
Definition at line 252 of file par_linearwave2d.c.
PropFun_t get_usr_par_prop | ( | const char * | name | ) |
Returns a user defined particle selection function.
Definition at line 257 of file par_linearwave2d.c.
int GetPosition | ( | Grain * | gr | ) |
void problem | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 44 of file par_linearwave2d.c.
References amp, ath_error(), cc_pos(), GetPosition(), Iso_csound, n, Npar, par_getd(), par_getd_def(), par_geti(), particle_realloc(), tstop0, x1max, x1min, x2max, and x2min.
void problem_read_restart | ( | Grid * | pG, | |
Domain * | pD, | |||
FILE * | fp | |||
) |
Definition at line 213 of file par_linearwave2d.c.
void problem_write_restart | ( | Grid * | pG, | |
Domain * | pD, | |||
FILE * | fp | |||
) |
Definition at line 208 of file par_linearwave2d.c.
static Real ScalarDen | ( | const Grid * | pG, | |
const int | i, | |||
const int | j, | |||
const int | k | |||
) | [static] |
|fn static Real ScalarDen(const Grid *pG, const int i, const int j, const int k)
Scalar ratio
Definition at line 222 of file par_linearwave2d.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 268 of file par_linearwave2d.c.
void Userwork_after_loop | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 286 of file par_linearwave2d.c.
References amp, ath_fname(), cc_pos(), Iso_csound, n, Npar, omega, par_getd(), par_geti(), particle_to_grid(), property_all(), x1max, x1min, x2max, and x2min.
void Userwork_in_loop | ( | Grid * | pGrid, | |
Domain * | pDomain | |||
) |
Definition at line 275 of file par_linearwave2d.c.