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 rho(10000.0),
61 F(0.04),
62 EJ(1.0 * 1.0),
63
64 //Turek
65 //rho(10000.0),
66 //F(0.02),
67 //EJ(1.1703239289446188),
68
69 R(R_),
70 x0(x0_),
71 L(L_)
72{
73 qCoeff.resize(R);
74 currentPhi.resize(R);
75 currentDPhi.resize(R);
77};
78
79double Beam::phi(int n, double t) const
80{
81 return currentPhi[n];
82}
83
84void Beam::solveDU(int n, double dt)
85{
86 double cm = rho * F;
87 double ck = EJ * sqr(sqr(unitLambda[n] / L));
88 double cq = qCoeff[n];
89
90 double omega = sqrt(ck / cm);
91 double cDamp = 0.0;
92
93 double phiAst = currentPhi[n] + 0.5 * dt * currentDPhi[n];
94 double psiAst = currentDPhi[n] + 0.5 * dt * (-ck * currentPhi[n] - cDamp * omega * currentDPhi[n] - cq) / cm;
95
96 currentPhi[n] += dt * psiAst;
97 currentDPhi[n] += dt * (-ck * phiAst - cDamp * omega * psiAst - cq) / cm;
98
99 std::cout << "n = " << n << std::endl;
100 std::cout << "ck / cm = " << ck / cm << std::endl;
101 std::cout << "cq / cm = " << cq / cm << std::endl;
102 //std::cout << "lam = " << unitLambda[n] / L << std::endl;
103}
104
105void Beam::solveDU_RK(int n, double dt) {
106 double cm = rho * F;
107 double ck = EJ * sqr(sqr(unitLambda[n] / L));
108 double cq = qCoeff[n];
109
110 double omega = sqrt(ck / cm);
111 double cDamp = 0.0;
112
113 auto acceleration = [&](double phi, double dphi) {
114 return (-ck * phi - cDamp * omega * dphi - cq) / cm;
115 };
116
117 double phi = currentPhi[n];
118 double dphi = currentDPhi[n];
119
120 double k1_phi = dphi;
121 double k1_dphi = acceleration(phi, dphi);
122
123 double k2_phi = dphi + 0.5 * dt * k1_dphi;
124 double k2_dphi = acceleration(phi + 0.5 * dt * k1_phi, dphi + 0.5 * dt * k1_dphi);
125
126 double k3_phi = dphi + 0.5 * dt * k2_dphi;
127 double k3_dphi = acceleration(phi + 0.5 * dt * k2_phi, dphi + 0.5 * dt * k2_dphi);
128
129 double k4_phi = dphi + dt * k3_dphi;
130 double k4_dphi = acceleration(phi + dt * k3_phi, dphi + dt * k3_dphi);
131
132 currentPhi[n] = phi + (dt / 6.0) * (k1_phi + 2 * k2_phi + 2 * k3_phi + k4_phi);
133 currentDPhi[n] = dphi + (dt / 6.0) * (k1_dphi + 2 * k2_dphi + 2 * k3_dphi + k4_dphi);
134
135 std::cout << "phi = " << currentPhi[n] << std::endl;
136}
137
138
139double Beam::getTotalDisp(double x, double t) const
140{
141 double result = 0.0;
142 for (int i = 0; i < R; ++i)
143 result += phi(i, t) * shape(i, x);
144 return result;
145}
146
147
148//deformParam = {f, alpha, lambda, c1, c2};
149
150double Beam::getGivenLaw(double x, double t, const std::vector<double>& deformParam) const //имитатор деформации упругой линии
151{
152 const double c1 = deformParam[3];
153 const double c2 = deformParam[4];
154 double alpha;
155
156 if (fsi) //Turek
157 alpha = 0.0; //Turek
158 else
159 alpha = deformParam[1]; //Fish
160
161
162 const double lambda = deformParam[2];
163 const double length = 1.0;
164 const double f = deformParam[0];
165 if (!fsi && (f == 0))
166 alpha = 0.0;
167
168 auto A = [c1, c2](double xi) {return 1.0 + (xi - 1.0) * c1 + (xi * xi - 1.0) * c2;};
169
170 //double result = alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
171 double result = W.getPassport().physicalProperties.accelCft(t) * alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
172
173 return result;
174}
175
176
177
178
179MechanicsDeformable::MechanicsDeformable(const World2D& W_, size_t numberInPassport_)
180 :
181 Mechanics(W_, numberInPassport_, true, true)
182{
183 const auto& airfoil = W_.getAirfoil(numberInPassport_);
184
185 Vcm0 = { 0.0, 0.0 };
186 Rcm0 = { airfoil.rcm[0], airfoil.rcm[1] };
187 Vcm = Vcm0;
188 Rcm = Rcm0;
189 VcmOld = Vcm0;
190 RcmOld = Rcm;
191
192
194
195 Point2D zero = { 0.0, 0.0 };
196
197 Initialize(zero, airfoil.rcm + zero, 0.0, airfoil.phiAfl + 0.0);
198
199 if (airfoil.phiAfl != 0)
200 {
201 W.getInfo('e') << "Airfoil rotation for Turek problem is not allowed" << std::endl;
202 exit(2345);
203 }
204
205 if (fsi)
206 {
207 //Turek
208 //Выделение упругой хорды
210 double x0 = airfoil.getR(indexOfUpperRightAngle)[0];
211 double x1 = x0;
212 while (fabs(x1 - x0) < 1e-12)
213 {
215 x0 = x1;
216 x1 = airfoil.getR(indexOfUpperRightAngle)[0];
217 }
219
221 for (size_t i = 0; i < upperShifts.size(); ++i)
222 upperShifts[i] = airfoil.getR(i + 1)[1] - airfoil.getR(0)[1];
223
224
226 double y0 = airfoil.getR(indexOfUpperLeftAngle)[1];
227 double y1 = y0;
228 while (fabs(y1 - y0) < 1e-12)
229 {
231 y0 = y1;
232 y1 = airfoil.getR(indexOfUpperLeftAngle)[1];
233 }
235
236
237 indexOfLowerRightAngle = airfoil.getNumberOfPanels() + 1;
238 x0 = airfoil.getR(indexOfLowerRightAngle)[0];
239 x1 = x0;
240 while (fabs(x1 - x0) < 1e-12)
241 {
243 x0 = x1;
244 x1 = airfoil.getR(indexOfLowerRightAngle)[0];
245 }
247
248
249 lowerShifts.resize(airfoil.getNumberOfPanels() - indexOfLowerRightAngle - 1);
250 for (size_t i = 0; i < lowerShifts.size(); ++i)
251 lowerShifts[i] = airfoil.getR(airfoil.getNumberOfPanels() - 1 - i)[1] - airfoil.getR(0)[1];
252
254 y0 = airfoil.getR(indexOfLowerLeftAngle)[1];
255 y1 = y0;
256 while (fabs(y1 - y0) < 1e-12)
257 {
259 y0 = y1;
260 y1 = airfoil.getR(indexOfLowerLeftAngle)[1];
261 }
263
264 //W.getInfo('i') << "UR: " << airfoil.getR(indexOfUpperRightAngle) << std::endl;
265 //W.getInfo('i') << "UL: " << airfoil.getR(indexOfUpperLeftAngle) << std::endl;
266 //W.getInfo('i') << "LR: " << airfoil.getR(indexOfLowerRightAngle) << std::endl;
267 //W.getInfo('i') << "LL: " << airfoil.getR(indexOfLowerLeftAngle) << std::endl;
268
270 {
271 W.getInfo('e') << "indexOfUpperLeftAngle - indexOfUpperRightAngle != indexOfLowerRightAngle - indexOfLowerLeftAngle" << std::endl;
272 exit(2346);
273 }
274
276
277 for (size_t i = 0; i < indexOfUpperLeftAngle - indexOfUpperRightAngle; ++i)
278 {
279 size_t idxUp = indexOfUpperLeftAngle - 1 - i;
280 size_t idxDn = indexOfLowerLeftAngle + i;
281 Point2D rUpLeft = airfoil.getR(idxUp + 1);
282 Point2D rUpRight = airfoil.getR(idxUp);
283 Point2D rDnLeft = airfoil.getR(idxDn);
284 Point2D rDnRight = airfoil.getR(idxDn + 1);
285
286 if (std::max(fabs(rUpLeft[0] - rDnLeft[0]), fabs(rUpRight[0] - rDnRight[0])) > \
287 0.01 * std::min((rUpRight[0] - rUpLeft[0]), (rDnRight[0] - rDnLeft[0])))
288 {
289 W.getInfo('e') << "x_up != x_dn" << std::endl;
290 exit(2347);
291 }
292
293 chord[i].beg = 0.5 * (rUpLeft + rDnLeft);
294 chord[i].end = 0.5 * (rUpRight + rDnRight);
295 chord[i].infPanels = { idxUp, idxDn };
296 chord[i].rightSemiWidth = 0.5 * (rUpRight - rDnRight)[1];
297 }
299 beam = std::make_unique<Beam>(W, fsi, chord[0].beg[0], initialChord.back().end[0] - initialChord[0].beg[0], 3); //Beam
300 }
301 else //Fish
302 {
303 int np = (int)airfoil.getNumberOfPanels();
304 chord.resize(np / 2);
305
306 chord[0].beg = airfoil.getR(np / 2);
307 chord[np / 2 - 1].end = airfoil.getR(0);
308 chord[np / 2 - 1].rightSemiWidth = 0.0;
309
310 for (size_t i = 0; i < np / 2; ++i)
311 {
312 if (i != 0)
313 chord[i].beg = 0.5 * (airfoil.getR(np / 2 - i) + airfoil.getR(np / 2 + i));
314
315 if (i != np / 2 - 1)
316 chord[i].end = 0.5 * (airfoil.getR(np / 2 - i - 1) + airfoil.getR(np / 2 + i + 1));
317
318 chord[i].infPanels = { np / 2 - i, np / 2 + i + 1 };
319
320 if (i != np / 2 - 1)
321 chord[i].rightSemiWidth = (airfoil.getR(np / 2 - i - 1) - airfoil.getR(np / 2 + i + 1)).length() * 0.5;
322 }
324 beam = std::make_unique<Beam>(W, fsi, chord[0].beg[0], initialChord.back().end[0] - initialChord[0].beg[0], 3); //Beam
325 }
326
327 //std::ofstream of("chord.txt");
328 //for (size_t i = 0; i < chord.size(); ++i)
329 // 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;
330 //of.close();
331
332
333
334 initialPossibleWays = airfoil.possibleWays;
335};
336
337//Вычисление гидродинамической силы, действующей на профиль
339{
340 W.getTimers().start("Force");
341
342 const double& dt = W.getPassport().timeDiscretizationProperties.dt;
343
344 hydroDynamForce = { 0.0, 0.0 };
345 hydroDynamMoment = 0.0;
346
347 viscousForce = { 0.0, 0.0 };
348 viscousMoment = 0.0;
349
350 Point2D hDFGam = { 0.0, 0.0 }; //гидродинамические силы, обусловленные присоед.завихренностью
351 Point2D hDFdelta = { 0.0, 0.0 }; //гидродинамические силы, обусловленные приростом завихренности
352 Point2D hDFQ = { 0.0, 0.0 }; //гидродинамические силы, обусловленные присоед.источниками
353
354 double hDMGam = 0.0; //гидродинамический момент, обусловленный присоед.завихренностью
355 double hDMdelta = 0.0; //гидродинамический момент, обусловленный приростом завихренности
356 double hDMQ = 0.0; //гидродинамический момент, обусловленный присоед.источниками
357 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
358 {
359 Point2D rK = 0.5 * (afl.getR(i + 1) + afl.getR(i)) - afl.rcm;
360
361 Point2D velK = 0.5 * (afl.getV(i) + afl.getV(i + 1));
362 double gAtt = (velK & afl.tau[i]);
363
364 double gAttOld = 0.0;
365 if (W.getCurrentStep() > 0)
366 {
367 auto oldAfl = W.getOldAirfoil(numberInPassport);
368 gAttOld = ((0.5 * (oldAfl.getV(i) + oldAfl.getV(i + 1))) & oldAfl.tau[i]);
369 }
370
371 double deltaGAtt = gAtt - gAttOld;
372
373 double qAtt = (velK & afl.nrm[i]);
374
376 double deltaK = boundary.sheets.freeVortexSheet(i, 0) * afl.len[i] - afl.gammaThrough[i] + deltaGAtt * afl.len[i];
377
378 /*1*/
379 hDFdelta += deltaK * Point2D({ -rK[1], rK[0] });
380 hDMdelta += 0.5 * deltaK * rK.length2();
381
382 /*2*/
383 hDFGam += 0.5 * velK.kcross() * gAtt * afl.len[i];
384 hDMGam += 0.5 * (rK ^ velK.kcross()) * gAtt * afl.len[i];
385
386 /*3*/
387 hDFQ -= 0.5 * velK * qAtt * afl.len[i];
388 hDMQ -= 0.5 * (rK ^ velK) * qAtt * afl.len[i];
389 }
390
391 const double rho = W.getPassport().physicalProperties.rho;
392
393 hydroDynamForce = rho * (hDFGam + hDFdelta * (1.0 / dt) + hDFQ);
394 hydroDynamMoment = rho * (hDMGam + hDMdelta / dt + hDMQ);
395
396 if ((W.getPassport().physicalProperties.nu > 0.0)/* && (W.currentStep > 0)*/)
397 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
398 {
399 Point2D rK = 0.5 * (afl.getR(i + 1) + afl.getR(i)) - afl.rcm;
400 viscousForce += rho * afl.viscousStress[i] * afl.tau[i];
401 viscousMoment += rho * (afl.viscousStress[i] * afl.tau[i]) & rK;
402 }
403
404 W.getTimers().stop("Force");
405}// GetHydroDynamForce()
406
407// Вычисление скорости центра масс
409{
410 return Vcm;
411}//VeloOfAirfoilRcm(...)
412
413// Вычисление положения центра масс
415{
416 return Rcm;
417}//PositionOfAirfoilRcm(...)
418
420{
421 return Wcm;
422}//AngularVelocityOfAirfoil(...)
423
425{
426 if (afl.phiAfl != Phi)
427 {
428 std::cout << "afl.phiAfl != Phi" << std::endl;
429 exit(100600);
430 }
431
432 return afl.phiAfl;
433}//AngleOfAirfoil(...)
434
435// Вычисление скоростей начал панелей
437{
438 std::vector<Point2D> veloW(afl.getNumberOfPanels(), {0.0, 0.0});
439
440 //if (W.getCurrentStep() == 0)
441 // for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
442 // veloW[i] = { 0.0, 0.0 };//afl.getR(i).kcross();
443
444 if (W.getCurrentStep() > 0)
445 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
446 veloW[i] = (1.0 / W.getPassport().timeDiscretizationProperties.dt) * (afl.getR(i) - W.getOldAirfoil(0).getR(i));
447
448 afl.setV(veloW);
449
450
451 //Циркуляция
453 circulation = 0.0;
454 for (size_t i = 0; i < afl.getNumberOfPanels(); ++i)
455 circulation += 0.5 * afl.len[i] * ((afl.getV(i) + afl.getV(i + 1)) & afl.tau[i]);
456
457}//VeloOfAirfoilPanels(...)
458
459
461{
462 double x0 = chord[0].beg[0];
463 double t = W.getCurrentTime();
464
465
466 if (fsi) //turek
467 {
468 for (int i = 0; i < beam->R; ++i)
470
471 for (size_t i = 0; i < chord.size(); ++i)
472 {
473 chord[i].beg[1] = beam->getTotalDisp(chord[i].beg[0], t);
474 chord[i].end[1] = beam->getTotalDisp(chord[i].end[0], t);
475 }
476
477 std::vector<Point2D> upperPoints(chord.size() + upperShifts.size());
478 std::vector<Point2D> lowerPoints(chord.size() + lowerShifts.size());
479
480 for (size_t i = 0; i < chord.size() - 1; ++i)
481 {
482 const Point2D& begIp1 = chord[i + 1].beg;
483 const Point2D& endI = chord[i].end;
484 Point2D normI = (endI - chord[i].beg).unit().kcross();
485 Point2D normIp1 = (chord[i + 1].end - begIp1).unit().kcross();
486 upperPoints[i] = endI + 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
487 lowerPoints[i] = endI - 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
488 }
489 Point2D normBack = (chord.back().end - chord.back().beg).unit().kcross();
490 upperPoints[chord.size() - 1] = chord.back().end + chord.back().rightSemiWidth * normBack;
491 lowerPoints[chord.size() - 1] = chord.back().end - chord.back().rightSemiWidth * normBack;
492
493 for (size_t i = 0; i < upperShifts.size(); ++i)
494 upperPoints[chord.size() + i] = chord.back().end + upperShifts[upperShifts.size() - 1 - i] * normBack;
495 for (size_t i = 0; i < lowerShifts.size(); ++i)
496 lowerPoints[chord.size() + i] = chord.back().end + lowerShifts[lowerShifts.size() - 1 - i] * normBack;
497
498 afl.setR(0) = { chord.back().end[0], beam->getTotalDisp(chord.back().end[0], t) };
499 for (size_t i = 0; i < upperPoints.size(); ++i)
500 afl.setR(indexOfUpperLeftAngle - 1 - i) = upperPoints[i];
501 for (size_t i = 0; i < lowerPoints.size(); ++i)
502 afl.setR(indexOfLowerLeftAngle + 1 + i) = lowerPoints[i];
503
504 /*
505 std::ofstream file;
506 file.open(W.getPassport().dir + "file" + std::to_string(W.getCurrentStep()) + ".txt");
507 for (size_t c = 0; c < chord.size(); ++c)
508 file << std::endl;
509 file.close();
510 //*/
511 }
512 else //Fish
513 {
514 for (size_t i = 0; i < chord.size(); ++i)
515 {
516 chord[i].beg[1] = beam->getGivenLaw(chord[i].beg[0], t, deformParam);
517 chord[i].end[1] = beam->getGivenLaw(chord[i].end[0], t, deformParam);
518 }
519
520 std::vector<Point2D> upperPoints(chord.size());
521 std::vector<Point2D> lowerPoints(chord.size());
522
523 for (size_t i = 0; i < chord.size() - 1; ++i)
524 {
525 const Point2D& begIp1 = chord[i + 1].beg;
526 const Point2D& endI = chord[i].end;
527 Point2D normI = (endI - chord[i].beg).unit().kcross();
528 Point2D normIp1 = (chord[i + 1].end - begIp1).unit().kcross();
529 upperPoints[i] = endI + 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
530 lowerPoints[i] = endI - 0.5 * chord[i].rightSemiWidth * (normI + normIp1);
531 }
532
533 Point2D normFront = (chord[0].end - chord[0].beg).unit().kcross();
534 Point2D normBack = (chord.back().end - chord.back().beg).unit().kcross();
535
536 int nph = (int)chord.size();
537
538 afl.setR(0) = chord.back().end;
539 afl.setR(nph) = chord[0].beg;
540 for (size_t i = 0; i < nph - 1; ++i)
541 {
542 afl.setR(nph - 1 - i) = upperPoints[i];
543 afl.setR(nph + 1 + i) = lowerPoints[i];
544 }
545 }
546
547
550
551 afl.possibleWays.clear();
552 afl.possibleWays.resize(initialPossibleWays.size());
553
554 for (size_t w = 0; w < initialPossibleWays.size(); ++w)
555 {
556 std::vector<Point2D> initialWay = initialPossibleWays[w];
557 afl.possibleWays[w].resize(initialWay.size());
558 for (size_t p = 0; p < initialWay.size(); ++p)
559 {
560 double x = initialWay[p][0];
561 double y;
562
563 if (fsi) //turek
564 y = beam->getTotalDisp(x, t);
565 else //fish
566 y = beam->getGivenLaw(x, t, deformParam);
567
568 afl.possibleWays[w][p] = Point2D{ x,y };
569 }
570 }
571
573}//Move()
574
575
576
577
578#if defined(INITIAL) || defined(BRIDGE)
580{
581 mechParamsParser->get("deformParam", deformParam);
582 W.getInfo('i') << "mechDeformable: " << "deformParam = {";
583 for (auto val : deformParam)
584 W.getInfo('i') << " " << val;
585 W.getInfo('i') << " }" << std::endl;
586
587 mechParamsParser->get("fsi", fsi);
588 W.getInfo('i') << "mechDeformable: " << "fsi = " << fsi << std::endl;
589}//ReadSpecificParametersFromDictionary()
590#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:301
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