VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
MeasureVP2D.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: MeasureVP2D.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
40#ifndef MEASUREVP2D_H
41#define MEASUREVP2D_H
42
43#include <memory>
44
45#include "defs.h"
46
47namespace VM2D
48{
49 class WakeDataBase;
50 class World2D;
51
65 {
66 private:
68 std::vector<Point2D> initialPoints;
69
71 std::vector<Point2D> historyPoints;
72
73 std::vector<std::ostringstream> sstr;
75
76
77 public:
79 std::vector<Point2D> elasticPoints;
80
81 private:
84 std::unique_ptr<WakeDataBase> wakeVP;
85
87 std::vector<Point2D> velocity;
88
90 std::vector<double> domainRadius;
91
93 std::vector<double> pressure;
94
96 //const double pInf = 1.0;
97
98 protected:
100 const World2D& W;
101
102 public:
106 MeasureVP(const World2D& W_);
107
110
114 void ReadPointsFromFile(const std::string& dir);
115 void SetPoints(const std::vector<Point2D>& points, const std::vector<Point2D>& history);
116
119 void Initialization();
120
122 void CalcPressure();
123
125 void SaveVP();
126
128 std::vector<std::pair<Point2D, double>> GetVPinElasticPoints();
129
133 const WakeDataBase& getWakeVP() const { return *wakeVP; };
134
138 const std::vector<Point2D>& getVelocity() const { return velocity; };
139
143 std::vector<Point2D>& getNonConstVelocity() { return velocity; };
144
148 const std::vector<double>& getDomainRadius() const { return domainRadius; };
149
153 std::vector<double>& getNonConstDomainRadius() { return domainRadius; };
154
155 size_t getTotalNumberOfRealPoints() const { return initialPoints.size() + historyPoints.size(); };
156
157 };
158
159}//namespace VM2D
160
161#endif
Класс, отвечающий за вычисление поля скорости и давления в заданых точках для вывода
Definition MeasureVP2D.h:65
std::vector< Point2D > initialPoints
Точки, которые считываются из файла (давление пишется в vtk-файлы)
Definition MeasureVP2D.h:68
std::vector< double > pressure
Давление в нужных точках
Definition MeasureVP2D.h:93
void ReadPointsFromFile(const std::string &dir)
Чтение точек, в которых нужно посчитать давление и скорость
void SaveVP()
Сохранение в файл вычисленных скоростей и давлений
const World2D & W
Константная ссылка на решаемую задачу
std::vector< Point2D > historyPoints
Точки, которые считываются из файла (давление пишется в vtk и csv-файлы)
Definition MeasureVP2D.h:71
const WakeDataBase & getWakeVP() const
Возврат wakeVP.
std::unique_ptr< WakeDataBase > wakeVP
Умный указатель на точки, в которых нужно вычислять в данный момент времени Хранятся в виде "мнимой" ...
Definition MeasureVP2D.h:84
std::vector< Point2D > elasticPoints
Точки, в которых давление нужно вычислять в служебных целях (для задач гидроупругости),...
Definition MeasureVP2D.h:79
std::vector< double > domainRadius
Радиусы вихрей в нужных точках
Definition MeasureVP2D.h:90
size_t getTotalNumberOfRealPoints() const
std::vector< Point2D > & getNonConstVelocity()
Возврат velocity.
void Initialization()
Инициализация векторов для вычисления скоростей и давлений Вызывается только на тех шагах расчета,...
void SetPoints(const std::vector< Point2D > &points, const std::vector< Point2D > &history)
std::vector< std::pair< Point2D, double > > GetVPinElasticPoints()
Возврат давления в "гидроупругих" точках
const std::vector< Point2D > & getVelocity() const
Возврат velocity.
const std::vector< double > & getDomainRadius() const
Возврат domainRadius.
~MeasureVP()
Деструктор
void CalcPressure()
Расчет поля давления
std::vector< double > & getNonConstDomainRadius()
Возврат domainRadius.
std::vector< Point2D > velocity
Скорости в нужных точках
Definition MeasureVP2D.h:87
std::vector< std::ostringstream > sstr
Definition MeasureVP2D.h:73
Класс, опеделяющий набор вихрей
Класс, опеделяющий текущую решаемую задачу
Definition World2D.h:74
Описание базовых вспомогательных функций