VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
VM2D::Passport Class Reference

#include <Passport2D.h>

Inheritance diagram for VM2D::Passport:
Collaboration diagram for VM2D::Passport:

Public Member Functions

 Passport (VMlib::LogStream &infoStream, const std::string &_problemName, const size_t _problemNumber, const std::string &_filePassport, const std::string &_mechanics, const std::string &_defaults, const std::string &_switchers, const std::vector< std::string > &vars)
 Конструктор
 
virtual ~Passport ()
 Деструктор
 

Public Attributes

std::string airfoilsDir
 Каталог с файлами профилей
 
std::string wakesDir
 Каталог с файлами вихревых следов
 
std::vector< AirfoilParamsairfoilParams
 Список структур с параметрами профилей
 
bool rotateForces
 Признак работы в "географической" системе координат
 
bool calcCoefficients
 Признак вычисления коэффициентов вместо сил
 
double rotateAngleVpPoints
 Угол поворота точек VP.
 
PhysicalProperties physicalProperties
 Структура с физическими свойствами задачи
 
WakeDiscretizationProperties wakeDiscretizationProperties
 Структура с параметрами дискретизации вихревого следа
 
NumericalSchemes numericalSchemes
 Структура с используемыми численными схемами
 
std::string dir
 Рабочий каталог задачи
 
std::string problemName
 Название задачи
 
size_t problemNumber
 Номер задачи
 
TimeDiscretizationProperties timeDiscretizationProperties
 Структура с параметрами процесса интегрирования по времени
 

Protected Attributes

LogStream info
 Поток для вывода логов и сообщений об ошибках
 

Private Member Functions

virtual void GetAllParamsFromParser (std::istream &mainStream, std::istream &mechanicsStream, std::istream &defaultStream, std::istream &switcherStream, std::istream &varsStream) override
 Считывание всех параметров расчета из соответствующих потоков
 
virtual void PrintAllParams () override
 Печать всех параметров расчета в поток логов
 

Detailed Description

\brief Класс, опеделяющий паспорт двумерной задачи

\author Марчевский Илья Константинович
\author Сокол Ксения Сергеевна
\author Рятина Евгения Павловна
Author
Колганова Александра Олеговна \Version 1.14
Date
6 марта 2026 г.

Definition at line 251 of file Passport2D.h.

Constructor & Destructor Documentation

◆ Passport()

Passport::Passport ( VMlib::LogStream infoStream,
const std::string &  _problemName,
const size_t  _problemNumber,
const std::string &  _filePassport,
const std::string &  _mechanics,
const std::string &  _defaults,
const std::string &  _switchers,
const std::vector< std::string > &  vars 
)

Конструктор

Осуществляет чтение всех данных из соответствующих потоков, полностью инициализирует паспорт

Parameters
[in,out]infoStreamбазовый поток для вывода логов
[in]_problemNameконстантная ссылка наназвание задачи
[in]_problemNumberномер (по счету) решаемой задачи
[in]_filePassportконстантная ссылка на файл (без пути) с паспортом задачи
[in]_mechanicsконстантная ссылка на файл (c путем) со словарем механических систем
[in]_defaultsконстантная ссылка на имя файла (с путем) с параметрами по умолчанию
[in]_switchersконстантная ссылка на имя файла (с путем) со значениями параметров-переключателей
[in]varsконстантная ссылка на список переменных, заданных в виде строк

Definition at line 69 of file Passport2D.cpp.

