The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
TransportEuler.c
Go to the documentation of this file.
1 /** \file TransportEuler.c
2 
3 Functions that handle the transport substep of a hydrodynamical time
4 step. The FARGO algorithm is implemented here. The transport is
5 performed in a manner similar to what is done for the ZEUS code (Stone
6 & Norman, 1992), except for the momenta transport (we define a left
7 and right momentum for each zone, which we declare zone centered; we
8 then transport then normally, and deduce the new velocity in each zone
9 by a proper averaging).
10 
11 @author THORIN modifications by
12 Ondřej Chrenko <chrenko@sirrah.troja.mff.cuni.cz>, Copyright (C) 2017;
13 original code by Frédéric Masset
14 
15 */
16 
17 #include "fargo.h"
18 
19 extern real OmegaFrame;
20 
21 static real VMed[MAX1D];
22 static int Nshift[MAX1D];
23 static real *TempShift;
24 
25 static real *dq;
28 
29 extern int TimeStep;
30 extern boolean OpenInner, FastTransport;
31 
32 real LostMass = 0.0;
33 
34 void Transport (Rho, Vrad, Vtheta, Energy, Label, dt) /* #THORIN */
35 PolarGrid *Rho, *Vrad, *Vtheta, *Energy, *Label;
36 real dt;
37 {
38  ComputeLRMomenta (Rho, Vrad, Vtheta);
39  if (AdvecteLabel == YES)
40  ComputeExtQty (Rho, Label, ExtLabel);
41  /* No-Alternate Directionnal Splitting */
42  OneWindRad (Rho, Vrad, Energy, dt); /* #THORIN */
43  OneWindTheta (Rho, Vtheta, Energy, dt); /* #THORIN */
44  ComputeVelocities (Rho, Vrad, Vtheta);
45  if (AdvecteLabel == YES)
46  ComputeSpeQty (Rho, Label, ExtLabel);
47 }
48 
49 void OneWindRad (Rho, Vrad, Energy, dt) /* #THORIN */
50 PolarGrid *Rho, *Vrad, *Energy;
51 real dt;
52 {
53  ComputeStarRad (Rho, Vrad, RhoStar, dt);
54  ActualiseGas (RhoInt, Rho);
55  VanLeerRadial (Vrad, RadMomP, dt);
56  VanLeerRadial (Vrad, RadMomM, dt);
57  VanLeerRadial (Vrad, ThetaMomP, dt);
58  VanLeerRadial (Vrad, ThetaMomM, dt);
59  if (EnergyEq) { /* #THORIN */
60  VanLeerRadial (Vrad, Energy, dt);
61  }
62  if (AdvecteLabel == YES)
63  VanLeerRadial (Vrad, ExtLabel, dt);
64  LostMass += VanLeerRadial (Vrad, Rho, dt); /* MUST be the last line */
65 }
66 
67 
68  /* Hereafter are the new specific procedures to the fast algorithm */
69 
70 void ComputeResiduals (Vtheta, dt)
71 PolarGrid *Vtheta;
72 real dt;
73 {
74  int i,j,l,nr,ns;
75  long nitemp;
76  real *vt, moy, *vtr, Ntilde, Nround;
77  real invdt, dpinvns, vtemp;
78  nr = Vtheta->Nrad;
79  ns = Vtheta->Nsec;
80  vt = Vtheta->Field;
81  vtr= VthetaRes->Field;
82  invdt = 1.0/dt;
83  dpinvns=2.0*PI/(real)ns;
84 #pragma omp parallel for private(j,l, moy, Ntilde, Nround, nitemp, vtemp)
85  for (i = 0; i < nr; i++) {
86  moy = 0.0;
87  for (j = 0; j < ns; j++) {
88  l=j+i*ns;
89  moy += vt[l];
90  }
91  VMed[i] = moy/(real)ns;
92  Ntilde = VMed[i]*InvRmed[i]*dt*(real)ns/2.0/PI;
93  Nround = floor(Ntilde+0.5);
94  nitemp = (long)Nround;
95  Nshift[i] = (long)nitemp;
96  if (FastTransport == YES) {
97  vtemp = (Ntilde-Nround)*Rmed[i]*invdt*dpinvns;
98  for (j = 0; j < ns; j++) {
99  l=j+i*ns;
100  vtr[l] = vt[l]-VMed[i];
101  vt[l] = vtemp;
102  }
103  } else {
104  for (j = 0; j < ns; j++) {
105  l=j+i*ns;
106  vtr[l] = vt[l];
107  vt[l] = 0.0;
108  }
109  }
110  }
111 }
112 
113 void AdvectSHIFT (array)
114 PolarGrid *array;
115 {
116  int i,j,ji,l,li,nr,ns;
117  real *val;
118  val = array->Field;
119  nr = array->Nrad;
120  ns = array->Nsec;
121 #pragma omp parallel for private (j,ji,l,li) default(none) shared(nr,ns,Nshift, val, TempShift)
122  for (i = 0; i < nr; i++) {
123  for (j = 0; j < ns; j++) {
124  ji = j-Nshift[i];
125  while (ji < 0) ji += ns;
126  while (ji >= ns) ji -= ns;
127  li= ji+i*ns;
128  l=j + i*ns;
129  TempShift[l]=val[li];
130  }
131  for (j = 0; j < ns; j++) {
132  l = j+i*ns;
133  val[l] = TempShift[l];
134  }
135  }
136 }
137 
138 void OneWindTheta (Rho, Vtheta, Energy, dt) /* #THORIN */
139 PolarGrid *Rho, *Vtheta, *Energy;
140 real dt;
141 {
142  ComputeResiduals (Vtheta, dt); /* Constant residual is in Vtheta from now on */
143  QuantitiesAdvection (Rho, Energy, VthetaRes, dt); /* #THORIN */
144  if (FastTransport == YES) { /* Useless in standard transport as Vtheta is zero */
145  QuantitiesAdvection (Rho, Energy, Vtheta, dt); /* Uniform Transport here */ /* #THORIN */
146  AdvectSHIFT (RadMomP);
147  AdvectSHIFT (RadMomM);
148  AdvectSHIFT (ThetaMomP);
149  AdvectSHIFT (ThetaMomM);
150  if (EnergyEq == YES)
151  AdvectSHIFT (Energy);
152  if (AdvecteLabel == YES)
153  AdvectSHIFT (ExtLabel);
154  AdvectSHIFT (Rho);
155  }
156 }
157  /* End of new specific procedures to the fast algorithm */
158 
159 void QuantitiesAdvection (Rho, Energy, Vtheta, dt) /* #THORIN */
160 PolarGrid *Rho, *Energy, *Vtheta;
161 real dt;
162 {
163  ComputeStarTheta (Rho, Vtheta, RhoStar, dt);
164  ActualiseGas (RhoInt, Rho);
165  VanLeerTheta (Vtheta, RadMomP, dt);
166  VanLeerTheta (Vtheta, RadMomM, dt);
167  VanLeerTheta (Vtheta, ThetaMomP, dt);
168  VanLeerTheta (Vtheta, ThetaMomM, dt);
169  if (EnergyEq) {
170  VanLeerTheta (Vtheta, Energy, dt);
171  }
172  if (AdvecteLabel == YES)
173  VanLeerTheta (Vtheta, ExtLabel, dt);
174  VanLeerTheta (Vtheta, Rho, dt); /* MUST be the last line */
175 }
176 
177 void ComputeExtQty (Rho, Label, ExtLabel)
178 PolarGrid *Rho, *Label, *ExtLabel;
179 {
180  int i,j,l,nr,ns;
181  real *rho, *lab, *extlab;
182  nr = Rho->Nrad;
183  ns = Rho->Nsec;
184  rho= Rho->Field;
185  lab= Label->Field;
186  extlab= ExtLabel->Field;
187 #pragma omp parallel for private(j,l)
188  for (i = 0; i < nr; i++) {
189  for (j = 0; j < ns; j++) {
190  l = j+i*ns;
191  extlab[l] = rho[l]*lab[l]; /* compressive flow if line commentarized
192  extlab[l] = lab[l]; */
193  }
194  }
195 }
196 
197 void ComputeSpeQty (Rho, Label, ExtLabel)
198 PolarGrid *Rho, *Label, *ExtLabel;
199 {
200  int i,j,l,nr,ns;
201  real *rho, *lab, *extlab;
202  nr = Rho->Nrad;
203  ns = Rho->Nsec;
204  rho= Rho->Field;
205  lab= Label->Field;
206  extlab= ExtLabel->Field;
207 #pragma omp parallel for private(j,l)
208  for (i = 0; i < nr; i++) {
209  for (j = 0; j < ns; j++) {
210  l = j+i*ns;
211  lab[l] = extlab[l]/rho[l]; /* compressive flow if line commentarized
212  lab[l] = extlab[l]; */
213  }
214  }
215 }
216 
218 {
219  RadMomP = CreatePolarGrid(NRAD, NSEC, "RadMomP");
220  RadMomM = CreatePolarGrid(NRAD, NSEC, "RadMomM");
221  ThetaMomP = CreatePolarGrid(NRAD, NSEC, "ThetaMomP");
222  ThetaMomM = CreatePolarGrid(NRAD, NSEC, "ThetaMomM");
223  Work = CreatePolarGrid(NRAD, NSEC, "WorkGrid");
224  QRStar = CreatePolarGrid(NRAD, NSEC, "QRStar");
225  ExtLabel = CreatePolarGrid(NRAD, NSEC, "ExtLabel");
226  VthetaRes = CreatePolarGrid(NRAD, NSEC, "VThetaRes");
227  Elongations = CreatePolarGrid(NRAD, NSEC, "Elongations");
228  TempShift = (real *)malloc(NRAD*NSEC*sizeof(real));
229  dq = (real *)malloc(NRAD*NSEC*sizeof(real));
230 }
231 
232 void ComputeStarRad (Qbase, Vrad, QStar, dt)
233 PolarGrid *Qbase, *Vrad, *QStar;
234 real dt;
235 {
236  int i,j,l,lq,lip,lim,nr,ns;
237  real *qb, *qs, *vr;
238  real dqp, dqm;
239  nr = Qbase->Nrad;
240  ns = Qbase->Nsec;
241  qb = Qbase->Field;
242  qs = QStar->Field;
243  vr = Vrad->Field;
244 #pragma omp parallel for private (i,l,lq,lip,lim,dqm,dqp)
245  for (j = 0; j < ns; j++) {
246  for (i = 0; i < nr; i++) {
247  l = j+i*ns;
248  lq= i+j*nr;
249  lip = l+ns;
250  lim = l-ns;
251  if ((i == 0) || (i == nr-1)) dq[lq] = 0.0;
252  else {
253  dqm = (qb[l]-qb[lim])*InvDiffRmed[i];
254  dqp = (qb[lip]-qb[l])*InvDiffRmed[i+1];
255  if (dqp * dqm > 0.0)
256  dq[lq] = 2.0*dqp*dqm/(dqp+dqm);
257  else
258  dq[lq] = 0.0;
259  }
260  }
261  for (i = 0; i < nr; i++) {
262  l = j+i*ns;
263  lq= i+j*nr;
264  lip = l+ns;
265  lim = l-ns;
266  if (vr[l] > 0.0)
267  qs[l] = qb[lim]+(Rmed[i]-Rmed[i-1]-vr[l]*dt)*0.5*dq[lq-1];
268  else
269  qs[l] = qb[l]-(Rmed[i+1]-Rmed[i]+vr[l]*dt)*0.5*dq[lq];
270  }
271  qs[j] = qs[j+ns*nr] = 0.0;
272  }
273 }
274 
275 void ComputeStarTheta (Qbase, Vtheta, QStar, dt)
276 PolarGrid *Qbase, *Vtheta, *QStar;
277 real dt;
278 {
279  int i,j,l,ljp,ljm,jm,nr,ns;
280  real *qb, *qs, *vt;
281  real dqp, dqm,dxtheta,ksi,invdxtheta;
282  nr = Qbase->Nrad;
283  ns = Qbase->Nsec;
284  qb = Qbase->Field;
285  qs = QStar->Field;
286  vt = Vtheta->Field;
287 #pragma omp parallel for private (dxtheta,invdxtheta,l,j,ljp,ljm,dqm,dqp,jm,ksi)
288  for (i = 0; i < nr; i++) {
289  dxtheta = 2.0*PI/(real)ns*Rmed[i];
290  invdxtheta = 1.0/dxtheta;
291  for (j = 0; j < ns; j++) {
292  l = j+i*ns;
293  ljp = l+1;
294  ljm = l-1;
295  if (j == 0) ljm = i*ns+ns-1;
296  if (j == ns-1) ljp = i*ns;
297  dqm = (qb[l]-qb[ljm]);
298  dqp = (qb[ljp]-qb[l]);
299  if (dqp * dqm > 0.0)
300  dq[l] = dqp*dqm/(dqp+dqm)*invdxtheta;
301  else
302  dq[l] = 0.0;
303  }
304  for (j = 0; j < ns; j++) {
305  l = j+i*ns;
306  jm = j-1;
307  if (j == 0) jm = ns-1;
308  ljm = jm+i*ns;
309  ksi=vt[l]*dt;
310  if (ksi > 0.0)
311  qs[l] = qb[ljm]+(dxtheta-ksi)*dq[ljm];
312  else
313  qs[l] = qb[l]-(dxtheta+ksi)*dq[l];
314  }
315  }
316 }
317 
318 void ComputeLRMomenta (Rho, Vrad, Vtheta)
319 PolarGrid *Rho, *Vrad, *Vtheta;
320 {
321  int i,j,l,lip,ljp,nr,ns;
322  real *vr,*vt,*rho;
323  real *rp, *rm, *tp, *tm;
324  nr = Vrad->Nrad;
325  ns = Vrad->Nsec;
326  rho= Rho->Field;
327  vr = Vrad->Field;
328  vt = Vtheta->Field;
329  rp = RadMomP->Field;
330  rm = RadMomM->Field;
331  tp = ThetaMomP->Field;
332  tm = ThetaMomM->Field;
333 #pragma omp parallel for private(j,l,lip,ljp)
334  for (i = 0; i < nr; i++) {
335  for (j = 0; j < ns; j++) {
336  l = j+i*ns;
337  lip = l+ns;
338  ljp = l+1;
339  if (j == ns-1)
340  ljp = i*ns;
341  rp[l] = rho[l]*vr[lip];
342  rm[l] = rho[l]*vr[l];
343  tp[l] = rho[l]*(vt[ljp]+Rmed[i]*OmegaFrame)*Rmed[i]; /* it is the angular momentum */
344  tm[l] = rho[l]*(vt[l]+Rmed[i]*OmegaFrame)*Rmed[i];
345  }
346  }
347 }
348 
349 
350 void ComputeVelocities (Rho, Vrad, Vtheta)
351 PolarGrid *Rho, *Vrad, *Vtheta;
352 {
353  int i,j,l,lim,ljm,nr,ns;
354  real *vr,*vt,*rho;
355  real *rp, *rm, *tp, *tm;
356  nr = Vrad->Nrad;
357  ns = Vrad->Nsec;
358  rho= Rho->Field;
359  vr = Vrad->Field;
360  vt = Vtheta->Field;
361  rp = RadMomP->Field;
362  rm = RadMomM->Field;
363  tp = ThetaMomP->Field;
364  tm = ThetaMomM->Field;
365 #pragma omp parallel for private(j,l,lim,ljm)
366  for (i = 0; i < nr; i++) {
367  for (j = 0; j < ns; j++) {
368  l = j+i*ns;
369  lim = l-ns;
370  ljm = l-1;
371  if (j == 0)
372  ljm = i*ns+ns-1;
373  if (i == 0)
374  vr[l] = 0.0;
375  else
376  vr[l] = (rp[lim]+rm[l])/(rho[l]+rho[lim]+1e-20);
377  vt[l] = (tp[ljm]+tm[l])/(rho[l]+rho[ljm]+1e-15)/Rmed[i]-Rmed[i]*OmegaFrame;
378  /* It was the angular momentum */
379  }
380  }
381 }
382 
383 
384 real VanLeerRadial (Vrad, Qbase, dt) /* #THORIN */
385 PolarGrid *Vrad, *Qbase;
386 real dt;
387 {
388  int i,j,nr,ns,l,lip;
389  real *qrs, *rhos, *vr, *qb;
390  real dtheta, varq;
391  real LostByDisk=0.0;
392  DivisePolarGrid (Qbase, RhoInt, Work);
393  ComputeStarRad (Work, Vrad, QRStar, dt);
394  nr = Qbase->Nrad;
395  ns = Qbase->Nsec;
396  qrs = QRStar->Field;
397  rhos = RhoStar->Field;
398  vr = Vrad->Field;
399  qb= Qbase->Field;
400  dtheta = 2.0*PI/(real)ns;
401 /* #THORIN: 'atomic' construct is now replaced with 'reduction' construct */
402 #pragma omp parallel for private(j,l,lip,varq) reduction(+ : LostByDisk)
403  for (i = 0; i < nr; i++) {
404  for (j = 0; j < ns; j++) {
405  l=j+i*ns;
406  lip=l+ns;
407  varq =dt*dtheta*Rinf[i]*qrs[l]*rhos[l]*vr[l];
408  varq-=dt*dtheta*Rsup[i]*qrs[lip]*rhos[lip]*vr[lip];
409  qb[l] += varq*InvSurf[i];
410  if ((i == 0) && (OpenInner == YES))
411  LostByDisk += varq; /* #THORIN: atomic used to be here */
412  }
413  }
414  return LostByDisk;
415 }
416 
417 void VanLeerTheta (Vtheta, Qbase, dt)
418 PolarGrid *Vtheta, *Qbase;
419 real dt;
420 {
421  int i,j,nr,ns,l,ljp;
422  real *qrs, *rhos, *vt, *qb;
423  real dxrad, varq, invsurf;
424  DivisePolarGrid (Qbase, RhoInt, Work);
425  ComputeStarTheta (Work, Vtheta, QRStar, dt);
426  nr = Qbase->Nrad;
427  ns = Qbase->Nsec;
428  qrs = QRStar->Field;
429  rhos = RhoStar->Field;
430  vt = Vtheta->Field;
431  qb= Qbase->Field;
432 #pragma omp parallel for private(dxrad,invsurf,j,l,ljp,varq)
433  for (i = 0; i < nr; i++) {
434  dxrad = (Rsup[i]-Rinf[i])*dt;
435  invsurf = 1.0/Surf[i];
436  for (j = 0; j < ns; j++) {
437  l=j+i*ns;
438  ljp=l+1;
439  if (j == ns-1) ljp=i*ns;
440  varq = dxrad*qrs[l]*rhos[l]*vt[l];
441  varq -= dxrad*qrs[ljp]*rhos[ljp]*vt[ljp];
442  qb[l] += varq*invsurf;
443  }
444  }
445 }
446 
447 /** An alternative to Transport() function for
448  * the 2nd fluid. */
449 void TransportPebbles (Rho, Vrad, Vtheta, dt) /* #THORIN */
450 PolarGrid *Rho, *Vrad, *Vtheta;
451 real dt;
452 {
453  ComputeLRMomenta (Rho, Vrad, Vtheta);
454  OneWindRadPebbles (Rho, Vrad, dt);
455  OneWindThetaPebbles (Rho, Vtheta, dt);
456  ComputeVelocities (Rho, Vrad, Vtheta);
457 }
458 
459 /** An alternative to OneWindRad() function for
460  * the 2nd fluid. */
461 void OneWindRadPebbles (Rho, Vrad, dt) /* #THORIN */
462 PolarGrid *Rho, *Vrad;
463 real dt;
464 {
465  ComputeStarRad (Rho, Vrad, RhoStar, dt);
466  ActualiseGas (RhoInt, Rho);
467  VanLeerRadial (Vrad, RadMomP, dt);
468  VanLeerRadial (Vrad, RadMomM, dt);
469  VanLeerRadial (Vrad, ThetaMomP, dt);
470  VanLeerRadial (Vrad, ThetaMomM, dt);
471  VanLeerRadial (Vrad, Rho, dt); /* MUST be the last line */
472 }
473 
474 /** An alternative to OneWindTheta() function for
475  * the 2nd fluid. */
476 void OneWindThetaPebbles (Rho, Vtheta, dt) /* #THORIN */
477 PolarGrid *Rho, *Vtheta;
478 real dt;
479 {
480  ComputeResiduals (Vtheta, dt);
481  QuantitiesAdvectionPebbles (Rho, VthetaRes, dt);
482  if (FastTransport == YES) {
483  QuantitiesAdvectionPebbles (Rho, Vtheta, dt);
484  AdvectSHIFT (RadMomP);
485  AdvectSHIFT (RadMomM);
486  AdvectSHIFT (ThetaMomP);
487  AdvectSHIFT (ThetaMomM);
488  AdvectSHIFT (Rho);
489  }
490 }
491 
492 /** An alternative to QuantitiesAdvection() function for
493  * the 2nd fluid. */
494 void QuantitiesAdvectionPebbles (Rho, Vtheta, dt) /* #THORIN */
495 PolarGrid *Rho, *Vtheta;
496 real dt;
497 {
498  ComputeStarTheta (Rho, Vtheta, RhoStar, dt);
499  ActualiseGas (RhoInt, Rho);
500  VanLeerTheta (Vtheta, RadMomP, dt);
501  VanLeerTheta (Vtheta, RadMomM, dt);
502  VanLeerTheta (Vtheta, ThetaMomP, dt);
503  VanLeerTheta (Vtheta, ThetaMomM, dt);
504  VanLeerTheta (Vtheta, Rho, dt); /* MUST be the last line */
505 }
double real
Definition of the type 'real' used throughout the code.
Definition: types.h:20
real InvDiffRmed[MAX1D]
Definition: global.h:12
real OmegaFrame
Definition: global.h:20
static PolarGrid * Elongations
real Rsup[MAX1D]
Definition: global.h:11
boolean FastTransport
Definition: Interpret.c:29
#define YES
Definition: types.h:46
void QuantitiesAdvection(PolarGrid *Rho, PolarGrid *Energy, PolarGrid *Vtheta, real dt)
static PolarGrid * RadMomP
static PolarGrid * ThetaMomM
void TransportPebbles(PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta, real dt)
An alternative to Transport() function for the 2nd fluid.
PolarGrid * CreatePolarGrid(int Nr, int Ns, char *name)
Definition: LowTasks.c:73
void ComputeVelocities(PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta)
static PolarGrid * ExtLabel
static PolarGrid * ThetaMomP
A structure used to store any scalar fied on the computational domain.
Definition: types.h:37
void Transport(PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta, PolarGrid *Energy, PolarGrid *Label, real dt)
void ComputeResiduals(PolarGrid *Vtheta, real dt)
void ComputeExtQty(PolarGrid *Rho, PolarGrid *Label, PolarGrid *ExtLabel)
real * Field
Definition: types.h:40
void ComputeLRMomenta(PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Vtheta)
static PolarGrid * QRStar
real InvSurf[MAX1D]
Definition: global.h:12
int Nrad
Radial size of the grid, in number of zones.
Definition: types.h:38
real Rmed[MAX1D]
Definition: global.h:11
void VanLeerTheta(PolarGrid *Vtheta, PolarGrid *Qbase, real dt)
void ActualiseGas()
void QuantitiesAdvectionPebbles(PolarGrid *Rho, PolarGrid *Vtheta, real dt)
An alternative to QuantitiesAdvection() function for the 2nd fluid.
static real VMed[MAX1D]
boolean EnergyEq
Definition: global.h:24
void ComputeStarRad(PolarGrid *Qbase, PolarGrid *Vrad, PolarGrid *QStar, real dt)
void OneWindTheta(PolarGrid *Rho, PolarGrid *Vtheta, PolarGrid *Energy, real dt)
static real * dq
void ComputeStarTheta(PolarGrid *Qbase, PolarGrid *Vtheta, PolarGrid *QStar, real dt)
static PolarGrid * Work
static real * TempShift
static PolarGrid * VthetaRes
void AdvectSHIFT(PolarGrid *array)
static PolarGrid * RadMomM
void ComputeSpeQty(PolarGrid *Rho, PolarGrid *Label, PolarGrid *ExtLabel)
boolean AdvecteLabel
Definition: global.h:29
int NSEC
Definition: param_noex.h:19
real LostMass
boolean OpenInner
Definition: main.c:14
real Surf[MAX1D]
Definition: global.h:11
PolarGrid * RhoStar
Definition: global.h:34
real VanLeerRadial(PolarGrid *Vrad, PolarGrid *Qbase, real dt)
void OneWindRad(PolarGrid *Rho, PolarGrid *Vrad, PolarGrid *Energy, real dt)
int NRAD
Definition: param_noex.h:18
void OneWindRadPebbles(PolarGrid *Rho, PolarGrid *Vrad, real dt)
An alternative to OneWindRad() function for the 2nd fluid.
Contains all the include directives requested by the code.
real Rinf[MAX1D]
Definition: global.h:11
static int Nshift[MAX1D]
void DivisePolarGrid()
void OneWindThetaPebbles(PolarGrid *Rho, PolarGrid *Vtheta, real dt)
An alternative to OneWindTheta() function for the 2nd fluid.
real Energy()
real InvRmed[MAX1D]
Definition: global.h:12
PolarGrid * RhoInt
Definition: global.h:34
#define PI
Definition: fondam.h:12
#define MAX1D
Definition: types.h:65
void InitTransport()
int TimeStep
Definition: global.h:23