VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
Passport2D.h
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: Passport2D.h |
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
49#ifndef PASSPORT2D_H
50#define PASSPORT2D_H
51
52#include "PassportGen.h"
53#include "Point2D.h"
54
55namespace VM2D
56{
57
69 {
70 private:
72
73 public:
75 double rho;
76
79
81 double vRef;
82
84 std::pair<std::string, int> typeAccel;
85
87 double timeAccel;
88
90 double accelCft(double currentTime) const;
91
93 Point2D V0(double currentTime) const
94 {
95 return static_cast<Point2D>(accelCft(currentTime) * vInf);
96 };
97
99 double nu;
100
102 :timeProp(timeProp_)
103 {
104 rho = 1.0;
105 nu = 0.0;
106 vRef = 1.0;
107 timeAccel = 0.0;
108 };
109
110 };//PhysicalProperties
111
112
124 {
126 double sigma0;
127
130
132 double epscol;
133
135 double distFar;
136
138 double delta;
139
142
144 double maxGamma;
145
147 std::string fileWake;
148
150 std::string fileSource;
151
153 double getMinEpsAst() const
154 {
155 return 0.0; // 2.0 * epscol;
156 };
157
158 };//WakeDiscretizationProperties
159
160
172 {
173 //Решатель СЛАУ
174 std::pair<std::string, int> linearSystemSolver;
175 double gmresEps;
178
179 //Метод вычисления скоростей вихрей и в отдельных точках
180 std::pair<std::string, int> velocityComputation;
183
184
185
186 //Метод решения ОДУ движения вихрей
187 //std::pair<std::string, int> wakeMotionIntegrator;
188
190 std::pair<std::string, int> boundaryCondition;
191 };//NumericalSchemes
192
193
205 {
207 std::string fileAirfoil;
208
210 std::pair<Point2D, Point2D> initialGab;
211
214
217
220
222 double chord;
223
225 double angle;
226
229
232
235 std::string mechanicalSystem;
237
238 };//AirfoilParams
239
240
241
253 {
254 private:
255 //далее -- реализации виртуальных функций
256 virtual void GetParamsFromParser
257 (
258 std::istream& mainStream,
259 std::istream& mechanicsStream,
260 std::istream& defaultStream,
261 std::istream& switcherStream,
262 std::istream& varsStream,
263 const std::vector<std::string> paramList
264 ) override;
265
266 virtual void PrintAllParams() override;
267
268 public:
270 std::string airfoilsDir;
271
273 std::string wakesDir;
274
276 std::vector<AirfoilParams> airfoilParams;
277
279 std::string fileFullName;
283 std::vector<std::string> varLine;
284
285
286
288 //bool geographicalAngles; //Для обдува ветром, когда углы считаются по компасу
289
292
295
298
299
302
305
308
322 (
323 VMlib::LogStream& infoStream,
324 const std::string& _problemName,
325 const size_t _problemNumber,
326 const std::string& _filePassport,
327 const std::string& _mechanics,
328 const std::string& _defaults,
329 const std::string& _switchers,
330 const std::vector<std::string>& vars,
331 const std::vector<std::string>& paramList
332 );
333
335 virtual ~Passport() { };
336
339 (
340 const Passport& newPassport,
341 const std::vector<std::string> paramList
342 );
343 };
344
345}//namespace VM2D
346
347#endif
348
Заголовочный файл с описанием класса PasportGen.
Заголовочный файл с описанием класса Point2D.
Класс, опеделяющий паспорт двумерной задачи
Definition Passport2D.h:253
bool rotateForces
Признак работы в "географической" системе координат
Definition Passport2D.h:291
std::string wakesDir
Каталог с файлами вихревых следов
Definition Passport2D.h:273
PhysicalProperties physicalProperties
Структура с физическими свойствами задачи
Definition Passport2D.h:301
std::string defaultsFileFullName
Definition Passport2D.h:281
bool calcCoefficients
Признак вычисления коэффициентов вместо сил
Definition Passport2D.h:294
double rotateAngleVpPoints
Угол поворота точек VP.
Definition Passport2D.h:297
WakeDiscretizationProperties wakeDiscretizationProperties
Структура с параметрами дискретизации вихревого следа
Definition Passport2D.h:304
std::vector< std::string > varLine
Definition Passport2D.h:283
std::string airfoilsDir
Каталог с файлами профилей
Definition Passport2D.h:270
virtual void GetParamsFromParser(std::istream &mainStream, std::istream &mechanicsStream, std::istream &defaultStream, std::istream &switcherStream, std::istream &varsStream, const std::vector< std::string > paramList) override
Считывание всех параметров расчета из соответствующих потоков
virtual void PrintAllParams() override
Печать всех параметров расчета в поток логов
virtual ~Passport()
Деструктор
Definition Passport2D.h:335
std::vector< AirfoilParams > airfoilParams
Список структур с параметрами профилей
Definition Passport2D.h:276
std::string switchersFileFullName
Definition Passport2D.h:282
std::string mechanicsFileFullName
Definition Passport2D.h:280
std::string fileFullName
Имена файлов
Definition Passport2D.h:279
void GetReviseParamsFromParser(const Passport &newPassport, const std::vector< std::string > paramList)
Считывание измененных параметров
NumericalSchemes numericalSchemes
Структура с используемыми численными схемами
Definition Passport2D.h:307
Класс, определяющий работу с потоком логов
Definition LogStream.h:57
Абстрактный класс, опеделяющий паспорт задачи
Структура, задающая параметры профиля
Definition Passport2D.h:205
Point2D addedMass
Присоединенная масса
Definition Passport2D.h:228
double chord
Хорда
Definition Passport2D.h:222
std::string mechanicalSystem
Definition Passport2D.h:235
std::pair< Point2D, Point2D > initialGab
Начальные габариты (прочитанные из файла, ло масштабирования и разворота на угол атаки)
Definition Passport2D.h:210
Point2D basePoint
Смещение центра масс (перенос профиля)
Definition Passport2D.h:216
int mechanicalSystemType
Тип механической системы
Definition Passport2D.h:234
std::string fileAirfoil
Имя файла с начальным состоянием профилей (без полного пути)
Definition Passport2D.h:207
double angle
Угол поворота (угол атаки)
Definition Passport2D.h:225
std::string mechanicalSystemParameters
Definition Passport2D.h:236
Point2D scale
Коэффициент масштабирования
Definition Passport2D.h:219
size_t requiredNPanels
Желаемое число панелей для разбиения геометрии
Definition Passport2D.h:213
bool inverse
Признак разворота нормалей (для расчета внутреннего течения)
Definition Passport2D.h:231
Структура, задающая используемые численные схемы
Definition Passport2D.h:172
std::pair< std::string, int > boundaryCondition
Метод аппроксимации граничных условий
Definition Passport2D.h:190
std::pair< std::string, int > velocityComputation
Definition Passport2D.h:180
std::pair< std::string, int > linearSystemSolver
Definition Passport2D.h:174
Структура, задающая физические свойства задачи
Definition Passport2D.h:69
std::pair< std::string, int > typeAccel
Способ разгона потока
Definition Passport2D.h:84
double accelCft(double currentTime) const
Функция-множитель, позволяющая моделировать разгон
const VMlib::TimeDiscretizationProperties & timeProp
Definition Passport2D.h:71
double vRef
Референсная скорость
Definition Passport2D.h:81
double nu
Коэффициент кинематической вязкости среды
Definition Passport2D.h:99
double timeAccel
Время разгона потока
Definition Passport2D.h:87
PhysicalProperties(const VMlib::TimeDiscretizationProperties &timeProp_)
Definition Passport2D.h:101
Point2D V0(double currentTime) const
Функция скорости набегающего потока с учетом разгона
Definition Passport2D.h:93
double rho
Плотность потока
Definition Passport2D.h:75
Point2D vInf
Скоростью набегающего потока
Definition Passport2D.h:78
Структура, задающая параметры параметры дискретизации вихревого следа
Definition Passport2D.h:124
int minVortexPerPanel
Минимальное число вихрей, рождаемых на каждой панели профииля
Definition Passport2D.h:141
double getMinEpsAst() const
Функция минимально возможного значения для epsAst.
Definition Passport2D.h:153
std::string fileSource
Имя файла с положениями источников (без полного пути)
Definition Passport2D.h:150
double delta
Расстояние, на которое рождаемый вихрь отодвигается от профиля
Definition Passport2D.h:138
double epscol
Радиус коллапса
Definition Passport2D.h:132
std::string fileWake
Имя файла с начальным состоянием вихревого следа (без полного пути)
Definition Passport2D.h:147
double sigma0
Радиус вихря
Definition Passport2D.h:126
double maxGamma
Максимально допустимая циркуляция вихря
Definition Passport2D.h:144
double distFar
Расстояние от центра самого подветренного (правого) профиля, на котором вихри уничтожаются
Definition Passport2D.h:135
Структура, задающая параметры процесса интегрирования по времени
Definition PassportGen.h:59