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 World2D & W
 
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 /*
61 rho(10000.0),
62 F(0.04),
63 EJ(1.0 * 1.0),
64 */
65
66 //Turek
67 rho(10000.0),
68 F(0.02),
69 EJ(1.17032),
70
71 R(R_),
72 x0(x0_),
73 L(L_)
74{
75 qCoeff.resize(R);
76 currentPhi.resize(R);
77 currentDPhi.resize(R);
79};
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 152 of file Mechanics2DDeformable.cpp.

153{
154 const double c1 = deformParam[3];
155 const double c2 = deformParam[4];
156 double alpha;
157
158 if (fsi) //Turek
159 alpha = 0.0; //Turek
160 else
161 alpha = deformParam[1]; //Fish
162
163
164 const double lambda = deformParam[2];
165 const double length = 1.0;
166 const double f = deformParam[0];
167 if (!fsi && (f == 0))
168 alpha = 0.0;
169
170 auto A = [c1, c2](double xi) {return 1.0 + (xi - 1.0) * c1 + (xi * xi - 1.0) * c2;};
171
172 //double result = alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
173 double result = W.getPassport().physicalProperties.accelCft(t) * alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
174
175 return result;
176}
const double DPI
Число .
Definition defs.h:82
PhysicalProperties physicalProperties
Структура с физическими свойствами задачи
Definition Passport2D.h:304
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 141 of file Mechanics2DDeformable.cpp.

142{
143 double result = 0.0;
144 for (int i = 0; i < R; ++i)
145 result += phi(i, t) * shape(i, x);
146 return result;
147}
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 81 of file Mechanics2DDeformable.cpp.

82{
83 return currentPhi[n];
84}
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 86 of file Mechanics2DDeformable.cpp.

87{
88 double cm = rho * F;
89 double ck = EJ * sqr(sqr(unitLambda[n] / L));
90 double cq = qCoeff[n];
91
92 double omega = sqrt(ck / cm);
93 double cDamp = 0.0;
94
95 double phiAst = currentPhi[n] + 0.5 * dt * currentDPhi[n];
96 double psiAst = currentDPhi[n] + 0.5 * dt * (-ck * currentPhi[n] - cDamp * omega * currentDPhi[n] - cq) / cm;
97
98 currentPhi[n] += dt * psiAst;
99 currentDPhi[n] += dt * (-ck * phiAst - cDamp * omega * psiAst - cq) / cm;
100
101 //std::cout << "n = " << n << std::endl;
102 //std::cout << "ck / cm = " << ck / cm << std::endl;
103 //std::cout << "cq / cm = " << cq / cm << std::endl;
104 //std::cout << "lam = " << unitLambda[n] / L << std::endl;
105}
T sqr(T x)
Возведение числа в квадрат
Definition defs.h:463

◆ solveDU_RK()

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

Definition at line 107 of file Mechanics2DDeformable.cpp.

107 {
108 double cm = rho * F;
109 double ck = EJ * sqr(sqr(unitLambda[n] / L));
110 double cq = qCoeff[n];
111
112 double omega = sqrt(ck / cm);
113 double cDamp = 0.0;
114
115 auto acceleration = [&](double phi, double dphi) {
116 return (-ck * phi - cDamp * omega * dphi - cq) / cm;
117 };
118
119 double phi = currentPhi[n];
120 double dphi = currentDPhi[n];
121
122 double k1_phi = dphi;
123 double k1_dphi = acceleration(phi, dphi);
124
125 double k2_phi = dphi + 0.5 * dt * k1_dphi;
126 double k2_dphi = acceleration(phi + 0.5 * dt * k1_phi, dphi + 0.5 * dt * k1_dphi);
127
128 double k3_phi = dphi + 0.5 * dt * k2_dphi;
129 double k3_dphi = acceleration(phi + 0.5 * dt * k2_phi, dphi + 0.5 * dt * k2_dphi);
130
131 double k4_phi = dphi + dt * k3_dphi;
132 double k4_dphi = acceleration(phi + dt * k3_phi, dphi + dt * k3_dphi);
133
134 currentPhi[n] = phi + (dt / 6.0) * (k1_phi + 2 * k2_phi + 2 * k3_phi + k4_phi);
135 currentDPhi[n] = dphi + (dt / 6.0) * (k1_dphi + 2 * k2_dphi + 2 * k3_dphi + k4_dphi);
136
137 std::cout << "phi = " << currentPhi[n] << std::endl;
138}
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: