Undefined or ambiguous IPhys dispatch for types FrictMat and CpmMat

Asked by rayolau

Hi all!

I try to simulate the damage in a concrete slab produced for a hammer shock. The script work well, but for little running time, this error appears:

"terminate called after throwing an instance of 'std::runtime_error' what(): Undefined or ambiguous IPhys dispatch for types FrictMat and CpmMat"

I looked for this error in the forum [1][2][3], and I know that my problem is in O.engines. I have 2 materials, concrete and steel, and three types of bodies: spheres (for the slab concrete), wall (to soil) utils.wall and box (for the hammer head) utils.facetBox.

As can see in the script [4], the concrete slab is imported like slab.yade[5], but before, I defined the O.material == concrete. In the engines, I have taken into FrictMat and CpmMat and if is Sphere, Wall or Facet, but I know that the problem is here. Any idea? Maybe, after import the slab.yade, should be put something like "for i in range(0,len (O.bodies)): ... and then define the concrete material for spheres?

Thanks in advance!
Laura.

[1] https://answers.launchpad.net/yade/+question/254316
[2] https://answers.launchpad.net/yade/+question/254315
[3] https://answers.launchpad.net/yade/+question/248700

script
[4] https://drive.google.com/file/d/0B6azPyaq-2oNNlBxZmV4aldjWGs/view?usp=sharing

slab.yade
[5] https://drive.google.com/file/d/0B6azPyaq-2oNMGVIeE85U0lzZU0/view?usp=sharing

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hi Laura,

the problem is that you have FrictMat and CpmMat, but no Ip2 functor to
deal with them. You have to options:
1) use CpmMat for all bodies
2) use Ip2_FrictMat_CpmMat_FrictPhys [1] in addition
to Ip2_CpmMat_CpmMat_CpmPhys

ad 2:
O.engines = [
  ...
  InteractionLoop(
    ...
    [Ip2_CpmMat_CpmMat_CpmPhys(), Ip2_FrictMat_CpmMat_FrictPhys()]
    ...
  ...
]

cheers
Jan

[1]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Ip2_FrictMat_CpmMat_FrictPhys

2014-11-19 16:56 GMT+01:00 rayolau <email address hidden>:

> New question #257902 on Yade:
> https://answers.launchpad.net/yade/+question/257902
>
> Hi all!
>
> I try to simulate the damage in a concrete slab produced for a hammer
> shock. The script work well, but for little running time, this error
> appears:
>
> "terminate called after throwing an instance of 'std::runtime_error'
> what(): Undefined or ambiguous IPhys dispatch for types FrictMat and
> CpmMat"
>
> I looked for this error in the forum [1][2][3], and I know that my problem
> is in O.engines. I have 2 materials, concrete and steel, and three types of
> bodies: spheres (for the slab concrete), wall (to soil) utils.wall and box
> (for the hammer head) utils.facetBox.
>
> As can see in the script [4], the concrete slab is imported like
> slab.yade[5], but before, I defined the O.material == concrete. In the
> engines, I have taken into FrictMat and CpmMat and if is Sphere, Wall or
> Facet, but I know that the problem is here. Any idea? Maybe, after import
> the slab.yade, should be put something like "for i in range(0,len
> (O.bodies)): ... and then define the concrete material for spheres?
>
> Thanks in advance!
> Laura.
>
>
> [1] https://answers.launchpad.net/yade/+question/254316
> [2] https://answers.launchpad.net/yade/+question/254315
> [3] https://answers.launchpad.net/yade/+question/248700
>
> script
> [4]
> https://drive.google.com/file/d/0B6azPyaq-2oNNlBxZmV4aldjWGs/view?usp=sharing
>
> slab.yade
> [5]
> https://drive.google.com/file/d/0B6azPyaq-2oNMGVIeE85U0lzZU0/view?usp=sharing
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
rayolau (rayolau88) said :
#2

Hi Jan,

Thanks for your reply.
I tried the second option, and appears this error:

 " None of given Law2 functors can handle interaction #42655+23671, types geom:ScGeom=1 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D returned empty functor)"

I changed the color of the ids (to dark blue), and correspond a vertex of a box (hammer) and a sphere of concrete, as can see in [1]. I should add some Law2 more?

InsertionSortCollider(
  [Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='is2aabb'),
   Bo1_Facet_Aabb(),
   Bo1_Box_Aabb(),
   Bo1_Wall_Aabb()]),
 ## Interactions
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius,label='ss2sc'),
   Ig2_Facet_Sphere_ScGeom(),
   Ig2_Wall_Sphere_ScGeom(),
   Ig2_Box_Sphere_ScGeom()],

  ## use Ip2_FrictMat_CpmMat_FrictPhys [1] in addition to Ip2_CpmMat_CpmMat_CpmPhys

  [Ip2_CpmMat_CpmMat_CpmPhys(),Ip2_FrictMat_CpmMat_FrictPhys()],
  ## Constitutive law
  [Law2_ScGeom_CpmPhys_Cpm()],
    ...
]

Cheers,
Laura

[1] https://drive.google.com/file/d/0B6azPyaq-2oNX3Zaa3oyZnJsOFE/view?usp=sharing

Revision history for this message
Best Jan Stránský (honzik) said :
#3

Sorry, I forgot to add that using option 2 you will also have some
FrictPhys, so you have to use
[Law2_ScGeom_CpmPhys_Cpm(), Law2_ScGeom_FrictPhys_CundallStrack()] for Law
functors.
cheers
Jan

2014-11-19 18:12 GMT+01:00 rayolau <email address hidden>:

> Question #257902 on Yade changed:
> https://answers.launchpad.net/yade/+question/257902
>
> rayolau posted a new comment:
> Hi Jan,
>
> Thanks for your reply.
> I tried the second option, and appears this error:
>
> " None of given Law2 functors can handle interaction #42655+23671,
> types geom:ScGeom=1 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D
> returned empty functor)"
>
> I changed the color of the ids (to dark blue), and correspond a vertex
> of a box (hammer) and a sphere of concrete, as can see in [1]. I should
> add some Law2 more?
>
> InsertionSortCollider(
>
> [Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='is2aabb'),
> Bo1_Facet_Aabb(),
> Bo1_Box_Aabb(),
> Bo1_Wall_Aabb()]),
> ## Interactions
> InteractionLoop(
>
> [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius,label='ss2sc'),
> Ig2_Facet_Sphere_ScGeom(),
> Ig2_Wall_Sphere_ScGeom(),
> Ig2_Box_Sphere_ScGeom()],
>
> ## use Ip2_FrictMat_CpmMat_FrictPhys [1] in addition to
> Ip2_CpmMat_CpmMat_CpmPhys
>
>
> [Ip2_CpmMat_CpmMat_CpmPhys(),Ip2_FrictMat_CpmMat_FrictPhys()],
> ## Constitutive law
> [Law2_ScGeom_CpmPhys_Cpm()],
> ...
> ]
>
>
> Cheers,
> Laura
>
> [1] https://drive.google.com/file/d/0B6azPyaq-
> 2oNX3Zaa3oyZnJsOFE/view?usp=sharing
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
rayolau (rayolau88) said :
#4

Thanks Jan Stránský, that solved my question.