Changing a particular sphere radius in a randomPeriPack ensemble

Asked by Vinícius Godim

If I create a simple randomPeriPack set of spheres with

sp = randomPeriPack(.1,(1,1,1))
sp.toSimulation()

I want to then be able to change a particular sphere radius and let the system "attract" into its centroid to recreate a dense packing with the newly sized particles.

I thought this could be simple but I haven't figured it out, thanks for any help!

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> I want to then be able to change a particular sphere radius

for b in O.bodies:
   b.shape.radius = whatever # there is a function also modifying mass, but I cannot find it just now

> let the system "attract" into its centroid to recreate a dense packing with the newly sized particles.

maybe [1]? (never used it myself..). Before using such approach, probably you would need something like
for b in O.bodies:
   b.state.pos = O.cell.wrap(b.state.pos)

cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CentralGravityEngine

Can you help with this problem?

Provide an answer of your own, or ask Vinícius Godim for more information if necessary.

To post a message you must log in.