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 =[partName]

# Delete previous mesh

# 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,

# Mesh it 

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



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

您可以在评论中使用如下的 HTML 标记来辅助表达: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>