LineElement.h
1 #define EIGEN_NO_DEBUG
2 #include "Node.h"
3 #include "Material.h"
4 
5 #pragma once
6 class LineElement
8 {
9 public:
13  LineElement();
14  ~LineElement();
15 
16  double thickness;
18 
19  double area;
20  double length;
21  double ecx;
22  double ecy;
23  double xl1;
24  double xl2;
25  double yl1;
26  double yl2;
27  double xs;
28  double ys;
29  double C;
30  double nrOfCycles;
31  double delta_omega_c;
32  double delta_q;
33  double q_tilde;
34  double tau_stv;
35 
36 
37  bool elementSorted = false;
38  bool visited = false;
39 
40  std::vector<double> q_0;
41  std::vector<Node> nodes;
42 
43  std::vector<int> cycleId;
44  std::vector<double> resultingSigma;
45 
55  std::vector<std::vector<std::vector<double>>> extraPoints;
56 
66  VectorXd C_0;
67 
77  VectorXd delta_C;
78 
79  void calculateArea();
80  void calculateAreaCenter();
81 
87  double getLength();
88 
99  double getBendingStiffnessX(double Ay);
100 
111  double getBendingStiffnessY(double Ax);
112 
125  double getBendingStiffnessProduct(double Ax, double Ay);
126 
127 
136  double xOfZeta(double zeta);
137 
146  double yOfZeta(double zeta);
147 
159  double xOfZeta2(double zeta, Node node1, Node node2);
160 
172  double yOfZeta2(double zeta, Node node1, Node node2);
173 
186  double omegaOfZeta(double zeta, Node node1, Node node2);
187 
196  void calculateElementShearFlow(Eigen::VectorXd p);
197 
198  void flipElement();
199 
200 
208  double calculateDeltaOmega_c();
209 
220  double calculateShearCenterX(Node node1, Node node2);
221 
232  double calculateShearCenterY(Node node1, Node node2);
233 
245  double calculateShearCenterC(Node node1, Node node2);
246 
261  double calculateElementWarpingStiffness(Node node1,Node node2, double xs, double ys, double C);
262 
274  double calculateIntersection(double a, double b, std::vector<std::vector<double>> *IntersectionPoints, std::vector<bool> *intersection);
275 
282  double findGLobalIntersectionX(double local_intersection);
283 
290  double findGLobalIntersectionY(double local_intersection);
291 
298  void initializeCVectors(double start_omega, double end_omega);
299 
304  std::vector<double> getMidPoint();
305 
311  double getTauSTV();
312 
313 };
314 
double getBendingStiffnessProduct(double Ax, double Ay)
Calculates and returns the bending stiffness product.
Definition: LineElement.cpp:80
void calculateElementShearFlow(Eigen::VectorXd p)
Calculates shear flow of element.
Definition: LineElement.cpp:115
double delta_omega_c
The slope ( ) of .
Definition: LineElement.h:31
double xl2
Distance in x-direction from node 2 to element area center.
Definition: LineElement.h:24
Struct that holds nodal properties.
Definition: Node.h:10
double ecy
Area centre in y-direction for the element.
Definition: LineElement.h:22
bool elementSorted
Boolean to check whether the element is sorted.
Definition: LineElement.h:37
double xs
Position of shear center in x-direction.
Definition: LineElement.h:27
double xl1
Distance in x-direction from node 1 to element area center.
Definition: LineElement.h:23
double calculateShearCenterY(Node node1, Node node2)
Calculates and returns shear center in y-direction.
Definition: LineElement.cpp:175
double omegaOfZeta(double zeta, Node node1, Node node2)
Calculates and returns the omega-value of the integration point zeta.
Definition: LineElement.cpp:111
VectorXd delta_C
Vector holding element delta x, y and omega values used in calculation of q and . ...
Definition: LineElement.h:77
double getLength()
Returns the length of the element.
Definition: LineElement.cpp:36
double calculateElementWarpingStiffness(Node node1, Node node2, double xs, double ys, double C)
Calculates and returns the warping stiffness of the element.
Definition: LineElement.cpp:200
bool visited
Boolean checking if this element has been visited before (to simplify logic by avoiding an additional...
Definition: LineElement.h:38
VectorXd C_0
Vector holding element average x, y and omega values used in calculation of q and ...
Definition: LineElement.h:66
Contains element data and relevant functions for thin-wall analysis.
Definition: LineElement.h:7
double nrOfCycles
Denotes the number of cells this element is a part of.
Definition: LineElement.h:30
double xOfZeta(double zeta)
Calculates and returns the the distance in the x-direction between the integration point in the eleme...
Definition: LineElement.cpp:95
double ys
Position of shear center in y-direction.
Definition: LineElement.h:28
std::vector< double > q_0
Contains the shear flow values for the mid point of the element from different type of loading $ and...
Definition: LineElement.h:40
LineElement()
Constructor for LineElement.
Definition: LineElement.cpp:5
double thickness
Thickness of the element.
Definition: LineElement.h:16
double xOfZeta2(double zeta, Node node1, Node node2)
Calculates and returns the x-coordinate of the integration point zeta.
Definition: LineElement.cpp:104
double getBendingStiffnessX(double Ay)
Calculates and returns the bending stiffness of the element about the global x-axis.
Definition: LineElement.cpp:47
Contains material data such as Young&#39;s Modulus, Shear Modulus and Poisson&#39;s ratio, and if needed could include additional material properties.
Definition: Material.h:3
double ecx
Area centre in x-direction for the element.
Definition: LineElement.h:21
double calculateShearCenterX(Node node1, Node node2)
Calculates and returns shear center in x-direction.
Definition: LineElement.cpp:161
double area
Total area of element.
Definition: LineElement.h:19
double yOfZeta(double zeta)
Calculates and returns the the distance in the y-direction between the integration point in the eleme...
Definition: LineElement.cpp:100
double calculateShearCenterC(Node node1, Node node2)
Calculates shear constant C.
Definition: LineElement.cpp:189
double length
Length of the element.
Definition: LineElement.h:20
double yl2
Distance in y-direction from node 2 to element area center.
Definition: LineElement.h:26
double calculateDeltaOmega_c()
Calculates the slope of within the element.
Definition: LineElement.cpp:152
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:214
double tau_stv
Tau due to St. Venant torsional moment.
Definition: LineElement.h:34
void initializeCVectors(double start_omega, double end_omega)
Initializes and .
Definition: LineElement.cpp:257
void calculateAreaCenter()
Calculates the area center of the element.
Definition: LineElement.cpp:25
std::vector< Node > nodes
List of nodes in Line.
Definition: LineElement.h:41
void flipElement()
Flips order of the nodes in the nodes list.
Definition: LineElement.cpp:137
double getTauSTV()
Returns the calculated value of tau from pure st. Venant torsional analysis.
Definition: LineElement.cpp:287
std::vector< int > cycleId
Contains the id of all the cells the element is part of.
Definition: LineElement.h:43
double delta_q
The slope of the shearflow within the element. .
Definition: LineElement.h:32
double q_tilde
Modified shear flow in line element.
Definition: LineElement.h:33
double findGLobalIntersectionX(double local_intersection)
Transforms local element x-coordinate into global mesh coordinates.
Definition: LineElement.cpp:253
std::vector< double > resultingSigma
Contains the resulting sigma x value for all extra points created within the element.
Definition: LineElement.h:44
double getBendingStiffnessY(double Ax)
Calculates and returns the bending stiffness of the element about the global y-axis.
Definition: LineElement.cpp:64
double findGLobalIntersectionY(double local_intersection)
Transforms local element y-coordinate into global mesh coordinates.
Definition: LineElement.cpp:249
double yOfZeta2(double zeta, Node node1, Node node2)
Calculates and returns the y-coordinate of the integration point zeta.
Definition: LineElement.cpp:107
Material material
The material of the element.
Definition: LineElement.h:17
std::vector< double > getMidPoint()
Calculates and returns the mid point of each element with direction.
Definition: LineElement.cpp:270
void calculateArea()
Calculates the area of the element.
Definition: LineElement.cpp:20
double C
Shear center constant.
Definition: LineElement.h:29
double yl1
Distance in y-direction from node 1 to element area center.
Definition: LineElement.h:25
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:55