bluemira.structural.element =========================== .. py:module:: bluemira.structural.element .. autoapi-nested-parse:: Finite element class Classes ------- .. autoapisummary:: bluemira.structural.element.Element Functions --------- .. autoapisummary:: bluemira.structural.element._k_array bluemira.structural.element.local_k_shear bluemira.structural.element.local_k Module Contents --------------- .. py:function:: _k_array(k11: float, k22: float, k33: float, k44: float, k55: float, k66: float, k35: float, k26: float, k511: float, k612: float) -> numpy.ndarray 3-D stiffness local member stiffness matrix, generalised for cases with and without shear :param Local stiffness matrix non-zero elements: :rtype: The local member stiffness matrix .. rubric:: Notes The matrix is given by .. math:: \small{ \left[ \begin{array}{cccccccccccc} k11 & 0 & 0 & 0 & 0 & 0 & -k11 & 0 & 0 & 0 & 0 & 0 \\ 0 & k22 & 0 & 0 & 0 & k26 & 0 & -k22 & 0 & 0 & 0 & k26 \\ 0 & 0 & k33 & 0 & k35 & 0 & 0 & 0 & -k33 & 0 & k35 & 0 \\ 0 & 0 & 0 & k44 & 0 & 0 & 0 & 0 & 0 & -k44 & 0 & 0 \\ 0 & 0 & k35 & 0 & k55 & 0 & 0 & 0 & -k35 & 0 & k511 & 0 \\ 0 & k26 & 0 & 0 & 0 & k66 & 0 & -k26 & 0 & 0 & 0 & k612 \\ -k11 & 0 & 0 & 0 & 0 & 0 & k11 & 0 & 0 & 0 & 0 & 0 \\ 0 & -k22 & 0 & 0 & 0 & -k26 & 0 & k22 & 0 & 0 & 0 & -k26 \\ 0 & 0 & -k33 & 0 & -k35 & 0 & 0 & 0 & k33 & 0 & -k35 & 0 \\ 0 & 0 & 0 & -k44 & 0 & 0 & 0 & 0 & 0 & k44 & 0 & 0 \\ 0 & 0 & k35 & 0 & k511 & 0 & 0 & 0 & -k35 & 0 & k55 & 0 \\ 0 & k26 & 0 & 0 & 0 & k612 & 0 & -k26 & 0 & 0 & 0 & k66 \\ \end{array} \right]} .. py:function:: local_k_shear(EA: float, EIyy: float, EIzz: float, ry: float, rz: float, L: float, GJ: float, A: float, A_sy: float, A_sz: float, nu: float = NU) -> numpy.ndarray 3-D stiffness local member stiffness matrix, including shear deformation :param EA: Youngs modulus x cross-sectional area :param EIyy: Youngs modulus x second moment of area about the element y-axis :param EIzz: Youngs modulus x second moment of area about the element z-axis :param L: The length of the beam :param GJ: The rigidity modulus x torsion constant :param A_sy: The shear area in the y-plane :param A_sz: The shear area in the z-plane :param nu: Poisson ratio :rtype: The local member stiffness matrix .. rubric:: Notes The shear deformation parameters are calculated by .. math:: \phi_{y} = 24 (1 + \nu) \left(\frac{A}{A_{sy}}\right)~ \left(\frac{r_{z}}{L}\right)^2 \phi_{z} = 24 (1 + \nu) \left(\frac{A}{A_{sz}}\right)~ \left(\frac{r_{y}}{L}\right)^2 The equations for different k-values are .. math:: k_{11} = \frac{EA}{L} \\ .. math:: k_{22} = \frac{12 EI_{zz}}{L^3 (1 + \phi_{y})} \\ .. math:: k_{33} = \frac{12 EI_{yy}}{L^3 (1 + \phi_{z})} \\ .. math:: k_{44} = \frac{GJ}{L} \\ .. math:: k_{55} = \frac{(4 + \phi_{z}) EI_{yy}}{L (1 + \phi_{z})} \\ .. math:: k_{66} = \frac{(4 + \phi_{y}) EI_{zz}}{L (1 + \phi_{y})} \\ .. math:: k_{35} = \frac{-6 EI_{yy}}{L^2 (1 + \phi_{z})} \\ .. math:: k_{26} = \frac{6 EI_{zz}}{L^2 (1 + \phi_{y})} \\ .. math:: k_{511} = \frac{(2 - \phi_{z}) EI_{yy}}{L (1 + \phi_{z})} \\ .. math:: k_{612} = \frac{(2 - \phi_{y}) EI_{zz}}{L (1 + \phi_{y})} \\ .. py:function:: local_k(EA: float, EIyy: float, EIzz: float, L: float, GJ: float) -> numpy.ndarray 3-D stiffness local member stiffness matrix, including shear deformation :param EA: Youngs modulus x cross-sectional area :param EIyy: Youngs modulus x second moment of area about the element y-axis :param EIzz: Youngs modulus x second moment of area about the element z-axis :param L: The length of the beam :param GJ: The rigidity modulus x torsion constant :rtype: The local member stiffness matrix .. rubric:: Notes The equations for different k-values are .. math:: k_{11} = \frac{EA}{L} \\ .. math:: k_{22} = \frac{12 EI_{zz}}{L^3} \\ .. math:: k_{33} = \frac{12 EI_{yy}}{L^3} \\ .. math:: k_{44} = \frac{GJ}{L} \\ .. math:: k_{55} = \frac{4 EI_{yy}}{L} \\ .. math:: k_{66} = \frac{4 EI_{zz}}{L} \\ .. math:: k_{35} = \frac{-6 EI_{yy}}{L^2} \\ .. math:: k_{26} = \frac{6 EI_{zz}}{L^2} \\ .. math:: k_{511} = \frac{2 EI_{yy}}{L} \\ .. math:: k_{612} = \frac{2 EI_{zz}}{L} \\ .. py:class:: Element(node_1: bluemira.structural.node.Node, node_2: bluemira.structural.node.Node, id_number: int, cross_section: bluemira.structural.crosssection.CrossSection, material: matproplib.material.Material | None = None, op_cond: matproplib.conditions.OperationalConditions | None = None) A 3-D beam element (Euler-Bernoulli type) :param node_1: The first node :param node_2: The second node :param id_number: The ID number of this element :param cross_section: The CrossSection property object of the element :param material: The Material property object of the element .. py:attribute:: HERMITE_POLYS .. py:attribute:: __slots__ :value: ('_cross_section', '_k_matrix', '_k_matrix_glob', '_lambda_matrix', '_length', '_material',... .. py:attribute:: node_1 .. py:attribute:: node_2 .. py:attribute:: id_number .. py:attribute:: loads :value: [] .. py:attribute:: shapes :value: None .. py:attribute:: stresses :value: None .. py:attribute:: max_stress :value: None .. py:attribute:: safety_factor :value: None .. py:attribute:: op_cond :value: None .. py:attribute:: _material :value: None .. py:attribute:: _cross_section .. py:attribute:: _length :value: None .. py:attribute:: _weight :value: None .. py:attribute:: _k_matrix :value: None .. py:attribute:: _lambda_matrix :value: None .. py:attribute:: _k_matrix_glob :value: None .. py:attribute:: _s_functs :value: None .. py:method:: _process_properties(cross_section, material: matproplib.material.Material | None = None, op_cond: matproplib.conditions.OperationalConditions | None = None) :staticmethod: Handles cross-sectional and material properties, including if a composite material cross-section is specified. .. py:property:: length :type: float Element length .. rubric:: Notes The Euclidean distance between Nodes 1 and 2 .. math:: d = \sqrt {(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} .. py:property:: weight :type: float Element self-weight force per unit length .. math:: w = g A \rho where: - g is the gravitational acceleration (m/s²), - A is the cross-sectional area of the element (m²), - \rho is the material density (kg/m³). .. py:property:: mid_point :type: numpy.ndarray The mid point of the Element :returns: **vector** -- The [x, y, z] vector of the midpoint :rtype: np.array(3) .. rubric:: Notes The midpoint coordinates are given by: .. math:: M_x = \frac{x_1 + x_2}{2}, \quad M_y = \frac{y_1 + y_2}{2}, \quad M_z = \frac{z_1 + z_2}{2} .. py:property:: space_vector Spatial vector of the Element :returns: **vector** -- The [dx, dy, dz] vector of the Element :rtype: np.array(3) .. rubric:: Notes The vector components are given by: .. math:: v_x = x_2 - x_1, \quad v_y = y_2 - y_1, \quad v_z = z_2 - z_1 .. py:property:: displacements :type: numpy.ndarray Element global displacement vector at nodes .. py:property:: max_displacement :type: float Maximum element absolute displacement values :rtype: The maximum absolute deflection distance of the two Nodes .. py:property:: k_matrix :type: numpy.ndarray Element stiffness matrix in local coordinates .. py:property:: k_matrix_glob :type: numpy.ndarray Element stiffness matrix in global coordinates .. py:property:: lambda_matrix :type: numpy.ndarray Transformation (direction cosine) matrix :raises StructuralError: Nodes are coincident .. rubric:: Notes This matrix is cached but involves properties that may be externally modified (e.g. by moving a node). Be careful to reset _lambda_matrix to None if you are doing this, so that it gets recalculated upon call. .. py:method:: add_load(load: bluemira.structural.loads.Load | dict[str, float | str]) Applies a load to the Element object. :param load: The dictionary of load values (in local coordinates) .. py:method:: clear_loads() Clears all loads applied to the Element .. py:method:: clear_cache() Clears all cached properties and matrices for the Element. Use if an Element's geometry has been modified. .. py:method:: u_vector() -> numpy.ndarray Element local displacement vector .. py:method:: p_vector() -> numpy.ndarray The local force vector of the element .. py:method:: p_vector_glob() -> numpy.ndarray The global force vector of the element .. py:method:: equivalent_node_forces() -> numpy.ndarray Equivalent concentrated forces in global coordinates .. py:method:: _equivalent_node_forces() -> numpy.ndarray Element local nodal force vector Equivalent concentrated forces in local coordinates .. py:property:: _shape_functions .. py:method:: interpolate(scale: float) Interpolates the displacement of the beam with Hermite polynomial shape functions to obtain inter-node displacement and stress :param scale: The scale at which to calculate the interpolated displacements .. py:method:: calculate_stress(u, m_matrix) Calculates the stresses in the Element, using Hermite polynomials for interpolation between the Nodes .. py:method:: calculate_shape(u, d, _m, _v, scale) Calculates the interpolated shape of the Element