3D Frame Elements¶
Bar3D_2N¶
- class
feastruct.fea.elements.frame3d.Bar3D_2N(nodes, material, section)[source]¶Bases:
feastruct.fea.elements.frame3d.FrameElement3DTwo noded, three dimensional bar element that can resist an axial force only. The element is defined by its two end nodes and uses two linear shape functions to obtain analytical results.
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
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 vectorReturns: Local displacement of the element (u, v, w)
Return type: tuple(float, float, float)
get_afd(n, analysis_case)[source]¶Returns the axial force diagram within the element for n stations for an analysis_case.
Parameters:
- n (int) – Number of stations to sample the axial force diagram
- analysis_case (
AnalysisCase) – Analysis caseReturns: Station locations, xis, and axial force diagram, afd - (xis, afd)
Return type: tuple(
numpy.ndarray,numpy.ndarray)
get_bmd(n, analysis_case)[source]¶Returns the bending moment diagram within the element for n stations for an analysis_case.
Parameters:
- n (int) – Number of stations to sample the bending moment diagram
- analysis_case (
AnalysisCase) – Analysis caseReturns: 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 vectorReturns: Internal force vector Return type: numpy.ndarrayRaises: 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)[source]¶Gets the geometric stiffness matrix for a two noded, 3D bar element. The stiffness matrix has been analytically integrated so numerical integration is not necessary. The geometric stiffness matrix requires an axial force so the analysis_case from a static analysis must be provided.
Parameters: analysis_case ( AnalysisCase) – Analysis case from which to extract the axial forceReturns: 6 x 6 element geometric stiffness matrix Return type: numpy.ndarray
get_internal_actions(analysis_case)[source]¶Returns the internal actions for a two noded 3D bar element.
Parameters: analysis_case ( AnalysisCase) – Analysis caseReturns: An array containing the internal actions for the element (N1, N2) Return type: numpy.ndarray
get_mass_matrix()[source]¶Gets the mass matrix for a for a two noded, 2D bar element. The mass matrix has been analytically integrated so numerical integration is not necessary.
Returns: 4 x 4 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 displacementReturns: 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)[source]¶Returns the shear force diagram within the element for n stations for an analysis_case.
Parameters:
- n (int) – Number of stations to sample the shear force diagram
- analysis_case (
AnalysisCase) – Analysis caseReturns: Station locations, xis, and shear force diagram, sfd - (xis, sfd)
Return type: tuple(
numpy.ndarray,numpy.ndarray)
get_shape_function(xi)[source]¶Returns the value of the shape functions N1 and N2 at xi.
Parameters: xi (float) – Position along the element Returns: Value of the shape functions (N1, N2) at xi Return type: numpy.ndarray
get_stiffness_matrix()[source]¶Gets the stiffness matrix for a two noded, 3D bar element. The stiffness matrix has been analytically integrated so numerical integration is not necessary.
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
EulerBernoulli3D_2N¶
- class
feastruct.fea.elements.frame3d.EulerBernoulli3D_2N(nodes, material, section)[source]¶Bases:
feastruct.fea.elements.frame3d.FrameElement3DTwo noded, three dimensional frame element based on the Euler-Bernoulli beam formulation for relatively thin beams. The element is defined by its two end nodes and uses four cubic polynomial shape functions to obtain analytical results.
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
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 vectorReturns: 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 caseReturns: 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 caseReturns: 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 vectorReturns: Internal force vector Return type: numpy.ndarrayRaises: 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)[source]¶Gets the geometric stiffness matrix for a two noded 3D Euler-Bernoulli frame element. The stiffness matrix has been analytically integrated so numerical integration is not necessary. The geometric stiffness matrix requires an axial force so the analysis_case from a static analysis must be provided.
Parameters: analysis_case ( AnalysisCase) – Analysis case from which to extract the axial forceReturns: 12 x 12 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 caseReturns: 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 displacementReturns: 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 caseReturns: Station locations, xis, and shear force diagram, sfd - (xis, sfd)
Return type: tuple(
numpy.ndarray,numpy.ndarray)
get_shape_function(xi)[source]¶Returns the value of the shape functions Nu1, Nu2, Nv1 to Nv4 at xi.
Parameters: xi (float) – Position along the element Returns: Value of the shape functions ((Nu1, Nu2), (Nv1 to Nv4)) at xi Return type: numpy.ndarray
get_stiffness_matrix(linear=True)[source]¶Gets the stiffness matrix for a two noded 3D Euler-Bernoulli frame element. The stiffness matrix has been analytically integrated so numerical integration is not necessary.
Returns: 12 x 12 element stiffness matrix Return type: numpy.ndarray
get_transformation_matrix()[source]¶Returns the transformation matrix for an EulerBernoulli3D_2N element.
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