pyva.geometry.meshClasses.RegShape2D
- class pyva.geometry.meshClasses.RegShape2D(X0, Y0, X1, Y1, NX, NY, doftype=DOFtype(typestr='displacement'), shape=<function RegShape2D.<lambda>>)
Bases:
RegMesh2D
This class deals with shapes mapped on regular and flat 2D meshes. These meshes are very useful for radiation stiffness calculation of vibrating structures
Check if required, usefull for function based shapes. Note, that there is no frequency depence!
- __init__(X0, Y0, X1, Y1, NX, NY, doftype=DOFtype(typestr='displacement'), shape=<function RegShape2D.<lambda>>)
Class constructor of RegShape2D
- Parameters:
X0 (float) – lowest X position
Y0 (float) – lowest Y position
X1 (float) – highest X position
Y1 (float) – highest Y position
NX (float) – number of nodes in X-direction
NY (float) – number of nodes in Y-direction
doftype (DOFtype, optional) – type of shape. The default is dof.DOFtype(typestr=’displacement’).
shape (function of (x,y), optional) – Function for shape. The default is a function that is 1.
- Returns:
None. – shape: shape of mesh, 2D fun or ndarray of shape NX,NY function is only defines in mesh area the rest is ignored
Examples – >>> regShape(0,0,0.8,0.9,10,10)
Methods
Zvec
([normalise])Vector of shape values
__init__
(X0, Y0, X1, Y1, NX, NY[, doftype, ...])Class constructor of RegShape2D
distance
()Calculate the distances between nodes of mesh
mean_square
(normalise)mean square value
nodes
([index])Node coordinates
normalised_shape
([N])Normalised reshape considering integration over element area
plot3d
([fig])3D plot for shapes
shapefun
(X, Y)Shape function with consideration of mesh limits
Attributes
Number of nodes
x-coordinates of mesh
y-coordinates of mesh
Returns area of full mesh.
dA
Wavenumber parameter from Langley [Lan2007]
shape
- property Nmesh
Number of nodes
- Return type:
int
- property X
x-coordinates of mesh
- Returns:
x-node positions.
- Return type:
ndarray
- property Y
y-coordinates of mesh
- Returns:
y-node positions.
- Return type:
ndarray
- Zvec(normalise=False)
Vector of shape values
- Parameters:
normalise (bool, optional) – switch if normalisation shall be used. The default is False.
- Returns:
shape vector.
- Return type:
ndarray
- property area
Returns area of full mesh. inlcuding edge elements
- Returns:
mesh area.
- Return type:
float
- distance()
Calculate the distances between nodes of mesh
This method provides the occuring distances in a mesh in a reduced way. Regular meshes have many repeating distances, thus this method returns a unique array of distances and an index to reconstruct the upper triangular matrix
dist[index] gives the full triangular matrix
- Returns:
ndarray – dist : unique distances
nd.adday of int – index : index to reconstruct all distances from dist
- property ks
Wavenumber parameter from Langley [Lan2007]
Technically with is the wavenumber that korresponds to the smallest allowed wavelength of the mesh represented by the diagonal length of the element
- Returns:
wavenumber.
- Return type:
float
- mean_square(normalise)
mean square value
- Parameters:
normalise (bool) – switch if normalisation shall be used.
- Returns:
mean square.
- Return type:
float
- nodes(index='all')
Node coordinates
- Parameters:
index (int or str, optional) – index of node. The default is ‘all’.
- Returns:
ndarray – x,y coordinates of mesh or x of 1st index.
float – y of 2nd index.
- normalised_shape(N=2)
Normalised reshape considering integration over element area
Integrates the shape function around the node to get better results when nodal shape value if not representing the average value in the node vincinity
- Parameters:
N (int) – oversamping for integration. The default is 2.
- Returns:
normalised shape
- Return type:
ndarray
- plot3d(fig=1)
3D plot for shapes
- Parameters:
fig (int, optional) – figure identifier. The default is 1.
- Return type:
None.
- shapefun(X, Y)
Shape function with consideration of mesh limits
- Parameters:
X (float) – x-coordinate.
Y (TYPE) – y-coordinate.
- Returns:
res – of shape dimension.
- Return type:
ndarray