FiniteElement#
- class planestress.analysis.finite_elements.finite_element.FiniteElement(el_idx: int, el_tag: int, coords: npt.NDArray[np.float64], node_idxs: list[int], material: Material, orientation: bool, num_nodes: int, int_points: int)[source]#
Bases:
object
Abstract base class for a plane-stress finite element.
Methods
Calculates various results for the finite element given nodal displacements.
Returns the column indexes fore the global stiffness matrix.
Assembles the load vector for the element.
Returns the row indexes fore the global stiffness matrix.
Assembles the stiffness matrix for the element.
Returns a list of coordinates and indexes that define the element exterior.
Returns a list of triangle indexes for the finite element.
- __init__(el_idx: int, el_tag: int, coords: npt.NDArray[np.float64], node_idxs: list[int], material: Material, orientation: bool, num_nodes: int, int_points: int) None [source]#
Inits the FiniteElement class.
- Parameters:
el_idx (int) – Element index.
el_tag (int) – Element mesh tag.
coords (npt.NDArray[np.float64]) – A
numpy.ndarray
of coordinates defining the element, e.g.[[x1, x2, x3], [y1, y2, y3]]
.node_idxs (list[int]) – List of node indexes defining the element, e.g.
[idx1, idx2, idx3]
.material (Material) – Material of the element.
orientation (bool) – If
True
the element is oriented correctly, ifFalse
the element’s nodes will need reordering.num_nodes (int) – Number of nodes in the finite element.
int_points (int) – Number of integration points used for the finite element.
- element_col_indexes() list[int] [source]#
Returns the column indexes fore the global stiffness matrix.
- element_stiffness_matrix() ndarray[Any, dtype[float64]] [source]#
Assembles the stiffness matrix for the element.
- Raises:
NotImplementedError – If this method hasn’t been implemented
- Return type:
- element_load_vector(acceleration_field: tuple[float, float]) ndarray[Any, dtype[float64]] [source]#
Assembles the load vector for the element.
- calculate_element_stresses(u: npt.NDArray[np.float64]) ElementResults [source]#
Calculates various results for the finite element given nodal displacements.
Calculates the following:
Stress components at the nodes (:math`sigma_{xx}`, :math`sigma_{yy}`, :math`sigma_{xy}`).
TODO
- Parameters:
u (npt.NDArray[np.float64]) – Displacement vector for the element.
- Raises:
NotImplementedError – If this method hasn’t been implemented
- Return type: