Functions

particles/integrators_particle.c File Reference

Provide three kinds of particle integrators. More...

Go to the source code of this file.

Functions

void Delete_Ghost (Grid *pG)
 Delete ghost particles.
void JudgeCrossing (Grid *pG, Real x1, Real x2, Real x3, Grain *gr)
 Judge if the particle is a crossing particle.
Vector Get_Drag (Grid *pG, int type, Real x1, Real x2, Real x3, Real v1, Real v2, Real v3, Vector cell1, Real *tstop1)
 Calculate the drag force to the particles.
Vector Get_Force (Grid *pG, Real x1, Real x2, Real x3, Real v1, Real v2, Real v3)
 Calculate the forces to the particle other than the gas drag.
Vector Get_Term (Grid *pG, int type, Real x1, Real x2, Real x3, Vector cell1, Real *tstop)
 Calculate the termination velocity of strongly coupled particles.
Vector Get_ForceDiff (Grid *pG, Real x1, Real x2, Real x3, Real v1, Real v2, Real v3)
 Calculate the force (density) difference between particles and gas.
void Integrate_Particles (Grid *pG, Domain *pD)
 Main particle integrator.
void int_par_fulimp (Grid *pG, Grain *curG, Vector cell1, Real *dv1, Real *dv2, Real *dv3, Real *ts)
 2nd order fully implicit particle integrator
void int_par_semimp (Grid *pG, Grain *curG, Vector cell1, Real *dv1, Real *dv2, Real *dv3, Real *ts)
 2nd order semi-implicit particle integrator
void int_par_exp (Grid *pG, Grain *curG, Vector cell1, Real *dv1, Real *dv2, Real *dv3, Real *ts)
 2nd order explicit particle integrator
void int_par_spec (Grid *pG, Grain *curG, Vector cell1, Real *dv1, Real *dv2, Real *dv3, Real *ts)
 2nd order specific particle integrator; This integrator works ONLY in the strong coupling regime (t_stop<h)
void feedback_predictor (Grid *pG)
 Calculate the feedback of the drag force from the particle to the gas.
void feedback_corrector (Grid *pG, Grain *gri, Grain *grf, Vector cell1, Real dv1, Real dv2, Real dv3, Real ts)
 Calculate the feedback of the drag force from the particle to the gas.

Detailed Description

Provide three kinds of particle integrators.

PURPOSE: provide three kinds of particle integrators, namely, 2nd order explicit, 2nd order semi-implicit and 2nd order fully implicit.

CONTAINS PUBLIC FUNCTIONS:

PRIVATE FUNCTION PROTOTYPES:

History:

Definition in file integrators_particle.c.


Function Documentation

void Delete_Ghost ( Grid *  pG  ) 

Delete ghost particles.

Definition at line 691 of file integrators_particle.c.

Referenced by Integrate_Particles().

Here is the caller graph for this function:

void feedback_corrector ( Grid *  pG,
Grain *  gri,
Grain *  grf,
Vector  cell1,
Real  dv1,
Real  dv2,
Real  dv3,
Real  ts 
)

Calculate the feedback of the drag force from the particle to the gas.

Serves for the corrector step. It deals with one particle at a time. Input: pG: grid with particles; gri,grf: initial and final particles; dv: velocity difference between gri and grf. Output: pG: the array of drag forces exerted by the particle is updated

Definition at line 643 of file integrators_particle.c.

References distrFB_corr(), Get_Force(), and getweight.

Referenced by Integrate_Particles().

Here is the call graph for this function:

Here is the caller graph for this function:

void feedback_predictor ( Grid *  pG  ) 

Calculate the feedback of the drag force from the particle to the gas.

Serves for the predictor step. It deals with all the particles. Input: pG: grid with particles Output: pG: the array of drag forces exerted by the particle is updated

Definition at line 528 of file integrators_particle.c.

References distrFB_pred(), gasvshift(), get_gasinfo(), get_ts, getvalues(), getweight, ilp, iup, jlp, jup, klp, kup, and rho.

Referenced by integrate_1d_ctu(), integrate_2d_ctu(), and integrate_3d_ctu().

Here is the call graph for this function:

Here is the caller graph for this function:

Vector Get_Drag ( Grid *  pG,
int  type,
Real  x1,
Real  x2,
Real  x3,
Real  v1,
Real  v2,
Real  v3,
Vector  cell1,
Real tstop1 
)

Calculate the drag force to the particles.

Input: pG: grid; type: particle type; cell1: 1/dx1,1/dx2,1/dx3; x1,x2,x3,v1,v2,v3: particle position and velocity; Output: tstop1: 1/stopping time; Return: drag force;

Definition at line 749 of file integrators_particle.c.

References ath_perr(), gasvshift(), get_ts, getvalues(), getweight, and rho.

Referenced by int_par_exp(), int_par_fulimp(), and int_par_semimp().

Here is the call graph for this function:

Here is the caller graph for this function:

Vector Get_Force ( Grid *  pG,
Real  x1,
Real  x2,
Real  x3,
Real  v1,
Real  v2,
Real  v3 
)

Calculate the forces to the particle other than the gas drag.

Input: pG: grid; x1,x2,x3,v1,v2,v3: particle position and velocity; Return: forces;

Definition at line 815 of file integrators_particle.c.

References Omega_0, qshear, and Userforce_particle().

Referenced by feedback_corrector(), int_par_exp(), int_par_fulimp(), and int_par_semimp().

Here is the call graph for this function:

Here is the caller graph for this function:

Vector Get_ForceDiff ( Grid *  pG,
Real  x1,
Real  x2,
Real  x3,
Real  v1,
Real  v2,
Real  v3 
)

Calculate the force (density) difference between particles and gas.

Used ONLY for the special integrator. THIS ROUTINE MUST BE EDITTED BY THE USER! Force differences due to gas pressure gradient and momentum feedback are automatically included. The user must provide other sources.

Input: pG: grid; x1,x2,x3,v1,v2,v3: particle position and velocity; Return: forces;

Definition at line 928 of file integrators_particle.c.

References Userforce_particle().

Referenced by Get_Term().

Here is the call graph for this function:

Here is the caller graph for this function:

Vector Get_Term ( Grid *  pG,
int  type,
Real  x1,
Real  x2,
Real  x3,
Vector  cell1,
Real tstop 
)

Calculate the termination velocity of strongly coupled particles.

Used for the special integrator Force difference include pressure gradient and momentum feedback Input: pG: grid; type: particle type; x1,x2,x3: particle position; Return: termination velocity, and the stopping time.

Definition at line 867 of file integrators_particle.c.

References ath_perr(), gasvshift(), Get_ForceDiff(), get_ts, getvalues(), getweight, and rho.

Referenced by int_par_spec(), Integrate_Particles(), and problem().

Here is the call graph for this function:

Here is the caller graph for this function:

void int_par_exp ( Grid *  pG,
Grain *  curG,
Vector  cell1,
Real dv1,
Real dv2,
Real dv3,
Real ts 
)

2nd order explicit particle integrator

Input: grid pointer (pG), grain pointer (curG), cell size indicator (cell1) Output: dv1,dv2,dv3: velocity update

Definition at line 415 of file integrators_particle.c.

References Get_Drag(), Get_Force(), and qshear.

Referenced by Integrate_Particles().

Here is the call graph for this function:

Here is the caller graph for this function:

void int_par_fulimp ( Grid *  pG,
Grain *  curG,
Vector  cell1,
Real dv1,
Real dv2,
Real dv3,
Real ts 
)

2nd order fully implicit particle integrator

Input: grid pointer (pG), grain pointer (curG), cell size indicator (cell1) Output: dv1,dv2,dv3: velocity update

Definition at line 200 of file integrators_particle.c.

References b0, C, Get_Drag(), Get_Force(), Omega_0, and qshear.

Referenced by Integrate_Particles().

Here is the call graph for this function:

Here is the caller graph for this function:

void int_par_semimp ( Grid *  pG,
Grain *  curG,
Vector  cell1,
Real dv1,
Real dv2,
Real dv3,
Real ts 
)

2nd order semi-implicit particle integrator

Input: grid pointer (pG), grain pointer (curG), cell size indicator (cell1) Output: dv1,dv2,dv3: velocity update

Definition at line 320 of file integrators_particle.c.

References Get_Drag(), Get_Force(), Omega_0, and qshear.

Referenced by Integrate_Particles().

Here is the call graph for this function:

Here is the caller graph for this function:

void int_par_spec ( Grid *  pG,
Grain *  curG,
Vector  cell1,
Real dv1,
Real dv2,
Real dv3,
Real ts 
)

2nd order specific particle integrator; This integrator works ONLY in the strong coupling regime (t_stop<h)

Input: grid pointer (pG), grain pointer (curG), cell size indicator (cell1) Output: dv1,dv2,dv3: velocity update

Definition at line 485 of file integrators_particle.c.

References Get_Term(), and qshear.

Referenced by Integrate_Particles().

Here is the call graph for this function:

Here is the caller graph for this function:

void Integrate_Particles ( Grid *  pG,
Domain *  pD 
)

Main particle integrator.

Input: Grid which is already evolved in half a time step. Paricles unevolved. Output: particle updated for one full time step; feedback array for corrector updated. Note: This routine allows has the flexibility to freely choose the particle integrator. Should use fully implicit integrator for tightly coupoled particles. Otherwise the semi-implicit integrator performs better.

Definition at line 75 of file integrators_particle.c.

References ath_error(), ath_pout(), Delete_Ghost(), dv1, dv2, dv3, feedback_clear(), feedback_corrector(), Get_Term(), int_par_exp(), int_par_fulimp(), int_par_semimp(), int_par_spec(), JudgeCrossing(), Omega_0, and qshear.

Referenced by integrate_1d_ctu(), integrate_2d_ctu(), and integrate_3d_ctu().

Here is the call graph for this function:

Here is the caller graph for this function:

void JudgeCrossing ( Grid *  pG,
Real  x1,
Real  x2,
Real  x3,
Grain *  gr 
)

Judge if the particle is a crossing particle.

Definition at line 717 of file integrators_particle.c.

References x1lpar, x1upar, x2lpar, x2upar, x3lpar, and x3upar.

Referenced by Integrate_Particles().

Here is the caller graph for this function: