PLUTO Test Problems  4.4-patch2
Functions
init.c File Reference

Single CR particle gyration (and drift) test. More...

Functions

void InitDomain (Data *d, Grid *grid)
 
void Analysis (const Data *d, Grid *grid)
 
void BackgroundField (double x1, double x2, double x3, double *B0)
 

Detailed Description

Test particle gyration in EM fields.

The time steps for partciles and fluid scale as

dt_pa = Na*dx/vp (if limited by translation) dt_pg = 1/(Ng*Omega) (if limited by gyration) dt_f = Ca*dx/lambda

where lambda = B/sqrt(rho) (when p << 1), Omega = q*B/(m*c), Ng and Na are some integers, Ca is the Courant number.

We set B = H*dx so the fluid time step is approximately the same at any resolution:

dt_pa = Na*dx/vp dt_pg = 1/(Ng*H*dx*q/mc) dt_f = Ca*sqrt(rho)/H

The ratio between particle and fluid time steps is:

dt_pa / dt_f = Na*dx*H/(vp*Ca*sqrt(rho)) dt_pg / dt_f = mc/(Ng*q*Ca*sqrt(rho)*dx)

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
March 04, 2021

References:

Function Documentation

◆ Analysis()

void Analysis ( const Data *  d,
Grid *  grid 
)
  • Set {x, v}(t=0) in the Lab frame.
  • Apply a Lorentz boost, so that E' = 0 (v/c = E/B = vgx/c)
  • Solve particle motion in the primed system o transform initial condition (x,v,t) -> (x,v,t)' o solve equations & write to disk

◆ BackgroundField()

void BackgroundField ( double  x1,
double  x2,
double  x3,
double *  B0 
)

Define the component of a static, curl-free background magnetic field.

Parameters
[in]x1position in the 1st coordinate direction $x_1$
[in]x2position in the 2nd coordinate direction $x_2$
[in]x3position in the 3rd coordinate direction $x_3$
[out]B0array containing the vector componens of the background magnetic field

◆ InitDomain()

void InitDomain ( Data *  d,
Grid *  grid 
)

Assign initial condition by looping over the computational domain. Called after the usual Init() function to assign initial conditions on primitive variables. Value assigned here will overwrite those prescribed during Init().