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

A simple advection test for Particles as Lagrangian tracers. More...

Functions

void Init (double *v, double x1, double x2, double x3)
 
void InitDomain (Data *d, Grid *grid)
 
void Analysis (const Data *d, Grid *grid)
 
void UserDefBoundary (const Data *d, RBox *box, int side, Grid *grid)
 

Detailed Description

Set the initial condition for a advection test along with Lagrangian tracers.

The input parameters read from pluto.ini are labeled as:

The available configuration refer to: -#01 Cartesian (2D, HD, VEL=0.25, THETA = PI/2, PHI = 0) -#02 Cartesian (3D, HD, VEL=0.25, THETA = PI/2, PHI = 0) -#03 Cartesian (3D, HD, VEL=0.25, THETA = PI/2, PHI = PI/4) -#04 Cartesian (3D, HD, VEL=0.25, THETA = PI/4, PHI = PI/4)

One particle per cell is initialized uniformly in the numerical domain. Spectral evolution is not considered for this test problem.

Author
B. Vaidya (bvaid.nosp@m.ya@i.nosp@m.iti.a.nosp@m.c.in) A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
June 02, 2018

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

◆ Init()

void Init ( double *  v,
double  x1,
double  x2,
double  x3 
)

The Init() function can be used to assign initial conditions as as a function of spatial position.

Parameters
[out]va pointer to a vector of primitive variables
[in]x1coordinate point in the 1st dimension
[in]x2coordinate point in the 2nd dimension
[in]x3coordinate point in the 3rdt dimension

The meaning of x1, x2 and x3 depends on the geometry:

\[ \begin{array}{cccl} x_1 & x_2 & x_3 & \mathrm{Geometry} \\ \noalign{\medskip} \hline x & y & z & \mathrm{Cartesian} \\ \noalign{\medskip} R & z & - & \mathrm{cylindrical} \\ \noalign{\medskip} R & \phi & z & \mathrm{polar} \\ \noalign{\medskip} r & \theta & \phi & \mathrm{spherical} \end{array} \]

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.

◆ 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]dpointer 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 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]gridpointer to an array of Grid structures.