title: script to remove an entire cell of a part automatically in ABAQUS
body: <p>I am trying to write an script to remove cells in a part in ABAQUS if the cell volume is smaller than a given value.
  Is there a simple command to delete a cell?</p>
  
  <p>This is what I have tried:</p>
  
  <pre><code># Keeps cells bigger than a certain minimum value 'paramVol': paramVol=volCell/part_volume_r
  cellsVolume = []
  pfacesInter_clean = []
  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);
  volume_sliver = 0
  # get faces
  for i in range(0, len(allCells)):
      volCell = allCells[i].getSize()
      cellsVolume.append(volCell)
      paramVol = volCell / part_volume_r
      print 'paramVol= '+str(paramVol)
      if paramVol &lt; 0.01:
          print 'liver Volume'
          #session.viewports['Viewport: 1'].setColor(initialColor='#FF0000') #--&gt;RED
          faces = allCells[i].getFaces()
          highlight(allCells[i].getFaces())
          #pfacesInter_clean = [x for i, x in enumerate(pfacesInter) if i not in faces]
          volume_sliver += volCell
      else:
          print 'Not an sliver Volume'
  </code></pre>
  
  <p>Thanks!</p>