Python for Abaqus: code for meshing a part

Region used for material orientation assignment can also be used in meshing a part. Here is an example of messing a part using C3D8R element.

Assuming the part name is partName and the whole entity has a cell set Set-cell, here comes the code to mesh this part for explicit solver,

model = mdb.models[modelName]
part = model.parts[partName]

# Delete previous mesh
part.deleteMesh()

# seed on all edges
e = p.edges
pickedEdges = e[:]
p.seedEdgeBySize(edges=pickedEdges, size=0.0003, deviationFactor=0.1,
    minSizeFactor=0.1, constraint=FINER)

# Element type settings
elemType1 = mesh.ElemType(elemCode=C3D8R, elemLibrary=EXPLICIT,
    kinematicSplit=AVERAGE_STRAIN, secondOrderAccuracy=ON,
    hourglassControl=DEFAULT, distortionControl=DEFAULT)
elemType2 = mesh.ElemType(elemCode=C3D6, elemLibrary=EXPLICIT,
    secondOrderAccuracy=OFF, distortionControl=DEFAULT)
elemType3 = mesh.ElemType(elemCode=C3D4, elemLibrary=EXPLICIT,
    secondOrderAccuracy=OFF, distortionControl=DEFAULT)

# mesh control
pickedRegions = p.cells # or p.cells[:] # or p.sets['Set-c'].cells[:]
# p.setMeshControls(regions=pickedRegions, algorithm=MEDIAL_AXIS)
p.setMeshControls(regions=pickedRegions, algorithm=ADVANCING_FRONT)

# Element type assignment
pickedRegions = p.sets['Set-c']
p.setElementType(regions=pickedRegions, elemTypes=(elemType1, elemType2,
    elemType3))

# Mesh it 
part.generateMesh()

There are other parameters to be set according different requirements, of course. This is just what I used in most of my simulations.©

本文发表于水景一页。永久链接:<http://cnzhx.net/fe/2017/02/28/python-for-abaqus-code-for-meshing-a-part/>。转载请保留此信息及相应链接。

雁过留声,人过留名

电子邮件地址不会被公开。 必填项已用*标注

特别提示:与当前文章主题无关的讨论相关但需要较多讨论求助信息请发布到水景一页讨论区的相应版块,谢谢您的理解与合作!请参考本站互助指南