My Project
Public Member Functions | Public Attributes | List of all members
QuadraticElement Class Referenceabstract

Class for implementation of quadratic elements. More...

#include <QuadraticElement.h>

Inheritance diagram for QuadraticElement:
Element Q4Element Q9Element

Public Member Functions

virtual MatrixXd getNMatrix (double zeta1, double zeta2)=0
 
virtual MatrixXd getN_etaMatrix (double xi, double eta)=0
 
virtual MatrixXd getN_xiMatrix (double xi, double eta)=0
 
virtual MatrixXd getJacobi (double xi, double eta)=0
 
virtual MatrixXd getBMatrix (MatrixXd jacobi, double xi, double eta)=0
 
void setExtrapolationMatrix ()
 Creates the matrix used for extrapolating results. More...
 
void resetElementLoad ()
 Resets element load to all zeros.
 
void calculateElementLoadTorsion ()
 Calculates the initial load vector for torsion \(\boldsymbol{S}^0\). More...
 
void calculateElementLoadShearX ()
 Calculates the initial load vector \(\boldsymbol{S}_x^0\) for applied shear along x-axis. More...
 
void calculateElementLoadShearY ()
 Calculates the initial load vector \(\boldsymbol{S}_y^0\) for applied shear along y-axis. More...
 
void checkBMatrix ()
 Method verifies \( \boldsymbol{B} \) Used in debugging of the program. Calculates \(\boldsymbol{\epsilon}\) for each node. First component should be 1, second should be zero. If not, B is wrong. User must verify values (non-automatic). \( \boldsymbol{\epsilon} = \boldsymbol{B}\boldsymbol{x}\).
 
void checkNMatrix ()
 Method verifies \(\boldsymbol{N}\) Used in debugging of the program. Checks if /f$ x = {N} {x} \( and /f$ y = \boldsymbol{N} \boldsymbol{y} \) for all integration points. User must verify (non-automatic).
 
void computeTauTorsion (double rateOfTwist)
 Calculates shear stresses at nodes using initialStrain and elementsDisplacement. More...
 
void computeTauShear (double Cx, double Cy)
 
double xOfZeta (double xi, double eta)
 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 xi, double eta)
 Calculates and returns the the distance in the y-direction between the integration point in the element and the element area centre. More...
 
void calculateArea ()
 Calculates the area of the element. More...
 
void calculateAreaCentre ()
 Calculates the area centre of the element. More...
 
double getBendingStiffnessX (double Ay)
 Calculates the second moment of area about the x-axis for the element. More...
 
double getBendingStiffnessY (double Ax)
 Calculates the second moment of area about the y-axis for the element. More...
 
double getBendingStiffnessProduct (double Ax, double Ay)
 Calculating the product of moment of inertia. More...
 
double calculateDeltaGIt ()
 Calculates delta GIt for the element, used to find gloal GIt for torsional analysis. More...
 
void calculateTorsionShearCenter ()
 Calculates the shear center derived from torsional analysis. More...
 
MatrixXd getN1Matrix (double xi, double eta)
 Gets the \( \textbf{N}_1 matrix\). More...
 
double getShearFactorContributionX ()
 
double getShearFactorContributionY ()
 
- Public Member Functions inherited from Element
 Element ()
 Constructor.
 
virtual void calculateStiffnessMatrix ()=0
 
void calculateConstants (int type)
 Initiates XoverY, xCoordinates, and yCoordinates for all massive element types.
 
MatrixXd getNxMatrix ()
 Returns the first row of the B matrix, i.e. N differentiated with respect to x.
 
MatrixXd getNyMatrix ()
 Returns the second row of the B matrix, i.e. N differentiated with respect to y.
 
std::vector< int > getIEG ()
 Creates a vector with node numbers that makes up the element. More...
 
void setElementValue (MatrixXd &system, MatrixXd &local)
 Uses getIEG() to assign system values to corresponding local parameters.
 

Public Attributes

double xiCoord [2][2] = { { -sqrt(1 / 3.0), sqrt(1 / 3.0) } ,{ sqrt(1 / 3.0), -sqrt(1 / 3.0) } }
 
double etaCoord [2][2] = { { -sqrt(1 / 3.0), -sqrt(1 / 3.0) } ,{ sqrt(1 / 3.0), sqrt(1 / 3.0) } }
 
double xiCorner [2][2] = { { -1.0, 1.0 },{ 1.0, -1.0 } }
 
double etaCorner [2][2] = { { -1.0, -1.0 } ,{ 1.0, 1.0 } }
 
double weights [2][2] = { { 1, 1 } ,{ 1, 1 } }
 
double xiExtrapolation [2][2] = { { -sqrt(3), sqrt(3) },{ sqrt(3), -sqrt(3) } }
 
double etaExtrapolation [2][2] = { { -sqrt(3), -sqrt(3) } ,{ sqrt(3), sqrt(3) } }
 
double xiCoord3x3 [3][3] = { { -sqrt(0.6), sqrt(0.6) , sqrt(0.6) },{ -sqrt(0.6), 0, sqrt(0.6) },{ 0, -sqrt(0.6), 0 } }
 
double etaCoord3x3 [3][3] = { { -sqrt(0.6), -sqrt(0.6), sqrt(0.6) },{ sqrt(0.6), -sqrt(0.6), 0 },{ sqrt(0.6), 0, 0 } }
 
double weights3x3 [3][3] = { { 25.0 / 81 , 25.0 / 81 , 25.0 / 81 },{ 25.0 / 81 , 40.0 / 81, 40.0 / 81 },{ 40.0 / 81, 40.0 / 81, 64.0 / 81 } }
 
- Public Attributes inherited from Element
std::vector< int > nodes
 Vector containing the nodes of the element.
 
double area
 Elements total area.
 
Material material
 Element material with Youngs modulus, poisson's ratio and shear modulus.
 
int elementType
 Defines what type of element this element is (value '2' for T3 and value '9' for T6)
 
double Iex
 Elements second area moment about x-axis.
 
double Iey
 Elements second area moment about y-axis.
 
double Iexy
 Elements second area moment product.
 
double ecx
 Elements area centre in x-direction.
 
double ecy
 Elements area centre in y-direction.
 
double dx
 Distance in x-direction between mesh- and node area centre.
 
double dy
 Distance in y-direction between mesh- and node area centre.
 
double deltaGIt
 St.Venant stiffness of the cross-section ( \( GI_t\))
 
double torsion_xs
 Shear center in x-direction derived from torsional analysis.
 
double torsion_ys
 Shear center in y-direction derived from torsional analysis.
 
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.
 
MatrixXd B
 Matrix containing differentials of shapefunction with respect to x and y respectively. 2 rows , number of columns equals number of nodes.
 
MatrixXd G
 Matrix with shear module used to determine initial element loads in torsional analysis. 2x2 matrix.
 
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.
 
MatrixXd xCoordinates
 Matrix with x-coordinates for the nodes in order. Number of rows equal number of nodes.
 
MatrixXd yCoordinates
 Matrix with y-coordinates for the nodes in order. Number of rows equal number of nodes.
 
MatrixXd cornerCoordinatesX
 x-position of corner nodes
 
MatrixXd cornerCoordinatesY
 y-position of corner nodes
 
MatrixXd elementStiffness
 Matrix used to temporarily hold element stiffnes coefficients.
 
MatrixXd elementLoad
 Matrix used to temporarily hold element load coefficients.
 
MatrixXd elementDisplacement
 Matrix used to temporarily hold element displacement values.
 
MatrixXd initialStrain
 Matrix used to temporarily hold element initial strain coefficients.
 
MatrixXd tauResult
 Stores the tau values of the element temporarily, before it's written to file.
 
MatrixXd extrapolationMatrix
 Matrix used for extrapolating stress results.
 

Detailed Description

Class for implementation of quadratic elements.

Member Function Documentation

void QuadraticElement::calculateArea ( )
virtual

Calculates the area of the element.

\( A = |J| \)

Implements Element.

void QuadraticElement::calculateAreaCentre ( )
virtual

Calculates the area centre of the element.

\( ecx = \frac{1}{n} \sum_{i=0}^{n} (x_i) \)
\( ecy = \frac{1}{n} \sum_{i=0}^{n} (y_i) \)
where n is number of nodes

Implements Element.

double QuadraticElement::calculateDeltaGIt ( )
virtual

Calculates delta GIt for the element, used to find gloal GIt for torsional analysis.

\( \begin{equation} \Delta GI_t \; = \; \int_A \begin{bmatrix} \boldsymbol{x^T} \\ \boldsymbol{y^T} \end{bmatrix} \begin{bmatrix} \boldsymbol{0} & \boldsymbol{N}^T \\ \boldsymbol{N}^T & \boldsymbol{0} \end{bmatrix} \left( \begin{bmatrix} \textbf{-N}_{,x} \\ \textbf{N}_{,y} \end{bmatrix} \textbf{v} + \begin{bmatrix} \textbf{0} & \textbf{N} \\ \textbf{N} & \textbf{0} \end{bmatrix} \begin{bmatrix} \textbf{x} \\ \textbf{y} \end{bmatrix} \right ) \end{equation} \)

Implements Element.

void QuadraticElement::calculateElementLoadShearX ( void  )
virtual

Calculates the initial load vector \(\boldsymbol{S}_x^0\) for applied shear along x-axis.

\( \boldsymbol{S}^0_x = \frac{E_eV_x}{EI_y} \left[\int_{A_e} \boldsymbol{N}^TxdA + \frac{\nu_e}{4(1+\nu_e)}\int_{A_e}(\boldsymbol{N}^T_{,x}(x^2 - y^2) + 2\boldsymbol{N}^T_{,y}xy)dA \right] \)

