anastruct.fem.elements ====================== .. py:module:: anastruct.fem.elements Attributes ---------- .. autoapisummary:: anastruct.fem.elements.CACHE_BOUND Classes ------- .. autoapisummary:: anastruct.fem.elements.Element Functions --------- .. autoapisummary:: anastruct.fem.elements.kinematic_matrix anastruct.fem.elements.constitutive_matrix anastruct.fem.elements.stiffness_matrix anastruct.fem.elements.geometric_stiffness_matrix Module Contents --------------- .. py:data:: CACHE_BOUND :value: 32000 .. py:class:: Element(id_: int, EA: float, EI: float, l: float, angle: float, vertex_1: anastruct.vertex.Vertex, vertex_2: anastruct.vertex.Vertex, type_: anastruct._types.ElementType, section_name: str, spring: Optional[anastruct.fem.system.Spring] = None) .. py:attribute:: id .. py:attribute:: type .. py:attribute:: EA .. py:attribute:: EI .. py:attribute:: l .. py:attribute:: springs :value: None .. py:attribute:: vertex_1 .. py:attribute:: vertex_2 .. py:attribute:: kinematic_matrix .. py:attribute:: constitutive_matrix :type: numpy.ndarray .. py:attribute:: stiffness_matrix :type: numpy.ndarray .. py:attribute:: node_id1 :type: int .. py:attribute:: node_id2 :type: int .. py:attribute:: node_map :type: Dict[int, anastruct.fem.node.Node] .. py:attribute:: element_displacement_vector :type: numpy.ndarray .. py:attribute:: element_primary_force_vector :type: numpy.ndarray .. py:attribute:: element_force_vector :type: numpy.ndarray .. py:attribute:: q_load :type: tuple :value: (0.0, 0.0) .. py:attribute:: q_perp_load :type: tuple :value: (0.0, 0.0) .. py:attribute:: q_direction :type: Optional[str] :value: None .. py:attribute:: q_angle :type: Optional[float] :value: None .. py:attribute:: dead_load :type: float :value: 0.0 .. py:attribute:: N_1 :type: Optional[float] :value: None .. py:attribute:: N_2 :type: Optional[float] :value: None .. py:attribute:: bending_moment :type: Optional[numpy.ndarray] :value: None .. py:attribute:: shear_force :type: Optional[numpy.ndarray] :value: None .. py:attribute:: axial_force :type: Optional[numpy.ndarray] :value: None .. py:attribute:: deflection :type: Optional[numpy.ndarray] :value: None .. py:attribute:: total_deflection :type: Optional[numpy.ndarray] :value: None .. py:attribute:: extension :type: Optional[numpy.ndarray] :value: None .. py:attribute:: max_deflection :type: Optional[float] :value: None .. py:attribute:: max_total_deflection :type: Optional[float] :value: None .. py:attribute:: max_extension :type: Optional[float] :value: None .. py:attribute:: nodes_plastic :type: List[bool] :value: [False, False] .. py:attribute:: section_name .. py:property:: all_qp_load :type: List[float] All parallel q (distributed) loads Returns: List[float]: All parallel q (distributed) loads .. py:property:: all_qn_load :type: List[float] All normal q (distributed) loads Returns: List[float]: All normal q (distributed) loads .. py:property:: node_1 :type: anastruct.fem.node.Node Starting node Returns: Node: Starting node .. py:property:: node_2 :type: anastruct.fem.node.Node Ending node Returns: Node: Ending node .. py:property:: hinges :type: List[int] Node IDs of hinges Returns: List[int]: Node IDs of hinges .. py:method:: determine_force_vector() -> Optional[numpy.ndarray] Determine the force vector of the element Returns: Optional[np.ndarray]: Force vector of the element .. py:method:: compile_stiffness_matrix() -> None Compile the stiffness matrix of the element .. py:method:: compile_kinematic_matrix() -> None Compile the kinematic matrix of the element .. py:method:: compile_constitutive_matrix(initial: bool = False) -> None Compile the constitutive matrix of the element .. py:method:: update_stiffness(factor: float, node: Literal[1, 2]) -> None Update the stiffness matrix of the element Args: factor (float): Factor to multiply the stiffness matrix with node (Literal[1, 2]): Node ID of the node to update (1 or 2) .. py:method:: compile_geometric_non_linear_stiffness_matrix() -> None Compile the geometric non-linear stiffness matrix of the element .. py:method:: reset() -> None Reset the element's solve state .. py:method:: __add__(other: Element) -> Element Add two elements Args: other (Element): Element to add Raises: FEMException: If the elements have different IDs Returns: Element: Sum of the two elements .. py:function:: kinematic_matrix(a1: float, a2: float, l: float) -> numpy.ndarray Generate the kinematic matrix of an element Args: a1 (float): Angle of the element at node 1 a2 (float): Angle of the element at node 2 l (float): Length of the element Returns: np.ndarray: Kinematic matrix of the element .. py:function:: constitutive_matrix(EA: float, EI: float, l: float, spring: Optional[anastruct.fem.system.Spring], node_1_hinge: Optional[bool], node_2_hinge: Optional[bool]) -> numpy.ndarray Generate the constitutive matrix of an element Args: EA (float): Axial stiffness EI (float): Bending stiffness l (float): Length spring (Optional[Spring]): Spring stiffnesses at node 1 and node 2 node_1_hinge (Optional[bool]): Whether node 1 is a hinge node_2_hinge (Optional[bool]): Whether node 2 is a hinge Returns: np.ndarray: Constitutive matrix of the element .. py:function:: stiffness_matrix(var_constitutive_matrix: numpy.ndarray, var_kinematic_matrix: numpy.ndarray) -> numpy.ndarray Generate the stiffness matrix of an element Args: var_constitutive_matrix (np.ndarray): Constitutive matrix of the element var_kinematic_matrix (np.ndarray): Kinematic matrix of the element Returns: np.ndarray: Stiffness matrix of the element .. py:function:: geometric_stiffness_matrix(l: float, N: float, a1: float, a2: float) -> numpy.ndarray Generate the geometric stiffness matrix of an element Args: l (float): Length N (float): Axial force a1 (float): Angle of the element at node 1 a2 (float): Angle of the element at node 2 Returns: np.ndarray: Geometric stiffness matrix of the element