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

Bell instability setup. More...

Functions

void BI_Parameters (double *km, double *Lambda, double *rhoCR)
 
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

Initialize fluid variables using Eqns. of [MVBM18], sect. 4.4. using a 1D configuration. The configuration is then rotated around the y- and z-axis in a way similar to Mignone, Tzeferacos & Bodo, JCP (2010). The initial phase is computed as $ \phi = k_0x_0 = \vec{k}\cdot\vec{x} $ (which is invariant under rotations), where $ \vec{k} $ and $ \vec{x} $ are the wavevector and coordinate vector in the rotated system, while $ k_0 $ and $ x_0 $ are the original (unrotated) 1D vectors.

The amount of rotation depends on the dimensionality of the problem and is uniquely specified by the domain size in the three directions Lx, Ly, Lz:

\[ \tan(\alpha) = \frac{L_x}{L_y} = \frac{k_y}{k_x} \,,\quad \tan(\beta) = \frac{L_x}{L_z} = \frac{k_z}{k_x} \]

where $ k_x = 2\pi/L_x,\, k_y = 2\pi/L_y$ and $ k_z = 2\pi/L_z $. In such a way the modulus of the wavevector is

\[ |\vec{k}| = \sqrt{k_x^2 + k_y^2 + k_z^2} = 2\pi\sqrt{\frac{1}{L_x^2} + \frac{1}{L_y^2} + \frac{1}{L_z^2}} \]

In order to have one wavelength, Ly and Lz must be chosen so that $ |\vec{k}| = 2\pi $. Thus in 1D, 2D and 3D we choose:

Dim Lx Ly Lz
1 1 - -
2 $ \sqrt{5} $ $ \sqrt{5}/2 $ -
3 3 3/2 3/2

The 6 configurations come in pairs (serial/parallel) and test the instability for eps = 0.1 in 1D (Conf. #1/#2), in 2D (Conf. #3/#4) and 3D (Conf. #5/#6).

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
June 10, 2019

References:

Function Documentation

◆ Analysis()

void Analysis ( const Data *  d,
Grid *  grid 
)

Perform runtime data analysis.

Parameters
[in]dthe PLUTO Data structure
[in]gridpointer to array of Grid structures

◆ 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

◆ BI_Parameters()

void BI_Parameters ( double *  km,
double *  Lambda,
double *  rhoCR 
)

Compute and return some useful parameters:

  • the value of the unstable wavelgenth
  • Lambda
  • CR density.

◆ 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().