Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JStephen on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Abaqus Python - how to export external triangles of a 3d mesh

Status
Not open for further replies.

gianca1976

Computer
Joined
Mar 15, 2011
Messages
2
Location
IT
Hi,

I'm struggling to obtain the external triangles of a tetrahedral mesh...

I did meshing operation with a Python script:

Code:
##### CREATE MODEL ######
myModel = mdb.Model(name=modelName)

##### IMPORT IGES MODEL ######
mdb.openIges('model.igs'
    , msbo=True, scaleFromFile=OFF, trimCurve=DEFAULT)
myModel.PartFromGeometryFile(combine=False, convertToAnalytical=1
    , dimensionality=THREE_D, geometryFile=mdb.acis, name='model',
    stitchAfterCombine=False, stitchEdges=1, stitchTolerance=1.0, type=
    DEFORMABLE_BODY)

[..assign materials, assembly, section, loads., etc etc....]


##### CREATE TETRAHEDRAL MESH #######
myModel.parts['part'].seedPart(size=8.0)
pickedRegions = model.parts[part'].cells
myModel.parts['part'].setMeshControls(elemShape=TET, regions=pickedRegions,
    sizeGrowth=MAXIMUM, technique=FREE)
elemType = mesh.ElemType(elemCode=C3D4, elemLibrary=STANDARD, 
    distortionControl=DEFAULT)
pickedRegions = (myModel.parts['part'].cells,)
myModel.parts['part'].setElementType(regions=pickedRegions, elemTypes=(elemType,))
myModel.parts['part'].generateMesh()
myModel.rootAssembly.regenerate()
#########################################
I need to export the 3d faces that compose the external surface. I tried with:

Code:
for ef1 in myModel.parts['part'].elementFaces:
	print ef1

#RESULT:
({'face': FACE1, 'label': 1})
({'face': FACE2, 'label': 1})
({'face': FACE3, 'label': 1})
({'face': FACE4, 'label': 1})
({'face': FACE1, 'label': 2})
({'face': FACE2, 'label': 2})
.... etc etc ......

###########################################

for face in myModel.parts['part'].faces:
	print face

#RESULT:
({'index': 0, 'instanceName': None, 'pointOn': ((16.626792, 29.168272, -50.806711),)})
({'index': 1, 'instanceName': None, 'pointOn': ((15.252681, -118.266439, -14.106842),)})
({'index': 2, 'instanceName': None, 'pointOn': ((-8.57784, -116.351098, -12.873274),)})
({'index': 3, 'instanceName': None, 'pointOn': ((-27.789027, -117.360474, 8.417591),)})
({'index': 4, 'instanceName': None, 'pointOn': ((-5.268457, -119.022915, -34.536412),)})
({'index': 5, 'instanceName': None, 'pointOn': ((-8.440513, -115.967772, -39.54762),)})
.... etc etc .....

############################################
but these results are not useful for my purposes.. I'm very beginning with Abaqus scripting, and I didn't find useful info in the documentation

please can you provide any suggestions?

thank you in advance, best regards
 
Why not make shells from the solid so that you can mesh the outer surface in triangles.

Tara
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top