Polyhedra-Sphere-Facet Coefficient of Restitution

Asked by Andrew Jennings

I am trying to simulate a transfer chute with a mix of spherical and polyhedra particles.

When I only have spherical particles the following interaction loop does a great job of modelling the flow through the chute:

    InteractionLoop(
        [
            Ig2_Sphere_Polyhedra_ScGeom(),
            Ig2_Sphere_Sphere_ScGeom(),
            Ig2_Facet_Sphere_ScGeom(),
        ],
        [
            Ip2_FrictMat_FrictMat_MindlinPhys(en=Restitution, gamma=Stickiness, krot=RollRes),
        ],
        [
            Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True, includeAdhesion=True),
        ],
    ),

When I add polyhedra, I get a bunch off errors like: <FATAL ERROR> InteractionLoop:182 virtual void yade::InteractionLoop::action(): None of given Law2 functors can handle interaction #167+2972, types geom:PolyhedraGeom=10 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D returned empty functor)

To fix this problem I used the following interaction loop:

InteractionLoop(
        [
            Ig2_Sphere_Polyhedra_ScGeom(),
            Ig2_Sphere_Sphere_ScGeom(),
            Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),
            Ig2_Facet_Polyhedra_PolyhedraGeom(),
            Ig2_Facet_Sphere_ScGeom(),
        ],
        [
            Ip2_FrictMat_FrictMat_MindlinPhys(en=Restitution, gamma=Stickiness, krot=RollRes),
            Ip2_FrictMat_PolyhedraMat_FrictPhys(),
            Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(),
        ],
        [
            Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True, includeAdhesion=True),
            Law2_ScGeom_FrictPhys_CundallStrack(),
            Law2_PolyhedraGeom_PolyhedraPhys_Volumetric(),
        ],
    ),

The simulation runs fine but neither polys nor spheres do not appear to have any coefficient of restitution after I add polys to the simulation. Is there a ways to force the spheres to use the Mindlin physics? Ideally I'd like the polyhedra to use the mindlin physics as well. Right now it looks like Mindlin Law2 and Ip2 are ignored and everything is defaulting to CundallStrack.

Do I need to modify the C++ code to get polys to have a coefficient of restitution or am I missing something here?

Question information

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

> spheres do not appear to have any coefficient of restitution
> Right now it looks like Mindlin Law2 and Ip2 are ignored and everything is defaulting to CundallStrack.

please observe the actual state - inspect interactions and get the actual type of interaction.phys

> Ideally I'd like the polyhedra to use the mindlin physics as well

then why using CundallStrack at all?

cheers
Jan

Revision history for this message
Andrew Jennings (andy98225) said :
#2

Thanks for responding so quickly Jan!

When I remove Law2_ScGeom_FrictPhys_CundallStrack() from the interactionLoop I get the following error:

<FATAL ERROR> InteractionLoop:182 virtual void yade::InteractionLoop::action(): None of given Law2 functors can handle interaction #1273+2328, types geom:ScGeom=1 and phys:PolyhedraPhys=18 (LawDispatcher::getFunctor2D returned empty functor)
Segmentation fault

If I leave it in the loop everything is fine, but I get no coefficient of restitution.

How does one go about inspecting the interaction.phys? I suppose this needs to be done on the working script because the script without CundallStrack has a Segmentation Fault that kills everything.

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

Please create and provide a MWE [1] containing your InteractionLoop with all shape-material combinations you use, all bodies fixed (for the sake of simplicity), one iteration, all possible combinations of interactions are present (sphere-sphere,sphere-polyhedron,...).
With that MWE, we can easily/quickly test modifications.

The point is that such combination of "many" shapes and materials is not too frequent among yade users/developers and such cases are in general problematic (you can find some in the question history).

> How does one go about inspecting the interaction.phys?

something like:
###
print(set(i.phys.__class__.__name__ for i in O.interactions))
###

One workaround could be using Ig2_Polyhedra_Polyhedra_ScGeom [2] (instead of Ig2_Polyhedra_Polyhedra_PolyhedraGeom). I am not sure about the polyhedron-boundary interaction...

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Ig2_Polyhedra_Polyhedra_ScGeom

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

Revision history for this message
Andrew Jennings (andy98225) said :
#5

Hi Jan,

Sorry for the tardy reply. Ig2_Polyhedra_Polyhedra_ScGeom creates really strange behavior and sometimes crashes so that did not work. However, I did figure out how to get the spheres to use MindlinPhys instead of CundallStrack. I made the mistake of assigning the PolyhedraMat to the sphere material. When I changed the sphere material to FrictMat the spheres started using MindlinPhys.

The simulation looks much more realistic as long as most of the particles are spheres. I have one final problem: is it possible to make the polyhedra follow MindlinPhs too? I need them to have a coefficient of restitution as well.

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

Hello,

If you want all interactions to be of the same type, there is nothing easier :-)

