← Back to team overview

yade-users team mailing list archive

[Question #680145]: Strange behaviour of Ek varying restitution coefficients

 

New question #680145 on Yade:
https://answers.launchpad.net/yade/+question/680145

Hi everybody,

I have to simulate the behaviour of some spheres in a moving cylinder varying the tangential and normal restitution coefficients of the material. What seems strange to me is that I get a kinetic Energy increasing with lower restitution coefficients.
>From the definition of coefficient of restitution I would expect the contrary.

I am wondering if I'm making a silly conceptual mistake or if there is an error in my code.
Do you see any error in the following code?
I work with yadedaily, xenial version.
Many thanks



from yade import pack,utils,plot,ymport,export,qt,timing

## Physical Parameters 
density=7950
cyl_r = 12.7e-3
cyl_h = 24.6e-3
sp_p_r = 1.5e-3
young = 200e9
poisson = 0.305

## Parameters to be varied
#en = 0.1
#es = 0.1
en = 0.78
es = 0.78

## Creation Cylinder
facetMat=O.materials.append(ViscElMat(density=density,young=young, poisson=poisson,en=en,et=es))
Cylinder=O.bodies.append(geom.facetCylinder((0,0,cyl_h/2),cyl_r,height=cyl_h,segmentsNumber=15,wallMask=7,material=facetMat))

## Creation Sphere
sphereMat=O.materials.append(ViscElMat(density=density,young=young,poisson=poisson,en=en,et=es))

s=utils.sphere((0,0,12e-3),radius=3e-3,material=sphereMat)
O.bodies.append(s)

sp=pack.SpherePack()
sp.makeCloud((-9e-3,-9e-3,1.5e-3),(9e-3,9e-3,8e-3),rMean=sp_p_r,num=20) 
sp.toSimulation(material=sphereMat)

## Engine
O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
   [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
      [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
      [Law2_ScGeom_ViscElPhys_Basic()]
   ),
   GlobalStiffnessTimeStepper(timeStepUpdateInterval=1,label='tss',timestepSafetyCoefficient=0.8,viscEl=True),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.2),
   PyRunner(command='checkUnbalanced()',realPeriod=1,label='checker')
   ]

def checkUnbalanced():
	if O.iter<100000: return
        O.engines=O.engines+[HarmonicMotionEngine(A=[0,0,6e-3],f=[0,0,60.0],fi=[0,0,pi],ids=Cylinder), PyRunner(command='addPlotData()',realPeriod=1)]
	checker.command='nothing()'

def nothing():
        return

def addPlotData():
	Ek=kineticEnergy()
	plot.addData(i=O.iter,t=O.time,Ninter=O.interactions.countReal(),total=O.energy.total(),Ek=kineticEnergy(),**O.energy)


O.trackEnergy=True
O.saveTmp()

plot.plots={'t':('Ek',)}

plot.plot()

qt.Controller()
qt.View()

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.