Public Member Functions | Public Attributes | List of all members
LineElement Class Reference

Contains element data and relevant functions for thin-wall analysis. More...

#include <LineElement.h>

Public Member Functions

 LineElement ()
 Constructor for LineElement.
 
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
 Thickness of the element.
 
Material material
 The material of the element.
 
double area
 Total area of element.
 
double length
 Length of the element.
 
double ecx
 Area centre in x-direction for the element.
 
double ecy
 Area centre in y-direction for the element.
 
double xl1
 Distance in x-direction from node 1 to element area center.
 
double xl2
 Distance in x-direction from node 2 to element area center.
 
double yl1
 Distance in y-direction from node 1 to element area center.
 
double yl2
 Distance in y-direction from node 2 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 whether 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 $ \((V_x, V_y, T_{wrp}\) and Resulting) applied respectively.
 
std::vector< Nodenodes
 List of nodes in Line.
 
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...
 

Detailed Description

Contains element data and relevant functions for thin-wall analysis.

Member Function Documentation

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} \)

Returns
\( \Delta \omega_c \)
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

Parameters
pvector 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 \)

Parameters
node1first node in element
node2last node in element
xsshear center in x-direction
ysshear center in y-direction
Cshear constant
Returns
warping stiffness \(EI_{\omega}\)
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

Parameters
athe z-value of the first node point in the element
bthe z-value of the seccond(last) node point in the element.
*IntersectionPointspointer to a global list of intersection points (used in LineResultWriter)
*intersectionglobal boolean stating whether the element has an intersection point or not
Returns
value between 0 and the element length, indicating where on the element the intersection is located
double LineElement::calculateShearCenterC ( Node  node1,
Node  node2 
)

Calculates shear constant C.

\( C = -\frac{\int_A E \omega_c dA}{EA} \)

Parameters
node1first node in element
node2last node in element
Returns
shear constant C
double LineElement::calculateShearCenterX ( Node  node1,
Node  node2 
)

Calculates and returns shear center in x-direction.

\( x_s = \frac{\int_A E \omega_c y dA}{EI_x} \)

Parameters
node1first node in element
node2last node in element
Returns
shear center in x-direction \((x_s)\)
double LineElement::calculateShearCenterY ( Node  node1,
Node  node2 
)

Calculates and returns shear center in y-direction.

\( y_s = -\frac{\int_A E \omega_c x dA}{EI_y} \)

Parameters
node1first node in element
node2last node in element
Returns
shear center in y-direction \((y_s)\)
double LineElement::findGLobalIntersectionX ( double  local_intersection)

Transforms local element x-coordinate into global mesh coordinates.

Parameters
local_intersectionx-coordinate of local intersection point
Returns
global x-coordinate of element intersection point
double LineElement::findGLobalIntersectionY ( double  local_intersection)

Transforms local element y-coordinate into global mesh coordinates.

Parameters
local_intersectiony-coordinate of local intersection point
Returns
global y-coordinate of element intersection point
double LineElement::getBendingStiffnessProduct ( double  Ax,
double  Ay 
)

Calculates and returns the bending stiffness product.

\( EI^e_{xy} = \int_{A_e} xy E_e \;dA_e + abE_eA_e \)
\( b = ecy - Ay \)
\( a = ecx - Ax \)

Parameters
Axx-coordinate of area centre
Ayy-coordinate of area centre
Returns
bending stiffness product ( \( EI^e_{xy} \) )
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 \)

Parameters
Ayy-coordinate of area centre
Returns
bending stiffness about the x-axis ( \( EI^e_x \))
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 \)

Parameters
Axx-coordinate of area centre
Returns
bending stiffness about y-axis ( \( EI^e_y \))
double LineElement::getLength ( )

Returns the length of the element.

Returns
length of the element
std::vector< double > LineElement::getMidPoint ( )

Calculates and returns the mid point of each element with direction.

Returns
vector with midpoint coordinates and directions in both the x- and y-direction
double LineElement::getTauSTV ( )

Returns the calculated value of tau from pure st. Venant torsional analysis.

Returns
\( \tau_{stv} \)
void LineElement::initializeCVectors ( double  start_omega,
double  end_omega 
)

Initializes \(\boldsymbol{{C}_0}^T \) and \(\Delta \boldsymbol{C} \).

Parameters
start_omega\(\omega\) for the start node of the element
end_omega\(\omega\) for the end node of the element
double LineElement::omegaOfZeta ( double  zeta,
Node  node1,
Node  node2 
)

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 \)

Parameters
integrationpoint with value between -1 and 1
node1first node of the element
node2last node of the element
Returns
of integration point
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 \)

Parameters
zetaintegration point with value between -1 and 1
Returns
distance in x-direction for integration point
double LineElement::xOfZeta2 ( double  zeta,
Node  node1,
Node  node2 
)

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 \)

Parameters
zetaintegration point with value between -1 and 1
node1first node of the element
node2last node of the element
Returns
x-value of integration point zeta
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 \)

Parameters
zetaintegration point with value between -1 and 1 distance in y-direction for integration point
double LineElement::yOfZeta2 ( double  zeta,
Node  node1,
Node  node2 
)

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 \)

Parameters
zetaintegration point with value between -1 and 1
node1first node of the element
node2last node of the element
Returns
y-value of integration point

Member Data Documentation

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.

  • The outmost vector depends on which type of loading \((V_x, V_y, T_{wrp}\) and resulting).
  • The mid vector holds the extra point integer withing the element, ranging from 0 to numberOfExtraPoints.
  • The innermost vector contains x- and y-coordinates for the element and the tau value of interest, respectively.

The documentation for this class was generated from the following files: