Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-12 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Status: Answered => Solved

Jonathan Pergoli confirmed that the question is solved:
Now I can distinguish between interactions:

def rollingfriction():
for i in sphere:
try:
O.interactions[m,sphere[i]].phys.kr=.15
print "Interaction between",m,sphere[i]
except:
print "No interaction exists",m,sphere[i]

Thank you guys for helping me. :)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-06 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jonathan Pergoli posted a new comment:
Sorry I wrote the wrong code. I did this:
O.engines=[

ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),es=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),krot=MatchMaker(matches=((gravel,MLI,.15),(gravel,gravel,3],
[Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1)
]

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-06 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jonathan Pergoli posted a new comment:
In this way the simulation distinguishes between en and es, but for the
rolling friction coefficient krot it doesn't work.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-06 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jonathan Pergoli posted a new comment:
What about this:
gravel=FrictMat(density=1700,frictionAngle=.9188,label="gravel")
O.materials.append(gravel)
MLI=FrictMat(density=1280,frictionAngle=0.1489,label="MLI")
O.materials.append(MLI)
...
O.engines=[

ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55],
[Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1)
]

It gives me this error:
No registered converter was able to produce a C++ rvalue of type 
Eigen::Matrix from this Python object of type tuple

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-05 Thread Jérôme Duriez
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jérôme Duriez proposed the following answer:
Yes, this is what I meant (in case your non-spherical bodies are all of
the same type, either Facet or Box, you may remove either Bo1_Box_Aabb()
; Ig2_Box_Sphere_ScGeom() or Bo1_Facet_Aabb() ;
Ig2_Facet_Sphere_ScGeom())

This being said, I realize my lengthy answer may not be directly related
to your initial problem, I am sorry...

I now understand you have different material parameters (these en,es)
for different bodies. Usually, YADE handles this at the bodies
"material" properties level [1].

For instance, simulations with "FrictPhys" handle like a charm different
friction angles for sphere-sphere and sphere-box interactions. We just
put different values for the frictionAngle attribute of the sphere or
box bodies' Material [2], and one unique Ip2
(Ip2_FrictMat_FrictMat_FrictPhys) does the job giving different local
friction angles for sphere-sphere and sphere-box interactions.

Here, the design of Ip2_FrictMat_FrictMat_MindlinPhys is flawed in my
point of view (I'm not used to MindlinPhys, though) if these en,es,krot
are material parameters that can be different among bodies. Because
including these parameters in Ip2_FrictMat_FrictMat_MindlinPhys prevents
playing with different parameters the same way as frictionAngle within
FrictPhys (hence your problem)..

I see two possible solutions to your problem, both involving modifying
the source code

- either modifying the source code of Ip2_FrictMat_FrictMat_MindlinPhys
to detect the shape of interacting bodies and assign distinct en,es in
accordance. From my point of view, this would not conform the classical
YADE design I exposed in #6, I agree thus with Jan it would be "hacky"

- removing these en,es from Ip2_FrictMat_FrictMat_MindlinPhys to insert
them in a (new ?) material class. Which would make more sense, from my
point of view.


Further discussion would require other people more used to MindlinPhys than me. 
Hope it still helps

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Body.material
[2] 
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FrictMat.frictionAngle

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-05 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jonathan Pergoli posted a new comment:
Hi Jérome,

you mean this:
O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_MindlinPhys(en=.55,es=.55,krot=3)],
[Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)]
),
NewtonIntegrator(gravity=(0,0,-2.5e-4),damping=.2)
]
?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-04 Thread Jérôme Duriez
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jérôme Duriez proposed the following answer:
Hello,

You mix here "geometry" [1] and "physics" [2] of YADE interactions. In
order to describe interactions in DEM, you need to know:

- what is the relative movement between two Discrete Elements (i.e. YADE
bodies), that's what's inside the "geometry" of the interaction, often
denoted i.geom

- how forces are associated to these relative displacements, i.e. which
contact law, that's what's inside the "physics" of the interaction:
i.phys

Ip2_FrictMat_FrictMat_MindlinPhys, like all "Ip2_" plays a role in describing 
the physics of the interaction (computing e.g. the stifness parameters of the 
interaction from the material parameters of the bodies). It has most often 
nothing to do with bodies shape !
Indeed, you can still use Ip2_FrictMat_FrictMat_MindlinPhys in your simulations 
whatever your shapes are, the only condition is that your bodies are of 
"FrictMat" type.
(I'm not 100% correct here, because of 
https://github.com/yade/trunk/blob/6d4a0d1689c6bad2dbdd6e27d1653418f7fc6498/pkg/dem/HertzMindlin.cpp#L43,
 but if you're new to YADE you may disregard this parenthesis that won't have 
any effect in your case...)

