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
154
156 double getMinEpsAst() const
157 {
158 return 0.0; // 2.0 * epscol;
159 };
160
161 };//WakeDiscretizationProperties
162
163
175 {
176 //Решатель СЛАУ
177 std::pair<std::string, int> linearSystemSolver;
178 double gmresEps;
181
182 //Метод вычисления скоростей вихрей и в отдельных точках
183 std::pair<std::string, int> velocityComputation;
186
187
188
189 //Метод решения ОДУ движения вихрей
190 //std::pair<std::string, int> wakeMotionIntegrator;
191
193 std::pair<std::string, int> boundaryCondition;
194 };//NumericalSchemes
195
196
208 {
210 std::string fileAirfoil;
211
213 std::pair<Point2D, Point2D> initialGab;
214
217
220
223
225 double chord;
226
228 double angle;
229
232
235
238 std::string mechanicalSystem;
240
241 };//AirfoilParams
242
243
244
256 {
257 private:
258 //далее -- реализации виртуальных функций
259 virtual void GetParamsFromParser
260 (
261 std::istream& mainStream,
262 std::istream& mechanicsStream,
263 std::istream& defaultStream,
264 std::istream& switcherStream,
265 std::istream& varsStream,
266 const std::vector<std::string> paramList
267 ) override;
268
269 virtual void PrintAllParams() override;
270
271 public:
273 std::string airfoilsDir;
274
276 std::string wakesDir;
277
279 std::vector<AirfoilParams> airfoilParams;
280
282 std::string fileFullName;
286 std::vector<std::string> varLine;
287
288
289
291 //bool geographicalAngles; //Для обдува ветром, когда углы считаются по компасу
292
295
298
301
302
305
308
311
325 (
326 VMlib::LogStream& infoStream,
327 const std::string& _problemName,
328 const size_t _problemNumber,
329 const std::string& _filePassport,
330 const std::string& _mechanics,
331 const std::string& _defaults,
332 const std::string& _switchers,
333 const std::vector<std::string>& vars,
334 const std::vector<std::string>& paramList
335 );
336
338 virtual ~Passport() { };
339
342 (
343 const Passport& newPassport,
344 const std::vector<std::string> paramList
345 );
346 };
347
348}//namespace VM2D
349
350#endif
351
Заголовочный файл с описанием класса PasportGen.
Заголовочный файл с описанием класса Point2D.
Класс, опеделяющий паспорт двумерной задачи
Definition Passport2D.h:256
bool rotateForces
Признак работы в "географической" системе координат
Definition Passport2D.h:294
std::string wakesDir
Каталог с файлами вихревых следов
Definition Passport2D.h:276
PhysicalProperties physicalProperties
Структура с физическими свойствами задачи
Definition Passport2D.h:304
std::string defaultsFileFullName
Definition Passport2D.h:284
bool calcCoefficients
Признак вычисления коэффициентов вместо сил
Definition Passport2D.h:297
double rotateAngleVpPoints
Угол поворота точек VP.
Definition Passport2D.h:300
WakeDiscretizationProperties wakeDiscretizationProperties
Структура с параметрами дискретизации вихревого следа
Definition Passport2D.h:307
std::vector< std::string > varLine
Definition Passport2D.h:286
std::string airfoilsDir
Каталог с файлами профилей
Definition Passport2D.h:273
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:338
std::vector< AirfoilParams > airfoilParams
Список структур с параметрами профилей
Definition Passport2D.h:279
std::string switchersFileFullName
Definition Passport2D.h:285
std::string mechanicsFileFullName
Definition Passport2D.h:283
std::string fileFullName
Имена файлов
Definition Passport2D.h:282
void GetReviseParamsFromParser(const Passport &newPassport, const std::vector< std::string > paramList)
Считывание измененных параметров
NumericalSchemes numericalSchemes
Структура с используемыми численными схемами
Definition Passport2D.h:310
Класс, определяющий работу с потоком логов
Definition LogStream.h:57
Абстрактный класс, опеделяющий паспорт задачи
Структура, задающая параметры профиля
Definition Passport2D.h:208
Point2D addedMass
Присоединенная масса
Definition Passport2D.h:231
double chord
Хорда
Definition Passport2D.h:225
std::string mechanicalSystem
Definition Passport2D.h:238
std::pair< Point2D, Point2D > initialGab
Начальные габариты (прочитанные из файла, ло масштабирования и разворота на угол атаки)
Definition Passport2D.h:213
Point2D basePoint
Смещение центра масс (перенос профиля)
Definition Passport2D.h:219
int mechanicalSystemType
Тип механической системы
Definition Passport2D.h:237
std::string fileAirfoil
Имя файла с начальным состоянием профилей (без полного пути)
Definition Passport2D.h:210
double angle
Угол поворота (угол атаки)
Definition Passport2D.h:228
std::string mechanicalSystemParameters
Definition Passport2D.h:239
Point2D scale
Коэффициент масштабирования
Definition Passport2D.h:222
size_t requiredNPanels
Желаемое число панелей для разбиения геометрии
Definition Passport2D.h:216
bool inverse
Признак разворота нормалей (для расчета внутреннего течения)
Definition Passport2D.h:234
Структура, задающая используемые численные схемы
Definition Passport2D.h:175
std::pair< std::string, int > boundaryCondition
Метод аппроксимации граничных условий
Definition Passport2D.h:193
std::pair< std::string, int > velocityComputation
Definition Passport2D.h:183
std::pair< std::string, int > linearSystemSolver
Definition Passport2D.h:177
Структура, задающая физические свойства задачи
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:156
std::string fileSource
Имя файла с положениями источников (без полного пути)
Definition Passport2D.h:150
double delta
Расстояние, на которое рождаемый вихрь отодвигается от профиля
Definition Passport2D.h:138
double coefEpsAst
Коэффициент для вычислекния eps_ast.
Definition Passport2D.h:153
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