PLUTO
|
Accretion disk in 3D spherical coordinates. More...
#include "pluto.h"
Go to the source code of this file.
Functions | |
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) |
Accretion disk in 3D spherical coordinates.
Setup a magnetized disk in 3D spherical coordinates ). The disk model is taken form [Flo11],[Mig12] and it consists of an initial equilibrium in a point mass gravity with equilibrium profiles given by
where is the cylindrical radius while and is the sound speed. Here H
is the scale height and it is proportional to the cylindrical radius. The constant of proportionality is the ratio defined by the input parameter g_inputParam[H_R]
. With the current setting, one rotation period of the inner orbit (r=1
) is .
Differently from [Flo11], a polodial magnetic field is used here, with vector potential prescribed as follows:
where A0
is a constant chosen to prescribe a given plasma beta. The exponential terms on the right hand side confine the magnetic field in the midplane around R=6
. We also make the vector potential vanish identically for or .
The boundary conditions are all set to userdef:
For the sake of simplicity only a quarter of a disk is considered. This test problems can be run normally or using the FARGO module, giving a saving factor of (roughly) 5. The figure below was produced by running the current setup at twice the resolution and for 90 orbits using FARGO.
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 109 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 72 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.
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 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] | grid | pointer to an array of Grid structures. |
Definition at line 201 of file init.c.