70: PassportGen(infoStream, _problemName, _problemNumber, _filePassport, _mechanics, _defaults, _switchers, vars),
72{
73 std::string fileFullName = dir + _filePassport;
74 std::string mechanicsFileFullName = _mechanics;
75 std::string defaultsFileFullName = _defaults;
76 std::string switchersFileFullName = _switchers;
77
78 if (
79 fileExistTest(fileFullName, info, true, { "txt", "TXT"}) &&
80 fileExistTest(defaultsFileFullName, info, true, { "txt", "TXT" }) &&
81 fileExistTest(switchersFileFullName, info, true, { "txt", "TXT" }) &&
82 fileExistTest(mechanicsFileFullName, info, true, { "txt", "TXT" })
83 )
84 {
85 std::string str = VMlib::StreamParser::VectorStringToString(vars);
86 std::stringstream varsStream(str);
87
88 std::stringstream mainStream;
89 mainStream << VMlib::Preprocessor(fileFullName).resultString;
90
91 std::stringstream mechanicsStream;
92 mechanicsStream << VMlib::Preprocessor(mechanicsFileFullName).resultString;
93
94 std::stringstream defaultsStream;
95 defaultsStream << VMlib::Preprocessor(defaultsFileFullName).resultString;
96
97 std::stringstream switchersStream;
98 switchersStream << VMlib::Preprocessor(switchersFileFullName).resultString;
99
100 GetAllParamsFromParser(mainStream, mechanicsStream, defaultsStream, switchersStream, varsStream);
101
103 }
104}
PhysicalProperties physicalProperties
Структура с физическими свойствами задачи
Definition Passport2D.h:289
virtual void PrintAllParams() override
Печать всех параметров расчета в поток логов
virtual void GetAllParamsFromParser(std::istream &mainStream, std::istream &mechanicsStream, std::istream &defaultStream, std::istream &switcherStream, std::istream &varsStream) override
Считывание всех параметров расчета из соответствующих потоков
TimeDiscretizationProperties timeDiscretizationProperties
Структура с параметрами процесса интегрирования по времени
LogStream info
Поток для вывода логов и сообщений об ошибках
std::string dir
Рабочий каталог задачи
PassportGen(LogStream &infoStream, const std::string &_problemName, const size_t _problemNumber, const std::string &_filePassport, const std::string &_mechanics, const std::string &_defaults, const std::string &_switchers, const std::vector< std::string > &vars)
Конструктор
Класс, позволяющий выполнять предварительную обработку файлов
std::string resultString
Строка, содержащая окончательный результат обработки файла
static std::string VectorStringToString(const std::vector< std::string > &_vecString)
Объединение вектора (списка) из строк в одну строку
bool fileExistTest(std::string &fileName, LogStream &info, bool exitKey=false, const std::list< std::string > &extList={})
Проверка существования файла
Definition defs.h:342
Here is the call graph for this function:

◆ ~Passport()

virtual VM2D::Passport::~Passport ( )
inlinevirtual

Деструктор

Definition at line 322 of file Passport2D.h.

322{ };

Member Function Documentation

◆ GetAllParamsFromParser()

void Passport::GetAllParamsFromParser ( std::istream &  mainStream,
std::istream &  mechanicsStream,
std::istream &  defaultStream,
std::istream &  switcherStream,
std::istream &  varsStream 
)
overrideprivatevirtual

Считывание всех параметров расчета из соответствующих потоков

Parameters
[in]mainStreamссылка на основной поток
[in]mechanicsStreamссылка на поток со словарем механических систем
[in]defaultStreamссылка на поток с параметрами по умолчанию
[in]switcherStreamссылка на поток со значениями параметров-переключателей
[in]varsStreamссылка на поток с параметрами конкретной задачи и переменными
Todo:
Удалить в следующих версиях. Добавлено для совместимости со старым синтаксисом задания разгона потока

Implements VMlib::PassportGen.

Definition at line 108 of file Passport2D.cpp.

