Element.h
1 #include <vector>
2 #include "Material.h"
3 #include "Node.h"
4 
5 #define EIGEN_NO_DEBUG
6 #include <Eigen/Sparse>
7 
8 #ifndef ELEMENT
9 #define ELEMENT
10 
11 using namespace Eigen;
13 class Element
14 {
15 
16 public:
17  // \cond
18  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
19  // \endcond
20 
21  Element();
22 
23  std::vector<Node> nodes;
24  double area;
28 
29  double Iex;
30  double Iey;
31  double Iexy;
32 
33  double ecx;
34  double ecy;
35 
36  double dx;
37  double dy;
38 
39  double deltaGIt;
40 
41  double torsion_xs;
42  double torsion_ys;
43 
44  virtual void calculateStiffnessMatrix() = 0;
45  virtual void calculateElementLoadTorsion() = 0;
46  virtual void calculateElementLoadShearX() = 0;
47  virtual void calculateElementLoadShearY() = 0;
48  virtual void computeTauTorsion(double rateOfTwist) = 0;
49  virtual void computeTauShear(double Cx, double Cy) = 0;
50  virtual void calculateArea() = 0;
51  virtual void calculateAreaCentre() = 0;
52  virtual double getBendingStiffnessX(double) = 0;
53  virtual double getBendingStiffnessY(double) = 0;
54  virtual double getBendingStiffnessProduct(double, double) = 0;
55  virtual double calculateDeltaGIt() = 0;
56  virtual double xOfZeta(double zeta1, double zeta2) = 0;
57  virtual double yOfZeta(double zeta1, double zeta2) = 0;
58  virtual void calculateElementLoadComposite(double C_x, double C_y, double rateOfTwist) = 0;
59  virtual void computeTauComposite(double C_x, double C_y, double rateOfTwist) = 0;
60  virtual double getShearFactorContributionX() = 0;
61  virtual double getShearFactorContributionY() = 0;
62  virtual void calculateTorsionShearCenter() = 0;
63 
70  void calculateConstants(int type);
71 
72  MatrixXd B;
73  MatrixXd G;
74  MatrixXd XoverY;
75  MatrixXd xCoordinates;
76  MatrixXd yCoordinates;
77 
78  MatrixXd cornerCoordinatesX;
79  MatrixXd cornerCoordinatesY;
80  MatrixXd elementStiffness;
81  MatrixXd elementLoad;
83  MatrixXd initialStrain;
84 
85  void setElementValue(MatrixXd &system, MatrixXd &local);
86  MatrixXd tauResult;
88  MatrixXd getZeroVector();
89 
90 
91 private:
92 };
93 
94 #endif
int elementType
Defines what type of element this element is (value &#39;2&#39; for T3,&#39;9&#39; for T6, &#39;3&#39; for Q4 and &#39;10&#39; for Q9...
Definition: Element.h:26
Contains element data and relevant functions for massive analysis.
Definition: Element.h:13
MatrixXd cornerCoordinatesY
y-position of corner nodes
Definition: Element.h:79
double torsion_ys
Shear center in y-direction derived from torsional analysis.
Definition: Element.h:42
double torsion_xs
Shear center in x-direction derived from torsional analysis.
Definition: Element.h:41
MatrixXd G
Matrix with shear module used to determine initial element loads in torsional analysis. 2x2 matrix.
Definition: Element.h:73
MatrixXd elementLoad
Matrix used to temporarily hold element load coefficients, .
Definition: Element.h:81
MatrixXd B
Matrix containing differentials of shapefunction with respect to x and y respectively. 2 rows , number of columns equals number of nodes.
Definition: Element.h:72
MatrixXd elementDisplacement
Matrix used to temporarily hold element displacement values, .
Definition: Element.h:82
Material material
Elements material with Youngs modulus, poisson&#39;s ratio and shear modulus.
Definition: Element.h:25
double ecy
Elements area centre in y-direction.
Definition: Element.h:34
double Iex
Elements second area moment about x-axis.
Definition: Element.h:29
double deltaGIt
Contribution to St.Venant stiffness of the cross-section ( ) from this element.
Definition: Element.h:39
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
std::vector< Node > nodes
Vector containing nodes of the element.
Definition: Element.h:23
double dy
Distance in y-direction between mesh- and node area centre.
Definition: Element.h:37
MatrixXd XoverY
Matrix with all x-coordinates followed by all y-coordinates for the nodes in order. Number of rows equal number of nodes times two.
Definition: Element.h:74
int numberOfCorners
Number of corner nodes for the element. 3 for triangular and 4 for quadrilateral. ...
Definition: Element.h:27
double ecx
Elements area centre in x-direction.
Definition: Element.h:33
double area
Elements total area.
Definition: Element.h:24
MatrixXd xCoordinates
Matrix with x-coordinates for the nodes in order. Number of rows equal number of nodes.
Definition: Element.h:75
double Iey
Elements second area moment about y-axis.
Definition: Element.h:30
MatrixXd yCoordinates
Matrix with y-coordinates for the nodes in order. Number of rows equal number of nodes.
Definition: Element.h:76
MatrixXd cornerCoordinatesX
x-position of corner nodes
Definition: Element.h:78
double dx
Distance in x-direction between mesh- and node area centre.
Definition: Element.h:36
MatrixXd extrapolationMatrix
Matrix used for extrapolating stress results.
Definition: Element.h:87
double Iexy
Elements second area moment product.
Definition: Element.h:31
MatrixXd initialStrain
Matrix used to temporarily hold element initial strain coefficients, .
Definition: Element.h:83
MatrixXd elementStiffness
Matrix used to temporarily hold element stiffnes coefficients, .
Definition: Element.h:80
MatrixXd tauResult
Stores the tau values of the element temporarily, before it&#39;s written to file.
Definition: Element.h:86