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

Hi everybody!

I'm using YADE to simulate an impact between two body with differents 
material's properties. Untill few days ago my code worked perfectly. Now it 
gives me the following problem:

terminate called after throwing an instance of 'std::invalid_argument'
  what():  MatchMaker: no match for (1,0), and values required for algo 
computation 'avg' not specified.
Aborted (core 
dumped)

The code is:
# Material
mli=FrictMat(density=643,frictionAngle=0.1489,label="MLI")
mat1=O.materials.append(mli)
gravel=FrictMat(density=1700,frictionAngle=0.9188,label="gravel")
mat2=O.materials.append(gravel)

# Ground
s=ymport.textExt('rest',format='x_y_z_r')
sphere=O.bodies.append(s)
print len(O.bodies)

# Create a vector o spheres to eliminate those that have COG above the container
for i in O.bodies:
        if isinstance(i.shape,Sphere):
                print i.state.mass
                if i.state.pos[2]>.4:
                        O.bodies.erase(i.id)
for i in O.bodies:
        if isinstance(i.shape,Sphere):
                if i.state.pos[2]<0:
                        O.bodies.erase(i.id)
for i in O.bodies:
        if isinstance(i.shape,Sphere):
                x=i.state.pos[0]
                y=i.state.pos[1]
                r=m.sqrt(x**2+y**2)
                if r>.75:
                        O.bodies.erase(i.id)
print len(O.bodies)

# Cylinder
h=.4
c=geom.facetCylinder((0,0,.2),radius=.75,height=h,segmentsNumber=100,wallMask=6,material="gravel")
O.bodies.append(c)

p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False)

# Engines
O.engines=[
        ForceResetter(),
        
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]),
        InteractionLoop(
                
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()],
                
[Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),es=MatchMaker(matches=((mat1,mat2,.6),(mat2,mat2,.55))),krot=3)],
                [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)]
        ),
        NewtonIntegrator(gravity=(0,0,-2.5e-4),damping=0.0)
]

O.trackEnergy=True
O.dt=.5*PWaveTimeStep()

 

I use yadedaily on Ubuntu 14.04 LTS server. But on my PC with the same versione 
of yade and Ubuntu 14 it works normally. 

Cheers,

Jonathan


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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to