FEM.Elements.E1D package¶
Collection of 1D Elements
Submodules¶
FEM.Elements.E1D.CubicElement module¶
Lineal element definition
- class FEM.Elements.E1D.CubicElement.CubicElement(coords: ndarray, gdl: ndarray, n: int = 4, **kargs)¶
Bases:
Element1D
Create a cubic element
- Parameters:
coords (np.ndarray) – Element coordinates matrix
gdl (np.ndarray) – Element degree of freedom matrix
n (int, optional) – Number of gauss points. Defaults to 4.
- dpsis(z: ndarray) ndarray ¶
Calculates the shape functions derivatives of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function derivatives evaluated in Z points
- Return type:
np.ndarray
- psis(z: ndarray) ndarray ¶
Calculates the shape functions of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function evaluated in Z points
- Return type:
np.ndarray
FEM.Elements.E1D.Element1D module¶
1D Elements general class
- class FEM.Elements.E1D.Element1D.Element1D(coords: ndarray, gdl: ndarray, n: int, **kargs)¶
Bases:
Element
,LinearScheme
Create a 1D Element
- Parameters:
coords (np.ndarray) – Coordinates matrix
gdl (np.ndarray) – Degree of freedom matrix
n (int) – Number of Gauss Points used in integration
- draw() None ¶
Create a element graph over domain
- isInside(x: ndarray) ndarray ¶
Test if a given points is inside element domain
- Parameters:
x (np.ndarray) – Point to be tested
- Returns:
Bolean array of test result
- Return type:
np.ndarray
- jacobianGraph() None ¶
Jacobian is constant in lineal elements
FEM.Elements.E1D.EulerBernoulliElement module¶
Creates a 1D beam element
- class FEM.Elements.E1D.EulerBernoulliElement.EulerBernoulliElement(coords, gdl, n=2, nvn=2)¶
Bases:
LinealElement
Creates a 1D beam element
- dhermit(z: ndarray) ndarray ¶
Calculates the shape functions derivatives of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function derivatives evaluated in Z points
- Return type:
np.ndarray
- giveSolution(SVSolution: bool = False, domain: str = 'domain') ndarray ¶
Calculate the interpolated solution over element domain
- Parameters:
SVSolution (bool, optional) – To calculate second variable solutions. Defaults to False.
- Returns:
Arrays of coordinates, solutions and second variables solutions.
- Return type:
np.ndarray
- giveSolutionPoint(Z: ndarray, SVSolution: bool = False) ndarray ¶
Calculate the interpolated solution over given set of points
- Parameters:
Z (np.ndarray) – Natural coordintas to extract the solution
SVSolution (bool, optional) – To calculate second variable solution. Defaults to False.
- Returns:
Arrays of coordinates, solutions and second variables solutions.
- Return type:
np.ndarray
- hermit(z: ndarray) ndarray ¶
Calculates the shape functions of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function evaluated in Z points
- Return type:
np.ndarray
FEM.Elements.E1D.LinealElement module¶
Lineal element definition
- class FEM.Elements.E1D.LinealElement.LinealElement(coords: ndarray, gdl: ndarray, n: int = 2, **kargs)¶
Bases:
Element1D
Create a lineal element
- Parameters:
coords (np.ndarray) – Element coordinates matrix
gdl (np.ndarray) – Element degree of freedom matrix
n (int, optional) – Number of gauss points. Defaults to 3.
- dpsis(z: ndarray) ndarray ¶
Calculates the shape functions derivatives of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function derivatives evaluated in Z points
- Return type:
np.ndarray
- psis(z: ndarray) ndarray ¶
Calculates the shape functions of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function evaluated in Z points
- Return type:
np.ndarray
FEM.Elements.E1D.LinearScheme module¶
Defines a linear scheme for lineal elements
- class FEM.Elements.E1D.LinearScheme.LinearScheme(n: int, **kargs)¶
Bases:
object
Creates a Linear Scheme
- Parameters:
n (int) – Number of gauss points
FEM.Elements.E1D.OriHinge module¶
- class FEM.Elements.E1D.OriHinge.OriHinge(coords: ndarray, gdl: ndarray, **kargs)¶
Bases:
LinealElement
,LinearScheme
- calculate_theta()¶
- calculate_vectors()¶
- dia(a, b)¶
- elementMatrix()¶
- elementMatrixNonLineal()¶
- get_M(theta)¶
- get_internal_force()¶
- get_kf(theta)¶
- get_theta_from_u()¶
- jacobian()¶
- set_internal_force(internal_force)¶
- set_kf(kf: Callable)¶
FEM.Elements.E1D.QuadraticElement module¶
Lineal element definition
- class FEM.Elements.E1D.QuadraticElement.QuadraticElement(coords: ndarray, gdl: ndarray, n: int = 4, **kargs)¶
Bases:
Element1D
Create a quadratic element
- Parameters:
coords (np.ndarray) – Element coordinates matrix
gdl (np.ndarray) – Element degree of freedom matrix
n (int, optional) – Number of gauss points. Defaults to 3.
- dpsis(z: ndarray) ndarray ¶
Calculates the shape functions derivatives of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function derivatives evaluated in Z points
- Return type:
np.ndarray
- psis(z: ndarray) ndarray ¶
Calculates the shape functions of the lineal element of a given natural coordinates
- Parameters:
z (np.ndarray) – Natural coordinates matrix
- Returns:
Shape function evaluated in Z points
- Return type:
np.ndarray