Tri3#
- class planestress.analysis.finite_element.Tri3(el_idx: int, el_tag: int, coords: npt.NDArray[np.float64], node_idxs: list[int], material: Material)[source]#
Bases:
TriangularElementClass for a three-noded linear triangular element.
Methods
Calculates the B matrix and jacobian at an isoparametric point.
Assembles the load vector for the element.
Assembles the stiffness matrix for the element.
Gaussian weights and locations for
n_pointGaussian integration.Calculates various results for the finite element given nodal displacements.
Returns a list of triangle indices for a Tri3 element.
Converts a point in isoparametric coordinates to global coordinates.
Returns the values of the isoparametric coordinates at the nodes.
Returns the shape functions at a point for a Tri3 element.
Returns the derivatives of the shape functions at a point for a Tri3 element.
- __init__(el_idx: int, el_tag: int, coords: npt.NDArray[np.float64], node_idxs: list[int], material: Material) None[source]#
Inits the Tri3 class.
- Parameters:
el_idx (int) – Element index.
el_tag (int) – Element mesh tag.
coords (npt.NDArray[np.float64]) – A
2 x 3numpy.ndarrayof coordinates defining the element, i.e.[[x1, x2, x3], [y1, y2, y3]].node_idxs (list[int]) – A list of node indexes defining the element, i.e.
[idx1, idx2, idx3].material (Material) – Material of the element.
- static shape_functions(iso_coords: tuple[float, float, float]) ndarray[Any, dtype[float64]][source]#
Returns the shape functions at a point for a Tri3 element.
- static shape_functions_derivatives(iso_coords: tuple[float, float, float]) ndarray[Any, dtype[float64]][source]#
Returns the derivatives of the shape functions at a point for a Tri3 element.
- static nodal_isoparametric_coordinates() ndarray[Any, dtype[float64]][source]#
Returns the values of the isoparametric coordinates at the nodes.
- get_triangulation() list[tuple[int, int, int]][source]#
Returns a list of triangle indices for a Tri3 element.
- b_matrix_jacobian(iso_coords: tuple[float, float, float]) tuple[ndarray[Any, dtype[float64]], float]#
Calculates the B matrix and jacobian at an isoparametric point.
- element_stiffness_matrix() ndarray[Any, dtype[float64]]#
Assembles the stiffness matrix for the element.
- gauss_points(n_points: int) ndarray[Any, dtype[float64]]#
Gaussian weights and locations for
n_pointGaussian integration.- Parameters:
n_points (int) – Number of gauss points.
- Raises:
ValueError – If
n_pointsis not 1, 3, 4 or 6.- Returns:
Gaussian weights and locations. For each gauss point -
[weight, eta, xi, zeta].- Return type:
- get_element_results(u: ndarray[Any, dtype[float64]]) ElementResults#
Calculates various results for the finite element given nodal displacements.
Calculates the following:
Stresses at nodes
TODO