Hello

I am currently working on implementing compaction powder forming using Abaqus. In order to do so, I need to select a representative volume element (RVE) from the entire model. However, some of the particles extend outside of the chosen RVE, and I need to remove them and keep only the particles that are inside. Since there are numerous particles, I plan to use a for loop in my script. I attempted to write the code for the loop, but unfortunately, it did not work as expected.

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

for i in range(1, 105):

instance_to_cut = mdb.models['Model-1'].rootAssembly.instances['Part-' + str(i) + '-1']

cutting_instance = a.instances['Big_Box-8-1']

# Check if the instance to be cut intersects with the cutting instance

if instance_to_cut.intersectsWith(cutting_instance):

a.InstanceFromBooleanCut(name='Cut-' + str(i) + '-2',

instanceToBeCut=instance_to_cut,

cuttingInstances=(cutting_instance, ), originalInstances=SUPPRESS)

a.features['Big_Box-8-1'].resume()

You can see an error message in the attached file.

Could you please help me to solve this problem?

Thank you.

More Hossein Ghorbani-Menghari's questions See All
Similar questions and discussions