anastruct.fem.elements

Attributes

CACHE_BOUND

Classes

Element

Functions

kinematic_matrix(→ numpy.ndarray)

Generate the kinematic matrix of an element

constitutive_matrix(→ numpy.ndarray)

Generate the constitutive matrix of an element

stiffness_matrix(→ numpy.ndarray)

Generate the stiffness matrix of an element

geometric_stiffness_matrix(→ numpy.ndarray)

Generate the geometric stiffness matrix of an element

Module Contents

anastruct.fem.elements.CACHE_BOUND = 32000[source]
class anastruct.fem.elements.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: anastruct.fem.system.Spring | None = None)[source]
id[source]
type[source]
EA[source]
EI[source]
l[source]
springs = None[source]
vertex_1[source]
vertex_2[source]
kinematic_matrix[source]
constitutive_matrix: numpy.ndarray[source]
stiffness_matrix: numpy.ndarray[source]
node_id1: int[source]
node_id2: int[source]
node_map: Dict[int, anastruct.fem.node.Node][source]
element_displacement_vector: numpy.ndarray[source]
element_primary_force_vector: numpy.ndarray[source]
element_force_vector: numpy.ndarray[source]
q_load: tuple = (0.0, 0.0)[source]
q_perp_load: tuple = (0.0, 0.0)[source]
q_direction: str | None = None[source]
q_angle: float | None = None[source]
dead_load: float = 0.0[source]
N_1: float | None = None[source]
N_2: float | None = None[source]
bending_moment: numpy.ndarray | None = None[source]
shear_force: numpy.ndarray | None = None[source]
axial_force: numpy.ndarray | None = None[source]
deflection: numpy.ndarray | None = None[source]
total_deflection: numpy.ndarray | None = None[source]
extension: numpy.ndarray | None = None[source]
max_deflection: float | None = None[source]
max_total_deflection: float | None = None[source]
max_extension: float | None = None[source]
nodes_plastic: List[bool] = [False, False][source]
section_name[source]
property all_qp_load: List[float][source]

All parallel q (distributed) loads

Returns:

List[float]: All parallel q (distributed) loads

property all_qn_load: List[float][source]

All normal q (distributed) loads

Returns:

List[float]: All normal q (distributed) loads

property node_1: anastruct.fem.node.Node[source]

Starting node

Returns:

Node: Starting node

property node_2: anastruct.fem.node.Node[source]

Ending node

Returns:

Node: Ending node

property hinges: List[int][source]

Node IDs of hinges

Returns:

List[int]: Node IDs of hinges

determine_force_vector() numpy.ndarray | None[source]

Determine the force vector of the element

Returns:

Optional[np.ndarray]: Force vector of the element

compile_stiffness_matrix() None[source]

Compile the stiffness matrix of the element

compile_kinematic_matrix() None[source]

Compile the kinematic matrix of the element

compile_constitutive_matrix(initial: bool = False) None[source]

Compile the constitutive matrix of the element

update_stiffness(factor: float, node: Literal[1, 2]) None[source]

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)

compile_geometric_non_linear_stiffness_matrix() None[source]

Compile the geometric non-linear stiffness matrix of the element

reset() None[source]

Reset the element’s solve state

__add__(other: Element) Element[source]

Add two elements

Args:

other (Element): Element to add

Raises:

FEMException: If the elements have different IDs

Returns:

Element: Sum of the two elements

anastruct.fem.elements.kinematic_matrix(a1: float, a2: float, l: float) numpy.ndarray[source]

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

anastruct.fem.elements.constitutive_matrix(EA: float, EI: float, l: float, spring: anastruct.fem.system.Spring | None, node_1_hinge: bool | None, node_2_hinge: bool | None) numpy.ndarray[source]

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

anastruct.fem.elements.stiffness_matrix(var_constitutive_matrix: numpy.ndarray, var_kinematic_matrix: numpy.ndarray) numpy.ndarray[source]

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

anastruct.fem.elements.geometric_stiffness_matrix(l: float, N: float, a1: float, a2: float) numpy.ndarray[source]

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