My Project
LineElement.h
1 #define EIGEN_NO_DEBUG
2 #include "Node.h"
3 
4 #pragma once
5 class LineElement
7 {
8 public:
12  LineElement();
13  ~LineElement();
14 
15  double thickness;
16  double E;
17  double G;
18  double area;
19  double length;
20  double ecx;
21  double ecy;
22  double xl1;
23  double xl2;
24  double yl1;
25  double yl2;
26  double xs;
27  double ys;
28  double C;
29  double nrOfCycles;
30  double delta_omega_c;
31  double delta_q;
32  double q_tilde;
33  double tau_stv;
34 
35 
36  bool elementSorted = false;
37  bool visited = false;
38 
39  std::vector<double> q_0;
40  std::vector<int> nodes;
41  std::vector<double> xNodePositions;
42  std::vector<double> yNodePositions;
43  std::vector<double> xNodePositionPrincipal;
44  std::vector<double> yNodePositionPrincipal;
45  std::vector<int> cycleId;
46  std::vector<double> resultingSigma;
47 
57  std::vector<std::vector<std::vector<double>>> extraPoints;
58 
68  VectorXd C_0;
69 
79  VectorXd delta_C;
80 
86  std::vector<int> getIEG();
87  void calculateArea();
88  void calculateAreaCenter();
89 
95  double getLength();
96 
107  double getBendingStiffnessX(double Ay);
108 
119  double getBendingStiffnessY(double Ax);
120 
133  double getBendingStiffnessProduct(double Ax, double Ay);
134 
135 
144  double xOfZeta(double zeta);
145 
154  double yOfZeta(double zeta);
155 
167  double xOfZeta2(double zeta, Node node1, Node node2);
168 
180  double yOfZeta2(double zeta, Node node1, Node node2);
181 
194  double omegaOfZeta(double zeta, Node node1, Node node2);
195 
204  void calculateElementShearFlow(Eigen::VectorXd p);
205 
206  void flipElement();
207 
208 
216  double calculateDeltaOmega_c();
217 
228  double calculateShearCenterX(Node node1, Node node2);
229 
240  double calculateShearCenterY(Node node1, Node node2);
241 
253  double calculateShearCenterC(Node node1, Node node2);
254 
269  double calculateElementWarpingStiffness(Node node1,Node node2, double xs, double ys, double C);
270 
282  double calculateIntersection(double a, double b, std::vector<std::vector<double>> *IntersectionPoints, std::vector<bool> *intersection);
283 
290  double findGLobalIntersectionX(double local_intersection);
291 
298  double findGLobalIntersectionY(double local_intersection);
299 
306  void initializeCVectors(double start_omega, double end_omega);
307 
312  std::vector<double> getMidPoint();
313 
319  double getTauSTV();
320 
321 };
322 
double getBendingStiffnessProduct(double Ax, double Ay)
Calculates and returns the bending stiffness product.
Definition: LineElement.cpp:90
void calculateElementShearFlow(Eigen::VectorXd p)
Calculates shear flow of element.
Definition: LineElement.cpp:132
double delta_omega_c
The slope ( ) of .
Definition: LineElement.h:30
std::vector< int > nodes
Contains the nodes of the element.
Definition: LineElement.h:40
std::vector< double > yNodePositions
Elements nodepositions in y-direction.
Definition: LineElement.h:42
double xl2
Distance in x-direction from node to element area center.
Definition: LineElement.h:23
Struct that holds the x and y coordinate for each node.
Definition: Node.h:10
double ecy
Element&#39;s area centre in y-direction.
Definition: LineElement.h:21
bool elementSorted
Boolean to check wether the element is sorted.
Definition: LineElement.h:36
double xs
Position of shear center in x-direction.
Definition: LineElement.h:26
double E
Young&#39;s modulus for the element.
Definition: LineElement.h:16
double xl1
Distance in x-direction from node to element area center.
Definition: LineElement.h:22
double calculateShearCenterY(Node node1, Node node2)
Calculates and returns shear center in y-direction.
Definition: LineElement.cpp:199
double omegaOfZeta(double zeta, Node node1, Node node2)
Calculates and returns the omega-value of the integration point zeta.
Definition: LineElement.cpp:127
VectorXd delta_C
Vector holding element delta x, y and omega values used in calculation of q and . ...
Definition: LineElement.h:79
double getLength()
Returns the length of the element.
Definition: LineElement.cpp:44
double calculateElementWarpingStiffness(Node node1, Node node2, double xs, double ys, double C)
Calculates and returns the warping stiffness of the element.
Definition: LineElement.cpp:231
bool visited
Boolean checking if this element has been visited before (to simplify logic by avoiding an additional...
Definition: LineElement.h:37
VectorXd C_0
Vector holding element average x, y and omega values used in calculation of q and ...
Definition: LineElement.h:68
Contains element data and relevant functions.
Definition: LineElement.h:6
double G
Shear modulus for the element.
Definition: LineElement.h:17
double nrOfCycles
Denotes the number of cells this element is a part of.
Definition: LineElement.h:29
double xOfZeta(double zeta)
Calculates and returns the the distance in the x-direction between the integration point in the eleme...
Definition: LineElement.cpp:107
double ys
Position of shear center in y-direction.
Definition: LineElement.h:27
std::vector< double > yNodePositionPrincipal
Nodal y-coordinates in principal axes.
Definition: LineElement.h:44
std::vector< double > q_0
Contains the shear flow values for the mid point of the element from different type of loading (Vx...
Definition: LineElement.h:39
LineElement()
Constructor for LineElement.
Definition: LineElement.cpp:5
double thickness
Element&#39;s thickness.
Definition: LineElement.h:15
double xOfZeta2(double zeta, Node node1, Node node2)
Calculates and returns the x-coordinate of the integration point zeta.
Definition: LineElement.cpp:118
double getBendingStiffnessX(double Ay)
Calculates and returns the bending stiffness of the element about the global x-axis.
Definition: LineElement.cpp:57
double ecx
Element&#39;s area centre in x-direction.
Definition: LineElement.h:20
double calculateShearCenterX(Node node1, Node node2)
Calculates and returns shear center in x-direction.
Definition: LineElement.cpp:185
double area
Total area of element.
Definition: LineElement.h:18
double yOfZeta(double zeta)
Calculates and returns the the distance in the y-direction between the integration point in the eleme...
Definition: LineElement.cpp:113
double calculateShearCenterC(Node node1, Node node2)
Calculates shear constant C.
Definition: LineElement.cpp:217
double length
Length of the element.
Definition: LineElement.h:19
std::vector< int > getIEG()
Returns the nodes making up the element.
Definition: LineElement.cpp:16
double yl2
Distance in y-direction from node to element area center.
Definition: LineElement.h:25
double calculateDeltaOmega_c()
Calculates the slope of within the element.
Definition: LineElement.cpp:172
double calculateIntersection(double a, double b, std::vector< std::vector< double >> *IntersectionPoints, std::vector< bool > *intersection)
Calculates a possible intersection point along the element for a linear relationship, to be used during result display.
Definition: LineElement.cpp:246
double tau_stv
Tau due to St. Venant torsional moment.
Definition: LineElement.h:33
void initializeCVectors(double start_omega, double end_omega)
Initializes and .
Definition: LineElement.cpp:292
void calculateAreaCenter()
Calculates the area center of the element.
Definition: LineElement.cpp:31
void flipElement()
Flips order of the nodes in the nodes list.
Definition: LineElement.cpp:155
double getTauSTV()
Returns the calculated value of tau from pure st. Venant torsional analysis.
Definition: LineElement.cpp:322
std::vector< int > cycleId
Contains the id of all the cells the element is part of.
Definition: LineElement.h:45
double delta_q
The slope of the shearflow within the element. .
Definition: LineElement.h:31
double q_tilde
Modified shear flow in line element.
Definition: LineElement.h:32
double findGLobalIntersectionX(double local_intersection)
Transforms local element x-coordinate into global mesh coordinates.
Definition: LineElement.cpp:288
std::vector< double > resultingSigma
Contains the resulting sigma x value for all extra points created within the element.
Definition: LineElement.h:46
double getBendingStiffnessY(double Ax)
Calculates and returns the bending stiffness of the element about the global y-axis.
Definition: LineElement.cpp:74
double findGLobalIntersectionY(double local_intersection)
Transforms local element y-coordinate into global mesh coordinates.
Definition: LineElement.cpp:283
double yOfZeta2(double zeta, Node node1, Node node2)
Calculates and returns the y-coordinate of the integration point zeta.
Definition: LineElement.cpp:122
std::vector< double > getMidPoint()
Calculates and returns the mid point of each element with direction.
Definition: LineElement.cpp:305
void calculateArea()
Calculates the area of the element.
Definition: LineElement.cpp:26
std::vector< double > xNodePositions
Elements nodepositions in x-direction.
Definition: LineElement.h:41
std::vector< double > xNodePositionPrincipal
Nodal x-coordinates in principal axes.
Definition: LineElement.h:43
double C
Shear center constant.
Definition: LineElement.h:28
double yl1
Distance in y-direction from node to element area center.
Definition: LineElement.h:24
std::vector< std::vector< std::vector< double > > > extraPoints
Vector holding all the data for the extra points created, for each type of loading (Vx...
Definition: LineElement.h:57