← Back to team overview

yade-users team mailing list archive

Re: material dispatching

 

My bad, sorry. I can't get a minimal script to crash. I probably just forgot to add the the Ip2_FM_FM functor in the simulation when I included some frict mat. It seems everything works fine.
Thank you for prompt reply.

Bruno


On 23/07/10 14:12, Václav Šmilauer wrote:
Yade [6]: terminate called after throwing an instance of
'std::runtime_error'
   what():  Undefined or ambiguous InteractionPhysics dispatch for
types FrictMat and CohFrictMat.

Virtualy, it could have work : CFM inherits from FM, so that
Ip2_FM_FM_FP apply. Is it possible to implement this behaviour?
For now, I'd have to add an Ip2_FM_CFM_FP to workaround this. It would
be an exact copy of Ip2_FM_FM_FP.
Can you post a minimal script? I will have a look. It is possible that
the dispatch is "ambiguous" because it can work either way -- CFM+FM or
FM+CFM, and the dispatcher is not smart enough to notice that such 2
different dispatches end up using the same functor.

v.




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



--
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________

#--- bruno.chareyre@xxxxxxxxxxx ---
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Experiment beam-like behaviour with chained cylinders + CohFrict connexions

from yade import utils,pack
young=8.0e4
poisson=3
density=2.60e3 
frictionAngle=radians(0)
O.dt=1e-5

Ns=10
sp=pack.SpherePack()
sp.makeCloud(Vector3(-0.3,0.5,-1.0),Vector3(+0.3,+1,+1.0),.11,.2,Ns,False)
O.materials.append(CohFrictMat(young=1.0e5,poisson=0.03,density=2.60e2,frictionAngle=frictionAngle,label='spheremat'))
O.materials.append(FrictMat(young=5.0e6,poisson=1.0,frictionAngle=0,density=2600.0,label='cohesive'))
O.bodies.append([utils.sphere(center,rad,material='spheremat') for center,rad in sp])
sp2=pack.SpherePack()
sp2.makeCloud(Vector3(-0.3,0.2,-1.0),Vector3(+0.3,+0.5,+1.0),.11,.2,Ns,False)
O.bodies.append([utils.sphere(center,rad,material='cohesive') for center,rad in sp2])

walls=utils.aabbWalls((Vector3(-0.3,-0.15,-1),Vector3(+0.3,+1.0,+1)),thickness=.1,material='cohesive')
wallIds=O.bodies.append(walls)

O.initializers=[
	BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_ChainedCylinder_Aabb(),Bo1_Box_Aabb()])
]

O.engines=[
	ForceResetter(),
	BoundDispatcher([
		Bo1_ChainedCylinder_Aabb(),
		Bo1_Sphere_Aabb(),
		Bo1_Box_Aabb()
	]),
	InsertionSortCollider(),
	InteractionDispatchers(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
		[Ip2_2xCohFrictMat_CohFrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_CohFrictPhys_ElasticPlastic(momentRotationLaw=True,label='law'), Law2_ScGeom_FrictPhys_Basic()]
	),
	## Apply gravity
	GravityEngine(gravity=[1,-9.81,0],label='gravity'),
	## Motion equation
	NewtonIntegrator(damping=0.15,label='newton'),
]


References