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

Вспомогательный класс Beam для описания упругой хорды деформируемой балки More...

#include <Mechanics2DDeformable.h>

Collaboration diagram for VM2D::Beam:

Public Member Functions

double shape (int n, double x) const
 
 Beam (const World2D &W_, bool fsi_, double x0_, double L_, int R_)
 
double phi (int n, double t) const
 
void solveDU (int n, double dt)
 
void solveDU_RK (int n, double dt)
 
double getTotalDisp (double x, double t) const
 
double getGivenLaw (double x, double t, const std::vector< double > &deformParam) const
 

Public Attributes

const bool fsi
 
const World2DW
 
double x0
 
double L
 
double rho
 
double F
 
double EJ
 
int R
 
const std::vector< double > unitLambda = { 1.87510407, 4.69409113, 7.854757, 10.99554073, 14.1371683 }
 
std::vector< double > qCoeff
 
const double intSqUnitShape = 0.25
 
std::vector< double > currentPhi
 
std::vector< double > currentDPhi
 
const size_t nLastSteps = 1
 
std::vector< std::vector< double > > presLastSteps
 

Detailed Description

Вспомогательный класс Beam для описания упругой хорды деформируемой балки

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

Definition at line 61 of file Mechanics2DDeformable.h.

Constructor & Destructor Documentation

◆ Beam()

Beam::Beam ( const World2D W_,
bool  fsi_,
double  x0_,
double  L_,
int  R_ 
)

Definition at line 56 of file Mechanics2DDeformable.cpp.

56 :
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};
std::vector< double > qCoeff
std::vector< std::vector< double > > presLastSteps
std::vector< double > currentPhi
std::vector< double > currentDPhi
const World2D & W
const size_t nLastSteps

Member Function Documentation

◆ getGivenLaw()

double Beam::getGivenLaw ( double  x,
double  t,
const std::vector< double > &  deformParam 
) const

Definition at line 150 of file Mechanics2DDeformable.cpp.

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}
const double DPI
Число .
Definition defs.h:82
PhysicalProperties physicalProperties
Структура с физическими свойствами задачи
Definition Passport2D.h:301
const Passport & getPassport() const
Возврат константной ссылки на паспорт
Definition World2D.h:263
double accelCft(double currentTime) const
Функция-множитель, позволяющая моделировать разгон

◆ getTotalDisp()

double Beam::getTotalDisp ( double  x,
double  t 
) const

Definition at line 139 of file Mechanics2DDeformable.cpp.

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}
double shape(int n, double x) const
double phi(int n, double t) const
Here is the call graph for this function:

◆ phi()

double Beam::phi ( int  n,
double  t 
) const

Definition at line 79 of file Mechanics2DDeformable.cpp.

80{
81 return currentPhi[n];
82}
Here is the caller graph for this function:

◆ shape()

double VM2D::Beam::shape ( int  n,
double  x 
) const
inline

Definition at line 83 of file Mechanics2DDeformable.h.

84 {
85 double lam = unitLambda[n] / L;
86 double C4 = (sin(unitLambda[n]) - sinh(unitLambda[n])) / (cos(unitLambda[n]) + cosh(unitLambda[n]));
87
88 return 0.5 * ( -cos(lam * (x - x0)) + cosh(lam * (x - x0)) - C4 * sin(lam * (x - x0)) + C4 * sinh(lam * (x - x0)) );
89 }
const std::vector< double > unitLambda
Here is the caller graph for this function:

◆ solveDU()

void Beam::solveDU ( int  n,
double  dt 
)

Definition at line 84 of file Mechanics2DDeformable.cpp.

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}
T sqr(T x)
Возведение числа в квадрат
Definition defs.h:455

◆ solveDU_RK()

void Beam::solveDU_RK ( int  n,
double  dt 
)

Definition at line 105 of file Mechanics2DDeformable.cpp.

105 {
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}
Here is the call graph for this function:

Member Data Documentation

◆ currentDPhi

std::vector<double> VM2D::Beam::currentDPhi

Definition at line 91 of file Mechanics2DDeformable.h.

◆ currentPhi

std::vector<double> VM2D::Beam::currentPhi

Definition at line 91 of file Mechanics2DDeformable.h.

◆ EJ

double VM2D::Beam::EJ

Definition at line 71 of file Mechanics2DDeformable.h.

◆ F

double VM2D::Beam::F

Definition at line 71 of file Mechanics2DDeformable.h.

◆ fsi

const bool VM2D::Beam::fsi

Definition at line 64 of file Mechanics2DDeformable.h.

◆ intSqUnitShape

const double VM2D::Beam::intSqUnitShape = 0.25

Definition at line 80 of file Mechanics2DDeformable.h.

◆ L

double VM2D::Beam::L

Definition at line 69 of file Mechanics2DDeformable.h.

◆ nLastSteps

const size_t VM2D::Beam::nLastSteps = 1

Definition at line 93 of file Mechanics2DDeformable.h.

◆ presLastSteps

std::vector<std::vector<double> > VM2D::Beam::presLastSteps

Definition at line 94 of file Mechanics2DDeformable.h.

◆ qCoeff

std::vector<double> VM2D::Beam::qCoeff

Definition at line 77 of file Mechanics2DDeformable.h.

◆ R

int VM2D::Beam::R

Definition at line 73 of file Mechanics2DDeformable.h.

◆ rho

double VM2D::Beam::rho

Definition at line 71 of file Mechanics2DDeformable.h.

◆ unitLambda

const std::vector<double> VM2D::Beam::unitLambda = { 1.87510407, 4.69409113, 7.854757, 10.99554073, 14.1371683 }

Definition at line 76 of file Mechanics2DDeformable.h.

76{ 1.87510407, 4.69409113, 7.854757, 10.99554073, 14.1371683 };

◆ W

const World2D& VM2D::Beam::W

Definition at line 66 of file Mechanics2DDeformable.h.

◆ x0

double VM2D::Beam::x0

Definition at line 68 of file Mechanics2DDeformable.h.


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