Implements Element.

void QuadraticElement::calculateElementLoadShearY ( )
virtual

Calculates the initial load vector \(\boldsymbol{S}_y^0\) for applied shear along y-axis.

\( \boldsymbol{S}^0_y = \frac{E_eV_y}{EI_x} \left[ \int_{A_e} \boldsymbol{N}^TydA + \frac{\nu_e}{4(1+\nu_e)}\int_{A_e}(\boldsymbol{N}^T_{,y}(y^2 - x^2) + 2\boldsymbol{N}^T_{,x}xy)dA \right]\)

Implements Element.

void QuadraticElement::calculateElementLoadTorsion ( )
virtual

Calculates the initial load vector for torsion \(\boldsymbol{S}^0\).

\( \boldsymbol{S}^0 = \int_A \boldsymbol{B}^T \boldsymbol{G} \boldsymbol{\epsilon}_0 dA \)

Implements Element.

void QuadraticElement::calculateTorsionShearCenter ( )
virtual

Calculates the shear center derived from torsional analysis.

\( x_s = -\frac{ \sum E \textbf{y}^T \int \textbf{N}_1^T \textbf{N}dA \textbf{v}}{EI_x} \)
\( y_s = \frac{ \sum E \textbf{x}^T \int \textbf{N}_1^T \textbf{N}dA \textbf{v}}{EI_y} \)

Returns
Shear center in x direction, derived from torsion analysis

Implements Element.

void QuadraticElement::computeTauTorsion ( double  rateOfTwist)
virtual

Calculates shear stresses at nodes using initialStrain and elementsDisplacement.

\( \tau = Bv + \epsilon_0 \)

Implements Element.

double QuadraticElement::getBendingStiffnessProduct ( double  Ax,
double  Ay 
)
virtual

Calculating the product of moment of inertia.

\( dx_e = Ac_x - Ac_{ex} \)
\( dy_e = Ac_y - Ac_{ey} \)
\( I_{xy} = \sum{E(I_{xy_e} + dx_e*dy_e*A_e)} \)

Implements Element.

double QuadraticElement::getBendingStiffnessX ( double  Ay)
virtual

Calculates the second moment of area about the x-axis for the element.

\( dy_e = A_y - Ac_{ey} \)
\( I_x = \sum{( E(I_{x_e} + dy_e^2*A_e)) } \)

Parameters
AyArea centre of the mesh

Implements Element.

double QuadraticElement::getBendingStiffnessY ( double  Ax)
virtual

Calculates the second moment of area about the y-axis for the element.

\( dx_e = A_x - Ac_{ex} \)
\( I_y = \sum{(E(I_{y_e} + dx_e^2*A_e))} \)

Parameters
AxArea centre of the mesh

Implements Element.

MatrixXd QuadraticElement::getN1Matrix ( double  xi,
double  eta 
)

Gets the \( \textbf{N}_1 matrix\).

\( \textbf{N}_1 = \begin{bmatrix} (1 - \xi)(1 - \eta) & (1 + \xi)(1 - \eta) & (1 + \xi)(1 + \eta) & (1 - \xi)(1 + \eta) \end{bmatrix} \)

void QuadraticElement::setExtrapolationMatrix ( )

Creates the matrix used for extrapolating results.

\( \begin{bmatrix} 1 + \frac{1}{2} \sqrt3 & -\frac{1}{2} & 1 - \frac{1}{2} \sqrt3 & -\frac{1}{2}\\ -\frac{1}{2} & 1 + \frac{1}{2} \sqrt3 & -\frac{1}{2} & 1- \frac{1}{2} \sqrt3\\ 1 - \frac{1}{2} \sqrt3 & -\frac{1}{2} & 1 + \frac{1}{2} \sqrt3 & -\frac{1}{2}\\ -\frac{1}{2} & 1 - \frac{1}{2} \sqrt3 & -\frac{1}{2} & 1 + \frac{1}{2} \sqrt3 \end{bmatrix} \)

double QuadraticElement::xOfZeta ( double  xi,
double  eta 
)
virtual

Calculates and returns the the distance in the x-direction between the integration point in the element and the element area centre.

\( x = | \boldsymbol{N} \boldsymbol{x}^T - ecx |\)

Parameters
xiarea coordinate with value between -1 and 1
etaarea coordinate with value between -1 and 1
Returns
distance in x-direction for integration point defiend by \(\zeta_1\) and \(\zeta_2\)

Implements Element.

double QuadraticElement::yOfZeta ( double  xi,
double  eta 
)
virtual

Calculates and returns the the distance in the y-direction between the integration point in the element and the element area centre.

\( y = | \boldsymbol{N} \boldsymbol{y}^T - ecy |\)

Parameters
xiarea coordinate with value between -1 and 1
etaarea coordinate with value between -1 and 1
Returns
distance in y-direction for integration point defiend by \(\zeta_1\) and \(\zeta_2\)

Implements Element.


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