VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
Mechanics2DDeformable.cpp
Go to the documentation of this file.
1/*--------------------------------*- VM2D -*-----------------*---------------*\
2| ## ## ## ## #### ##### | | Version 1.14 |
3| ## ## ### ### ## ## ## ## | VM2D: Vortex Method | 2026/03/06 |
4| ## ## ## # ## ## ## ## | for 2D Flow Simulation *----------------*
5| #### ## ## ## ## ## | Open Source Code |
6| ## ## ## ###### ##### | https://www.github.com/vortexmethods/VM2D |
7| |
8| Copyright (C) 2017-2026 I. Marchevsky, K. Sokol, E. Ryatina, A. Kolganova |
9*-----------------------------------------------------------------------------*
10| File name: Mechanics2DDeformable.cpp |
11| Info: Source code of VM2D |
12| |
13| This file is part of VM2D. |
14| VM2D is free software: you can redistribute it and/or modify it |
15| under the terms of the GNU General Public License as published by |
16| the Free Software Foundation, either version 3 of the License, or |
17| (at your option) any later version. |
18| |
19| VM2D is distributed in the hope that it will be useful, but WITHOUT |
20| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
22| for more details. |
23| |
24| You should have received a copy of the GNU General Public License |
25| along with VM2D. If not, see <http://www.gnu.org/licenses/>. |
26\*---------------------------------------------------------------------------*/
27
28
42
43#include "Airfoil2D.h"
44#include "Airfoil2DDeformable.h"
45#include "Boundary2D.h"
46#include "MeasureVP2D.h"
47#include "StreamParser.h"
48#include "Velocity2D.h"
49#include "Wake2D.h"
50#include "World2D.h"
51#include "Gmres2D.h"
52
53using namespace VM2D;
54
55
56Beam::Beam(const World2D& W_, bool fsi_, double x0_, double L_, int R_) :
57 W(W_),
58 fsi(fsi_),
59 //filament
60 /*
61 rho(10000.0),
62 F(0.04),
63 EJ(1.0 * 1.0),
64 */
65
66 //Turek
67 rho(10000.0),
68 F(0.02),
69 EJ(1.17032),
70
71 R(R_),
72 x0(x0_),
73 L(L_)
74{
75 qCoeff.resize(R);
76 currentPhi.resize(R);
77 currentDPhi.resize(R);
79};
80
81double Beam::phi(int n, double t) const
82{
83 return currentPhi[n];
84}
85
86void Beam::solveDU(int n, double dt)
87{
88 double cm = rho * F;
89 double ck = EJ * sqr(sqr(unitLambda[n] / L));
90 double cq = qCoeff[n];
91
92 double omega = sqrt(ck / cm);
93 double cDamp = 0.0;
94
95 double phiAst = currentPhi[n] + 0.5 * dt * currentDPhi[n];
96 double psiAst = currentDPhi[n] + 0.5 * dt * (-ck * currentPhi[n] - cDamp * omega * currentDPhi[n] - cq) / cm;
97
98 currentPhi[n] += dt * psiAst;
99 currentDPhi[n] += dt * (-ck * phiAst - cDamp * omega * psiAst - cq) / cm;
100
101 //std::cout << "n = " << n << std::endl;
102 //std::cout << "ck / cm = " << ck / cm << std::endl;
103 //std::cout << "cq / cm = " << cq / cm << std::endl;
104 //std::cout << "lam = " << unitLambda[n] / L << std::endl;
105}
106
107void Beam::solveDU_RK(int n, double dt) {
108 double cm = rho * F;
109 double ck = EJ * sqr(sqr(unitLambda[n] / L));
110 double cq = qCoeff[n];
111
112 double omega = sqrt(ck / cm);
113 double cDamp = 0.0;
114
115 auto acceleration = [&](double phi, double dphi) {
116 return (-ck * phi - cDamp * omega * dphi - cq) / cm;
117 };
118
119 double phi = currentPhi[n];
120 double dphi = currentDPhi[n];
121
122 double k1_phi = dphi;
123 double k1_dphi = acceleration(phi, dphi);
124
125 double k2_phi = dphi + 0.5 * dt * k1_dphi;
126 double k2_dphi = acceleration(phi + 0.5 * dt * k1_phi, dphi + 0.5 * dt * k1_dphi);
127
128 double k3_phi = dphi + 0.5 * dt * k2_dphi;
129 double k3_dphi = acceleration(phi + 0.5 * dt * k2_phi, dphi + 0.5 * dt * k2_dphi);
130
131 double k4_phi = dphi + dt * k3_dphi;
132 double k4_dphi = acceleration(phi + dt * k3_phi, dphi + dt * k3_dphi);
133
134 currentPhi[n] = phi + (dt / 6.0) * (k1_phi + 2 * k2_phi + 2 * k3_phi + k4_phi);
135 currentDPhi[n] = dphi + (dt / 6.0) * (k1_dphi + 2 * k2_dphi + 2 * k3_dphi + k4_dphi);
136
137 std::cout << "phi = " << currentPhi[n] << std::endl;
138}
139
140
141double Beam::getTotalDisp(double x, double t) const
142{
143 double result = 0.0;
144 for (int i = 0; i < R; ++i)
145 result += phi(i, t) * shape(i, x);
146 return result;
147}
148
149
150//deformParam = {f, alpha, lambda, c1, c2};
151
152double Beam::getGivenLaw(double x, double t, const std::vector<double>& deformParam) const //имитатор деформации упругой линии
153{
154 const double c1 = deformParam[3];
155 const double c2 = deformParam[4];
156 double alpha;
157
158 if (fsi) //Turek
159 alpha = 0.0; //Turek
160 else
161 alpha = deformParam[1]; //Fish
162
163
164 const double lambda = deformParam[2];
165 const double length = 1.0;
166 const double f = deformParam[0];
167 if (!fsi && (f == 0))
168 alpha = 0.0;
169
170 auto A = [c1, c2](double xi) {return 1.0 + (xi - 1.0) * c1 + (xi * xi - 1.0) * c2;};
171
172 //double result = alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
173 double result = W.getPassport().physicalProperties.accelCft(t) * alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
174
175 return result;
176}
177
178
179
180
181MechanicsDeformable::MechanicsDeformable(const World2D& W_, size_t numberInPassport_)
182 :
183 Mechanics(W_, numberInPassport_, true, true)
184{
185 const auto& airfoil = W_.getAirfoil(numberInPassport_);
186
187 Vcm0 = { 0.0, 0.0 };
188 Rcm0 = { airfoil.rcm[0], airfoil.rcm[1] };
189 Vcm = Vcm0;
190 Rcm = Rcm0;
191 VcmOld = Vcm0;
192 RcmOld = Rcm;
193
194
196
197 Point2D zero = { 0.0, 0.0 };
198
199 Initialize(zero, airfoil.rcm + zero, 0.0, airfoil.phiAfl + 0.0);
200
201 if (airfoil.phiAfl != 0)
202 {
203 W.getInfo('e') << "Airfoil rotation for Turek problem is not allowed" << std::endl;
204 exit(2345);
205 }
206
207 if (fsi)
208 {
209 //Turek
210 //Выделение упругой хорды
212 double x0 = airfoil.getR(indexOfUpperRightAngle)[0];
213 double x1 = x0;
214 while (fabs(x1 - x0) < 1e-12)
215 {
217 x0 = x1;
218 x1 = airfoil.getR(indexOfUpperRightAngle)[0];
219 }
221
223 for (size_t i = 0; i < upperShifts.size(); ++i)
224 upperShifts[i] = airfoil.getR(i + 1)[1] - airfoil.getR(0)[1];
225
226
228 double y0 = airfoil.getR(indexOfUpperLeftAngle)[1];
229 double y1 = y0;
230 while (fabs(y1 - y0) < 1e-12)
231 {
233 y0 = y1;
234 y1 = airfoil.getR(indexOfUpperLeftAngle)[1];
235 }
237
238
239 indexOfLowerRightAngle = airfoil.getNumberOfPanels() + 1;
240 x0 = airfoil.getR(indexOfLowerRightAngle)[0];
241 x1 = x0;
242 while (fabs(x1 - x0) < 1e-12)
243 {
245 x0 = x1;
246 x1 = airfoil.getR(indexOfLowerRightAngle)[0];
247 }
249
250
251 lowerShifts.resize(airfoil.getNumberOfPanels() - indexOfLowerRightAngle - 1);
252 for (size_t i = 0; i < lowerShifts.size(); ++i)
253 lowerShifts[i] = airfoil.getR(airfoil.getNumberOfPanels() - 1 - i)[1] - airfoil.getR(0)[1];
254
256 y0 = airfoil.getR(indexOfLowerLeftAngle)[1];
257 y1 = y0;
258 while (fabs(y1 - y0) < 1e-12)
259 {
261 y0 = y1;
262 y1 = airfoil.getR(indexOfLowerLeftAngle)[1];
263 }
265
266 //W.getInfo('i') << "UR: " << airfoil.getR(indexOfUpperRightAngle) << std::endl;
267 //W.getInfo('i') << "UL: " << airfoil.getR(indexOfUpperLeftAngle) << std::endl;
268 //W.getInfo('i') << "LR: " << airfoil.getR(indexOfLowerRightAngle) << std::endl;
269 //W.getInfo('i') << "LL: " << airfoil.getR(indexOfLowerLeftAngle) << std::endl;
270
272 {
273 W.getInfo('e') << "indexOfUpperLeftAngle - indexOfUpperRightAngle != indexOfLowerRightAngle - indexOfLowerLeftAngle" << std::endl;
274 exit(2346);
275 }
276
278
279 for (size_t i = 0; i < indexOfUpperLeftAngle - indexOfUpperRightAngle; ++i)
280 {
281 size_t idxUp = indexOfUpperLeftAngle - 1 - i;
282 size_t idxDn = indexOfLowerLeftAngle + i;
283 Point2D rUpLeft = airfoil.getR(idxUp + 1);
284 Point2D rUpRight = airfoil.getR(idxUp);
285 Point2D rDnLeft = airfoil.getR(idxDn);
286 Point2D rDnRight = airfoil.getR(idxDn + 1);
287
288 if (std::max(fabs(rUpLeft[0] - rDnLeft[0]), fabs(rUpRight[0] - rDnRight[0])) > \
289 0.01 * std::min((rUpRight[0] - rUpLeft[0]), (rDnRight[0] - rDnLeft[0])))
290 {
291 W.getInfo('e') << "x_up != x_dn" << std::endl;
292 exit(2347);
293 }
294
295 chord[i].beg = 0.5 * (rUpLeft + rDnLeft);
296 chord[i].end = 0.5 * (rUpRight + rDnRight);
297 chord[i].infPanels = { idxUp, idxDn };
298 chord[i].rightSemiWidth = 0.5 * (rUpRight - rDnRight)[1];
299 }
301 beam = std::make_unique<Beam>(W, fsi, chord[0].beg[0], initialChord.back().end[0] - initialChord[0].beg[0], 3); //Beam
302 }
303 else //Fish
304 {
305 int np = (int)airfoil.getNumberOfPanels();
306 chord.resize(np / 2);
307
308 chord[0].beg = airfoil.getR(np / 2);
309 chord[np / 2 - 1].end = airfoil.getR(0);
310 chord[np / 2 - 1].rightSemiWidth = 0.0;
311
312 for (size_t i = 0; i < np / 2; ++i)
313 {
314 if (i != 0)
315 chord[i].beg = 0.5 * (airfoil.getR(np / 2 - i) + airfoil.getR(np / 2 + i));
316
317 if (i != np / 2 - 1)
318 chord[i].end = 0.5 * (airfoil.getR(np / 2 - i - 1) + airfoil.getR(np / 2 + i + 1));
319
320 chord[i].infPanels = { np / 2 - i, np / 2 + i + 1 };
321
322 if (i != np / 2 - 1)
323 chord[i].rightSemiWidth = (airfoil.getR(np / 2 - i - 1) - airfoil.getR(np / 2 + i + 1)).length() * 0.5;
324 }
326 beam = std::make_unique<Beam>(W, fsi, chord[0].beg[0], initialChord.back().end[0] - initialChord[0].beg[0], 3); //Beam
327 }
328
329 //std::ofstream of("chord.txt");
330 //for (size_t i = 0; i < chord.size(); ++i)
331 // of << chord[i].beg[0] << " " << chord[i].beg[1] << " " << chord[i].end[0] << " " << chord[i].end[1] << " " << chord[i].infPanels.first << " " << chord[i].infPanels.second << std::endl;
332 //of.close();
333
334
335
336 initialPossibleWays = airfoil.possibleWays;
337};
338
339//Вычисление гидродинамической силы, действующей на профиль
341{
342 W.getTimers().start("Force");
343
344 const double& dt = W.getPassport().timeDiscretizationProperties.dt;
345
346 hydroDynamForce = { 0.0, 0.0 };
347 hydroDynamMoment = 0.0;
348
349 viscousForce = { 0.0, 0.0 };
350 viscousMoment = 0.0;
351
352 Point2D hDFGam = { 0.0, 0.0 }; //гидродинамические силы, обусловленные присоед.завихренностью
353 Point2D hDFdelta = { 0.0, 0.0 }; //гидродинамические силы, обусловленные приростом завихренности
354 Point2D hDFQ = { 0.0, 0.0 }; //гидродинамические силы, обусловленные присоед.источниками
355
356 double hDMGam = 0.0; //гидродинамический момент, обусловленный присоед.завихренностью
357 double hDMdelta = 0.0; //гидродинамический момент, обусловленный приростом завихренности
358 double hDMQ = 0.0; //гидродинамический момент, обусловленный присоед.источниками
359 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
360 {
361 Point2D rK = 0.5 * (afl.getR(i + 1) + afl.getR(i)) - afl.rcm;
362
363 Point2D velK = 0.5 * (afl.getV(i) + afl.getV(i + 1));
364 double gAtt = (velK & afl.tau[i]);
365
366 double gAttOld = 0.0;
367 if (W.getCurrentStep() > 0)
368 {
369 auto oldAfl = W.getOldAirfoil(numberInPassport);
370 gAttOld = ((0.5 * (oldAfl.getV(i) + oldAfl.getV(i + 1))) & oldAfl.tau[i]);
371 }
372
373 double deltaGAtt = gAtt - gAttOld;
374
375 double qAtt = (velK & afl.nrm[i]);
376
378 double deltaK = boundary.sheets.freeVortexSheet(i, 0) * afl.len[i] - afl.gammaThrough[i] + deltaGAtt * afl.len[i];
379
380 /*1*/
381 hDFdelta += deltaK * Point2D({ -rK[1], rK[0] });
382 hDMdelta += 0.5 * deltaK * rK.length2();
383
384 /*2*/
385 hDFGam += 0.5 * velK.kcross() * gAtt * afl.len[i];
386 hDMGam += 0.5 * (rK ^ velK.kcross()) * gAtt * afl.len[i];
387
388 /*3*/
389 hDFQ -= 0.5 * velK * qAtt * afl.len[i];
390 hDMQ -= 0.5 * (rK ^ velK) * qAtt * afl.len[i];
391 }
392
393 const double rho = W.getPassport().physicalProperties.rho;
394
395 hydroDynamForce = rho * (hDFGam + hDFdelta * (1.0 / dt) + hDFQ);
396 hydroDynamMoment = rho * (hDMGam + hDMdelta / dt + hDMQ);
397
398 if ((W.getPassport().physicalProperties.nu > 0.0)/* && (W.currentStep > 0)*/)
399 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
400 {
401 Point2D rK = 0.5 * (afl.getR(i + 1) + afl.getR(i)) - afl.rcm;
402 viscousForce += rho * afl.viscousStress[i] * afl.tau[i];
403 viscousMoment += rho * (afl.viscousStress[i] * afl.tau[i]) & rK;
404 }
405
406 W.getTimers().stop("Force");
407}// GetHydroDynamForce()
408
409// Вычисление скорости центра масс
411{
412 return Vcm;
413}//VeloOfAirfoilRcm(...)
414
415// Вычисление положения центра масс
417{
418 return Rcm;
419}//PositionOfAirfoilRcm(...)
420
422{
423 return Wcm;
424}//AngularVelocityOfAirfoil(...)
425
427{
428 if (afl.phiAfl != Phi)
429 {
430 std::cout << "afl.phiAfl != Phi" << std::endl;
431 exit(100600);
432 }
433
434 return afl.phiAfl;
435}//AngleOfAirfoil(...)
436
437// Вычисление скоростей начал панелей
439{
440 std::vector<Point2D> veloW(afl.getNumberOfPanels(), {0.0, 0.0});
441
442 //if (W.getCurrentStep() == 0)
443 // for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
444 // veloW[i] = { 0.0, 0.0 };//afl.getR(i).kcross();
445
446 if (W.getCurrentStep() > 0)
447 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
448 veloW[i] = (1.0 / W.getPassport().timeDiscretizationProperties.dt) * (afl.getR(i) - W.getOldAirfoil(0).getR(i));
449
450 afl.setV(veloW);
451
452
453 //Циркуляция
455 circulation = 0.0;
456 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
457 circulation += 0.5 * afl.len[i] * ((afl.getV(i) + afl.getV(i + 1)) & afl.tau[i]);
458
459}//VeloOfAirfoilPanels(...)
460
461
463{
464 double x0 = chord[0].beg[0];
465 double t = W.getCurrentTime();
466
467
468 if (fsi) //turek
469 {
470 for (int i = 0; i < beam->R; ++i)
472
473 for (size_t i = 0; i < chord.size(); ++i)
474 {
475 chord[i].beg[1] = beam->getTotalDisp(chord[i].beg[0], t);
476 chord[i].end[1] = beam->getTotalDisp(chord[i].end[0], t);
477 }
478
479 std::vector<Point2D> upperPoints(chord.size() + upperShifts.size());
480 std::vector<Point2D> lowerPoints(chord.size() + lowerShifts.size());
481
482 for (size_t i = 0; i < chord.size() - 1; ++i)
483 {
484 const Point2D& begIp1 = chord[i + 1].beg;
485 const Point2D& endI = chord[i].end;
486 Point2D normI = (endI - chord[i].beg).unit().kcross();
487 Point2D normIp1 = (chord[i + 1].end - begIp1).unit().kcross();
488 upperPoints[i] = endI + 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
489 lowerPoints[i] = endI - 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
490 }
491 Point2D normBack = (chord.back().end - chord.back().beg).unit().kcross();
492 upperPoints[chord.size() - 1] = chord.back().end + chord.back().rightSemiWidth * normBack;
493 lowerPoints[chord.size() - 1] = chord.back().end - chord.back().rightSemiWidth * normBack;
494
495 for (size_t i = 0; i < upperShifts.size(); ++i)
496 upperPoints[chord.size() + i] = chord.back().end + upperShifts[upperShifts.size() - 1 - i] * normBack;
497 for (size_t i = 0; i < lowerShifts.size(); ++i)
498 lowerPoints[chord.size() + i] = chord.back().end + lowerShifts[lowerShifts.size() - 1 - i] * normBack;
499
500 afl.setR(0) = { chord.back().end[0], beam->getTotalDisp(chord.back().end[0], t) };
501 for (size_t i = 0; i < upperPoints.size(); ++i)
502 afl.setR(indexOfUpperLeftAngle - 1 - i) = upperPoints[i];
503 for (size_t i = 0; i < lowerPoints.size(); ++i)
504 afl.setR(indexOfLowerLeftAngle + 1 + i) = lowerPoints[i];
505
506 /*
507 std::ofstream file;
508 file.open(W.getPassport().dir + "file" + std::to_string(W.getCurrentStep()) + ".txt");
509 for (size_t c = 0; c < chord.size(); ++c)
510 file << std::endl;
511 file.close();
512 //*/
513 }
514 else //Fish
515 {
516 for (size_t i = 0; i < chord.size(); ++i)
517 {
518 chord[i].beg[1] = beam->getGivenLaw(chord[i].beg[0], t, deformParam);
519 chord[i].end[1] = beam->getGivenLaw(chord[i].end[0], t, deformParam);
520 }
521
522 std::vector<Point2D> upperPoints(chord.size());
523 std::vector<Point2D> lowerPoints(chord.size());
524
525 for (size_t i = 0; i < chord.size() - 1; ++i)
526 {
527 const Point2D& begIp1 = chord[i + 1].beg;
528 const Point2D& endI = chord[i].end;
529 Point2D normI = (endI - chord[i].beg).unit().kcross();
530 Point2D normIp1 = (chord[i + 1].end - begIp1).unit().kcross();
531 upperPoints[i] = endI + 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
532 lowerPoints[i] = endI - 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
533 }
534
535 Point2D normFront = (chord[0].end - chord[0].beg).unit().kcross();
536 Point2D normBack = (chord.back().end - chord.back().beg).unit().kcross();
537
538 int nph = (int)chord.size();
539
540 afl.setR(0) = chord.back().end;
541 afl.setR(nph) = chord[0].beg;
542 for (size_t i = 0; i < nph - 1; ++i)
543 {
544 afl.setR(nph - 1 - i) = upperPoints[i];
545 afl.setR(nph + 1 + i) = lowerPoints[i];
546 }
547 }
548
549
552
553 afl.possibleWays.clear();
554 afl.possibleWays.resize(initialPossibleWays.size());
555
556 for (size_t w = 0; w < initialPossibleWays.size(); ++w)
557 {
558 std::vector<Point2D> initialWay = initialPossibleWays[w];
559 afl.possibleWays[w].resize(initialWay.size());
560 for (size_t p = 0; p < initialWay.size(); ++p)
561 {
562 double x = initialWay[p][0];
563 double y;
564
565 if (fsi) //turek
566 y = beam->getTotalDisp(x, t);
567 else //fish
568 y = beam->getGivenLaw(x, t, deformParam);
569
570 afl.possibleWays[w][p] = Point2D{ x,y };
571 }
572 }
573
575}//Move()
576
577
578
579
580#if defined(INITIAL) || defined(BRIDGE)
582{
583 mechParamsParser->get("deformParam", deformParam);
584 W.getInfo('i') << "mechDeformable: " << "deformParam = {";
585 for (auto val : deformParam)
586 W.getInfo('i') << " " << val;
587 W.getInfo('i') << " }" << std::endl;
588
589 mechParamsParser->get("fsi", fsi);
590 W.getInfo('i') << "mechDeformable: " << "fsi = " << fsi << std::endl;
591}//ReadSpecificParametersFromDictionary()
592#endif
Заголовочный файл с описанием класса Airfoil.
Заголовочный файл с описанием класса AirfoilDeformable.
Заголовочный файл с описанием класса Boundary.
Заголовочный файл с функциями для метода GMRES.
Заголовочный файл с описанием класса MeasureVP.
Заголовочный файл с описанием класса MechanicsDeformable.
Заголовочный файл с описанием класса StreamParser.
const double DPI
Число .
Definition defs.h:82
Заголовочный файл с описанием класса Velocity.
Заголовочный файл с описанием класса Wake.
Заголовочный файл с описанием класса World2D.
double phiAfl
Поворот профиля
Definition Airfoil2D.h:100
std::vector< double > len
Длины панелей профиля
Definition Airfoil2D.h:94
void setV(const Point2D &vel)
Установка постоянной скорости всех вершин профиля
Definition Airfoil2D.h:145
const Point2D & getR(size_t q) const
Возврат константной ссылки на вершину профиля
Definition Airfoil2D.h:113
const Point2D & getV(size_t q) const
Возврат константной ссылки на скорость вершины профиля
Definition Airfoil2D.h:137
std::vector< Point2D > nrm
Нормали к панелям профиля
Definition Airfoil2D.h:81
std::vector< Point2D > tau
Касательные к панелям профиля
Definition Airfoil2D.h:91
Point2D rcm
Положение центра масс профиля
Definition Airfoil2D.h:97
size_t getNumberOfPanels() const
Возврат количества панелей на профиле
Definition Airfoil2D.h:163
Point2D & setR(size_t q)
Возврат ссылки на вершину профиля
Definition Airfoil2D.h:125
std::vector< double > gammaThrough
Суммарные циркуляции вихрей, пересекших панели профиля на прошлом шаге
Definition Airfoil2D.h:276
virtual void GetGabarits(double gap=0.02)
Вычисляет габаритный прямоугольник профиля
void CalcNrmTauLen()
Вычисление нормалей, касательных и длин панелей по текущему положению вершин
void lightningTest()
Тест на "отвещенность".
std::vector< double > viscousStress
Нейросеть для коэффициентов I0 и I3 диффузионной скорости
Definition Airfoil2D.h:268
std::vector< std::vector< Point2D > > possibleWays
Возможные пути внутри профиля от точки (0, 0) к центрам всех панелей
Definition Airfoil2D.h:199
std::vector< double > qCoeff
void solveDU_RK(int n, double dt)
Beam(const World2D &W_, bool fsi_, double x0_, double L_, int R_)
std::vector< std::vector< double > > presLastSteps
double shape(int n, double x) const
const std::vector< double > unitLambda
std::vector< double > currentPhi
void solveDU(int n, double dt)
std::vector< double > currentDPhi
double phi(int n, double t) const
double getTotalDisp(double x, double t) const
const size_t nLastSteps
double getGivenLaw(double x, double t, const std::vector< double > &deformParam) const
Sheet sheets
Слои на профиле
Definition Boundary2D.h:96
virtual Point2D PositionOfAirfoilRcm(double currTime) override
Вычисление положения центра масс профиля
virtual Point2D VeloOfAirfoilRcm(double currTime) override
Вычисление скорости центра масс профиля
virtual void Move() override
Перемещение профиля в соответствии с законом
virtual void VeloOfAirfoilPanels(double currTime) override
Вычисление скоростей начал панелей
MechanicsDeformable(const World2D &W_, size_t numberInPassport_)
Конструктор
virtual void GetHydroDynamForce() override
Вычисление гидродинамической силы, действующей на профиль
virtual void ReadSpecificParametersFromDictionary() override
Чтение параметров конкретной механической системы
std::vector< ChordPanel > initialChord
std::vector< double > deformParam
virtual double AngularVelocityOfAirfoil(double currTime) override
Вычисление угловой скорости профиля
std::vector< std::vector< Point2D > > initialPossibleWays
std::vector< double > upperShifts
std::vector< double > lowerShifts
std::vector< ChordPanel > chord
std::unique_ptr< Beam > beam
virtual double AngleOfAirfoil(double currTime) override
Вычисление угла поворота профиля
Абстрактный класс, определяющий вид механической системы
Definition Mechanics2D.h:72
std::unique_ptr< VMlib::StreamParser > mechParamsParser
Умный указатель на парсер параметров механической системы
Definition Mechanics2D.h:98
Point2D hydroDynamForce
Вектор гидродинамической силы и момент, действующие на профиль
Point2D Vcm0
Начальная скорость центра и угловая скорость
const size_t numberInPassport
Номер профиля в паспорте
Definition Mechanics2D.h:82
Point2D RcmOld
Текущие положение профиля
Point2D VcmOld
Скорость и отклонение с предыдущего шага
const World2D & W
Константная ссылка на решаемую задачу
Definition Mechanics2D.h:79
void Initialize(Point2D Vcm0_, Point2D Rcm0_, double Wcm0_, double Phi0_)
Задание начального положения и начальной скорости
Point2D Rcm
Текущие положение профиля
Point2D Rcm0
Начальное положение профиля
Point2D viscousForce
Вектор силы и момент вязкого трения, действующие на профиль
double circulationOld
Циркуляция скорости по границе профиля с предыдущего шага
double hydroDynamMoment
Airfoil & afl
Definition Mechanics2D.h:87
Point2D Vcm
Текущие скорость центра и угловая скорость
double circulation
Текущая циркуляция скорости по границе профиля
const Boundary & boundary
Definition Mechanics2D.h:91
PhysicalProperties physicalProperties
Структура с физическими свойствами задачи
Definition Passport2D.h:304
const double & freeVortexSheet(size_t n, size_t moment) const
Definition Sheet2D.h:100
Класс, опеделяющий текущую решаемую задачу
Definition World2D.h:77
const Airfoil & getAirfoil(size_t i) const
Возврат константной ссылки на объект профиля
Definition World2D.h:163
const AirfoilGeometry & getOldAirfoil(size_t i) const
Возврат константной ссылки на объект старого профиля
Definition World2D.h:169
VMlib::TimersGen & getTimers() const
Возврат ссылки на временную статистику выполнения шага расчета по времени
Definition World2D.h:288
const Passport & getPassport() const
Возврат константной ссылки на паспорт
Definition World2D.h:263
TimeDiscretizationProperties timeDiscretizationProperties
Структура с параметрами процесса интегрирования по времени
void stop(const std::string &timerLabel)
Останов счетчика
Definition TimesGen.cpp:68
void start(const std::string &timerLabel)
Запуск счетчика
Definition TimesGen.cpp:55
VMlib::LogStream & getInfo() const
Возврат ссылки на объект LogStream Используется в техничеcких целях для организации вывода
Definition WorldGen.h:82
double getCurrentTime() const
Definition WorldGen.h:100
size_t getCurrentStep() const
Возврат константной ссылки на параметры распараллеливания по MPI.
Definition WorldGen.h:99
numvector< T, 2 > kcross() const
Геометрический поворот двумерного вектора на 90 градусов
Definition numvector.h:511
auto length2() const -> typename std::remove_const< typename std::remove_reference< decltype(this->data[0])>::type >::type
Вычисление квадрата нормы (длины) вектора
Definition numvector.h:386
size_t size() const
Definition numvector.h:114
double nu
Коэффициент кинематической вязкости среды
Definition Passport2D.h:99
double rho
Плотность потока
Definition Passport2D.h:75
double dt
Шаг по времени
Definition PassportGen.h:67