1 #include "LineParser.h" 2 #include "CycleDetection.h" 7 #include "ResultWriter.h" 130 std::vector<std::vector<LineElement*>>
cycles;
364 std::vector<LineElement*>
findCommonElements(std::vector<LineElement*> a, std::vector<LineElement*> b);
371 std::vector<LineElement*>
DFS();
381 bool contains(std::vector<int> a,
int b);
int SIGMA_X_DUE_TO_B
Int corrosponding to sigma_x due to B.
Definition: LineMesh.h:23
int TAU_DUE_TO_VY
Int corrosponding to tau due to Vy.
Definition: LineMesh.h:15
void addElementPoints(VectorXd f_d, int type)
Adds points along the element used for visualization of quadratic functions.
Definition: LineMesh.cpp:664
Performs cycle detection on the cross section.
Definition: CycleDetection.h:7
void transformCoordinates()
Transforms coordinates for computation purposes.
Definition: LineMesh.cpp:150
void calculateOmegaIntersection()
Iterates through all elements and finds an omega intersection point if it exists. ...
Definition: LineMesh.cpp:514
void calculateKappaX()
Calculates shear deformation factor x.
Definition: LineMesh.cpp:1071
void printCells()
Prints each cell, and it's elements.
Definition: LineMesh.cpp:216
double T_wrp
Warping torsion to be applied to the cross section.
Definition: LineMesh.h:55
int SIGMA_X_RESULTING
Int corrosponding to resulting sigma_x.
Definition: LineMesh.h:24
void findElementIntersections(VectorXd f_d, int type)
Finds the element intersection points for quadratic functions along the element.
Definition: LineMesh.cpp:701
std::vector< std::vector< LineElement * > > cycles
2d vector containing all cycles in the cross-section
Definition: LineMesh.h:130
void createA2Matrix()
Creates A2 matrix.
Definition: LineMesh.cpp:815
int OMEGA_DIAGRAM
Int corrosponding to omega diagram.
Definition: LineMesh.h:27
double EImax
Bending stiffness about global x- and y-axes.
Definition: LineMesh.h:33
double kappaY
Shear deformation factor y.
Definition: LineMesh.h:44
void findElementsNextToNode()
Finds the number of elements that are neighboring each node.
Definition: LineMesh.cpp:1047
double N
Normal force to be applied to the cross section.
Definition: LineMesh.h:48
void initiateCVectors()
Initializes the C vectors for each element.
Definition: LineMesh.cpp:655
void calculateKappaY()
Calculates shear deformation factor y.
Definition: LineMesh.cpp:1111
std::vector< LineElement * > findCommonElements(std::vector< LineElement * > a, std::vector< LineElement * > b)
Finds common elements in two vectors, could be moved to a UTILS class.
Definition: LineMesh.cpp:395
void printOmega_c()
prints omega_c values
Definition: LineMesh.cpp:635
int TAU_DUE_TO_VX
Int corrosponding to tau due to Vx.
Definition: LineMesh.h:14
void calculatePrincipalMomentOfAreas()
Calculates the principal moment of areas EIxp and EIyp.
Definition: LineMesh.cpp:141
int SIGMA_X_DUE_TO_MY
Int corrosponding to sigma_x due to My.
Definition: LineMesh.h:22
double Ay
Area centre for mesh in X- and Y-direction.
Definition: LineMesh.h:31
void calculateAreaStiffness()
Calculates the area stiffness.
Definition: LineMesh.cpp:99
int numberOfNodes
Number of nodes in the cross-section.
Definition: LineMesh.h:56
double C
Shear center constant.
Definition: LineMesh.h:38
void printEigenMatrix(MatrixXd A, std::string s)
prints out a matrix on Eigen format
Definition: LineMesh.cpp:943
void calculateEk()
Calculates average E value of all elements surrounding a node.
Definition: LineMesh.cpp:554
void solveSystemEquation()
Solves the system of equations.
Definition: LineMesh.cpp:270
void calculateQ0(VectorXd f_d, int type)
Calculates q0.
Definition: LineMesh.cpp:905
std::vector< double > tauIntersect
Vector containing intersectionpoints of tau.
Definition: LineMesh.h:187
VectorXd p
Modified shear flows around each cell.
Definition: LineMesh.h:62
void calculatePureStvTorsionStress()
Calculates the pure St.Venants torsion stress.
Definition: LineMesh.cpp:566
std::vector< LineElement * > elements
List of all elements in mesh.
Definition: LineMesh.h:128
double T_stv
St.Venant torsion to be applied to the cross section.
Definition: LineMesh.h:54
void calculateOmega_c()
Calculates for all the elements.
Definition: LineMesh.cpp:327
void findIntersections()
Finds diagram intersections for Sigma_x as well as omega.
Definition: LineMesh.cpp:1057
Contains element data and relevant functions.
Definition: LineElement.h:6
std::vector< std::vector< double > > midPoints
Vector containing the middle points of each elements.
Definition: LineMesh.h:132
double My
Bending moment in y-direction to be applied to the cross section.
Definition: LineMesh.h:50
void calculateG1Matrix()
Calculates G1 matrix.
Definition: LineMesh.cpp:846
double Vx
Shear force in x-direction to be applied to the cross section.
Definition: LineMesh.h:51
void calculateSigmaXIntersection(int type, std::vector< std::vector< std::vector< double >>> *intersectionPoints, std::vector< std::vector< bool >> *intersection)
Iterates through all elements and finds /f$ /f$ intersection values if they exist.
Definition: LineMesh.cpp:527
VectorXd a
A vector of doubles representing the areas of the cells found in the elements.
Definition: LineMesh.h:61
double anglePrincipalAxes
Stores the angle of the principal axes in degrees.
Definition: LineMesh.h:29
double calculateQs(double s, LineElement *element, VectorXd f_d, int type)
Calculates the shear value at a distance s along the element.
Definition: LineMesh.cpp:1007
std::vector< LineElement * > DFS()
Creates a vector of LineElement pointers that are sorted in a DFS fashion, could be extracted to a UT...
Definition: LineMesh.cpp:414
void calculateResultingSigmaExtra()
Calculates to resulting sigma for all extra points in the element.
Definition: LineMesh.cpp:1148
void constructBMatrix()
Constructs coefficiant matrix .
Definition: LineMesh.cpp:227
int TAU_RESULTING
Int corrosponding to tau due to resulting tau.
Definition: LineMesh.h:17
double Mx
Bending moment in x-direction to be applied to the cross section.
Definition: LineMesh.h:49
void calculateOmega()
Calculates omega for each node in the cross-section.
Definition: LineMesh.cpp:490
double calculateVonMisesStress(LineElement *element, int j)
Calculates von mises stress.
Definition: LineMesh.cpp:1166
void calculateNodalTau(VectorXd f_d, int type)
Calculates tau values for the nodes.
Definition: LineMesh.cpp:773
void calculateTauSTV()
Calculates tau for applied T_stv.
Definition: LineMesh.cpp:1032
VectorXd q0
Vector of shear flow in the middle of each element.
Definition: LineMesh.h:126
std::vector< std::vector< bool > > omegaIntersection
Two dimensional vector containing boolean values if an element has an intersection of the omega diagr...
Definition: LineMesh.h:183
MatrixXd G2
Matrix with G values, used to calculate q_0.
Definition: LineMesh.h:125
void initializeMatrices()
Initializes matrices.
Definition: LineMesh.cpp:954
void printCellAreas()
Prints cell areas.
Definition: LineMesh.cpp:609
std::vector< double > extraPoint
Vector of function values at points along the element, used for display of quadratic functions...
Definition: LineMesh.h:186
MatrixXd D
D matrix.
Definition: LineMesh.h:76
void calculateAxialStress()
Calculates the resulting axial stress for all nodes in the cross-section, as well as axial stress du...
Definition: LineMesh.cpp:583
double kappaX
Shear deformation factor x.
Definition: LineMesh.h:43
int TAU_STV
Int corrosponding to tau due to T_stv.
Definition: LineMesh.h:18
double baseG
Shear modulus of base material.
Definition: LineMesh.h:46
double EIyp
Bending stiffness about principal x- and y-axes.
Definition: LineMesh.h:34
void calculateStVenantStiffness(CycleDetection c)
Calculates the St.Venant stiffness .
Definition: LineMesh.cpp:298
std::vector< std::vector< std::vector< double > > > omegaIntersectionPoints
Three dimensional vector containing intersection points for .
Definition: LineMesh.h:152
double ys
y-position of hear center
Definition: LineMesh.h:37
void printDeltaOmega_c()
Prints delta_Omega_c values.
Definition: LineMesh.cpp:645
double baseE
Young's modulus of base material.
Definition: LineMesh.h:45
void calculateG2Matrix()
Calculates G2 matrix.
Definition: LineMesh.cpp:883
double Sy
TODO.
Definition: LineMesh.h:35
MatrixXd A1
Matrix with directional values. The matrix dimensions are [nrOfNodes x nrOfElements]. is +1 if the LineElement direction is away from the node, and -1 if the direction is towards the node.
Definition: LineMesh.h:122
VectorXd f_d_Vy
Vector containing input forces and moments .
Definition: LineMesh.h:109
double stVenantStiffness
St.Venant stiffness GI_t.
Definition: LineMesh.h:41
void calculateShearCenter()
Calculates shear center of the cross-section by summing the shear centers of each individual element...
Definition: LineMesh.cpp:456
void calculateTau(VectorXd f_d, int type)
Calculates tau for different applied loads.
Definition: LineMesh.cpp:1025
double xs
x-position of shear center
Definition: LineMesh.h:36
void createA1Matrix()
Creates A1 matrix.
Definition: LineMesh.cpp:798
MatrixXd A2
Matrix with directional values. The matrix dimensions are [nrOfCells x nrOfElements]. is +1 if the LineElement coincides with a positive counter clockwise direction of the cell, and -1 otherwise.
Definition: LineMesh.h:123
bool contains(std::vector< int > a, int b)
Checks wether a vector of ints contains a certain int, could be placed in a UTILS class...
Definition: LineMesh.cpp:446
std::vector< std::vector< std::vector< double > > > sigmaXIntersectionPoints
Three dimensional vector containing intersection points for .
Definition: LineMesh.h:181
std::vector< Node > nodes
List of all nodes in mesh.
Definition: LineMesh.h:129
void calculateEffectiveStress()
Calculates effective stress for cross-section.
Definition: LineMesh.cpp:1174
int TAU_DUE_TO_WRP
Int corrosponding to tau due to T_wrp.
Definition: LineMesh.h:16
void constructAVector(CycleDetection c)
Constructs area vector a.
Definition: LineMesh.cpp:261
void calculateMeshProperties()
Calculates mesh properties.
Definition: LineMesh.cpp:90
int EFFECTIVE_STRESS
Int corrosponding to resulting effective stress.
Definition: LineMesh.h:25
void findMidPoints()
Finds the middle points of each element.
Definition: LineMesh.cpp:1039
void calculateShearFlow()
Calculates the shear flow for all elements in the cross-section.
Definition: LineMesh.cpp:319
std::vector< LineElement * > orderedElements
List of all elements ordered in a DFS manner.
Definition: LineMesh.h:131
void printCoordinates()
Prints node coordinates.
Definition: LineMesh.cpp:616
void calculateAnglePrincipalAxes()
Calculates angle of the principal axes.
Definition: LineMesh.cpp:184
double warpingStiffness
Warping stiffness EI_.
Definition: LineMesh.h:42
Contains mesh data and has function to calculate and retrieve mesh properties.
Definition: LineMesh.h:11
void printOmega()
Prints omega values.
Definition: LineMesh.cpp:625
int numberOfElementSegments
Number of element segments along an element, used for displaying quadratic functions.
Definition: LineMesh.h:57
int SIGMA_X_DUE_TO_N
Int corrosponding to sigma_x due to N.
Definition: LineMesh.h:20
double Bi
Bimoment to be applied to the cross section.
Definition: LineMesh.h:53
double totalArea
The sum of all element areas.
Definition: LineMesh.h:39
MatrixXd B
Coefficiant matrix B is used to find st. venants stiffness.
Definition: LineMesh.h:60
double EA
Axial stiffness.
Definition: LineMesh.h:32
int numberOfExtraElementPoints
Number of extra points along an element, used for displaying quadratic functions. ...
Definition: LineMesh.h:58
std::vector< std::vector< std::vector< double > > > tauIntersectionPoints
Three dimensional vector containing intersection points for .
Definition: LineMesh.h:215
double Vy
Shear force in y-direction to be applied to the cross section.
Definition: LineMesh.h:52
double areaStiffness
Area stiffness EA.
Definition: LineMesh.h:40
int SIGMA_X_DUE_TO_MX
Int corrosponding to sigma_x due to Mx.
Definition: LineMesh.h:21
double anglePrincipalAxesRad
Stores the angle of the principal axes in radians.
Definition: LineMesh.h:30
std::vector< std::vector< bool > > sigmaXIntersection
Two dimensional vector containing boolean values if an element has an intersection or not...
Definition: LineMesh.h:243
VectorXd f_d_Wrp
Vector containing input forces and moments .
Definition: LineMesh.h:120
void calculateWarpingStiffness()
Calculates the warping stiffness (EI_w) for the mesh by summing the warping stiffness found in each e...
Definition: LineMesh.cpp:498
void calculateBendingStiffness()
Calculates seccond area moments.
Definition: LineMesh.cpp:116
VectorXd f_d
Vector containing input forces and moments .
Definition: LineMesh.h:87
VectorXd f_d_Vx
Vector containing input forces and moments .
Definition: LineMesh.h:98
MatrixXd G1
Matrix with G values, used to calculate q_0.
Definition: LineMesh.h:124