PLUTO
init.c
Go to the documentation of this file.
1 /* ///////////////////////////////////////////////////////////////////// */
2 /*!
3  \file
4  \brief Shearing Box setup.
5 
6  Set initial conditions for a shearing box model in two or
7  three dimensions:
8  \f[
9  \rho = \left\{\begin{array}{ll}
10  1 & \quad{\rm(unstratified)} \\ \noalign{\medskip}
11  \exp(-z^2/H^2) & \quad{\rm(stratified)}
12  \end{array}\right.
13  ;\quad
14  v_y = -q\Omega x\,; \quad
15  p = \rho c_s^2\,; \quad
16  \vec{B} = \left\{\begin{array}{ll}
17  (0,0,B_z) & \quad{\rm(net\,flux)} \\ \noalign{\medskip}
18  (0,0,B_z\sin 2\pi x/L_x) & \quad{\rm(no\,net\,flux)}
19  \end{array}\right.
20  \f]
21  where, by default, the angular rotation frequency is \f$\Omega = 1\f$
22  while the shear parameter is \f$ q = 3/2 \f$ (Keplerian rotation).
23  In the stratified case the scale height is given by
24  \f$ H = \sqrt{2}c_s/\Omega \f$.
25  The parameters controlling the model are the elements of the
26  array \c g_inputParam:
27 
28  - <tt>g_inputParam[BETA]</tt>: sets the plasma beta (midplane),
29  \f$ B_z = \sqrt{2c_s^2/\beta} \f$;
30  - <tt>g_inputParam[CSOUND]</tt>: sets the speed of sound \f$ c_s \f$.
31 
32  The additional constants \c NET_FLUX and \c STRATIFICATION are
33  defined inside \c definitions.h and are used to:
34 
35  - \c NET_FLUX (\c YES/\c NO): set the magnetic field configuration
36  corresponding to a net magnetic flux (\c YES) or zero-net flux
37  (\c NO);
38  - \c STRATIFICATION (\c YES/\c NO): enable or disable stratified shearing
39  box models. With stratification, density and vertical gravity are changed.
40 
41  The \c Shearing_Box/ directory contains several configurations
42  for different purposes:
43 
44  <CENTER>
45  Conf.|DIM|NET_FLUX|STRAT.|T. STEPPING|RECONSTR. | EOS |Ref
46  -----|---|--------|------|---------- |----------|----------|-------
47  #01 | 2 | YES | NO | HANCOCK |LINEAR |ISOTHERMAL| -
48  #02 | 2 | YES | NO | ChTr |PARABOLIC |ISOTHERMAL| -
49  #03 | 3 | YES | NO | RK2 |LINEAR |ISOTHERMAL|[Bod08]
50  #04 | 3 | YES | NO | RK2 |LINEAR |ISOTHERMAL|[Bod08]
51  #05 | 3 | YES | NO | ChTr |PARABOLIC |ISOTHERMAL|[Bod08]
52  #06 | 3 | YES | NO | ChTr |PARABOLIC |ISOTHERMAL|[Bod08]
53  #07 | 3 | NO | NO | RK2 |LINEAR |ISOTHERMAL|[Mig12]
54  #08 | 3 | NO | NO | RK2 |LINEAR |ISOTHERMAL|[Mig12] (*)
55  #09 | 3 | NO | NO | ChTr |PARABOLIC |ISOTHERMAL|[Mig12]
56  #10 | 3 | NO | NO | ChTr |PARABOLIC |ISOTHERMAL|[Mig12] (*)
57  #11 | 3 | NO | YES | HANCOCK |LINEAR |ISOTHERMAL|[Bod14]
58  #12 | 3 | NO | YES | HANCOCK |LINEAR |IDEAL |[Bod12] (^)
59  #13 | 3 | NO | NO | HANCOCK |LINEAR |IDEAL |(**)
60  #14 | 3 | YES | NO | RK3 |WENO3 |IDEAL |(**)
61  </CENTER>
62 
63  (*) used with FARGO to be compared to the previous configurations.
64 
65  (**) as conf. #9 but with IDEAL eos and FARGO.
66 
67  (^) This a simplified version of the [Bod12] setup.
68  The actual configuration was also modifying the Riemann solver flux
69  to guarantee zero mass flux across top and bottom boundary.
70 
71  \image html sb.06.png "Density and magnetic field lines for configuration #06 at t = 50 using a grid resolution of 64 x 256 x 64."
72 
73  \author A. Mignone (mignone@ph.unito.it)
74  \date Aug 25, 2015
75 
76  \b References:
77  - [Bod08]: "Aspect ratio dependence in magnetorotational instability
78  shearing box simulations" Bodo et al. A&A (2008) 487, 1
79  - [Mig12]: "A conservative orbital advection scheme for simulations of
80  magnetized shear flows with the PLUTO code",
81  Mignone et al., A&A (2012) 545, Sec. 3.3.2
82  - [Bod12]: "Magnetorotational turbulence in stratified shearing boxes
83  with perfect gas equation of state and finite thermal diffusivity",
84  Bodo et al., ApJ (2012) 761, 116
85  - [Bod14]: "On the Convergence of Magnetorotational Turbulence in
86  Stratified Isothermal Shearing Boxes" Bodo et al. (2014) 787 L13
87 */
88 /* ///////////////////////////////////////////////////////////////////// */
89 #include "pluto.h"
90 
91 //double sb_Omega = 1.0; /* Orbital frequency (global variable) */
92 //double sb_q = 1.5; /* Shear parameter (global variable) */
93 
94 
95 /* ********************************************************************* */
96 void Init (double *v, double x, double y, double z)
97 /*
98  *
99  *********************************************************************** */
100 {
101  static int first_call = 1;
102  double Bz0, rnd, dvy, cs, H;
103  double Lx, Ly, Lz;
104  double kx, ky, kz;
105 
106 #ifndef SHEARINGBOX
107  print1 ("! ShearingBox module has not been included.\n");
108  print1 ("! Cannot continue.\n");
109  QUIT_PLUTO(1);
110 #endif
111 
112 /* -- compute domain sizes -- */
113 
114  Lx = g_domEnd[IDIR] - g_domBeg[IDIR]; kx = 2.0*CONST_PI/Lx;
115  Ly = g_domEnd[JDIR] - g_domBeg[JDIR]; ky = 2.0*CONST_PI/Ly;
116  Lz = g_domEnd[KDIR] - g_domBeg[KDIR]; kz = 2.0*CONST_PI/Lz;
117 
118 /* -- get sound speed and pressure scale height -- */
119 
120  cs = g_inputParam[CSOUND]; /* sound speed */
121 //H = sqrt(2.0)*cs/sb_Omega; /* pressure scale height */
122  H = sqrt(2.0)*cs/SB_OMEGA; /* pressure scale height */
123 
124 /* -- seed random numbers differently for each processor -- */
125 
126  if (first_call == 1){
127  srand(time(NULL) + prank);
128  first_call = 0;
129  }
130  rnd = (double)(rand())/((double)RAND_MAX + 1.0);
131 
132 /* -- set velocity perturbation [1]: random noise -- */
133 
134 /* dvy = 0.01*cs*rnd; */
135 
136 /* -- set velocity perturbation [2], two harmonics for each direction -- */
137 
138  dvy = sin(kx*x + 0.20) + sin(2.0*kx*x - 0.37);
139  dvy *= sin(ky*y + 0.13) + sin(2.0*ky*y + 0.04);
140  dvy *= sin(kz*z + 0.56) + sin(2.0*kz*z + 0.62);
141  dvy *= 0.01*cs/8.0;
142 
143 /* -- in 2D we don't use any perturbation -- */
144 
145  #if DIMENSIONS == 2
146  dvy = 0.0;
147  #endif
148 
149 /* -- set initial condition -- */
150 
151  #if STRATIFICATION == YES
152  v[RHO] = exp(-z*z/(H*H));
153  #else
154  v[RHO] = 1.0;
155  #endif
156 
157  v[VX1] = 0.0;
158 //v[VX2] = -sb_q*sb_Omega*x + dvy;
159  v[VX2] = -SB_Q*SB_OMEGA*x + dvy;
160  v[VX3] = 0.0;
161  #if EOS == IDEAL
162  v[PRS] = cs*cs*v[RHO];
163  #elif EOS == ISOTHERMAL
164  g_isoSoundSpeed = cs;
165  #endif
166 
167  v[TRC] = 0.0;
168 
169 /* ----------------------------------------------------------------
170  The magnetic field amplitude is set by the parameter
171  beta = 2p/B^2 = 2*rho*c^2/b0^2 --> b0 = c*sqrt(2/beta)
172  where it is assumed that rho = 1 (midplane).
173  ---------------------------------------------------------------- */
174 
175  #if PHYSICS == MHD
176  Bz0 = cs*sqrt(2.0/g_inputParam[BETA]);
177 
178  #if NET_FLUX == YES /* -- Net flux, constant vertical field Bz = B0 -- */
179 
180  v[BX1] = 0.0;
181  v[BX2] = 0.0;
182  v[BX3] = Bz0;
183 
184  v[AX1] = 0.0;
185  v[AX2] = Bz0*x;
186  v[AX3] = 0.0;
187 
188  #else /* -- Zero net flux, Bz = B0*sin(2*pi*x/Lx) -- */
189 
190  v[BX1] = 0.0;
191  v[BX2] = 0.0;
192  v[BX3] = Bz0*sin(kx*x);
193 
194  v[AX1] = 0.0;
195  v[AX2] = -Bz0*cos(kx*x)/kx;
196  v[AX3] = 0.0;
197 
198  #endif
199 
200  #if DIMENSIONS == 2 /* 2D Case only for testing */
201  v[BX1] = Bz0*sin(ky*y);
202  v[BX2] = 0.0;
203  v[BX3] = 0.0;
204 
205  v[AX1] = 0.0;
206  v[AX2] = 0.0;
207  v[AX3] = -Bz0*cos(ky*y)/ky;
208  #endif
209  #endif
210 }
211 /* ********************************************************************* */
212 void Analysis (const Data *d, Grid *grid)
213 /*!
214  * Compute volume-integrated magnetic pressure, Maxwell and
215  * Reynolds stresses. Save them to "averages.dat"
216  *
217  *********************************************************************** */
218 {
219  int i,j,k;
220  static int first_call=1;
221  double *dx, *dy, *dz;
222  double *x, *y, *z;
223  double Lx, Ly, Lz, scrh;
224  double pm, Mxy, Rxy, tot_vol, aM, aR, dV;
225  FILE *fp;
226 
227 /* -- compute domain sizes and box volume -- */
228 
229  Lx = g_domEnd[IDIR] - g_domBeg[IDIR];
230  Ly = g_domEnd[JDIR] - g_domBeg[JDIR];
231  Lz = g_domEnd[KDIR] - g_domBeg[KDIR];
232 
233  tot_vol = Lx*Ly*Lz;
234 
235 /* -- pointers to mesh spacing and coordinates -- */
236 
237  dx = grid[IDIR].dx; dy = grid[JDIR].dx; dz = grid[KDIR].dx;
238  x = grid[IDIR].x; y = grid[JDIR].x; z = grid[KDIR].x;
239 
240 /* ------------------------------------------------------------
241  Main analysis loop.
242  Compute volume-integrated magnetic pressure and stresses
243  ------------------------------------------------------------ */
244 
245  pm = Mxy = Rxy = 0.0;
246  DOM_LOOP(k,j,i){
247  dV = dx[i]*dy[j]*dz[k];
248 
249  /* -- magnetic pressure -- */
250 
251  pm += 0.5*(EXPAND( d->Vc[BX1][k][j][i]*d->Vc[BX1][k][j][i],
252  + d->Vc[BX2][k][j][i]*d->Vc[BX2][k][j][i],
253  + d->Vc[BX3][k][j][i]*d->Vc[BX3][k][j][i]))*dV;
254 
255  /* -- Maxwell and Reynolds stresses -- */
256 
257  aM = d->Vc[BX1][k][j][i]*d->Vc[BX2][k][j][i];
258  aR = d->Vc[RHO][k][j][i]*d->Vc[VX1][k][j][i]*
259  (d->Vc[VX2][k][j][i] + SB_Q*SB_OMEGA*x[i]);
260 
261  Mxy += aM*dV;
262  Rxy += aR*dV;
263  }
264 
265 /* -- divide summations by total volume -- */
266 
267  pm /= tot_vol;
268  Mxy /= tot_vol;
269  Rxy /= tot_vol;
270 
271 /* -- parallel reduce -- */
272 
273  #ifdef PARALLEL
274  MPI_Allreduce (&pm, &scrh, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
275  pm = scrh;
276 
277  MPI_Allreduce (&Mxy, &scrh, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
278  Mxy = scrh;
279 
280  MPI_Allreduce (&Rxy, &scrh, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
281  Rxy = scrh;
282 
283  MPI_Barrier (MPI_COMM_WORLD);
284  #endif
285 
286 /* -- only proc #0 writes ascii data-file to disk -- */
287 
288  if (prank == 0){
289  static double tpos = -1.0;
290  if (g_stepNumber == 0){ /* -- open for writing if initial step -- */
291  char fname[64];
292  sprintf (fname, "%s/averages.dat",RuntimeGet()->output_dir);
293  fp = fopen(fname,"w");
294  fprintf (fp,"# %4s %12s %12s %12s %12s\n",
295  "time"," step "," <B^2/2> "," <Bx*By> ","<rho*ux*duy>");
296  first_call = 0;
297  }else{
298  if (tpos < 0.0){ /* obtain time coordinate of last written line */
299  char sline[512];
300  fp = fopen("averages.dat","r");
301  while (fgets(sline, 512, fp)) {
302  }
303  sscanf(sline, "%lf\n",&tpos);
304  fclose(fp);
305  }
306  fp = fopen("averages.dat","a");
307  }
308  if (g_time > tpos){ /* -- write -- */
309  fprintf (fp, "%12.6e %4d %12.6e %12.6e %12.6e\n",
310  g_time, g_stepNumber, pm, Mxy, Rxy);
311  }
312  fclose(fp);
313  }
314 }
315 /* ********************************************************************* */
316 void UserDefBoundary (const Data *d, RBox *box, int side, Grid *grid)
317 /*!
318  * The user-defined boundary is used to impose stress-free boundary
319  * and purely vertical magnetic field at the top and bottom boundaries,
320  * as done in Bodo et al. (2012).
321  * In addition, constant temperature and hydrostatic balance are imposed.
322  * For instance, at the bottom boundary, one has:
323  * \f[
324  * \left\{\begin{array}{lcl}
325  * \DS \frac{dp}{dz} &=& \rho g_z \\ \noalign{\medskip}
326  * p &=& \rho c_s^2
327  * \end{array}\right.
328  * \qquad\Longrightarrow\qquad
329  * \frac{p_{k+1}-p_k}{\Delta z} = \frac{p_{k} + p_{k+1}}{2c_s^2}g_z
330  * \f]
331  * where \f$g_z\f$ is the value of gravity at the lower boundary.
332  * Solving for \f$p_k\f$ at the bottom boundary where \f$k=k_b-1\f$
333  * gives:
334  * \f[
335  * \left\{\begin{array}{lcl}
336  * p_k &=& \DS p_{k+1} \frac{1-a}{1+a} \\ \noalign{\medskip}
337  * \rho_k &=& \DS \frac{p_k}{c_s^2}
338  * \end{array}\right.
339  * \qquad\mathrm{where}\qquad
340  * a = \frac{\Delta z g_z}{2c_s^2} > 0
341  * \f]
342  * where, for simplicity, we keep constant temperature in the ghost
343  * zones rather than at the boundary interface (this seems to give a
344  * more stable behavior and avoids negative densities).
345  * A similar treatment holds at the top boundary.
346  *********************************************************************** */
347 {
348  int i, j, k, nv;
349  double *z, *dz;
350  double ***rho = d->Vc[RHO];
351 #if HAVE_ENERGY
352  double ***prs = d->Vc[PRS];
353 #endif
354  double cs = g_inputParam[CSOUND], cs2 = cs*cs, H;
355  EXPAND(double ***vx = d->Vc[VX1]; ,
356  double ***vy = d->Vc[VX2]; ,
357  double ***vz = d->Vc[VX3];)
358  EXPAND(double ***Bx = d->Vc[BX1]; ,
359  double ***By = d->Vc[BX2]; ,
360  double ***Bz = d->Vc[BX3];)
361 #ifdef STAGGERED_MHD
362  EXPAND(double ***Bxs = d->Vs[BX1s]; ,
363  double ***Bys = d->Vs[BX2s]; ,
364  double ***Bzs = d->Vs[BX3s];)
365 #endif
366 
367  H = sqrt(2.0)*cs/SB_OMEGA; /* pressure scale height */
368 
369  z = grid[KDIR].x;
370  dz = grid[KDIR].dx;
371 
372  if (side == 0) { /* -- Density threshold -- */
373  DOM_LOOP(k,j,i){
374  if (d->Vc[RHO][k][j][i] < 1.e-5) d->Vc[RHO][k][j][i] = 1.e-5;
375  }
376  }
377 
378  if (side == X3_BEG){ /* -- X3_BEG boundary -- */
379  double gz, a;
380  if (box->vpos == CENTER){
381  BOX_LOOP(box,k,j,i){
382  gz = -g_domBeg[KDIR]*SB_OMEGA*SB_OMEGA; /* > 0 */
383  a = 0.5*dz[k]*gz/cs2;
384 #if EOS == IDEAL
385  prs[k][j][i] = prs[KBEG][j][i]*(1.0 - a)/(1.0 + a);
386  rho[k][j][i] = prs[k][j][i]/cs2;
387 #elif EOS == ISOTHERMAL
388  rho[k][j][i] = rho[KBEG][j][i]*(1.0 - a)/(1.0 + a);
389 #endif
390  EXPAND(vx[k][j][i] = vx[2*KBEG-k-1][j][i]; ,
391  vy[k][j][i] = vy[2*KBEG-k-1][j][i]; ,
392  vz[k][j][i] = -vz[2*KBEG-k-1][j][i];)
393 
394  EXPAND(Bx[k][j][i] = -Bx[2*KBEG-k-1][j][i]; ,
395  By[k][j][i] = -By[2*KBEG-k-1][j][i]; ,
396  Bz[k][j][i] = Bz[2*KBEG-k-1][j][i];)
397  }
398  }
399 #ifdef STAGGERED_MHD
400  if (box->vpos == X1FACE){
401  BOX_LOOP(box,k,j,i) Bxs[k][j][i] = -Bxs[2*KBEG-k-1][j][i];
402  }else if (box->vpos == X2FACE){
403  BOX_LOOP(box,k,j,i) Bys[k][j][i] = -Bys[2*KBEG-k-1][j][i];
404  }
405 #endif
406  }
407 
408  if (side == X3_END) { /* -- X3_END boundary -- */
409  double gz, a;
410  if (box->vpos == CENTER){
411  BOX_LOOP(box,k,j,i){
412  gz = -g_domEnd[KDIR]*SB_OMEGA*SB_OMEGA; /* < 0 */
413  a = 0.5*dz[k]*gz/cs2;
414 #if EOS == IDEAL
415  prs[k][j][i] = prs[KEND][j][i]*(1.0 + a)/(1.0 - a);
416  rho[k][j][i] = prs[k][j][i]/cs2;
417 #elif EOS == ISOTHERMAL
418  rho[k][j][i] = rho[KEND][j][i]*(1.0 + a)/(1.0 - a);
419 #endif
420  EXPAND(vx[k][j][i] = vx[2*KEND-k+1][j][i]; ,
421  vy[k][j][i] = vy[2*KEND-k+1][j][i]; ,
422  vz[k][j][i] = -vz[2*KEND-k+1][j][i];)
423 
424  EXPAND(Bx[k][j][i] = -Bx[2*KEND-k+1][j][i]; ,
425  By[k][j][i] = -By[2*KEND-k+1][j][i]; ,
426  Bz[k][j][i] = Bz[2*KEND-k+1][j][i];)
427  }
428  }
429 #ifdef STAGGERED_MHD
430  if (box->vpos == X1FACE){
431  BOX_LOOP(box,k,j,i) Bxs[k][j][i] = -Bxs[2*KEND-k+1][j][i];
432  }else if (box->vpos == X2FACE){
433  BOX_LOOP(box,k,j,i) Bys[k][j][i] = -Bys[2*KEND-k+1][j][i];
434  }
435 #endif
436  }
437 
438 }
439 
440 /* ********************************************************************* */
441 void BodyForceVector (double *v, double *g, double x, double y, double z)
442 /*!
443  * Include gravitational force in the shearing box module.
444  * Coriolis terms are included elsewhere.
445  *
446  * Note: with FARGO, gravity in the x-direction must not be included.
447  *
448  *********************************************************************** */
449 {
450  double om2 = SB_OMEGA*SB_OMEGA;
451  double zb = g_domBeg[KDIR], ze = g_domEnd[KDIR];
452 
453 #ifdef FARGO
454  g[IDIR] = 0.0;
455 #else
456  g[IDIR] = om2*2.0*SB_Q*x;
457 #endif
458  g[JDIR] = 0.0;
459 
460 #if STRATIFICATION == YES
461  g[KDIR] = -om2*z;
462 
463 /* -----------------------------------------------------------
464  With CTU and a reflective vertical boundary, gravity must
465  be symmetrized since the predictor step of CTU does not
466  not preserve the symmetry.
467  ----------------------------------------------------------- */
468 
469  #ifdef CTU
470  if (z > ze) g[KDIR] += 2.0*om2*ze;
471  else if (z < zb) g[KDIR] += 2.0*om2*zb;
472  #endif
473 
474 #else
475  g[KDIR] = 0.0;
476 #endif
477 }
478 /* ********************************************************************* */
479 double BodyForcePotential(double x, double y, double z)
480 /*
481  * Return the gravitational potential as function of the coordinates.
482  *
483  *********************************************************************** */
484 {
485  double om2 = SB_OMEGA*SB_OMEGA;
486  double zb = g_domBeg[KDIR], ze = g_domEnd[KDIR];
487  double psi;
488 
489 #if STRATIFICATION == YES
490  psi = om2*(0.5*z*z - SB_Q*x*x);
491  #ifdef CTU /* see note in BodyForceVector() */
492  if (z > ze) psi -= 2.0*om2*ze*(z - ze);
493  if (z < zb) psi -= 2.0*om2*zb*(z - zb);
494  #endif
495  return psi;
496 #else
497  return -om2*SB_Q*x*x;
498 #endif
499 }
500 
501 /* ************************************************************** */
502 double FARGO_SetVelocity(double x1, double x2)
503 /*!
504  * Compute the shear angular velocity to be subtracted from
505  * the HD or MHD equations.
506  *
507  **************************************************************** */
508 {
509  return -SB_Q*SB_OMEGA*x1;
510 }
#define X3_BEG
Boundary region at X3 beg.
Definition: pluto.h:150
static double a
Definition: init.c:135
double **** Vs
The main four-index data array used for face-centered staggered magnetic fields.
Definition: structs.h:43
void UserDefBoundary(const Data *d, RBox *box, int side, Grid *grid)
Definition: init.c:98
DOM_LOOP(k, j, i)
Definition: analysis.c:22
#define VX2
Definition: mod_defs.h:29
#define BETA
double FARGO_SetVelocity(double x1, double x2)
Definition: init.c:502
#define CENTER
Definition: pluto.h:200
void print1(const char *fmt,...)
Definition: amrPluto.cpp:511
int vpos
Location of the variable inside the cell.
Definition: structs.h:359
#define RHO
Definition: mod_defs.h:19
tuple scrh
Definition: configure.py:200
#define BOX_LOOP(B, k, j, i)
Definition: macros.h:70
double **** Vc
The main four-index data array used for cell-centered primitive variables.
Definition: structs.h:31
#define AX2
Definition: mod_defs.h:86
#define BX3s
Definition: ct.h:29
#define TRC
Definition: pluto.h:581
double * dx
Definition: structs.h:83
int prank
Processor rank.
Definition: globals.h:33
#define VX1
Definition: mod_defs.h:28
#define KDIR
Definition: pluto.h:195
#define X1FACE
Definition: pluto.h:201
#define STAGGERED_MHD
Definition: ct.h:15
long int g_stepNumber
Gives the current integration step number.
Definition: globals.h:97
Runtime * RuntimeGet(void)
#define IDIR
Definition: pluto.h:193
Definition: structs.h:78
#define AX3
Definition: mod_defs.h:87
static double Bx
Definition: hlld.c:62
double g_inputParam[32]
Array containing the user-defined parameters.
Definition: globals.h:131
#define SB_OMEGA
Disk local orbital frequency .
Definition: shearingbox.h:81
int j
Definition: analysis.c:2
int k
Definition: analysis.c:2
#define CSOUND
#define BX1s
Definition: ct.h:27
double g_domBeg[3]
Lower limits of the computational domain.
Definition: globals.h:125
double * x
Definition: structs.h:80
#define SB_Q
The shear parameter, .
Definition: shearingbox.h:76
#define BX3
Definition: mod_defs.h:27
#define X3_END
Boundary region at X3 end.
Definition: pluto.h:151
PLUTO main header file.
Definition: structs.h:30
int i
Definition: analysis.c:2
double g_time
The current integration time.
Definition: globals.h:117
double BodyForcePotential(double x, double y, double z)
Definition: init.c:479
#define AX1
Definition: mod_defs.h:85
FILE * fp
Definition: analysis.c:7
#define BX1
Definition: mod_defs.h:25
#define VX3
Definition: mod_defs.h:30
#define CONST_PI
.
Definition: pluto.h:269
long int KBEG
Lower grid index of the computational domain in the the X3 direction for the local processor...
Definition: globals.h:43
#define BX2s
Definition: ct.h:28
#define BX2
Definition: mod_defs.h:26
long int KEND
Upper grid index of the computational domain in the the X3 direction for the local processor...
Definition: globals.h:45
double g_domEnd[3]
Upper limits of the computational domain.
Definition: globals.h:126
#define JDIR
Definition: pluto.h:194
Definition: structs.h:346
#define QUIT_PLUTO(e_code)
Definition: macros.h:125
#define X2FACE
Definition: pluto.h:202
void Analysis(const Data *d, Grid *grid)
Definition: init.c:66
void Init(double *v, double x1, double x2, double x3)
Definition: init.c:17
void BodyForceVector(double *v, double *g, double x, double y, double z)
Definition: init.c:441