Module platepy.generateMesh

Generates and stores the mesh of a plate Model.

Functions

def generateMesh(self, showGmshMesh=False, showGmshGeometryBeforeMeshing=False, elementDefinition='MITC-4-N', meshSize=0.6, nEdgeNodes=0, order='linear', meshDistortion=False, distVal=100, deactivateRotation=False)

Generates mesh and stores it in the plateModel object according to the selected options. Gmsh model has to be already initialized and structural elements have to be added to the model.

INPUT
  • self: plateModel object.
  • showGmshMesh = False: If True, the model is shown through the built-in fltk terminal (after the mesh generation).
  • showGmshMesh = True: If True, the model is shown through the built-in fltk terminal (before the mesh generation).
  • elementDefinition = None: String defining the desired FE-element in the following form: "type-nNodes-integration".

    • type: DB for displacement-based elements or MITC.
    • nNodes: number of nodes ( currently 3, 4 or 9).
    • integration: Desired Gauss-quadrature for the calculation of the stiffness matrixes. R for reduced or N for normal.
  • meshSize = 8e-1: target mesh size around the point entities. If nEdgeNodes > 0, meshSize is ignored.

  • nEdgeNodes = 0: Prescribes the number of nodes on each edge. Plate must be rectangular.
  • order = "linear": Prescribes the order of the elements. "linear for first order elements (default) and "quadratic" for second order elements.
  • meshDistortion = False: Boolean, if True a mesh distortion function is applied.
  • distVal = 100: Sereneness of the mesh distortion function.
RETURN
def setMesh(self, nodesArray, elements, BCs, elementDefinition=None, load=None)

Allows to manually define node positions, elements connectivity, boundary conditions and loads.

INPUT
  • self: plateModel object.
  • nodesArray: nNodes x 3 numpy array. Columns are the x-y-z coordinates of each node.
  • elements: (nElements x nElementNodes) connectivity matrix. Each row is an element, the columns contain the node tags which build the element.
  • BCs: n x 4 numpy array. n is the number of restrained nodes, the first column is the node tag, the other column represent the condition of the three DOFs (1 is blocked, 0 is free).
  • load = None: n x 4 numpy array. n is the number of loaded nodes, the first column is the node tag, the other column represent the magnitude of the load for the relative DOF.
RETURN