133 static double Profile (
double,
double);
135 static double a = 0.8;
139 void Init (
double *v,
double x1,
double x2,
double x3)
145 static int first_call = 1;
147 static double veq[
NVAR];
155 #if COOLING == H2_COOL
166 EXPAND(v[
BX1] = 0.0; ,
175 #if COOLING == H2_COOL
210 double *x1, *x2, *x3;
211 double r, vjet[256], vout[
NVAR],
q;
239 EXPAND(vout[
BX1] *= -1.0; ,
244 d->
Vc[nv][
k][
j][
i] = vout[nv]-(vout[nv]-vjet[nv])*
Profile(x1[i], nv);
275 static int first_call = 1;
276 static double veq[
NVAR];
277 double Bz, Bm = 0.0, x;
279 if (fabs(R) < 1.e-9) R = 1.e-9;
286 EXPAND( vj[
BX1] = 0.0; ,
288 vj[
BX3] = -Bm*(x < 1.0 ? x:1.0/x);)
292 EXPAND( vj[
VX1] = 0.0; ,
296 vj[PRS] = pa + Bm*Bm*(1.0 -
MIN(x*x,1.0));
300 static double Tj,muj;
301 #if COOLING == H2_COOL
324 double R4 = R*R*R*R, R8 = R4*R4;
326 #if PHYSICS == MHD && COMPONENTS == 3
327 if (
g_time < 0.1)
return 1.0/cosh(R4);
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.
void CompEquil(double n, double T, double *v)
#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.
#define UNIT_VELOCITY
Unit velocity in cm/sec.
#define UNIT_LENGTH
Unit Length in cm.
double g_inputParam[32]
Array containing the user-defined parameters.
double * xgc
Cell volumetric centroid (!= x when geometry != CARTESIAN).
double g_minCoolingTemp
The minimum temperature (in K) below which cooling is suppressed.
static double Profile(double, double)
double MeanMolecularWeight(double *V)
void GetJetValues(double, double *)
double g_time
The current integration time.
#define X2_BEG
Boundary region at X2 beg.
double g_maxCoolingRate
The maximum fractional variation due to cooling from one step to the next.
long int JBEG
Lower grid index of the computational domain in the the X2 direction for the local processor...
double * A
Right interface area, A[i] = .
void Analysis(const Data *d, Grid *grid)
void Init(double *v, double x1, double x2, double x3)