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