PLUTO
4.4-patch2
|
Update CR particles (without feedback) using guiding center approximation. More...
#include "pluto.h"
Functions | |
static void | Particles_CR_setGC (Data *d, Grid *grid) |
static int | Particles_CR_getGC (Particle *, Data *, double *, double, Grid *) |
static void | Particles_CR_destroyGCParticle (Particle *, particleNode *, Data *) |
void | Particles_CR_Update (Data *data, timeStep *Dts, double dt, Grid *grid) |
GCA algorithm for updating charged particles.
Time step restriction is computed by requiring that no particle travels more than Nmax
= PARTICLES_CR_NCELL_MAX
zones and that the Larmor scale is resolved with more than 1 cycle (see particles_cr_update.c documentation for more information)
|
static |
Destroys particle at CurNode and updates CurNode to the next node
[in] | p | Pointer to PLUTO particle data structure. |
[in,out] | CurNode | Node of the particle that will be destroyed |
[in] | data | Pointer to PLUTO data structure |
|
static |
Compute the right hand side of particle equation in the guiding center approximation. Interpolate fields provided by Particles_CR_setGC at cell location. Conditions: 1) Larmor radius is required to be smaller than cell dimension 2) Larmor radius is required to be small compared to magnetic gradient scale
[in] | p | Pointer to PLUTO particle data structure. |
[in] | data | Pointer to PLUTO data structure. |
[in,out] | dRdt | double array containing GC speed and parallel 4-velocity. |
[in] | inv_dt | Inverse of time step, if <0 time derivatives are not computed. |
[in] | grid | Pointer to Grid PLUTO structure. |
CAMBIARE c
Define and compute 3D arrays on the grid (later needed for particle interpolation) NOTE: Vector fields are saved as static field[x/y/z][k cell number][j cell number][i cell number] b is magnetic versor field, u_E is the fluid velocity field, gc_Bmf1 is a scalar field
[in] | d | Data structure (contains particles list) |
[in] | grid | pointer to Grid structure |
[out] | bGradb | (b ) b vector field |
[out] | gc_vEGrad_b | (vE ) b vector field |
[out] | gc_bGrad_vE | (b vE) vector field |
[out] | gc_vEGrad_vE | (vE vE) vector field |
[out] | gc_Grad_Bf1 | gc_Bmf1 vector field |
[out] | gc_Grad_B | B vector field, needed to check validity of GCA |