My Project
|
Contains element data and relevant functions. More...
#include <LineElement.h>
Inherited by L2Element, and L3Element.
Public Member Functions | |
LineElement () | |
Constructor for LineElement. | |
std::vector< int > | getIEG () |
Returns the nodes making up the element. More... | |
void | calculateArea () |
Calculates the area of the element. | |
void | calculateAreaCenter () |
Calculates the area center of the element. | |
double | getLength () |
Returns the length of the element. More... | |
double | getBendingStiffnessX (double Ay) |
Calculates and returns the bending stiffness of the element about the global x-axis. More... | |
double | getBendingStiffnessY (double Ax) |
Calculates and returns the bending stiffness of the element about the global y-axis. More... | |
double | getBendingStiffnessProduct (double Ax, double Ay) |
Calculates and returns the bending stiffness product. More... | |
double | xOfZeta (double zeta) |
Calculates and returns the the distance in the x-direction between the integration point in the element and the element area centre. More... | |
double | yOfZeta (double zeta) |
Calculates and returns the the distance in the y-direction between the integration point in the element and the element area centre. More... | |
double | xOfZeta2 (double zeta, Node node1, Node node2) |
Calculates and returns the x-coordinate of the integration point zeta. More... | |
double | yOfZeta2 (double zeta, Node node1, Node node2) |
Calculates and returns the y-coordinate of the integration point zeta. More... | |
double | omegaOfZeta (double zeta, Node node1, Node node2) |
Calculates and returns the omega-value of the integration point zeta. More... | |
void | calculateElementShearFlow (Eigen::VectorXd p) |
Calculates shear flow of element. More... | |
void | flipElement () |
Flips order of the nodes in the nodes list. | |
double | calculateDeltaOmega_c () |
Calculates the slope of \( \omega_c \) within the element. More... | |
double | calculateShearCenterX (Node node1, Node node2) |
Calculates and returns shear center in x-direction. More... | |
double | calculateShearCenterY (Node node1, Node node2) |
Calculates and returns shear center in y-direction. More... | |
double | calculateShearCenterC (Node node1, Node node2) |
Calculates shear constant C. More... | |
double | calculateElementWarpingStiffness (Node node1, Node node2, double xs, double ys, double C) |
Calculates and returns the warping stiffness of the element. More... | |
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. More... | |
double | findGLobalIntersectionX (double local_intersection) |
Transforms local element x-coordinate into global mesh coordinates. More... | |
double | findGLobalIntersectionY (double local_intersection) |
Transforms local element y-coordinate into global mesh coordinates. More... | |
void | initializeCVectors (double start_omega, double end_omega) |
Initializes \(\boldsymbol{{C}_0}^T \) and \(\Delta \boldsymbol{C} \). More... | |
std::vector< double > | getMidPoint () |
Calculates and returns the mid point of each element with direction. More... | |
double | getTauSTV () |
Returns the calculated value of tau from pure st. Venant torsional analysis. More... | |
Public Attributes | |
double | thickness |
Element's thickness. | |
double | E |
Young's modulus for the element. | |
double | G |
Shear modulus for the element. | |
double | area |
Total area of element. | |
double | length |
Length of the element. | |
double | ecx |
Element's area centre in x-direction. | |
double | ecy |
Element's area centre in y-direction. | |
double | xl1 |
Distance in x-direction from node to element area center. | |
double | xl2 |
Distance in x-direction from node to element area center. | |
double | yl1 |
Distance in y-direction from node to element area center. | |
double | yl2 |
Distance in y-direction from node to element area center. | |
double | xs |
Position of shear center in x-direction. | |
double | ys |
Position of shear center in y-direction. | |
double | C |
Shear center constant. | |
double | nrOfCycles |
Denotes the number of cells this element is a part of. | |
double | delta_omega_c |
The slope ( \( \Delta \omega_c \)) of \(\omega_c\). | |
double | delta_q |
The slope of the shearflow within the element. \( \Delta q \). | |
double | q_tilde |
Modified shear flow in line element. | |
double | tau_stv |
Tau due to St. Venant torsional moment. | |
bool | elementSorted = false |
Boolean to check wether the element is sorted. | |
bool | visited = false |
Boolean checking if this element has been visited before (to simplify logic by avoiding an additional for loop) | |
std::vector< double > | q_0 |
Contains the shear flow values for the mid point of the element from different type of loading (Vx, Vy, Twrp and Resulting) applied respectively. | |
std::vector< int > | nodes |
Contains the nodes of the element. | |
std::vector< double > | xNodePositions |
Elements nodepositions in x-direction. | |
std::vector< double > | yNodePositions |
Elements nodepositions in y-direction. | |
std::vector< double > | xNodePositionPrincipal |
Nodal x-coordinates in principal axes. | |
std::vector< double > | yNodePositionPrincipal |
Nodal y-coordinates in principal axes. | |
std::vector< int > | cycleId |
Contains the id of all the cells the element is part of. | |
std::vector< double > | resultingSigma |
Contains the resulting sigma x value for all extra points created within the element. | |
std::vector< std::vector< std::vector< double > > > | extraPoints |
Vector holding all the data for the extra points created, for each type of loading (Vx, Vy, Twrp and resulting). More... | |
VectorXd | C_0 |
Vector holding element average x, y and omega values used in calculation of q and \(\Delta q\). More... | |
VectorXd | delta_C |
Vector holding element delta x, y and omega values used in calculation of q and \(\Delta q\). More... | |
Contains element data and relevant functions.
double LineElement::calculateDeltaOmega_c | ( | ) |
Calculates the slope of \( \omega_c \) within the element.
\( \Delta \omega_c = (x_i y_j - x_j y_i) - \frac{2q \Delta l}{Gt} \)
void LineElement::calculateElementShearFlow | ( | Eigen::VectorXd | p | ) |
Calculates shear flow of element.
When the element is part of two cells, the absolute value of the shear flow decreases when both contributions are attributed
p | vector containing shear flow of each cell |
double LineElement::calculateElementWarpingStiffness | ( | Node | node1, |
Node | node2, | ||
double | xs, | ||
double | ys, | ||
double | C | ||
) |
Calculates and returns the warping stiffness of the element.
\( EI_\omega = \int_A E(\omega_c - x_s y + y_s x + C)^2 dA \)
node1 | first node in element |
node2 | last node in element |
xs | shear center in x-direction |
ys | shear center in y-direction |
C | shear constant |
double LineElement::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.
Since this method is only used for linear relationship, a maximum of one intersection point can be found. This intersection point is then appended to a global list of intersection points
a | the z-value of the first node point in the element |
b | the z-value of the seccond(last) node point in the element. |
*IntersectionPoints | pointer to a global list of intersection points (used in LineResultWriter) |
*intersection | global boolean stating whether the element has an intersection point or not |
Calculates shear constant C.
\( C = -\frac{\int_A E \omega_c dA}{EA} \)
node1 | first node in element |
node2 | last node in element |
Calculates and returns shear center in x-direction.
\( x_s = \frac{\int_A E \omega_c y dA}{EI_x} \)
node1 | first node in element |
node2 | last node in element |
Calculates and returns shear center in y-direction.
\( y_s = -\frac{\int_A E \omega_c x dA}{EI_y} \)
node1 | first node in element |
node2 | last node in element |
double LineElement::findGLobalIntersectionX | ( | double | local_intersection | ) |
Transforms local element x-coordinate into global mesh coordinates.
local_intersection | x-coordinate of local intersection point |
double LineElement::findGLobalIntersectionY | ( | double | local_intersection | ) |
Transforms local element y-coordinate into global mesh coordinates.
local_intersection | y-coordinate of local intersection point |
double LineElement::getBendingStiffnessProduct | ( | double | Ax, |
double | Ay | ||
) |
Calculates and returns the bending stiffness product.
\( EI^e_{xy} = \int_{A_e} xy E\;dA_e + abE_eA_e \)
\( b = ecy - Ay \)
\( a = ecx - Ax \)
Ax | x-coordinate of area centre |
Ay | y-coordinate of area centre |
double LineElement::getBendingStiffnessX | ( | double | Ay | ) |
Calculates and returns the bending stiffness of the element about the global x-axis.
\( EI^e_x = \int_{A_e} y^2 E_e\;dA_e + b^2E_e A_e \)
\( b = ecy - Ay \)
Ay | y-coordinate of area centre |
double LineElement::getBendingStiffnessY | ( | double | Ax | ) |
Calculates and returns the bending stiffness of the element about the global y-axis.
\( EI^e_y = \int_{A_e} x^2 E_e\;dA_e + a^2E_eA_e \)
\( a = ecx - Ax \)
Ax | x-coordinate of area centre |
std::vector< int > LineElement::getIEG | ( | ) |
Returns the nodes making up the element.
double LineElement::getLength | ( | ) |
Returns the length of the element.
std::vector< double > LineElement::getMidPoint | ( | ) |
Calculates and returns the mid point of each element with direction.
double LineElement::getTauSTV | ( | ) |
Returns the calculated value of tau from pure st. Venant torsional analysis.
void LineElement::initializeCVectors | ( | double | start_omega, |
double | end_omega | ||
) |
Initializes \(\boldsymbol{{C}_0}^T \) and \(\Delta \boldsymbol{C} \).
start_omega | \(\omega\) for the start node of the element |
end_omega | \(\omega\) for the end node of the element |
Calculates and returns the omega-value of the integration point zeta.
\( \omega = \frac{node1.omega + node2.omega}{2} + \frac{node2.omega - node1.omega}{2} \zeta \)
integration | point with value between -1 and 1 |
node1 | first node of the element |
node2 | last node of the element |
double LineElement::xOfZeta | ( | double | zeta | ) |
Calculates and returns the the distance in the x-direction between the integration point in the element and the element area centre.
\( \Delta x = xl1*\zeta \)
zeta | integration point with value between -1 and 1 |
Calculates and returns the x-coordinate of the integration point zeta.
\( x = \frac{node1.x + node2.x}{2} + \frac{node2.x - node1.x}{2} \zeta \)
zeta | integration point with value between -1 and 1 |
node1 | first node of the element |
node2 | last node of the element |
double LineElement::yOfZeta | ( | double | zeta | ) |
Calculates and returns the the distance in the y-direction between the integration point in the element and the element area centre.
\( \Delta y = yl1*\zeta \)
zeta | integration point with value between -1 and 1 distance in y-direction for integration point |
Calculates and returns the y-coordinate of the integration point zeta.
\( y = \frac{node1.y + node2.y}{2} + \frac{node2.y - node1.y}{2} \zeta \)
zeta | integration point with value between -1 and 1 |
node1 | first node of the element |
node2 | last node of the element |
VectorXd LineElement::C_0 |
Vector holding element average x, y and omega values used in calculation of q and \(\Delta q\).
\( \boldsymbol{{C}_0}^T = \begin{bmatrix} 1 & y_0 & x_0 & \omega_0 \end{bmatrix} \)
VectorXd LineElement::delta_C |
Vector holding element delta x, y and omega values used in calculation of q and \(\Delta q\).
\( \boldsymbol{\Delta C}^T = \begin{bmatrix} 0 & \Delta y & \Delta x & \Delta \omega \end{bmatrix} \)
std::vector<std::vector<std::vector<double> > > LineElement::extraPoints |
Vector holding all the data for the extra points created, for each type of loading (Vx, Vy, Twrp and resulting).
Contains all the extra points needed to visualize quadratic shapes in ParaView.