Cohesion Friction model

Asked by Robert Sarracino

Is the cohesion friction model working in Yade? I tried to run the following code:

from yade import *
import sys, time, random, os, gts, math
from yade import ymport
from yade import pack
from yade import qt
from yade import bodiesHandling

s = utils.sphere(center=[0,0,0],radius=1)
p = utils.sphere(center=[0,0,1.99],radius=1)

O.bodies.append(s)
O.bodies.append(p)
O.bodies[0].state.vel=(0,0,1.0)
O.bodies[1].state.vel=(0,0,-1.0)

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb()]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom6D()],
        [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
        [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]),
    NewtonIntegrator(damping=0.2),
    VTKRecorder(fileName='test_cohfrict', recorders=['spheres'], iterPeriod=1)
]

O.dt = utils.PWaveTimeStep()
O.run(400)
#O.stopAtIter=300
#O.wait()

But received the following error message:

Yade [6]: terminate called after throwing an instance of 'std::runtime_error'
  what(): Undefined or ambiguous IPhys dispatch for types FrictMat and FrictMat.
Aborted (core dumped)

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Best Jérôme Duriez (jduriez) said :
#1

Hi,

The crash you got is linked to a fundamental error in your script, so it is too early to conclude that the cohesive frictional model does not work in Yade.. ;-)

The constitutive law-related engines you are using require bodies with "CohFrictMat" type Material : see Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()
However, you did not define yourself the Material of your bodies, hence the default material (FrictMat type) is used. Hence it crashes...

Giving a look to the doc - User's Manual - or previous questions/answers (sorry I do not have by hand any exact reference) should help you to deal with the definition of material / interaction parameters in Yade.

Jérôme

Revision history for this message
Robert Sarracino (robert-sarracino-q) said :
#2

Thanks Jérôme Duriez, that solved my question.