yade-users team mailing list archive
Mailing list archive
Re: [Question #678645]: Shrinkage of particles
Question #678645 on Yade changed:
Jan Stránský proposed the following answer:
thanks for the code (although, as Bruno pointed, it is not very minimal ;-) Why it is not MWE:
- unused or unnecessarry code (import datetime, qtr.bgColor)
- materials are irrelevant to the problem (and you define CohFrictMat and in engines you have just FrictMat)
- facetCylinder is also not needed
- there are quite a lot particles for testing
- but MOST importantly, it is not WORKING example. Your Shrinkage function ends with error and there are several problems:
- for i in O.bodies[Sphere]: # ???
- utils.growParticles(0.5,updateMass=True) # probably you meant just growParticle (without s). growParticles grow all particles. Not what you want and it not very reasonable to use it inside looping over all bodies..
Next time please try to create a MWE specific for the problem.
Quite often you solve the problem yourself this way ;-)
> the radius will be reduced instantly. but I want their reduction in each step.
> PyRunner(command='Shrinkage()', label='Shrink',iterPeriod=700000)
if you want the reduction in each step, use iterPeriod=1
a MWE (demonstration how to shrink particles and an inspiration how true MWE could look like):
# you can see particles growing below the wall. For shrinkage, just use multiplier <1
from yade import pack
rMean,num = 1e-3, 100
O.bodies.append([utils.sphere(c,r) for c,r in sp])
for b in O.bodies:
if not isinstance(b.shape,Sphere):
if b.state.pos < -5e-3:
You received this question notification because your team yade-users is
an answer contact for Yade.