# yade-users team mailing list archive

## Re: [Question #678645]: Shrinkage of particles

```Question #678645 on Yade changed:

Status: Needs information => Open

Hello Jan,

This is a simple case similar to my simulation.

O.reset()

from datetime import datetime

qtr=qt.Renderer()
qtr.bgColor=(1,1,1)

#==============================================================
#================= define the materials =======================
#==============================================================

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion=
1e20, isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3,
frictionAngle= 0.31, fragile=False, label='Coke'))

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= False, young=6.81e8,
density=1523.6, poisson=0.3, frictionAngle= 0.28, fragile=False, label='mold'))

#===============================================================
#=================== define wall================================
#===============================================================

O.bodies.append(mld)

#===============================================================
#=================== define packing ============================
#===============================================================

nums=['t']

mats=['Coke']

coke=(1e-3,2000)

nums=pack.SpherePack()
nums.makeCloud((-4.5e-3,-4.5e-3,-5e-2),(4.5e-3,4.5e-3,0.08),rMean=coke[0],rRelFuzz=1e-4,num=coke[1])
O.bodies.append([utils.sphere(c,r,material=mats[0]) for c,r in nums])

#===============================================================
#=================== define Engine =============================
#===============================================================

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),

]

O.dt=1.00e-6

#=============================================================
#=====================define Shrinkage========================

O.engines=O.engines+[PyRunner(command='Shrinkage()', label='Shrink',iterPeriod=700000)]

def Shrinkage():

for i in O.bodies[Sphere]:

if i.state.pos[2]<-40e-3:

utils.growParticles(0.5,updateMass=True)

#for i in O.bodies:
#	if isinstance(i.shape,Sphere) and i.state.pos[2]<-20e-3 and i.state.pos[2]>-30e-3:
#		i.material=O.materials['Coke']

Thank you very much for your help.

Best Regards

Alireza

--