Frame Elements

Frame Element

class feastruct.fea.elements.frame.FrameElement(nodes, material, efs, section)[source]

Bases: feastruct.fea.fea.FiniteElement

Parent class for a frame element.

Establishes a template for a frame element and provides a number of generic methods that can be used for any frame element.

Variables:
  • nodes (list[Node]) – List of node objects defining the element
  • material (Material) – Material object for the element
  • efs (list[bool]) – Element freedom signature
  • f_int (list[ForceVector]) – List of internal force vector results stored for each analysis case
  • section (Section) – Section object for the element
__init__(nodes, material, efs, section)[source]

Inits the FrameElement class.

Parameters:
  • nodes (list[Node]) – List of node objects defining the element
  • material (Material) – Material object for the element
  • efs (list[bool]) – Element freedom signature
  • section (Section) – Section object for the element
apply_nfa()

Applies the element freedom signature to all nodes in the element to generate a node freedom allocation.

calculate_local_displacement(xi, u_el)[source]

Placeholder for the calculate_local_displacement method.

Calculates the local displacement of the element at position xi given the displacement vector u_el.

Parameters:
  • xi (float) – Position along the element (0 < xi < 1)
  • u_el (numpy.ndarray) – Element displacement vector
Returns:

Local displacement of the element (u, v, w)

Return type:

tuple(float, float, float)

get_afd(n, analysis_case)[source]

Placeholder for the get_afd method.

