-
Notifications
You must be signed in to change notification settings - Fork 0
/
beam.h
106 lines (76 loc) · 2.45 KB
/
beam.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#ifndef beam_H
#define beam_H
#include<map>
#include<set>
#include<numeric>
#include<vector>
class beam{
public:
double rRestraint=0;
std::map<double,double> loads;
std::map<double,double> meLoads;
double leng,Ela,intia;
beam(double length, double e, double Iz):leng(length), Ela(e), intia(Iz) {};
virtual ~beam(){}
virtual double wanju(const double& pos)=0;
virtual double neili(const double&)=0;
virtual double bending(const double&)=0;
//virtual void calc();
void loadjizhongli(double pos, double force);
void loadMoment(double pos, double me);
void loadlin(double& pos1,double& pos2,double& force1,double& force2);
double thetaA();
double thetaB();
};
class simpSupBeam:public beam{
public:
simpSupBeam(double length, double e, double Iz) : beam(length,e,Iz) {};
double bending(const double& pos);
double wanju(const double& pos);
double neili(const double&);
//double thetaA();
//double thetaB();
};
class overHangingBeam : public beam{
public:
overHangingBeam(double length, double e, double Iz,double rRes):beam(length,e,Iz){rRestraint=rRes; }
overHangingBeam(double length, double e, double Iz):beam(length,e,Iz){rRestraint=length/2.0; }
double wanju(const double& pos);
double neili(const double&);
double bending(const double&);
//double thetaA();
//double thetaB();
};
class continBeam{
public:
continBeam(double length, double e, double Iz):leng(length), Ela(e), intia(Iz)
{
resPos.push_back(0.0);
beams.push_back(new overHangingBeam(1,Ela,intia,.5));
addRes(length);}
~continBeam()
{
int size=beams.size();
for(int i=0;i<size;i++){
delete beams[i];
}
}
std::vector<double> resPos;
std::vector<beam*> beams;
void addRes(double pos);
void loadjizhongli(double pos, double force);
void loadMoment(double pos, double me);
void loadlin(double pos1,double pos2,double force1,double force2);
double leng,Ela,intia;
std::set<double> jizhongPos;
double bend[101]={0};
double Fsy[101]={0};
double innerMz[101]={0};
std::map<double,double> loads;
std::map<double,double> meLoads;
void calc();
double bending(const double& pos);
double wanju(const double& pos);
double neili(const double&);
};
#endif // beam_H