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!
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?
RE: script to remove an entire cell of a part automatically in ABAQUS?
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?
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?
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?
p.RemoveFaces(faceList = f[0:6], deleteCells=False)
RE: script to remove an entire cell of a part automatically in ABAQUS?
You can perform the action in CAE, then check the .rpy file to retrieve the python command and manipulate into a parameterized/automated script.