pyva.geometry.meshClasses.RegMesh2D

class pyva.geometry.meshClasses.RegMesh2D(X0, Y0, X1, Y1, NX, NY, doftype=DOFtype(typestr='general'))

Bases: object

This class deals with regular and flat 2D meshes. These meshes are very useful for radiation stiffness calculation of vibrating structures

__init__(X0, Y0, X1, Y1, NX, NY, doftype=DOFtype(typestr='general'))

Class constructor of RegMesh2D

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

Methods

__init__(X0, Y0, X1, Y1, NX, NY[, doftype])

Class constructor of RegMesh2D

distance()

Calculate the distances between nodes of mesh

nodes([index])

Node coordinates

plot3d([fig])

3D plot

Attributes

Nmesh

Number of nodes

X

x-coordinates of mesh

Y

y-coordinates of mesh

area

Returns area of full mesh.

dA

ks

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

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

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.

plot3d(fig=1)

3D plot

Parameters:

fig (int, optional) – figure identifier. The default is 1.

Return type:

None.