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

Circularly polarized Alfven waves. More...

Functions

void InitDomain (Data *d, Grid *grid)
 

Detailed Description

This is a rotated version of a 1D setup where

\[ \rho = 1 \,,\quad v_x = V_0 \,,\quad v_y = |\epsilon|\sin(\phi) \,,\quad v_z = |\epsilon|\cos(\phi) \,,\quad B_x = 1 \,,\quad B_y = \epsilon\sqrt{\rho}\sin(\phi) \,,\quad B_z = \epsilon\sqrt{\rho}\cos(\phi) \,,\quad P = P_0 \,, \]

where $V_0$ is the translation velocity in the $x$ direction, $\phi$ is the phase ( $k_xx$ in 1D and ( $k_xx + k_yy$) in 2D), and $\epsilon$ is the wave amplitude ( $\epsilon > 0$ implies right going waves; $\epsilon < 0$ implies left going waves).

With this normalization, the Alfven velocity $V_A = B_x/\sqrt{\rho}$ is always unity.

The configuration is rotated by specifying $\tan\alpha = k_y/k_x$ and $\tan\beta = k_z/k_x$ which express the ratios between the $y$- and $z$- components of the wave vector with the $x$ component. In order to apply periodic boundary conditions everywhere, an integer number of wavelegnths must be contained in each direction, that is, $k_x = 2\pi/L_x$, $k_y = 2\pi/L_y$, $k_z = 2\pi/L_z$.

We use the tools in rotate.c which requires to specify the four integer shifts such that

\[ \tan\alpha = -\frac{j_x}{j_y}\frac{\Delta x}{\Delta y} = \frac{L_x}{L_y} , \qquad \tan\beta = -\frac{k_x}{k_z}\frac{\Delta x}{\Delta z} = \frac{L_x}{L_z} \]

The final time step is one period and is found from

$V_A = \omega/|k|$ –> $1/T = \sqrt{1 + \tan^2\alpha + \tan^2\beta}$

The runtime parameters that are read from pluto.ini are

Configurations:

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

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