116{
117 // 1. Разбор паспорта в целом
118
119 //создаем парсер и связываем его с нужным потоком
120 std::unique_ptr<VMlib::StreamParser> parser;
121 parser.reset(new VMlib::StreamParser(info, "parser", mainStream, defaultStream, switcherStream, varsStream));
122
123 //считываем общие параметры
124 parser->get("rho", physicalProperties.rho);
125 parser->get("vInf", physicalProperties.vInf);
126 parser->get("vRef", physicalProperties.vRef, &defaults::defaultVRef);
127
128 if (physicalProperties.vRef == 0.0)
129 {
130 if (physicalProperties.vInf.length() == 0.0)
131 {
132 info('e') << "Reference velocity should be non-zero!" << std::endl;
133 exit(1);
134 }
136 }
137
138 //Считывание схемы разгона потока
139 {
140 std::pair<std::pair<std::string, int>, std::string> velAccel;
141 bool defParamAccelVel = parser->get("accelVel", velAccel, &defaults::defaultVelAccel);
142 if (velAccel.first.second != -1)
143 {
144 physicalProperties.typeAccel = velAccel.first;
145 std::stringstream sstr(velAccel.second);
146 std::istream& istr(sstr);
147
148 std::unique_ptr<VMlib::StreamParser> parserAccel;
149
150 parserAccel.reset(new VMlib::StreamParser(info, "parserAccel", istr, defaultStream, switcherStream, varsStream));
151 bool defParamTime = parserAccel->get("timeAccel", physicalProperties.timeAccel, &defaults::defaultTimeAccel, false);
152 parserAccel->get("_DEFVAR_0", physicalProperties.timeAccel, &physicalProperties.timeAccel, defParamAccelVel && !defParamTime);
153 }
154 else
155 {
156 info('e') << "Velocity acceleration scheme <" << velAccel.first.first << "> is unknown" << std::endl;
157 exit(1);
158 }
159
161 if (!defParamAccelVel)
162 parser->get("timeAccel", physicalProperties.timeAccel, &defaults::defaultTimeAccel);
163 else
164 {
165 double tempTimeAccel;
166 if (parser->get("timeAccel", tempTimeAccel, &defaults::defaultTimeAccel, false))
167 {
168 info('e') << "timeAccel parameter is set twice!" << std::endl;
169 exit(1);
170 }
171 }
172 }
173
174
175 parser->get("nu", physicalProperties.nu);
176
178 parser->get("timeStop", timeDiscretizationProperties.timeStop);
179 parser->get("dt", timeDiscretizationProperties.dt);
181
182
183 //Считывание схемы сохранения файлов Vtx
184 std::pair<std::pair<std::string, int>, std::string> saveVtx;
185 bool defParamSaveVtx = parser->get("saveVt?", saveVtx, &defaults::defaultSaveVtx);
186 if (saveVtx.first.second != -1)
187 {
189 std::stringstream sstr(saveVtx.second);
190 std::istream& istr(sstr);
191
192 std::unique_ptr<VMlib::StreamParser> parserSaveVtx;
193
194 parserSaveVtx.reset(new VMlib::StreamParser(info, "parserSaveVtx", istr, defaultStream, switcherStream, varsStream));
195 parserSaveVtx->get("_DEFVAR_0", timeDiscretizationProperties.saveVtxStep, &defaults::defaultSaveVtxStep, defParamSaveVtx);
196 }
197 else
198 {
199 std::stringstream ss;
200 ss << saveVtx.first.first;
201 int step;
202 ss >> step;
203 if (!ss.fail())
204 {
207 }
208 else
209 {
210 info('e') << "Vtx file type <" << saveVtx.first.first << "> is unknown" << std::endl;
211 exit(1);
212 }
213 }
214
215
216 //Считывание схемы сохранения файлов VP
217 std::pair<std::pair<std::string, int>, std::string> saveVP;
218 bool defParamSaveVP = parser->get("saveVP", saveVP, &defaults::defaultSaveVP);
219 if (saveVP.first.second != -1)
220 {
222 std::stringstream sstr(saveVP.second);
223 std::istream& istr(sstr);
224
225 std::unique_ptr<VMlib::StreamParser> parserSaveVP;
226
227 parserSaveVP.reset(new VMlib::StreamParser(info, "parserSaveVP", istr, defaultStream, switcherStream, varsStream));
228 parserSaveVP->get("_DEFVAR_0", timeDiscretizationProperties.saveVPstep, &defaults::defaultSaveVPstep, defParamSaveVP);
229 }
230 else
231 {
232 std::stringstream ss;
233 ss << saveVP.first.first;
234 int step;
235 ss >> step;
236 if (!ss.fail())
237 {
240 }
241 else
242 {
243 info('e') << "VP file type <" << saveVP.first.first << "> is unknown" << std::endl;
244 exit(1);
245 }
246 }
247
248 parser->get("rotateVpPoints", rotateAngleVpPoints, &defaults::rotateAngleVpPoints);
249
250
252
253
263
266 parser->get("gmresEps", numericalSchemes.gmresEps);
267
268 if (numericalSchemes.linearSystemSolver.second == 2)
269 {
270 parser->get("fastGmresTheta", numericalSchemes.gmresTheta);
271 parser->get("fastGmresMultipoleOrder", numericalSchemes.gmresMultipoleOrder);
272 }
273
275
277 {
278 parser->get("nbodyTheta", numericalSchemes.nbodyTheta);
279 parser->get("nbodyMultipoleOrder", numericalSchemes.nbodyMultipoleOrder);
280 }
281
282 //parser->get("wakeMotionIntegrator", numericalSchemes.wakeMotionIntegrator);
283 parser->get("boundaryConditionSatisfaction", numericalSchemes.boundaryCondition, &defaults::defaultBoundaryCondition);
284
285 parser->get("airfoilsDir", airfoilsDir, &defaults::defaultAirfoilsDir);
286 parser->get("wakesDir", wakesDir, &defaults::defaultWakesDir);
287
290
291 //Для обдува ветром, когда углы считаются по компасу
292 //parser->get("geographicalAngles", geographicalAngles, &defaults::defaultGeographicalAngles);
293 //if (geographicalAngles && (physicalProperties.vInf[1] != 0.0))
294 //{
295 // info('e') << "For geographical angles vInf should be horizontal; now vInf = " << physicalProperties.vInf << "." << std::endl;
296 // exit(1);
297 //}
298
299 parser->get("rotateForces", rotateForces, &defaults::defaultRotateForces);
300 parser->get("calcCoefficients", calcCoefficients, &defaults::defaultCalcCoefficients);
301
302 std::vector<std::string> airfoil;
303 parser->get("airfoil", airfoil, &defaults::defaultAirfoil);
304
305 // 2. Разбор параметров профилей
306
307 //определяем число профилей и организуем цикл по ним
308 size_t nAirfoil = airfoil.size();
309 //*(defaults::defaultPinfo) << "Number of airfoils = " << nAirfoil << endl;
310 for (size_t i = 0; i < nAirfoil; ++i)
311 {
312 //делим имя файла + выражение в скобках на 2 подстроки
313 std::pair<std::string, std::string> airfoilLine = VMlib::StreamParser::SplitString(info, airfoil[i], false);
314
315 AirfoilParams prm;
316 //первая подстрока - имя файла
317 prm.fileAirfoil = airfoilLine.first;
318
319 //вторую подстроку разделяем на вектор из строк по запятым, стоящим вне фигурных скобок
320 std::vector<std::string> vecAirfoilLineSecond = VMlib::StreamParser::StringToVector(airfoilLine.second, '{', '}');
321
322 //создаем парсер и связываем его с параметрами профиля
323 std::stringstream aflStream(VMlib::StreamParser::VectorStringToString(vecAirfoilLineSecond));
324 std::unique_ptr<VMlib::StreamParser> parserAirfoil;
325
326 parserAirfoil.reset(new VMlib::StreamParser(info, "airfoil parser", aflStream, defaultStream, switcherStream, varsStream));
327
328 //считываем нужные параметры с учетом default-значений
329 parserAirfoil->get("nPanels", prm.requiredNPanels, &defaults::defaultRequiredNPanels);
330
331 parserAirfoil->get("basePoint", prm.basePoint, &defaults::defaultBasePoint);
332
333 std::vector<double> tmpScale, defaultTmpScale = { defaults::defaultScale[0], defaults::defaultScale[1] };
334
335 parserAirfoil->get("scale", tmpScale, &defaultTmpScale);
336 switch (tmpScale.size())
337 {
338 case 1:
339 prm.scale[0] = prm.scale[1] = tmpScale[0];
340 break;
341 case 2:
342 prm.scale[0] = tmpScale[0];
343 prm.scale[1] = tmpScale[1];
344 break;
345 default:
346 info('e') << "Error in _scale_ value for airfoil" << std::endl;
347 exit(1);
348 }
349 //parserAirfoil->get("scale", prm.scalexy, &defaults::defaultScale);
350
351
352 parserAirfoil->get("angle", prm.angle, &defaults::defaultAngle);
353 prm.angle *= PI / 180.0;
354
355 parserAirfoil->get("chord", prm.chord, &defaults::defaultChord);
356
357 parserAirfoil->get("addedMass", prm.addedMass, &defaults::defaultAddedMass);
358
359
360 parserAirfoil->get("inverse", prm.inverse, &defaults::defaultInverse);
361 parserAirfoil->get("mechanicalSystem", prm.mechanicalSystem, &defaults::defaultMechanicalSystem);
362
364 {
365 prm.mechanicalSystemType = 0;
367 }
368 else
369 {
370 std::unique_ptr<VMlib::StreamParser> parserMechanicsList;
371 std::unique_ptr<VMlib::StreamParser> parserSwitchers;
372 parserMechanicsList.reset(new VMlib::StreamParser(info, "mechanical parser", mechanicsStream, defaultStream, switcherStream, varsStream, { prm.mechanicalSystem }));
373 parserSwitchers.reset(new VMlib::StreamParser(info, "switchers parser" ,switcherStream));
374
375 std::string mechString;
376
377 parserMechanicsList->get(prm.mechanicalSystem, mechString);
378
379 //делим тип мех.системы + выражение в скобках (ее параметры) на 2 подстроки
380 std::pair<std::string, std::string> mechanicsLine = VMlib::StreamParser::SplitString(info, mechString);
381
382 std::string mechTypeAlias = mechanicsLine.first;
383 parserSwitchers->get(mechTypeAlias, prm.mechanicalSystemType);
384
385 //вторую подстроку разделяем на вектор из строк по запятым, стоящим вне фигурных скобок
386 std::vector<std::string> vecMechLineSecond = VMlib::StreamParser::StringToVector(mechanicsLine.second, '{', '}');
388 }
389
390 //отправляем считанные параметры профиля в структуру данных паспорта
391 airfoilParams.push_back(prm);
392
393 } //for i
394}//GetAllParamsFromParser(...)
bool rotateForces
Признак работы в "географической" системе координат
Definition Passport2D.h:279
std::string wakesDir
Каталог с файлами вихревых следов
Definition Passport2D.h:270
bool calcCoefficients
Признак вычисления коэффициентов вместо сил
Definition Passport2D.h:282
double rotateAngleVpPoints
Угол поворота точек VP.
Definition Passport2D.h:285
WakeDiscretizationProperties wakeDiscretizationProperties
Структура с параметрами дискретизации вихревого следа
Definition Passport2D.h:292
std::string airfoilsDir
Каталог с файлами профилей
Definition Passport2D.h:267
std::vector< AirfoilParams > airfoilParams
Список структур с параметрами профилей
Definition Passport2D.h:273
NumericalSchemes numericalSchemes
Структура с используемыми численными схемами
Definition Passport2D.h:295
Класс, позволяющий выполнять разбор файлов и строк с настройками и параметрами
static std::vector< std::string > StringToVector(std::string line, char openBracket='(', char closeBracket=')')
Pазбор строки, содержащей запятые, на отдельные строки
static std::pair< std::string, std::string > SplitString(LogStream &info, std::string line, bool upcase=true)
Разбор строки на пару ключ-значение
P length() const
Вычисление 2-нормы (длины) вектора
Definition numvector.h:374
const double PI
Число .
Definition defs.h:82
const VMlib::Point2D defaultBasePoint
Базовое смещение профиля
Definition defs.h:189
const double defaultDistFar
Радиус убивания дальнего следа
Definition defs.h:129
const bool defaultCalcCoefficients
Признак расчета безразмерных коэффициентов вместо сил
Definition defs.h:162
const std::string defaultWakesDir
Каталог с файлами вихревых следов
Definition defs.h:172
const int defaultSaveVisStress
Шаг подсчета поля скорости и давления
Definition defs.h:117
const size_t defaultRequiredNPanels
Желаемое число панелей для разбиения геометрии
Definition defs.h:144
const double defaultVRef
Референсная скорость, равная нулю, что означает ее равенство скорости набегающего потока
Definition defs.h:141
const Point2D defaultScale
Коэффициент масштабирования профиля
Definition defs.h:193
const double defaultDelta
Расстояние, на которое рождаемый вихрь отодвигается от профиля
Definition defs.h:132
const bool defaultRotateForces
Признак работы в "географической" системе координат
Definition defs.h:159
const Point2D defaultAddedMass
Присоединенная масса
Definition defs.h:202
const bool defaultInverse
Признак разворота нормалей (для расчета внутреннего течения)
Definition defs.h:205
const int defaultSaveVPstep
Definition defs.h:110
const double defaultEpsCol
Радиус вихря по умолчанию
Definition defs.h:126
const double defaultTimeAccel
Definition defs.h:106
const double defaultChord
Хорда
Definition defs.h:199
const std::pair< std::string, int > defaultVelocityComputation
Способ вычисления скоростей вихрей
Definition defs.h:153
const std::string defaultFileSource("")
Файл с источниками
const std::vector< std::string > defaultAirfoil({})
Список профилей
const double defaultAngle
Угол атаки
Definition defs.h:196
const double defaultMaxGamma
Число вихрей, рождаемых на одной панели
Definition defs.h:138
const int defaultVortexPerPanel
Число вихрей, рождаемых на одной панели
Definition defs.h:135
const int defaultNameLength
Число разрядов в имени файла
Definition defs.h:120
const double rotateAngleVpPoints
Угол поворота точек VP.
Definition defs.h:165
const std::string defaultAirfoilsDir
Каталог с файлами профилей
Definition defs.h:168
const std::pair< std::pair< std::string, int >, std::string > defaultSaveVtx
Шаг подсчета поля скорости и давления
Definition defs.h:113
const std::pair< std::pair< std::string, int >, std::string > defaultVelAccel
Время разгона
Definition defs.h:105
const double defaultTimeStart
Начало расчета
Definition defs.h:102
const std::string defaultMechanicalSystem
Definition defs.h:209
const int defaultSaveVtxStep
Definition defs.h:114
const std::pair< std::string, int > defaultBoundaryCondition
Способ удовлетворения граничного условия
Definition defs.h:147
const double defaultEps
Радиус вихря по умолчанию
Definition defs.h:123
const std::pair< std::string, int > defaultLinearSystemSolver
Способ решения линейной системы
Definition defs.h:150
const std::pair< std::pair< std::string, int >, std::string > defaultSaveVP
Шаг подсчета поля скорости и давления
Definition defs.h:109
const std::string defaultFileWake("")
Файл со следом
Point2D addedMass
Присоединенная масса
Definition Passport2D.h:227
double chord
Хорда
Definition Passport2D.h:221
std::string mechanicalSystem
Definition Passport2D.h:234
Point2D basePoint
Смещение центра масс (перенос профиля)
Definition Passport2D.h:215
int mechanicalSystemType
Тип механической системы
Definition Passport2D.h:233
std::string fileAirfoil
Имя файла с начальным состоянием профилей (без полного пути)
Definition Passport2D.h:206
double angle
Угол поворота (угол атаки)
Definition Passport2D.h:224
std::string mechanicalSystemParameters
Definition Passport2D.h:235
Point2D scale
Коэффициент масштабирования
Definition Passport2D.h:218
size_t requiredNPanels
Желаемое число панелей для разбиения геометрии
Definition Passport2D.h:212
bool inverse
Признак разворота нормалей (для расчета внутреннего течения)
Definition Passport2D.h:230
std::pair< std::string, int > boundaryCondition
Метод аппроксимации граничных условий
Definition Passport2D.h:189
std::pair< std::string, int > velocityComputation
Definition Passport2D.h:180
std::pair< std::string, int > linearSystemSolver
Definition Passport2D.h:174
std::pair< std::string, int > typeAccel
Способ разгона потока
Definition Passport2D.h:84
double vRef
Референсная скорость
Definition Passport2D.h:81
double nu
Коэффициент кинематической вязкости среды
Definition Passport2D.h:99
double timeAccel
Время разгона потока
Definition Passport2D.h:87
double rho
Плотность потока
Definition Passport2D.h:75
Point2D vInf
Скоростью набегающего потока
Definition Passport2D.h:78
int minVortexPerPanel
Минимальное число вихрей, рождаемых на каждой панели профииля
Definition Passport2D.h:141
std::string fileSource
Имя файла с положениями источников (без полного пути)
Definition Passport2D.h:150
double delta
Расстояние, на которое рождаемый вихрь отодвигается от профиля
Definition Passport2D.h:138
double eps
Радиус вихря
Definition Passport2D.h:126
double epscol
Радиус коллапса
Definition Passport2D.h:132
std::string fileWake
Имя файла с начальным состоянием вихревого следа (без полного пути)
Definition Passport2D.h:147
double maxGamma
Максимально допустимая циркуляция вихря
Definition Passport2D.h:144
double distFar
Расстояние от центра самого подветренного (правого) профиля, на котором вихри уничтожаются
Definition Passport2D.h:135
double eps2
Квадрат радиуса вихря
Definition Passport2D.h:129
double dt
Шаг по времени
Definition PassportGen.h:67
std::pair< std::string, int > fileTypeVtx
Тип файлов для сохранения скорости и давления
Definition PassportGen.h:73
double timeStart
Начальное время
Definition PassportGen.h:61
int saveVPstep
Шаг вычисления и сохранения скорости и давления
Definition PassportGen.h:80
int saveVtxStep
Шаг сохранения кадров в бинарные файлы
Definition PassportGen.h:75
int saveVisStress
Шаг вычисления и сохранения скорости и давления
Definition PassportGen.h:83
int nameLength
Число разрядов в имени файла
Definition PassportGen.h:70
double timeStop
Конечное время
Definition PassportGen.h:64
std::pair< std::string, int > fileTypeVP
Тип файлов для сохранения скорости и давления
Definition PassportGen.h:78
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintAllParams()

