Law2_ScGeom6D_CohFrictPhys_CohesionMoment

Asked by Luis Barbosa

Hi,
Im trying to solve this code,
#exercicio de Law

# basic simulation showing sphere falling ball gravity,
# bouncing against another sphere representing the support

# DATA COMPONENTS

# add 2 particles to the simulation
# they the default material (utils.defaultMat)
O.bodies.append([
   # fixed: particle's position in space will not change (support)
   utils.sphere(center=(0,0,0),radius=.5,fixed=True),
   # this particles is free, subject to dynamics
   utils.sphere((0,0,2),.5)
])

# FUNCTIONAL COMPONENTS

# simulation loop -- see presentation for the explanation
O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom6D()],
      [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label="cohesiveIp")],
      [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(label="cohesiveLaw")]

   ),
   # apply gravity force to particles
   GravityEngine(gravity=(0,0,-9.81)),
   # damping: numerical dissipation of energy
   NewtonIntegrator(damping=0.1)
]

O.dt=.5e-3*utils.PWaveTimeStep()

O.saveTmp()

To understand better the Law2_ScGeom6D_CohFrictPhys_CohesionMoment, but the error [1] always appears:

[1]ERROR /tmp/buildd/yadedaily-1.05.0-28-g5e71fa5~precise/pkg/common/GravityEngines.cpp:19 action: GravityEngine is deprecated, consider using Newton::gravity instead (unless gravitational energy has to be tracked - not implemented with the newton attribute).
terminate called after throwing an instance of 'std::runtime_error'
  what(): Undefined or ambiguous IPhys dispatch for types FrictMat and FrictMat.

What am I doing wrong

Thanks

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
Luc Sibille (luc-sibille) said :
#1

Hi Luis,

There is a problem with the definition of the material properties (I imagine the default material is not a CohFricMat material but rather a FricMat?), by defining a CohFricMat material as introduced below in your script it works:

#exercicio de Law

# basic simulation showing sphere falling ball gravity,
# bouncing against another sphere representing the support

# DATA COMPONENTS

# add 2 particles to the simulation
# they the default material (utils.defaultMat)

matSph=CohFrictMat(
 young=170e6,
 poisson=0.2,
 frictionAngle=radians(17),
 isCohesive=False,
 alphaKr=1.8,
 alphaKtw=0,
 etaRoll=1.8,
 momentRotationLaw=True,
 density=2600,
 label='spheres',
)

O.materials.append(matSph)

O.bodies.append([
# fixed: particle's position in space will not change (support)
utils.sphere(center=(0,0,0),radius=.5,fixed=True,material='spheres'),
# this particles is free, subject to dynamics
utils.sphere((0,0,2),.5,material='spheres')
])

# FUNCTIONAL COMPONENTS

# simulation loop -- see presentation for the explanation
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label="cohesiveIp")],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(label="cohesiveLaw")]

),
# apply gravity force to particles
GravityEngine(gravity=(0,0,-9.81)),
# damping: numerical dissipation of energy
NewtonIntegrator(damping=0.1)
]

O.dt=.5e-3*utils.PWaveTimeStep()

Best,
Luc

Revision history for this message
Luis Barbosa (luis-pires-b) said :
#2

Ok, it's worked.
But how can I set the value of cohesion and adhesion?

Revision history for this message
Best Jérôme Duriez (jduriez) said :
#3

Hello,

As everytime when it is about contact properties (see https://www.yade-dem.org/doc/user.html#examples for the general workflow about contact laws), the answer is : in the Material properties !

So, here : https://www.yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CohFrictMat.shearCohesion
and there : https://www.yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CohFrictMat.normalCohesion

(But I agree that the doc of these parameters is not very explicit..)

Jérôme

Revision history for this message
Luis Barbosa (luis-pires-b) said :
#4

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