Something like this could work:
Spheres - FrictMat
Polyhedrons - FrictMat
Facet - PolyedraMat
( there is currently no Ig2_Facet_Polyhedron_ScGeom, although it should not be difficult to implement it, then you could get rid of PolyhedraMat entirely)
and
InteractionLoop(
        [
            Ig2_Sphere_Polyhedra_ScGeom(),
            Ig2_Sphere_Sphere_ScGeom(),
            Ig2_Polyhedra_Polyhedra_ScGeom(),
            Ig2_Facet_Polyhedra_PolyhedraGeom(),
            Ig2_Facet_Sphere_ScGeom(),
        ],
        [
            Ip2_FrictMat_FrictMat_MindlinPhys(en=Restitution, gamma=Stickiness, krot=RollRes),
            Ip2_FrictMat_PolyhedraMat_FrictPhys(),
        ],
        [
            Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True, includeAdhesion=True),
            Law2_PolyhedraGeom_PolyhedraPhys_Volumetric(),
        ],
    ),

Have a try and let us know

> Ig2_Polyhedra_Polyhedra_ScGeom creates really strange behavior

ScGeom between Polyhedrons is an easy "hack", not too much tested etc.
If you can isolate the problem in a MWE (e.g. 2 specific polyhedrons with given initial velocities), please open a new question or new issue.

> sometimes crashes so that did not work.

Please be more specific (ideally again in an separate issue or question)

Cheers
Jan

Revision history for this message
Andrew Jennings (andy98225) said :
#7

I tried changing the polyhedra material to FrictMat and got the follow error:

"In [1]: <FATAL ERROR> InteractionLoop:182 virtual void yade::InteractionLoop::action(): None of given Law2 functors can handle interaction #919+3649, types geom:PolyhedraGeom=10 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D returned empty functor)
<FATAL ERROR> InteractionLoop:182 virtual void yade::InteractionLoop::action(): None of given Law2 functors can handle interaction #920+3649, types geom:PolyhedraGeom=10 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D returned empty functor)
<FATAL ERROR> InteractionLoop:182 virtual void yade::InteractionLoop::action(): None of given Law2 functors can handle interaction #915+3652, types geom:PolyhedraGeom=10 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D returned empty functor)
Segmentation fault"

I get this error with both Ig2_Polyhedra_Polyhedra_PolyhedraGeom() and Ig2_Polyhedra_Polyhedra_ScGeom()

I'll see about building a MWE to illustrate the problem on Monday

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

Ok, probably you would need either
Ip2_FrictMat_PolyhedraMat_PolyhedraPhys
or
Ig2_Facet_Polyhedron_ScGeom
both not implemented. Ip2_FrictMat_PolyhedraMat_PolyhedraPhys should be easier (have a look on existing Ip2_FrictMat_PolyhedraMat_FrictPhys [3,4]).
Cheers
Jan

[3] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/Polyhedra.hpp#L263
[4] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/Polyhedra.cpp#L547

Revision history for this message
Andrew Jennings (andy98225) said :
#9

Hi Jan,

I finally found time to try out your recommendation. This is the function I created:

void Ip2_FrictMat_PolyhedraMat_PolyhedraPhys::go(const shared_ptr<Material>& pp1, const shared_ptr<Material>& pp2, const shared_ptr<Interaction>& interaction)
{
 if (interaction->phys) return;
 const shared_ptr<FrictMat>& mat1 = YADE_PTR_CAST<FrictMat>(pp1);
 const shared_ptr<PolyhedraMat>& mat2 = YADE_PTR_CAST<PolyhedraMat>(pp2);
 interaction->phys = shared_ptr<PolyhedraPhys>(new PolyhedraPhys());
 const shared_ptr<PolyhedraPhys>& contactPhysics = YADE_PTR_CAST<PolyhedraPhys>(interaction->phys);
 Real Kna = mat1->young;
 Real Knb = mat2->young;
 Real Ksa = mat1->young * mat1->poisson;
 Real Ksb = mat2->young * mat2->poisson;
 Real frictionAngle = math::min(mat1->frictionAngle, mat2->frictionAngle);
 contactPhysics->tangensOfFrictionAngle = math::tan(frictionAngle);
 contactPhysics->kn = Kna * Knb / (Kna + Knb);
 contactPhysics->ks = Ksa * Ksb / (Ksa + Ksb);
}

This does allow me to assign friction material to the polys. Unfortunately, I still seem to need CundallStrack or I get this error:

 <FATAL ERROR> InteractionLoop:182 virtual void yade::InteractionLoop::action(): None of given Law2 functors can handle interaction #8+239, types geom:ScGeom=1 and phys:PolyhedraPhys=18 (LawDispatcher::getFunctor2D returned empty functor)

as soon as the polys touch the facets. When I add CundallStrack the particles explode as soon as they touch the facets.

Maybe I need to try to create a Ig2_Facet_Polyhedron_ScGeom so everything uses friction material.

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

> Maybe I need to try to create a Ig2_Facet_Polyhedron_ScGeom so everything uses friction material.

you can try.. let us know if you need some help

Cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask Andrew Jennings for more information if necessary.

To post a message you must log in.