void Passport::PrintAllParams ( )
overrideprivatevirtual

Печать всех параметров расчета в поток логов

Implements VMlib::PassportGen.

Definition at line 398 of file Passport2D.cpp.

399{
400 const std::string str = "passport info: ";
401
402 info('i') << "--- Passport info ---" << std::endl;
403 info('-') << "rho = " << physicalProperties.rho << std::endl;
404 info('-') << "vInf = " << physicalProperties.vInf << std::endl;
405 info('-') << "vRef = " << physicalProperties.vRef << std::endl;
406 info('-') << "velAccel = " << physicalProperties.typeAccel.first << "( " << physicalProperties.timeAccel << " )" << std::endl;
407
408 info('-') << "nu = " << physicalProperties.nu << std::endl;
409 info('-') << "timeStart = " << timeDiscretizationProperties.timeStart << std::endl;
410 info('-') << "timeStop = " << timeDiscretizationProperties.timeStop << std::endl;
411 info('-') << "dt = " << timeDiscretizationProperties.dt << std::endl;
412 info('-') << "nameLength = " << timeDiscretizationProperties.nameLength << std::endl;
413 info('-') << "saveVtx = " << timeDiscretizationProperties.fileTypeVtx.first << "( " << timeDiscretizationProperties.saveVtxStep << " )" << std::endl;
414 info('-') << "saveVP = " << timeDiscretizationProperties.fileTypeVP.first << "( " << timeDiscretizationProperties.saveVPstep << " )" << std::endl;
415 info('-') << "saveVisStress = " << timeDiscretizationProperties.saveVisStress << std::endl;
416 info('-') << "eps = " << wakeDiscretizationProperties.eps << std::endl;
417 info('-') << "eps2 = " << wakeDiscretizationProperties.eps2 << std::endl;
418 info('-') << "epscol = " << wakeDiscretizationProperties.epscol << std::endl;
419 info('-') << "distFar = " << wakeDiscretizationProperties.distFar << std::endl;
420 info('-') << "delta = " << wakeDiscretizationProperties.delta << std::endl;
421 info('-') << "vortexPerPanel = " << wakeDiscretizationProperties.minVortexPerPanel << std::endl;
422 info('-') << "maxGamma = " << ((wakeDiscretizationProperties.maxGamma == 1e+10) ? 0.0 : wakeDiscretizationProperties.maxGamma) << std::endl;
423 info('-') << "linearSystemSolver = " << numericalSchemes.linearSystemSolver.first << std::endl;
425 {
426 info('-') << "gmresEps = " << numericalSchemes.gmresEps << std::endl;
427 if (numericalSchemes.linearSystemSolver.second == 2)
428 {
429 info('-') << "gmresTheta = " << numericalSchemes.gmresTheta << std::endl;
430 info('-') << "gmresMultipoleOrder = " << numericalSchemes.gmresMultipoleOrder << std::endl;
431 }
432 }
433
434 info('-') << "velocityComputation = " << numericalSchemes.velocityComputation.first << std::endl;
436 {
437 info('-') << "nbodyTheta = " << numericalSchemes.nbodyTheta << std::endl;
438 info('-') << "nbodyMultipoleOrder = " << numericalSchemes.nbodyMultipoleOrder << std::endl;
439 }
440
441 //info('-') << "wakeMotionIntegrator = " << numericalSchemes.wakeMotionIntegrator << std::endl;
442 info('_') << "boundaryCondition = " << numericalSchemes.boundaryCondition.first << std::endl;
443
444 info('-') << "airfoilsDir = " << airfoilsDir << std::endl;
445 info('-') << "wakesDir = " << wakesDir << std::endl;
446
447 //Для обдува ветром, когда углы считаются по компасу
448 //info('-') << "geographicalAngles = " << geographicalAngles << std::endl;
449 info('-') << "rotateForces = " << rotateForces << std::endl;
450 info('-') << "calcCoefficients = " << calcCoefficients << std::endl;
451 info('-') << "rotateVpPoints = " << rotateAngleVpPoints << std::endl;
452
453
454
455 info('-') << "number of airfoils = " << airfoilParams.size() << std::endl;
456 for (size_t q = 0; q < airfoilParams.size(); ++q)
457 {
458 info('_') << "airfoil[" << q << "]_file = " << airfoilParams[q].fileAirfoil << std::endl;
459 info('_') << "airfoil[" << q << "]_requiredNPanels = " << airfoilParams[q].requiredNPanels << std::endl;
460 info('_') << "airfoil[" << q << "]_basePoint = " << airfoilParams[q].basePoint << std::endl;
461 info('_') << "airfoil[" << q << "]_scale = " << airfoilParams[q].scale << std::endl;
462 info('_') << "airfoil[" << q << "]_angle = " << airfoilParams[q].angle << std::endl;
463 info('_') << "airfoil[" << q << "]_chord = " << airfoilParams[q].chord << std::endl;
464 info('_') << "airfoil[" << q << "]_inverse = " << (airfoilParams[q].inverse ? "true": "false") << std::endl;
465 info('_') << "airfoil[" << q << "]_mechanicalSystem = " << airfoilParams[q].mechanicalSystem << std::endl;
466 info('_') << "airfoil[" << q << "]_addedMass = " << airfoilParams[q].addedMass << std::endl;
467 }
468
469 info('-') << "fileWake = " << wakeDiscretizationProperties.fileWake << std::endl;
470 info('-') << "fileSource = " << wakeDiscretizationProperties.fileSource << std::endl;
471}
Here is the caller graph for this function:

Member Data Documentation

◆ airfoilParams

std::vector<AirfoilParams> VM2D::Passport::airfoilParams

Список структур с параметрами профилей

Definition at line 273 of file Passport2D.h.

◆ airfoilsDir

std::string VM2D::Passport::airfoilsDir

Каталог с файлами профилей

Definition at line 267 of file Passport2D.h.

◆ calcCoefficients

bool VM2D::Passport::calcCoefficients

Признак вычисления коэффициентов вместо сил

Definition at line 282 of file Passport2D.h.

◆ dir

std::string VMlib::PassportGen::dir
inherited

Рабочий каталог задачи

Definition at line 122 of file PassportGen.h.

◆ info

LogStream VMlib::PassportGen::info
mutableprotectedinherited

Поток для вывода логов и сообщений об ошибках

Definition at line 115 of file PassportGen.h.

◆ numericalSchemes

NumericalSchemes VM2D::Passport::numericalSchemes

Структура с используемыми численными схемами

Definition at line 295 of file Passport2D.h.

◆ physicalProperties

PhysicalProperties VM2D::Passport::physicalProperties

Структура с физическими свойствами задачи

Definition at line 289 of file Passport2D.h.

◆ problemName

std::string VMlib::PassportGen::problemName
inherited

Название задачи

Definition at line 125 of file PassportGen.h.

◆ problemNumber

size_t VMlib::PassportGen::problemNumber
inherited

Номер задачи

Definition at line 128 of file PassportGen.h.

◆ rotateAngleVpPoints

double VM2D::Passport::rotateAngleVpPoints

Угол поворота точек VP.

Definition at line 285 of file Passport2D.h.

◆ rotateForces

bool VM2D::Passport::rotateForces

Признак работы в "географической" системе координат

Признак поворота вычисляемых сил в профильную систему координат

Definition at line 279 of file Passport2D.h.

◆ timeDiscretizationProperties

TimeDiscretizationProperties VMlib::PassportGen::timeDiscretizationProperties
inherited

Структура с параметрами процесса интегрирования по времени

Definition at line 131 of file PassportGen.h.

◆ wakeDiscretizationProperties

WakeDiscretizationProperties VM2D::Passport::wakeDiscretizationProperties

Структура с параметрами дискретизации вихревого следа

Definition at line 292 of file Passport2D.h.

◆ wakesDir

std::string VM2D::Passport::wakesDir

Каталог с файлами вихревых следов

Definition at line 270 of file Passport2D.h.


The documentation for this class was generated from the following files: