20 const double A = 197.0;
21 const double Ra = 6.37;
22 const double dlt = 0.54;
36 prms[0] = sqrt((x +
b / 2.0) * (x +
b / 2.0) + y * y);
37 iff->SetParameters(prms);
38 const double tpp = iff->Integral(-3.0 *
Ra, 3.0 *
Ra, 1.0
e-9);
39 prms[0] = sqrt((x -
b / 2.0) * (x -
b / 2.0) + y * y);
40 iff->SetParameters(prms);
41 const double tmm = iff->Integral(-3.0 *
Ra, 3.0 *
Ra, 1.0
e-9);
43 pow(1. / rho0 * (tpp * (1.0 - pow((1.0 -
sigma * tmm /
A),
A)) +
44 tmm * (1.0 - pow((1.0 -
sigma * tpp /
A),
A))),
49 _rphi =
new double[
nphi];
50 for (
int iphi = 0; iphi <
nphi; iphi++) {
51 double phi = iphi *
C_PI * 2. / (nphi - 1);
52 double r = 0.,
r1 = 0.,
r2 = 2. *
Ra;
53 while (fabs((
r2 -
r1) /
r2) > 0.001 &&
r2 > 0.001) {
55 if (eProfile(r * cos(phi), r * sin(phi)) > 0.5)
66 const double cpi =
C_PI;
67 phi = phi - 2. * cpi * floor(phi / 2. / cpi);
68 int iphi = (int)(phi / (2. * cpi) * (
nphi - 1));
71 return _rphi[iphi] * (1. - (phi / (2. * cpi) * (
nphi - 1) - iphi)) +
72 _rphi[iphi1] * (phi / (2. * cpi) * (
nphi - 1) - iphi);
77 double e, nb, nq,
vx = 0.,
vy = 0.,
vz = 0.;
79 ofstream fvel(
"velocity_debug.txt");
82 double prms2[2], intgr2;
83 cout <<
"finding normalization constant\n";
85 -3.0 *
Ra, 3.0 *
Ra, 2,
"IC",
"Thickness");
88 ff->SetParameters(prms2);
89 intgr2 = ff->Integral(-3.0 *
Ra, 3.0 *
Ra, -3.0 *
Ra, 3.0 *
Ra, 1.0e-9);
91 cerr <<
"IC::setICGlauber Error! ff->Integral == 0; Return -1\n";
96 cout <<
"a = " <<
A / intgr2 << endl;
103 iff->SetParameters(prms);
104 const double tpp = iff->Integral(-3.0 *
Ra, 3.0 *
Ra, 1.0e-9);
105 rho0 = 2.0 * tpp * (1.0 - pow((1.0 -
sigma * tpp /
A),
A));
109 for (
int jj = 0; jj < 5; jj++) cout << rPhi(jj *
C_PI / 2.) <<
" ";
112 double avv_num = 0., avv_den = 0.;
115 for (
int ix = 0; ix < f->
getNX(); ix++)
116 for (
int iy = 0; iy < f->
getNY(); iy++)
117 for (
int iz = 0; iz < f->
getNZ(); iz++) {
119 double x = f->
getX(ix);
120 double y = f->
getY(iy);
123 double eta1 = fabs(eta) < 1.3 ? 0.0 : fabs(eta) - 1.3;
124 etaFactor = exp(-eta1 * eta1 / 2.1 / 2.1) * (fabs(eta) < 5.3 ? 1.0 : 0.0);
125 e = eProfile(x, y) * etaFactor;
126 if (e < 0.5) e = 0.0;
131 avv_num += sqrt(vx * vx +
vy *
vy) *
e;
135 double _p = eos->
p(e, nb, nq, 0.);
136 const double gamma2 = 1.0 / (1.0 - vx * vx - vy * vy -
vz *
vz);
138 ((e + _p) * gamma2 * (cosh(eta) +
vz * sinh(eta)) - _p * cosh(eta));
144 cout <<
"average initial flow = " << avv_num / avv_den << endl;
145 cout <<
"total energy = " << Etotal *f->
getDx() * f->
getDy() * f->
getDz() *
151 double intgrl, prms[4];
155 prms[0] = sqrt(x[0] * x[0] + x[1] * x[1]);
159 iff->SetParameters(prms);
160 intgrl = iff->Integral(-3.0 * p[0], 3.0 * p[0], 1.0
e-9);
166 return p[1] / (exp((sqrt(x[0] * x[0] + p[0] * p[0]) - p[2]) / p[3]) + 1.0);