Remove floating balls

Dear all,

Does anyone know a fish code that can be used to remove floating balls in PFC2D?

Thanks,

Syani

Dear Syani,

within the PFC documentation you can find the example called ā€œProbing a Granular Specimenā€.

Within the explenation of this example you can find the fish function called [identify_floaters] - you can delete the ball group called ā€˜floatersā€™ after calling the fish function.

Cheers

Mussie

Dear Mussie,

Thanks to you I managed to find the function.

Let me ask you one more question, please. Do you know why a model never reaches convergence? Iā€™ve tried running the model for hours but the model wonā€™t converge.

Regards,

Syani

Dear Syanai,

can you specify details of your models please.

What is the set up of your model? Did you use damping? Which solve commands did you use? Theres is a number of reasons why your model might not reach convergence.

Regards,

Mussie

Dear Behzad,

You can use this code to delete the balls that donā€™t have any contacts.

fish define identify_floaters
loop foreach local ball ball.list
ball.group.remove(ball,ā€˜floatersā€™)
local contactmap = ball.contactmap(ball)
local size = map.size(contactmap)
if size <= 1 then
ball.group(ball) = ā€˜floatersā€™
endif
endloop
end
[identify_floaters]
ball delete range group ā€˜floatersā€™

When you run that code, there will be information about how much they delete the balls.

Regards,

Syani

Pada tanggal Kam, 4 Agu 2022 pukul 02.08 Behzad via Itasca Software Forum <notifications@itasca.discoursemail.com> menulis:

3 Likes

Thank you so much Syani. It helped me truly!

Dear syaniliffa,
Thank you for your generous advice!