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

Circularly polarized Alfven waves for RMHD. More...

Functions

void InitDomain (Data *d, Grid *grid)
 
void UserDefBoundary (const Data *d, RBox *box, int side, Grid *grid)
 

Detailed Description

Setup the initial conditions for the large-amplitude circularly polarized Alfven wave test, as in section 4.1 of Del Zanna (2007).

Note: in 2D the solution is rotated around the $z$-axis by assuming one wavelength in both directions. This implies that $ k_x = 2\pi/L_x$ and $ k_y = 2\pi/L_y$. The transformation from the 1D (unrotated) system with primed coordinates to the actual computational system is given by

\[ \vec{V} = R\vec{V}' \qquad{\rm where}\quad R = \left(\begin{array}{ccc} \cos\alpha & -\sin\alpha & 0 \\ \noalign{\medskip} \sin\alpha & \cos\alpha & 0 \\ \noalign{\medskip} 0 & 0 & 1 \\ \noalign{\medskip} \end{array}\right) \]

while the invers transormation is

\[ \vec{V}' = R^{-1}\vec{V} \qquad{\rm where}\quad R^{-1} = \left(\begin{array}{ccc} \cos\alpha & \sin\alpha & 0 \\ \noalign{\medskip} -\sin\alpha & \cos\alpha & 0 \\ \noalign{\medskip} 0 & 0 & 1 \\ \noalign{\medskip} \end{array}\right) \]

Note that the wave phase

\[ \phi = \vec{k}\cdot\vec{x} = \vec{k}'\cdot\vec{x}' \]

is invariant under rotations.

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

References:

Function Documentation

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

◆ UserDefBoundary()

void UserDefBoundary ( const Data *  d,
RBox *  box,
int  side,
Grid *  grid 
)

Assign user-defined boundary conditions.

Parameters
[in/out]d pointer to the PLUTO data structure containing cell-centered primitive quantities (d->Vc) and staggered magnetic fields (d->Vs, when used) to be filled.
[in]boxpointer to a RBox structure containing the lower and upper indices of the ghost zone-centers/nodes or edges at which data values should be assigned.
[in]sidespecifies on which side boundary conditions need to be assigned. side can assume the following pre-definite values: X1_BEG, X1_END, X2_BEG, X2_END, X3_BEG, X3_END. The special value side == 0 is used to control a region inside the computational domain.
[in]gridpointer to an array of Grid structures.