Returns the axial force diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the axial force diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and axial force diagram, afd - (xis, afd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_bmd(n, analysis_case)[source]

Placeholder for the get_bmd method.

Returns the bending moment diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the bending moment diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and bending moment diagram, bmd - (xis, bmd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_buckling_results(analysis_case, buckling_mode=0)

Returns the eigenvalue corresponding to the buckling analysis defined by the analysis_case and the buckling_mode. Also returns an array of eigenvector values corresponding to each degree of freedom in the finite element.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the buckling analysis
  • buckling_mode (int) – Buckling mode number
Returns:

Eigenvalue and eigenvectors (w, v). A tuple containing the eigenvalue w and an (n_nodes x n_dof) array of eigenvector values v.

Return type:

tuple(float, numpy.ndarray)

get_displacements(n, analysis_case)[source]

Placeholder for the get_displacements method.

Returns a list of the local displacements, (u, v, w, ru, rv, rw), along the element for the analysis case and a minimum of n subdivisions. A list of the stations, xi, is also included. Station locations, xis, vary from 0 to 1.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the displacement
  • n (int) – Minimum number of sampling points
Returns:

2D numpy array containing stations and local displacements. Each station contains an array of the following format: [xi, u, v, w, rx, ry, rz]

Return type:

numpy.ndarray

get_dofs()

Finds and returns a list of DoF objects corresponding to the degrees of freedom of the finite element.

Returns:A list of DoF objects, with a length of (n_nodes x n_dof)
Return type:list[list[DoF]]
get_element_loads(analysis_case)[source]

Returns a list of element loads on a FrameElement for an analyis case.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the displacement
get_fint(analysis_case)

Returns the internal force vector relating to an AnalysisCase.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the internal force vector
Returns:Internal force vector
Return type:numpy.ndarray
Raises:Exception – If the force vector cannot be found for the analysis_case
get_frequency_results(analysis_case, frequency_mode=0)

Returns the eigenvalue corresponding to the frequency analysis defined by the analysis_case and the frequency_mode. Also returns an array of eigenvector values corresponding to each degree of freedom in the finite element.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the frequency analysis
  • frequency_mode (int) – Frequency mode number
Returns:

Eigenvalue and eigenvectors (w, v). A tuple containing the eigenvalue w and an (n_nodes x n_dof) array of eigenvector values v.

Return type:

tuple(float, numpy.ndarray)

get_gdof_nums()

Returns an array of global degree of freedom numbers corresponding to the degrees of freedom of the finite element.

Returns:A integer array of global degrees of freedom, with a length of (1 x n), where n is n_nodes x n_dof
Return type:numpy.ndarray
get_geometric_properties()[source]

Calculates geometric properties related to a frame element. Returns the following:

  • node_coords: An (n x 3) array of node coordinates, where n is the number of nodes for the given finite element
  • dx: A (1 x 3) array consisting of the x, y and z distances between the nodes
  • l0: The original length of the frame element
  • c: A (1 x 3) array consisting of the cosines with respect to the x, y and z axes
Returns:(node_coords, dx, l0, c)
Return type:tuple(numpy.ndarray, numpy.ndarray, float, numpy.ndarray)
get_geometric_stiff_matrix(analysis_case)

Placeholder for the get_geometric_stiff_matrix method.

Gets the geometric stiffness matrix for a FiniteElement.

Parameters:analysis_case (AnalysisCase) – Analysis case from which to extract the axial force
Returns:Element geometric stiffness matrix
Return type:numpy.ndarray
get_internal_actions(analysis_case)

Returns the internal actions for a FiniteElement.

Parameters:analysis_case (AnalysisCase) – Analysis case
Returns:An array containing the internal actions for the element
Return type:numpy.ndarray
get_mass_matrix()

Placeholder for the get_mass_matrix method.

Gets the mass matrix for a for a FiniteElement.

Returns:Element mass matrix
Return type:numpy.ndarray
get_ndof()

Returns the number of active degrees of freedom for the element.

Returns:Number of active degrees of freedom for the element
Return type:int
get_nodal_displacements(analysis_case)

Returns an array of the nodal displacements for each degree of freedom in the finite element for the analysis_case.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the displacement
Returns:An (n_nodes x n_dof) array of degree of freedom displacements
Return type:numpy.ndarray
get_node_coords()

Returns a NumPy array of the cartesian coordinates defining the geometry of the finite element.

Returns:An (n x 3) array of node coordinates, where n is the number of nodes for the given finite element
Return type:numpy.ndarray
get_sampling_points(n, analysis_case, bm=False, defl=False)[source]

Returns a list of sampling points along a 2D frame element given a minimum n points and an analysis case. The sampling points vary from 0 to 1.

Adds a sampling point at the following locations:

  • Concentrated element load
  • Point of zero shear force (if bm=True)
  • Point of zero rotation (if defl=True)
Parameters:
  • n (int) – Minimum number of sampling points
  • analysis_case (AnalysisCase) – Analysis case relating to the displacement
  • bm (bool) – Whether or not the sampling points are for the bending moment (i.e. include sfd roots)
  • defl (bool) – Whether or not the sampling points for transverse deflection (i.e. include rotation roots). N.B. the FrameElement must have a calculate_rotation method.
Returns:

List of sampling points

Return type:

numpy.ndarray

get_sfd(n, analysis_case)[source]

Placeholder for the get_sfd method.

Returns the shear force diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the shear force diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and shear force diagram, sfd - (xis, sfd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_shape_function(xi)

Placeholder for the get_shape_function method.

Returns the value of the shape functions at xi.

Parameters:xi (float) – Position along the element
Returns:Value of the shape functions at xi
Return type:numpy.ndarray
get_stiffness_matrix()

Placeholder for the get_stiffness_matrix method.

Gets the stiffness matrix for a FiniteElement.

Returns:6 x 6 element stiffness matrix
Return type:numpy.ndarray
get_transformation_matrix()[source]

Placeholder for the get_transformation_matrix method.

Returns the transformation matrix for a FrameElement.

Returns:Element transformation matrix
Return type:numpy.ndarray
map_to_isoparam(xi)[source]

Maps a station value 0 < xi < 1 to the isometric parameter -1 < eta < 1.

Parameters:xi (float) – Station location (0 < x < 1)
Returns:Isoparametric coordinate (-1 < eta < 1)
Return type:float
map_to_station(eta)[source]

Maps the isometric parameter -1 < eta < 1 to a station value 0 < xi < 1.

Parameters:xi (float) – Isoparametric coordinate (-1 < eta < 1)
Returns:Station location (0 < x < 1)
Return type:float
save_fint(f, analysis_case)

Adds an internal force vector result to the FiniteElement.

Parameters:
  • f (numpy.ndarray) – Internal force vector
  • analysis_case (AnalysisCase) – Analysis case relating to the internal force vector

Frame Element2D

class feastruct.fea.elements.frame2d.FrameElement2D(nodes, material, efs, section)[source]

Bases: feastruct.fea.elements.frame.FrameElement

Class for a 2D frame element.

Provides a number of methods that can be used for a 2D frame element.

Variables:
  • nodes (list[Node]) – List of node objects defining the element
  • material (Material) – Material object for the element
  • efs (list[bool]) – Element freedom signature
  • f_int (list[ForceVector]) – List of internal force vector results stored for each analysis case
  • section (Section) – Section object for the element
__init__(nodes, material, efs, section)

Inits the FrameElement class.

Parameters:
  • nodes (list[Node]) – List of node objects defining the element
  • material (Material) – Material object for the element
  • efs (list[bool]) – Element freedom signature
  • section (Section) – Section object for the element
apply_nfa()

Applies the element freedom signature to all nodes in the element to generate a node freedom allocation.

calculate_local_displacement(xi, u_el)

Placeholder for the calculate_local_displacement method.

Calculates the local displacement of the element at position xi given the displacement vector u_el.

Parameters:
  • xi (float) – Position along the element (0 < xi < 1)
  • u_el (numpy.ndarray) – Element displacement vector
Returns:

Local displacement of the element (u, v, w)

Return type:

tuple(float, float, float)

get_afd(n, analysis_case)

Placeholder for the get_afd method.

Returns the axial force diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the axial force diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and axial force diagram, afd - (xis, afd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_bmd(n, analysis_case)

Placeholder for the get_bmd method.

Returns the bending moment diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the bending moment diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and bending moment diagram, bmd - (xis, bmd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_buckling_results(analysis_case, buckling_mode=0)

Returns the eigenvalue corresponding to the buckling analysis defined by the analysis_case and the buckling_mode. Also returns an array of eigenvector values corresponding to each degree of freedom in the finite element.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the buckling analysis
  • buckling_mode (int) – Buckling mode number
Returns:

Eigenvalue and eigenvectors (w, v). A tuple containing the eigenvalue w and an (n_nodes x n_dof) array of eigenvector values v.

Return type:

tuple(float, numpy.ndarray)

get_displacements(n, analysis_case)

Placeholder for the get_displacements method.

Returns a list of the local displacements, (u, v, w, ru, rv, rw), along the element for the analysis case and a minimum of n subdivisions. A list of the stations, xi, is also included. Station locations, xis, vary from 0 to 1.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the displacement
  • n (int) – Minimum number of sampling points
Returns:

2D numpy array containing stations and local displacements. Each station contains an array of the following format: [xi, u, v, w, rx, ry, rz]

Return type:

numpy.ndarray

get_dofs()

Finds and returns a list of DoF objects corresponding to the degrees of freedom of the finite element.

Returns:A list of DoF objects, with a length of (n_nodes x n_dof)
Return type:list[list[DoF]]
get_element_loads(analysis_case)

Returns a list of element loads on a FrameElement for an analyis case.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the displacement
get_fint(analysis_case)

Returns the internal force vector relating to an AnalysisCase.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the internal force vector
Returns:Internal force vector
Return type:numpy.ndarray
Raises:Exception – If the force vector cannot be found for the analysis_case
get_frequency_results(analysis_case, frequency_mode=0)

Returns the eigenvalue corresponding to the frequency analysis defined by the analysis_case and the frequency_mode. Also returns an array of eigenvector values corresponding to each degree of freedom in the finite element.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the frequency analysis
  • frequency_mode (int) – Frequency mode number
Returns:

Eigenvalue and eigenvectors (w, v). A tuple containing the eigenvalue w and an (n_nodes x n_dof) array of eigenvector values v.

Return type:

tuple(float, numpy.ndarray)

get_gdof_nums()

Returns an array of global degree of freedom numbers corresponding to the degrees of freedom of the finite element.

Returns:A integer array of global degrees of freedom, with a length of (1 x n), where n is n_nodes x n_dof
Return type:numpy.ndarray
get_geometric_properties()

Calculates geometric properties related to a frame element. Returns the following:

  • node_coords: An (n x 3) array of node coordinates, where n is the number of nodes for the given finite element
  • dx: A (1 x 3) array consisting of the x, y and z distances between the nodes
  • l0: The original length of the frame element
  • c: A (1 x 3) array consisting of the cosines with respect to the x, y and z axes
Returns:(node_coords, dx, l0, c)
Return type:tuple(numpy.ndarray, numpy.ndarray, float, numpy.ndarray)
get_geometric_stiff_matrix(analysis_case)

Placeholder for the get_geometric_stiff_matrix method.

Gets the geometric stiffness matrix for a FiniteElement.

Parameters:analysis_case (AnalysisCase) – Analysis case from which to extract the axial force
Returns:Element geometric stiffness matrix
Return type:numpy.ndarray
get_internal_actions(analysis_case)

Returns the internal actions for a FiniteElement.

Parameters:analysis_case (AnalysisCase) – Analysis case
Returns:An array containing the internal actions for the element
Return type:numpy.ndarray
get_mass_matrix()

Placeholder for the get_mass_matrix method.

Gets the mass matrix for a for a FiniteElement.

Returns:Element mass matrix
Return type:numpy.ndarray
get_ndof()

Returns the number of active degrees of freedom for the element.

Returns:Number of active degrees of freedom for the element
Return type:int
get_nodal_displacements(analysis_case)

Returns an array of the nodal displacements for each degree of freedom in the finite element for the analysis_case.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the displacement
Returns:An (n_nodes x n_dof) array of degree of freedom displacements
Return type:numpy.ndarray
get_node_coords()

Returns a NumPy array of the cartesian coordinates defining the geometry of the finite element.

Returns:An (n x 3) array of node coordinates, where n is the number of nodes for the given finite element
Return type:numpy.ndarray
get_sampling_points(n, analysis_case, bm=False, defl=False)

Returns a list of sampling points along a 2D frame element given a minimum n points and an analysis case. The sampling points vary from 0 to 1.

Adds a sampling point at the following locations:

  • Concentrated element load
  • Point of zero shear force (if bm=True)
  • Point of zero rotation (if defl=True)
Parameters:
  • n (int) – Minimum number of sampling points
  • analysis_case (AnalysisCase) – Analysis case relating to the displacement
  • bm (bool) – Whether or not the sampling points are for the bending moment (i.e. include sfd roots)
  • defl (bool) – Whether or not the sampling points for transverse deflection (i.e. include rotation roots). N.B. the FrameElement must have a calculate_rotation method.
Returns:

List of sampling points

Return type:

numpy.ndarray

get_sfd(n, analysis_case)

Placeholder for the get_sfd method.

Returns the shear force diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the shear force diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and shear force diagram, sfd - (xis, sfd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_shape_function(xi)

Placeholder for the get_shape_function method.

Returns the value of the shape functions at xi.

Parameters:xi (float) – Position along the element
Returns:Value of the shape functions at xi
Return type:numpy.ndarray
get_stiffness_matrix()

Placeholder for the get_stiffness_matrix method.

Gets the stiffness matrix for a FiniteElement.

Returns:6 x 6 element stiffness matrix
Return type:numpy.ndarray
get_transformation_matrix()

Placeholder for the get_transformation_matrix method.

Returns the transformation matrix for a FrameElement.

Returns:Element transformation matrix
Return type:numpy.ndarray
map_to_isoparam(xi)

Maps a station value 0 < xi < 1 to the isometric parameter -1 < eta < 1.

Parameters:xi (float) – Station location (0 < x < 1)
Returns:Isoparametric coordinate (-1 < eta < 1)
Return type:float
map_to_station(eta)

Maps the isometric parameter -1 < eta < 1 to a station value 0 < xi < 1.

Parameters:xi (float) – Isoparametric coordinate (-1 < eta < 1)
Returns:Station location (0 < x < 1)
Return type:float
plot_axial_force(ax, analysis_case, scalef, n)[source]

Plots the axial force diagram from a static analysis defined by case_id. N.B. this method is adapted from the MATLAB code by F.P. van der Meer: plotNLine.m.

Parameters:
  • ax (matplotlib.axes.Axes) – Axis object on which to draw the element
  • analysis_case (AnalysisCase) – Analysis case
  • scalef (float) – Factor by which to scale the axial force diagram
  • n (int) – Number of points at which to plot the axial force diagram
plot_bending_moment(ax, analysis_case, scalef, n)[source]

Plots the axial force diagram from a static analysis defined by case_id. N.B. this method is adapted from the MATLAB code by F.P. van der Meer: plotMLine.m.

Parameters:
  • ax (matplotlib.axes.Axes) – Axis object on which to draw the element
  • analysis_case (AnalysisCase) – Analysis case
  • scalef (float) – Factor by which to scale the bending moment diagram
  • n (int) – Number of points at which to plot the bending moment diagram
plot_deformed_element(ax, analysis_case, n, def_scale, u_el=None)[source]

Plots a 2D frame element in its deformed configuration for the displacement vector defined by the analysis_case. The deformation is based on the element shape functions. If a displacement vector, u_el, is supplied, uses this to plot the deformed element.

Parameters:
  • ax (matplotlib.axes.Axes) – Axis object on which to draw the element
  • analysis_case (AnalysisCase) – Analysis case relating to the displacement
  • n (int) – Number of linear subdivisions used to plot the element
  • def_scale (float) – Deformation scale
  • u_el (numpy.ndarray) – Element displacement vector of size (n_node x n_dof)
plot_element(ax, linestyle='-', linewidth=2, marker='.')[source]

Plots the undeformed frame element on the axis defined by ax.

Parameters:
  • ax (matplotlib.axes.Axes) – Axis object on which to draw the element
  • linestyle (string) – Element linestyle
  • linewidth (int) – Element linewidth
  • marker (string) – Node marker type
plot_shear_force(ax, analysis_case, scalef, n)[source]

Plots the axial force diagram from a static analysis defined by case_id. N.B. this method is adapted from the MATLAB code by F.P. van der Meer: plotVLine.m.

Parameters:
  • ax (matplotlib.axes.Axes) – Axis object on which to draw the element
  • analysis_case (AnalysisCase) – Analysis case
  • scalef (float) – Factor by which to scale the shear force diagram
  • n (int) – Number of points at which to plot the shear force diagram
save_fint(f, analysis_case)

Adds an internal force vector result to the FiniteElement.

Parameters:
  • f (numpy.ndarray) – Internal force vector
  • analysis_case (AnalysisCase) – Analysis case relating to the internal force vector

Frame Element3D

class feastruct.fea.elements.frame3d.FrameElement3D(nodes, material, efs, section)[source]

Bases: feastruct.fea.elements.frame.FrameElement

Class for a 3D frame element.

Provides a number of methods that can be used for a 3D frame element.

Variables:
  • nodes (list[Node]) – List of node objects defining the element
  • material (Material) – Material object for the element
  • efs (list[bool]) – Element freedom signature
  • f_int (list[ForceVector]) – List of internal force vector results stored for each analysis case
  • section (Section) – Section object for the element
__init__(nodes, material, efs, section)

Inits the FrameElement class.

Parameters:
  • nodes (list[Node]) – List of node objects defining the element
  • material (Material) – Material object for the element
  • efs (list[bool]) – Element freedom signature
  • section (Section) – Section object for the element
apply_nfa()

Applies the element freedom signature to all nodes in the element to generate a node freedom allocation.

calculate_local_displacement(xi, u_el)

Placeholder for the calculate_local_displacement method.

Calculates the local displacement of the element at position xi given the displacement vector u_el.

Parameters:
  • xi (float) – Position along the element (0 < xi < 1)
  • u_el (numpy.ndarray) – Element displacement vector
Returns:

Local displacement of the element (u, v, w)

Return type:

tuple(float, float, float)

get_afd(n, analysis_case)

Placeholder for the get_afd method.

Returns the axial force diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the axial force diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and axial force diagram, afd - (xis, afd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_bmd(n, analysis_case)

Placeholder for the get_bmd method.

Returns the bending moment diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the bending moment diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and bending moment diagram, bmd - (xis, bmd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_buckling_results(analysis_case, buckling_mode=0)

Returns the eigenvalue corresponding to the buckling analysis defined by the analysis_case and the buckling_mode. Also returns an array of eigenvector values corresponding to each degree of freedom in the finite element.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the buckling analysis
  • buckling_mode (int) – Buckling mode number
Returns:

Eigenvalue and eigenvectors (w, v). A tuple containing the eigenvalue w and an (n_nodes x n_dof) array of eigenvector values v.

Return type:

tuple(float, numpy.ndarray)

get_displacements(n, analysis_case)

Placeholder for the get_displacements method.

Returns a list of the local displacements, (u, v, w, ru, rv, rw), along the element for the analysis case and a minimum of n subdivisions. A list of the stations, xi, is also included. Station locations, xis, vary from 0 to 1.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the displacement
  • n (int) – Minimum number of sampling points
Returns:

2D numpy array containing stations and local displacements. Each station contains an array of the following format: [xi, u, v, w, rx, ry, rz]

Return type:

numpy.ndarray

get_dofs()

Finds and returns a list of DoF objects corresponding to the degrees of freedom of the finite element.

Returns:A list of DoF objects, with a length of (n_nodes x n_dof)
Return type:list[list[DoF]]
get_element_loads(analysis_case)

Returns a list of element loads on a FrameElement for an analyis case.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the displacement
get_fint(analysis_case)

Returns the internal force vector relating to an AnalysisCase.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the internal force vector
Returns:Internal force vector
Return type:numpy.ndarray
Raises:Exception – If the force vector cannot be found for the analysis_case
get_frequency_results(analysis_case, frequency_mode=0)

Returns the eigenvalue corresponding to the frequency analysis defined by the analysis_case and the frequency_mode. Also returns an array of eigenvector values corresponding to each degree of freedom in the finite element.

Parameters:
  • analysis_case (AnalysisCase) – Analysis case relating to the frequency analysis
  • frequency_mode (int) – Frequency mode number
Returns:

Eigenvalue and eigenvectors (w, v). A tuple containing the eigenvalue w and an (n_nodes x n_dof) array of eigenvector values v.

Return type:

tuple(float, numpy.ndarray)

get_gdof_nums()

Returns an array of global degree of freedom numbers corresponding to the degrees of freedom of the finite element.

Returns:A integer array of global degrees of freedom, with a length of (1 x n), where n is n_nodes x n_dof
Return type:numpy.ndarray
get_geometric_properties()

Calculates geometric properties related to a frame element. Returns the following:

  • node_coords: An (n x 3) array of node coordinates, where n is the number of nodes for the given finite element
  • dx: A (1 x 3) array consisting of the x, y and z distances between the nodes
  • l0: The original length of the frame element
  • c: A (1 x 3) array consisting of the cosines with respect to the x, y and z axes
Returns:(node_coords, dx, l0, c)
Return type:tuple(numpy.ndarray, numpy.ndarray, float, numpy.ndarray)
get_geometric_stiff_matrix(analysis_case)

Placeholder for the get_geometric_stiff_matrix method.

Gets the geometric stiffness matrix for a FiniteElement.

Parameters:analysis_case (AnalysisCase) – Analysis case from which to extract the axial force
Returns:Element geometric stiffness matrix
Return type:numpy.ndarray
get_internal_actions(analysis_case)

Returns the internal actions for a FiniteElement.

Parameters:analysis_case (AnalysisCase) – Analysis case
Returns:An array containing the internal actions for the element
Return type:numpy.ndarray
get_mass_matrix()

Placeholder for the get_mass_matrix method.

Gets the mass matrix for a for a FiniteElement.

Returns:Element mass matrix
Return type:numpy.ndarray
get_ndof()

Returns the number of active degrees of freedom for the element.

Returns:Number of active degrees of freedom for the element
Return type:int
get_nodal_displacements(analysis_case)

Returns an array of the nodal displacements for each degree of freedom in the finite element for the analysis_case.

Parameters:analysis_case (AnalysisCase) – Analysis case relating to the displacement
Returns:An (n_nodes x n_dof) array of degree of freedom displacements
Return type:numpy.ndarray
get_node_coords()

Returns a NumPy array of the cartesian coordinates defining the geometry of the finite element.

Returns:An (n x 3) array of node coordinates, where n is the number of nodes for the given finite element
Return type:numpy.ndarray
get_sampling_points(n, analysis_case, bm=False, defl=False)

Returns a list of sampling points along a 2D frame element given a minimum n points and an analysis case. The sampling points vary from 0 to 1.

Adds a sampling point at the following locations:

  • Concentrated element load
  • Point of zero shear force (if bm=True)
  • Point of zero rotation (if defl=True)
Parameters:
  • n (int) – Minimum number of sampling points
  • analysis_case (AnalysisCase) – Analysis case relating to the displacement
  • bm (bool) – Whether or not the sampling points are for the bending moment (i.e. include sfd roots)
  • defl (bool) – Whether or not the sampling points for transverse deflection (i.e. include rotation roots). N.B. the FrameElement must have a calculate_rotation method.
Returns:

List of sampling points

Return type:

numpy.ndarray

get_sfd(n, analysis_case)

Placeholder for the get_sfd method.

Returns the shear force diagram within the element for a minimum of n stations for an analysis_case. Station locations, xis, vary from 0 to 1.

Parameters:
  • n (int) – Minimum number of stations to sample the shear force diagram
  • analysis_case (AnalysisCase) – Analysis case
Returns:

Station locations, xis, and shear force diagram, sfd - (xis, sfd)

Return type:

tuple(numpy.ndarray, numpy.ndarray)

get_shape_function(xi)

Placeholder for the get_shape_function method.

Returns the value of the shape functions at xi.

Parameters:xi (float) – Position along the element
Returns:Value of the shape functions at xi
Return type:numpy.ndarray
get_stiffness_matrix()

Placeholder for the get_stiffness_matrix method.

Gets the stiffness matrix for a FiniteElement.

Returns:6 x 6 element stiffness matrix
Return type:numpy.ndarray
get_transformation_matrix()

Placeholder for the get_transformation_matrix method.

Returns the transformation matrix for a FrameElement.

Returns:Element transformation matrix
Return type:numpy.ndarray
map_to_isoparam(xi)

Maps a station value 0 < xi < 1 to the isometric parameter -1 < eta < 1.

Parameters:xi (float) – Station location (0 < x < 1)
Returns:Isoparametric coordinate (-1 < eta < 1)
Return type:float
map_to_station(eta)

Maps the isometric parameter -1 < eta < 1 to a station value 0 < xi < 1.

Parameters:xi (float) – Isoparametric coordinate (-1 < eta < 1)
Returns:Station location (0 < x < 1)
Return type:float
save_fint(f, analysis_case)

Adds an internal force vector result to the FiniteElement.

Parameters:
  • f (numpy.ndarray) – Internal force vector
  • analysis_case (AnalysisCase) – Analysis case relating to the internal force vector