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!

Create a set list of Reference Points in Abaqus, Python

Status
Not open for further replies.

Nicola_Tarque

Civil/Environmental
Nov 17, 2020
1
Dear all,
I am trying to create a set of RP with Python. I have different rigid bodies and I need to add BC to a given set.
I have tried getbyBoundingBox, but with no results.
I saw this answer but i think something is wrong:

refPoints1=[0]*size
j=0
for i in range(start,end,interval):
refPoints1[j]=(mdb.models['Model-1'].rootAssembly.referencePoints)
j+=1
mdb.models['Model-1'].rootAssembly.Set(referencePoints=refPoints1, name='mySet')

Thanks
 
Replies continue below

Recommended for you

If you just want to collect all Reference Points and put them in a set, then the code below is doing it.
You have to start thinking from the end: What type of data is the set-command expecting? It's a tuple and it contains the objects with their IDs. And then you collect those information and provide it to the command.

Code:
from abaqus import *
from abaqusConstants import *
from caeModules import *

dummylist = []

a = mdb.models['Model-1'].rootAssembly
r1 = a.referencePoints

for i in r1.keys():
	dummylist.append(r1[i])

dummytuple = tuple(dummylist)

a.Set(referencePoints=dummytuple, name='set-refpoints')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor