Mesh utils

Utilities to make FE model creation easier.

class model.mesh.finit_el_model.LinSetToMesh(linSet, matSect, elemSize, vDirLAxZ, elemType='ElasticBeam3d', dimElemSpace=3, coordTransfType='linear')

Bases: model.mesh.finit_el_model.RawLineSetToMesh

Define the parameters to mesh a set of lines. The method generateMesh meshes those lines and adds the nodes and elements created to the set .

Variables
  • matSect – instance of the class BeamMaterialData that defines the material-section to be applied to the set of lines.

  • elemSize – mean size of the elements (in elemSize= None do not change number of divisions).

  • vDirLAxZ – direction vector for the element local axis Z defined as xc.Vector([x,y,z]). This is the direction in which the Z local axis of the sections will be oriented (i.e. in the case of rectangular sections this Z local axis of the section is parallel to the dimension defined as width of the rectangle)

  • dimElemSpace – dimension of the element space (defaults to 3)

  • coordTransfType – type of coordinate transformation. Available types: ‘linear’, ‘PDelta’ and ‘corotational’ (defaults to ‘linear’)

class model.mesh.finit_el_model.RawLineSetToMesh(linSet, matSect, elemSize, coordTransf, elemType='ElasticBeam3d', dimElemSpace=3)

Bases: model.mesh.finit_el_model.SetToMesh

Define the parameters to mesh a set of lines. The method generateMesh meshes those lines and adds the nodes and elements created to the set .

Variables
  • matSect – instance of the class BeamMaterialData that defines the material-section to be applied to the set of lines.

  • elemSize – mean size of the elements (in elemSize= None do not change number of divisions).

  • coordTransf – coordinate transformation for the elements.

  • elemType – type of element for the mesh (defaults to ‘ElasticBeam3d’).

  • dimElemSpace – dimension of the element space (defaults to 3)

generateMesh(preprocessor, sectGeom='N')

Generate the mesh for the line set.

Parameters

sectGeom – =’Y’ if want to create the property ‘crossSection’ for each element (defaults to ‘N’)

getSeedElement(preprocessor)

Return the element that will be use to mesh the set.

class model.mesh.finit_el_model.SetToMesh(primitiveSet, elemSize, elemType)

Bases: object

Base for classes that mesh a primitive set.

Variables
  • primitiveSet – set of lines/surfaces/blocks.

  • elemSize – mean size of the elements (in elemSize= None do not change number of divisions).

  • elemType – type of element for the mesh.

class model.mesh.finit_el_model.SurfSetToMesh(surfSet, matSect, elemSize, elemType='ShellMITC4')

Bases: model.mesh.finit_el_model.SetToMesh

Define the parameters to mesh a set of surfaces. The method generateMesh meshes those surfaces and adds the nodes and elements created to the set .

Variables
  • surfSet – set of surfaces.

  • matSect – instance of the class DeckMaterialData that defines the material-section to be applied to the set of surfaces.

  • elemSize – mean size of the elements (in elemSize= None do not change number of divisions).

  • elemType – type of element for the mesh (defaults to ‘ShellMITC4’)

generateMesh(preprocessor, sectGeom='N')

Generate the mesh for the surface set.

Parameters

sectGeom – =’Y’ if want to create the property ‘crossSection’ for each element (defaults to ‘N’)

getSeedElement(preprocessor)

Return the element that will be use to mesh the set.

model.mesh.finit_el_model.assign_ndiv_to_lines_in_set(lnSet, ndiv)

Assign a number of divisions = ndiv to all the lines included in set linSet

model.mesh.finit_el_model.createBeam2Pnts(preprocessor, startPnt, endPnt, setName, matSect, elemSize, vDirLAxZ, elemType='ElasticBeam3d', dimElemSpace=3, coordTransfType='linear', sectGeom='N')

Return a set of beam elements created from startPnt to endPnt.

Parameters
  • preprocessor – preprocessor

  • startPnt – coordinates of first beam extremity (defined as geom.Pos3d(x,y,z)

  • startPnt – coordinates of end beam extremity (defined as geom.Pos3d(x,y,z)

  • setName – name of the set of entities created

  • matSect – instance of the class BeamMaterialData that defines the material-section to be applied to the set of lines.

  • elemSize – mean size of the elements

  • vDirLAxZ – direction vector for the element local axis Z defined as xc.Vector([x,y,z]). This is the direction in which the Z local axis of the sections will be oriented (i.e. in the case of rectangular sections this Z local axis of the section is parallel to the dimension defined as width of the rectangle)

  • dimElemSpace – dimension of the element space (defaults to 3)

  • coordTransfType – type of coordinate transformation. Available types: ‘linear’, ‘PDelta’ and ‘corotational’ (defaults to ‘linear’)

  • sectGeom – =’Y’ if want to create the property ‘crossSection’ for each element (defaults to ‘N’)

model.mesh.finit_el_model.getDefaultCoordinateTransformation(preprocessor, coordTransfName, coordTransfType, vDir)

Creates a default coordinate transformation.

model.mesh.finit_el_model.multi_mesh(preprocessor, lstMeshSets, sectGeom='N')

Mesh all the mesh-sets included in lstMeshSets

Parameters
  • preprocessor – preprocessor

  • lstMeshSets – list of instances of classes LinSetToMesh or SurfSetToMesh to be meshed

  • sectGeom – =’Y’ if want to create the property ‘crossSection’ for each element (defaults to ‘N’)