Thread Previous • Date Previous • Date Next • Thread Next |
Hi, OK I found where is the problem. Please see the two attached figures (for people interested in the topic see the previous post in this thread). In one case I include friction between balls and boxes, in the other only between balls. Energy is conserved even if the simulation is _dynamic_ (good news), the problem is present only if there is friction between balls and boxes. Please I need your help to understand if this is a bug. So question for everyone: What is the difference in terms of computation of the shear behavior between a box-sphere interaction and a sphere-sphere interaction? Thanks a lot. Chiara On 12 July 2010 17:26, Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx> wrote: > > Chiara, I found a problem in the script you use for comparing energies in > bouncing spheres. > The line O.materials[0].frictionAngle=radians(25) is changing value in the > material but it is not reflecting everything automaticaly in interactions > (tangent of friction is still 0 in the contact law, but radians(25) is used > for computing energy, so...). > By using TriaxialCompressionEngine().setContactProperties(radians(25)) > instead, I get something better. Total energy is still increasing, but at > least it will stagnate at a point. > > Bruno > > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> > Post to : yade-users@xxxxxxxxxxxxxxxxxxx > Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> > More help : https://help.launchpad.net/ListHelp > >
#!/usr/local/bin/yade-trunk -x # -*- coding: utf-8 -*- # -*- encoding=utf-8 -*- # Script to monitor the energy of a system from yade import utils #----------------------------------------------------- # material #----------------------------------------------------- young=600.0e6 poisson=0.6 density=2.60e3 frictionAngle=radians(35) O.materials.append(FrictMat(young=young,poisson=poisson,density=density,frictionAngle=frictionAngle,label='mat')) # INCLUDE FRICTION!!! #----------------------------------------------------- # geometry #----------------------------------------------------- # create a random packing in a box space from yade import pack sp=pack.SpherePack() mn=Vector3(0,0,0) mx=Vector3(1.0,1.0,1.0) ntot=10 R=0.1 std=0.0 sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=R,rRelFuzz=std,num=ntot,periodic=False) for s in sp: O.bodies.append(utils.sphere(s[0],s[1])) # create some boundaries O.materials.append(FrictMat(young=young,poisson=poisson,density=density,frictionAngle=frictionAngle,label='mat2')) # _NO_ FRICTION!!! wires=True O.bodies.append(utils.box(center=[-0.1,0.5,0.5],extents=[.0025,1.0,1.0],dynamic=False,wire=wires,material='mat2')) O.bodies.append(utils.box(center=[1.1,0.5,0.5],extents=[.0025,1.0,1.0],dynamic=False,wire=wires,material='mat2')) O.bodies.append(utils.box(center=[1.1/2,-0.1,0.5],extents=[1.0,0.0025,1.0],dynamic=False,wire=wires,material='mat2')) O.bodies.append(utils.box(center=[1.1/2,1.1,0.5],extents=[1.0,0.0025,1.0],dynamic=False,wire=wires,material='mat2')) O.bodies.append(utils.box(center=[0.5,0.5,-0.1],extents=[1.0,1.0,0.0025],dynamic=False,wire=wires,material='mat2')) O.bodies.append(utils.box(center=[0.5,0.5,1.1],extents=[1.0,1.0,0.0025],dynamic=False,wire=wires,material='mat2')) #----------------------------------------------------- # initial condition (velocities) #----------------------------------------------------- v=7.0 for b in O.bodies: if b.id%2 == 0: b.state.vel=Vector3(-v,v,-v) # assign an initial velocity else: b.state.vel=Vector3(v,-v,v) # assign an initial velocity #----------------------------------------------------- # list of engines #----------------------------------------------------- O.engines=[ ForceResetter(), BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InsertionSortCollider(), InteractionDispatchers( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_Basic(label='dry',traceEnergy=True)] ), NewtonIntegrator(damping=0.0), # *** NO DAMPING *** PeriodicPythonRunner(iterPeriod=10,command='monitoring()') ] #----------------------------------------------------- # time step #----------------------------------------------------- O.dt=.1*utils.PWaveTimeStep() O.saveTmp('init') from yade import qt qt.View() qt.Controller() #----------------------------------------------------- # plot some results #----------------------------------------------------- from math import * from yade import plot plot.plots={'t':('Ek','Eel','Slip','Etot'),'t_':('Slip')} def monitoring(): plot.addData(Ek=utils.kineticEnergy(),Eel=dry.elasticEnergy(),Slip=dry.plasticDissipation(),t=O.time,t_=O.time, Etot=utils.kineticEnergy()+dry.elasticEnergy()+dry.plasticDissipation()) plot.plot(); O.run()
Attachment:
WallFrictionless.png
Description: PNG image
Attachment:
WallFriction.png
Description: PNG image
Thread Previous • Date Previous • Date Next • Thread Next |