Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How can identify element number(or index) in ABAQUS scripting instead of using mask?

Status
Not open for further replies.

Sobhan.a

Civil/Environmental
Sep 6, 2020
1
Dear all
I want to specify random material to elements. for doing this first of all I want to create sets to elements then specify the materials tho them.
to create sets in script we should write the fallowing code I used For loop to identify all elements and define sets)
for i in range(1,(width*height)/(meshsize**2)):
mdb.models['Model-1'].parts['Part_1'].Set(elements=
mdb.models['Model-1'].parts['Biaxial'].elements..getSequenceFromMask(mask=(
'[#0 #10 ]', ), ), name='Set-'+str(i))
as you know we can not recognize masks so my question is that how can I identify Elements index(names or anything) to define sets?
special regards Sobhan
 
Replies continue below

Recommended for you

Run these command at the beginning of the A/CAE session in the CLI and you'll get the replay file written with the id's. But be aware, that the reporting might now be slower with large models.

Code:
session.journalOptions.replayGeometry
session.journalOptions.setValues(replayGeometry=INDEX)

If you want those setting permanently, put this into the abaqus_v6.env in your home directory.
Code:
def onCaeStartup():
    session.journalOptions.replayGeometry
    session.journalOptions.setValues(replayGeometry=INDEX)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor