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, 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 55 of file Mechanics2DDeformable.cpp.

55 :
56 W(W_),
57 fsi(fsi_),
58 rho(10000.0),
59 F(0.02),
60 EJ(1.1703239289446188),
61 R(R_),
62 x0(x0_),
63 L(L_)
64{
65 qCoeff.resize(R);
66 currentPhi.resize(R);
67 currentDPhi.resize(R);
69};
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,
double  deformParam 
) const

Definition at line 137 of file Mechanics2DDeformable.cpp.

138{
139 const double c1 = -0.825;
140 const double c2 = 1.625;
141 double alpha;
142 if (fsi) //Turek
143 alpha = 0.0; //Turek
144 else
145 alpha = 0.1; //Fish
146
147
148 const double lambda = 1.0;
149 const double length = 1.0;
150 const double f = deformParam;
151
152 auto A = [c1, c2](double xi) {return 1.0 + (xi - 1.0) * c1 + (xi * xi - 1.0) * c2;};
153
154 //double result = alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
155 double result = W.getPassport().physicalProperties.accelCft(t) * alpha * A(x + 0.5) * sin(DPI * ((x + 0.5) / (length * lambda) - f * t));
156
157 return result;
158}
PhysicalProperties physicalProperties
Структура с физическими свойствами задачи
Definition Passport2D.h:289
const Passport & getPassport() const
Возврат константной ссылки на паспорт
Definition World2D.h:251
const double DPI
Число .
Definition defs.h:88
double accelCft(double currentTime) const
Функция-множитель, позволяющая моделировать разгон

◆ getTotalDisp()

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

Definition at line 129 of file Mechanics2DDeformable.cpp.

130{
131 double result = 0.0;
132 for (int i = 0; i < R; ++i)
133 result += phi(i, t) * shape(i, x);
134 return result;
135}
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 71 of file Mechanics2DDeformable.cpp.

72{
73 return currentPhi[n];
74}
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 76 of file Mechanics2DDeformable.cpp.

77{
78 double cm = rho * F;
79 double ck = EJ * sqr(sqr(unitLambda[n] / L));
80 double cq = qCoeff[n];
81 //std::cout << "ck = " << ck << std::endl;
82 //std::cout << "lam = " << unitLambda[n] << std::endl;
83 //std::cout << "lam = " << unitLambda[n] / L << std::endl;
84
85 //double omega = sqrt(ck / cm);
86 //double cDamp = 0.0; //0.005;
87
88 double phiAst = currentPhi[n] + 0.5 * dt * currentDPhi[n];
89 double psiAst = currentDPhi[n] + 0.5 * dt * (-ck * currentPhi[n] /*- cDamp * omega * currentDPhi[n]*/ - cq) / cm;
90
91 currentPhi[n] += dt * psiAst;
92 currentDPhi[n] += dt * (-ck * phiAst /*- cDamp * omega * psiAst*/ - cq) / cm;
93}
T sqr(T x)
Умножение a на комплексно сопряженноe к b.
Definition defsBH.h:101

◆ solveDU_RK()

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

Definition at line 95 of file Mechanics2DDeformable.cpp.

95 {
96 double cm = rho * F;
97 double ck = EJ * sqr(sqr(unitLambda[n] / L));
98 double cq = qCoeff[n];
99
100 double omega = sqrt(ck / cm);
101 double cDamp = 0.0;
102
103 auto acceleration = [&](double phi, double dphi) {
104 return (-ck * phi - cDamp * omega * dphi - cq) / cm;
105 };
106
107 double phi = currentPhi[n];
108 double dphi = currentDPhi[n];
109
110 double k1_phi = dphi;
111 double k1_dphi = acceleration(phi, dphi);
112
113 double k2_phi = dphi + 0.5 * dt * k1_dphi;
114 double k2_dphi = acceleration(phi + 0.5 * dt * k1_phi, dphi + 0.5 * dt * k1_dphi);
115
116 double k3_phi = dphi + 0.5 * dt * k2_dphi;
117 double k3_dphi = acceleration(phi + 0.5 * dt * k2_phi, dphi + 0.5 * dt * k2_dphi);
118
119 double k4_phi = dphi + dt * k3_dphi;
120 double k4_dphi = acceleration(phi + dt * k3_phi, dphi + dt * k3_dphi);
121
122 currentPhi[n] = phi + (dt / 6.0) * (k1_phi + 2 * k2_phi + 2 * k3_phi + k4_phi);
123 currentDPhi[n] = dphi + (dt / 6.0) * (k1_dphi + 2 * k2_dphi + 2 * k3_dphi + k4_dphi);
124
125 std::cout << "phi = " << currentPhi[n] << std::endl;
126}
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: