72 static void GetJetValues (
double x1,
double x2,
double x3,
double *vj);
80 void Init (
double *v,
double x1,
double x2,
double x3)
88 double r, z, p0, vjet[256], vamb[256];
96 EXPAND(v[
VX1] = 0.0; ,
101 EXPAND(v[
BX1] = 0.0; ,
135 double *x1, *x2, *x3;
136 double ***bxs, ***bys, ***bzs;
137 double prof, vjet[256], vout[
NVAR];
156 EXPAND(vout[
BX1] *= -1.0; ,
164 prof = (fabs(x1[i]) <= 1.0);
165 VAR_LOOP(nv) d->
Vc[nv][
k][
j][
i] = vout[nv] - (vout[nv] - vjet[nv])*prof;
174 prof = (fabs(x1[i]) <= 1.0);
175 bxs[
k][
j][
i] = vout[
BX1] - (vout[
BX1] - vjet[
BX1])*prof;
191 static int first_call = 1;
192 double bm, b2_av, bphi, lor,
a = 0.5;
193 double r, x,
scrh, sig_z, sig_phi;
199 if (fabs(r) < 1.e-9) r = 1.e-9;
204 EXPAND(vj[
VX1] = 0.0; ,
205 vj[
VX2] = sqrt(1.0 - 1.0/(lor*lor)); ,
212 bm /= a*a*(1.0 - 4.0*log(a) - 2.0*sig_phi);
215 scrh =
MIN(x*x, 1.0);
216 vj[PRS] = pj + bm*bm*(1.0 -
scrh);
218 bphi = bm*(fabs(x) < 1.0 ? x: 1.0/x);
220 #if GEOMETRY == CYLINDRICAL
221 EXPAND(vj[
iBR] = 0.0; ,
222 vj[
iBZ] = sqrt(sig_z*(bm*bm*a*a + 2.0*pj)); ,
223 vj[
iBPHI] = lor*bphi;)
double **** Vs
The main four-index data array used for face-centered staggered magnetic fields.
void UserDefBoundary(const Data *d, RBox *box, int side, Grid *grid)
int vpos
Location of the variable inside the cell.
#define BOX_LOOP(B, k, j, i)
double **** Vc
The main four-index data array used for cell-centered primitive variables.
double g_smallPressure
Small value for pressure fix.
double g_inputParam[32]
Array containing the user-defined parameters.
double * xgc
Cell volumetric centroid (!= x when geometry != CARTESIAN).
D_EXPAND(tot/[n]=(double) grid[IDIR].np_int_glob;, tot/[n]=(double) grid[JDIR].np_int_glob;, tot/[n]=(double) grid[KDIR].np_int_glob;)
void GetJetValues(double, double *)
#define X2_BEG
Boundary region at X2 beg.
long int JBEG
Lower grid index of the computational domain in the the X2 direction for the local processor...
void Analysis(const Data *d, Grid *grid)
void Init(double *v, double x1, double x2, double x3)