coordxtr

Purpose:

Extract element coordinates from a global coordinate matrix.

_images/coord.svg
Syntax:

[Ex, Ey, Ez] = coordxtr(Edof, Coord, Dof, nen)
Description:

coordxtr extracts element nodal coordinates from the global coordinate matrix Coord for elements with equal numbers of element nodes and dof’s.

Input variables are the element topology matrix Edof, defined in assem, the global coordinate matrix Coord, the global topology matrix Dof, and the number of element nodes \(nen\) in each element.

Coord\(= \begin{bmatrix} x_1 & y_1 & [z_1] \\ x_2 & y_2 & [z_2] \\ x_3 & y_3 & [z_3] \\ \vdots & \vdots & \vdots \\ x_n & y_n & [z_n] \end{bmatrix}\) \(\qquad\) Dof\(= \begin{bmatrix} k_1 & l_1 & \ldots & m_1 \\ k_2 & l_2 & \ldots & m_2 \\ k_3 & l_3 & \ldots & m_3 \\ \vdots & \vdots & \ldots & \vdots \\ k_n & l_n & \ldots & m_n \end{bmatrix}\) \(\qquad\) nen\(= [\;nen\;]\)

The nodal coordinates defined in row \(i\) of Coord correspond to the degrees of freedom of row \(i\) in Dof. The components \(k_i\), \(l_i\) and \(m_i\) define the degrees of freedom of node \(i\), and \(n\) is the number of global nodes for the considered part of the FE-model.

The output variables Ex, Ey, and Ez are matrices defined according to

Ex\(= \begin{bmatrix} x_1^1 & x_2^1 & x_3^1 & \ldots & x_{nen}^1 \\ x_1^2 & x_2^2 & x_3^2 & \ldots & x_{nen}^2 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ x_1^{nel} & x_2^{nel} & x_3^{nel} & \ldots & x_{nen}^{nel} \end{bmatrix}\)

where row \(i\) gives the \(x\)-coordinates of the element defined in row \(i\) of Edof, and where \(nel\) is the number of considered elements.

The element coordinate data extracted by the function coordxtr can be used for plotting purposes and to create input data for the element stiffness functions.