yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #10975
Re: [Question #263634]: MatchMaker use
Question #263634 on Yade changed:
https://answers.launchpad.net/yade/+question/263634
Anton Gladky proposed the following answer:
It works also with Ip2_FrictMat_FrictMat_FrictPhys::frictAngle
==============
#!/usr/bin/python
# -*- coding: utf-8 -*-
from yade import pack,timing
r1 = 0.002381
r2 = 0.002381
mat1 = O.materials.append(FrictMat(young=50e9,density=6000,poisson=.2,label='shots1'))
mat2 = O.materials.append(FrictMat(young=50e9,density=6000,poisson=.2,label='shots2'))
mat3 = O.materials.append(FrictMat(young=50e9,density=6000,poisson=.2,label='shots3'))
id11 = O.bodies.append(sphere(center=[0,0,0],radius=r1,material=mat1,fixed=True,color=[0,0,1]))
id12 = O.bodies.append(sphere(center=[0,0,(r1+r2)],radius=r2,material=mat2,fixed=False,color=[0,0,1]))
id21 = O.bodies.append(sphere(center=[3*r1,0,0],radius=r1,material=mat1,fixed=True,color=[0,1,0]))
id22 = O.bodies.append(sphere(center=[3*r1,0,(r1+r2)],radius=r2,material=mat3,fixed=False,color=[0,1,0]))
id31 = O.bodies.append(sphere(center=[6*r1,0,0],radius=r1,material=mat2,fixed=True,color=[1,0,0]))
id32 = O.bodies.append(sphere(center=[6*r1,0,(r1+r2)],radius=r2,material=mat3,fixed=False,color=[1,0,0]))
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys(
frictAngle=MatchMaker(matches=((mat1,mat2,.1),(mat1,mat3,.2),(mat2,mat3,.3))),
label='damping')],
[Law2_ScGeom_FrictPhys_CundallStrack(label='contactLaw')]
),
NewtonIntegrator(damping=.3,gravity=(0,0,-1e3)), # gravity artificially high, to make it faster going ;-)
]
O.dt=PWaveTimeStep()
O.step()
print "Friction coefficient for id11 and id12 is %g"%(math.atan(O.interactions[id11,id12].phys.tangensOfFrictionAngle))
print "Friction coefficient for id21 and id22 is %g"%(math.atan(O.interactions[id21,id22].phys.tangensOfFrictionAngle))
print "Friction coefficient for id31 and id32 is %g"%(math.atan(O.interactions[id31,id32].phys.tangensOfFrictionAngle))
from yade import qt
qt.Controller()
qt.View()
=====================
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.