22if (currentStep % 1 == 0)
26 std::vector<double> scale =
scales;
29 std::string circFileName = getPassport().dir +
"circ";
34 std::ofstream circFile(circFileName.c_str());
38 std::stringstream ssCirc;
39 ssCirc <<
"step time scale";
45 circFile << std::endl;
50 for (
int c = 0; c < scale.size(); ++c)
52 std::vector<double> circRad(rad.size(), 0.0);
64 for (
size_t i = 0; i < rad.size(); ++i)
69#pragma omp parallel for default(none) private(L,gam,epsAst) shared(R,nPts,delta,c,scale) reduction(+:curCirc) schedule(dynamic,100)
70 for (
int j = 0; j < (int)
wake->vtx.size(); ++j)
72 L =
wake->vtx[j].r().length();
73 gam =
wake->vtx[j].g();
74 epsAst = scale[c] * velocity->wakeVortexesParams.epsastWake[j];
76 if (R - L > delta * epsAst)
78 else if (R - L > -delta * epsAst)
80 double h = fabs(R - L);
83 double phi = atan(h / sqrt(delta * delta * epsAst * epsAst - h * h));
84 double deltaPhi = (
PI - 2.0 * phi) / nPts;
88 auto func = [h, epsAst, delta](
double phi) ->
double
90 return (
IDPI / epsAst) * (exp(h / (epsAst * sin(phi))) * (epsAst - h / sin(phi)) - exp(-delta) * (1 + delta));
93 for (
int s = 0; s < nPts; ++s)
95 double valAngle = -phi - deltaPhi * (s + 0.5);
97 addCirc += func(valAngle) * deltaPhi;
104 curCirc += (gam - addCirc);
107 curCirc += 0.5 * gam;
111 circRad[i] = curCirc;
115 std::ofstream circFile(circFileName.c_str(), std::ios::app);
117 circFile << currentStep <<
" " << getCurrentTime() <<
" " << scale[c];
119 for (
auto gamma : circRad)
120 circFile <<
" " << gamma;
121 circFile << std::endl;
void PrintLogoToTextFile(std::ofstream &str, const std::string &fileName, const std::string &descr)
Формирование заголовка файла программы VM2D/VM3D.