The bodies shapes enter into picture through the "geom". Because the way
e.g. overlap is computed depends whether we face overlap between
spheres, or between a sphere and a box, or between a sphere and a facet.

Your problem is thus (as Jan said: he told you about "Ig2", not "Ip2")
to use in your simulation the correct "Ig2_". Look here [3] (the names
do help !) to pick the right one.

Once this will be done, you will have a new kind of i.geom in your
simulation. For this reason, you may also have to update your "Law2_.."
(as Jan suggested again) which, in the end, has to consider both i.geom
and i.phys to do his job (computing and applying interaction forces)

Again, you will have to choose the correct Law2 (from [4], there is a
lot..., but again the names do help) to be sure it can handle the i.geom
and i.phys you have in your simulation.



[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Interaction.geom, 
see https://yade-dem.org/doc/yade.wrapper.html#igeom for all possible choices
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Interaction.phys, 
see https://yade-dem.org/doc/yade.wrapper.html#iphys for all possible choices
[3] https://yade-dem.org/doc/yade.wrapper.html#igeomfunctor
[4] https://yade-dem.org/doc/yade.wrapper.html#lawfunctor

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-04 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jonathan Pergoli posted a new comment:
P.S. I'm new to YADE :-)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-04 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jonathan Pergoli posted a new comment:
Thanks Jan, but I mean how can i modifie
Ip2_FrictMat_FrictMat_MindlinPhys in order to distinguish between
sphere-sphere and sphere box? :-)

I'm using box now instead of polyhedra but the problem is the same.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-04 Thread Jan Stránský
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jan Stránský proposed the following answer:
instead of using utils.polyhedron() using utils.box() :-)
+ changing some Ig2 and Law2 fomr Polyhedra to Box
cheers
Jan


2016-05-04 18:13 GMT+02:00 Jonathan Pergoli <
question293...@answers.launchpad.net>:

> Question #293247 on Yade changed:
> https://answers.launchpad.net/yade/+question/293247
>
> Jonathan Pergoli posted a new comment:
> Hi Jan,
>
> How can be modified?
>
> I have only one box.
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-04 Thread Jonathan Pergoli
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Jonathan Pergoli posted a new comment:
Hi Jan,

How can be modified?

I have only one box.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-04 Thread Jan Stránský
Question #293247 on Yade changed:
https://answers.launchpad.net/yade/+question/293247

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Jonathan,

currently you can have only one instance (thus one set of parameters) of
p2_FrictMat_FrictMat_MindlinPhys. If needed, it could be modified to
distinguish between sphere-sphere and sphere-box interactions, but it would
need some coding and probably would be a bit hacky..

Do you have more boxes in your simulation? If no, I would use box instead
of polyhedra.

cheers
Jan


2016-05-04 16:52 GMT+02:00 Jonathan Pergoli <
question293...@answers.launchpad.net>:

> New question #293247 on Yade:
> https://answers.launchpad.net/yade/+question/293247
>
> Hi everybody!
>
> I'm trying to simulate a box falling on a cylindrical pack of spheres. The
> spheres have coefficient of restitution = .1 and the box has a COR = .6.
> For the spheres I have used Ip2_FrictMat_FrictMat_MindlinPhys(en=.1,es=.1)
> . As regard the box, I would like to use the same but if I write:
> ...
>
> [p2_FrictMat_FrictMat_MindlinPhys(en=.1,es=.1),p2_FrictMat_FrictMat_MindlinPhys(en=.6,es=.6)]
> the former properties are overwritten by the latter.
>
>  The box is made using utils.polyhedron().
>
> I have also used Ip2_FrictMat_PolyhedraMat_CundallStrack(), but I cannot
> set the COR.
>
> Can someone help me,please?
>
> Thank you :)
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


[Yade-users] [Question #293247]: Physic interaction betweem particles and polyhedra

2016-05-04 Thread Jonathan Pergoli
New question #293247 on Yade:
https://answers.launchpad.net/yade/+question/293247

Hi everybody!

I'm trying to simulate a box falling on a cylindrical pack of spheres. The 
spheres have coefficient of restitution = .1 and the box has a COR = .6. For 
the spheres I have used Ip2_FrictMat_FrictMat_MindlinPhys(en=.1,es=.1) . As 
regard the box, I would like to use the same but if I write:
...
[p2_FrictMat_FrictMat_MindlinPhys(en=.1,es=.1),p2_FrictMat_FrictMat_MindlinPhys(en=.6,es=.6)]
the former properties are overwritten by the latter.

 The box is made using utils.polyhedron().

I have also used Ip2_FrictMat_PolyhedraMat_CundallStrack(), but I cannot set 
the COR.

Can someone help me,please?

Thank you :)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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