PLUTO
|
Circularly polarized Alfven waves. More...
#include "pluto.h"
Go to the source code of this file.
Functions | |
static double | AX_VEC (double x, double y, double z) |
static double | AY_VEC (double x, double y, double z) |
static double | AZ_VEC (double x, double y, double z) |
void | Init (double *us, double x1, double x2, double x3) |
void | Analysis (const Data *d, Grid *grid) |
void | UserDefBoundary (const Data *d, RBox *box, int side, Grid *grid) |
Variables | |
static double | ta = 0.0 |
static double | tb = 0.0 |
static double | ca |
static double | sa |
static double | cg |
static double | sg |
Circularly polarized Alfven waves.
This is a rotated version of a 1D setup where
where is the translation velocity in the 1D
direction,
is the phase (
in 1D and (
) in 2D), and
is the wave amplitude (
implies right going waves;
implies left going waves).
With this normalization, the Alfven velocity is always one.
Rotations are specified by and
expressing the ratios between the
- and
- components of the wave vector with the
component. We choose the wavelength in
-direction to be always 1, so that
,
,
so that
,
. By choosing the domain in the
-direction to be 1, the extent in
and
should be adjusted so that
(and similarly for
) becomes an integer number to ensure periodicity. If one wants 1 wave length in both directions than
,
,
.
If wavelengths are specified in the
-direction than
,
,
1D is recovered by specifying .
The final time step is one period and is found from
–>
The runtime parameters that are read from pluto.ini
are
g_inputParam[EPS]
: sets the wave amplitude g_inputParam[VEL0]
: sets g_inputParam[PR0]
: sets the pressure of the 1D solution;g_inputParam[ALPHA_GLM]
: ;Configurations:
References:
Definition in file init.c.
Perform runtime data analysis.
[in] | d | the PLUTO Data structure |
[in] | grid | pointer to array of Grid structures |
Definition at line 151 of file init.c.
|
static |
Definition at line 218 of file init.c.
|
static |
Definition at line 247 of file init.c.
|
static |
Definition at line 275 of file init.c.
void Init | ( | double * | us, |
double | x1, | ||
double | x2, | ||
double | x3 | ||
) |
The Init() function can be used to assign initial conditions as as a function of spatial position.
[out] | v | a pointer to a vector of primitive variables |
[in] | x1 | coordinate point in the 1st dimension |
[in] | x2 | coordinate point in the 2nd dimension |
[in] | x3 | coordinate point in the 3rdt dimension |
The meaning of x1, x2 and x3 depends on the geometry:
Variable names are accessed by means of an index v[nv], where nv = RHO is density, nv = PRS is pressure, nv = (VX1, VX2, VX3) are the three components of velocity, and so forth.
Definition at line 78 of file init.c.
Assign user-defined boundary conditions.
[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] | box | pointer 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] | side | specifies the boundary side where ghost zones need to be filled. It 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] | grid | pointer to an array of Grid structures. |
Assign user-defined boundary conditions in the lower boundary ghost zones. The profile is top-hat:
where and
M
is the flow Mach number (the unit velocity is the jet sound speed, so ).
Assign user-defined boundary conditions:
x < 1/6
and reflective boundary otherwise.Assign user-defined boundary conditions at inner and outer radial boundaries. Reflective conditions are applied except for the azimuthal velocity which is fixed.