×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

script to remove an entire cell of a part automatically in ABAQUS?

script to remove an entire cell of a part automatically in ABAQUS?

script to remove an entire cell of a part automatically in ABAQUS?

(OP)
Hi,

I am trying to write an script to remove cells in a part if the cell volume is smaller than a given value.
Is there a simple command to delete a cell?

This is what I have tried:

def sliverVolumes(modelName, pInterName):
#Class to keep only cells bigger than a certain minimum value 'paramVol': paramVol=volCell/part_volume_r
allCells = pInterName.cells
mask_r = pInter.cells.getMask();
cellobj_sequence_r = pInter.cells.getSequenceFromMask(mask=mask_r);
part_volume_r = pInterName.getVolume(cells=cellobj_sequence_r);
# get faces
for i in range(0, len(allCells)):
volCell = allCells[i].getSize()
paramVol = volCell / part_volume_r
print 'paramVol= '+str(paramVol)
if paramVol < 0.01:
print 'Sliver Volume'
#HOW CAN I DELETE THE CELL HERE???
else:
print 'Not a sliver Volume'


Thanks!

RE: script to remove an entire cell of a part automatically in ABAQUS?

Try using the boolean operations available in the assembly module. You can merge/subtract volumes to generate a modified part then delete the old ones.

RE: script to remove an entire cell of a part automatically in ABAQUS?

(OP)
Hi Cooken,
I do not think that the boolean operations are an option, at least when it comes to automation. I simply want to delete small sliver volumes like the one below:



RE: script to remove an entire cell of a part automatically in ABAQUS?

Remove faces? This will automatically delete the affected cells.

Also there is an option in part copy to separate disconnected regions into parts..?

RE: script to remove an entire cell of a part automatically in ABAQUS?

(OP)
Thanks Cooken, What would be the command for removing all the faces of a particular cell?

def sliverVolumes(modelName, pInterName):
#Class to keep only cells bigger than a certain minimum value 'paramVol': paramVol=volCell/part_volume_r
allCells = pInterName.cells
mask_r = pInter.cells.getMask();
cellobj_sequence_r = pInter.cells.getSequenceFromMask(mask=mask_r);
part_volume_r = pInterName.getVolume(cells=cellobj_sequence_r);
# get faces
for i in range(0, len(allCells)):
volCell = allCells[i].getSize()
paramVol = volCell / part_volume_r
print 'paramVol= '+str(paramVol)
if paramVol < 0.01:
print 'Sliver Volume'
#REMOVE ALL FACES OF THE SLIVER CELL
else:
print 'Not a sliver Volume'

RE: script to remove an entire cell of a part automatically in ABAQUS?

If is a separate cell like on the picture, then it is simple. Check all cells and if the cell is too small, ask for the attached faces and then use them in this command form the Geometry Edit option:

p.RemoveFaces(faceList = f[0:6], deleteCells=False)

RE: script to remove an entire cell of a part automatically in ABAQUS?

^ That.

You can perform the action in CAE, then check the .rpy file to retrieve the python command and manipulate into a parameterized/automated script.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources