PLUTO
4.4-patch2
|
Collection of tools for the LAGRANGIAN particle module at particle positions. More...
#include "pluto.h"
Functions | |
void | Particles_LP_ExchangeFlag (char ***, int, Grid *) |
void | Particles_LP_FixValue (Particle *pl, particleProbe *probe, Data *d, Grid *grid) |
void | Particles_LP_IntegrateSpectra (Particle *pl, double density, double *totE) |
void | Particles_LP_FlagShock (Data *d, char ***flag2, Grid *grid) |
void Particles_LP_ExchangeFlag | ( | char *** | flag, |
int | nbuf, | ||
Grid * | grid | ||
) |
Exchange nbuf zones in the ghost zones during the shock detection process. Since the number of buffer zones can exceed the number of ghost zones, one needs to do this exchange. If An and Dn are values in the ghost zones, the process can be sketched as follows:
where the (+) sign means the received buffer is added to pre-existing values.
Seen from rank # 1, we have
A1
= snd_bufLD1
= snd_bufRD0
= rcv_bufLA2
= rcv_bufRHere 'L' or 'R' refer to the processor to the left (rank #0) and to the right (rank #2), respectively. In 2D or 3D we loop over dimensions.
This function finds the cell of the particles and fix all the phisical variables, interpolating them on the particle coordinates. Call this routine only after pl->coor have been correctly initialized or calculated.
[in] | pl | Pointer to the Particle. |
[in] | d | Pointer to the Data structure. |
[in] | grid | Pointer to the PLUTO grid structure. |
Flag cells that are shocked. The condition used is same as that used for the fluid. i.e., divV < 0.0, |GradP|/P > Threshold.
[in] | d | Pointer to the data structure |
[in] | grid | Pointer to the grid structure |
[out] | flag2 | 3D Array of the flagged zones. |
void Particles_LP_IntegrateSpectra | ( | Particle * | pl, |
double | density, | ||
double * | totE | ||
) |
Integrate particle spectrum to give total energy.
[in] | d | Pointer to the Particle structure |
[in] | density | The fluid density interpolated on the particle. This must be provided even in pl->density is present, because IntegrateSpectra is called before LP_FIX at one time. |
[out] | totE | Integration of N(e)*e*de. |