← Back to team overview

yade-dev team mailing list archive

Re: Add the ability to do a contact between a FrictMat and a ViscElMat

 

On 17/12/13 10:20, François wrote:
> Ok I'm going to do the second option.
> I talked with Raphael and I remember that his work was mostly focused
> on the timestepper. But what I can see in the timestepper now is that
> he didn't prepared the case of coexistent viscous and "pure" elast
> contacts in the same simulation. So if the user sets the flag
> "viscEl=1" in the timestepper, the code will do :
>
> /ViscElPhys* viscPhys = YADE_CAST<ViscElPhys*>(contact->phys.get());/
>
> for each contact, which is a problem for all non viscous contact ->
> segt fault.

If they all inherit from elastMat this problem will disappear, no?

>
> About K and Young, my precise idea is :
>
>   * Ip2_FrictMat_FrictMat_FrictPhys : will use young and poisson
>     directly, or use kn and ks if they exist and are set by converting
>     them with : Young = 0.5 * Kn * R and Poisson = Ks/Kn. If both
>     modulus and stiffnesses are defined for one material, print a
>     message that gently recommend the user to review his script.
>   * Ip2_ViscElMat_ViscElMat_ViscElPhys : will use Kn and Ks directly
>     if they are set, convert and use Young and Poisson otherwise. If
>     both modulus and stiffnesses are defined for one material, print a
>     message that gently recommend the user to review his script.
>
Excellent.

> About your warning, should I take care about something more ? I think
> that kwargs are automatically handled  between python/c++ by boost.
I'm not sure how you will do it, and not sure about possible
difficulties. If you use "add_property" to handle the different sort of
assignments, then I'm not sure it will work with kwargs. There is also a
subtle difference in what really happens:

"mat.young =" ... is simple assignement.
 "ViscElMat(.....,young=...)" is triggering postLoad().

Last possible difficulty, the kn/Young decision must be preserved if you
save and reload.

I'm not saying it is difficult. Just a few things to keep in mind.

Bruno


>
>
> 2013/12/16 Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx
> <mailto:bruno.chareyre@xxxxxxxxxxx>>
>
>     My vote for 2°).
>     The independancy of the "Visc" classes makes no sense. It is
>     inherited from very early ages of the code.
>
>     Raphael partly fixed the problem regarding kn vs. Young. You
>     should talk to him (I don't remember now why he did not make the
>     inheritance Frict -> ViscEl - to minimize the noise most probably).
>     There is now a choice to decide if kn should be translated like
>     Young or not (IIRC).
>     Your suggestion is to make it more transparent, the flag being set
>     depending on which attribute is defined. I like the idea.
>
>     Be carefull it must work with different syntax:
>     mat.young = ...
>     m=ViscElMat(.....,young=...)
>
>     B
>
>
>     On 16/12/13 08:56, François wrote:
>>     Hi everybody,
>>
>>     I would like in my simulations to make possible the interaction
>>     between (Coh)FrictMat and ViscElMat spheres. I don't want to
>>     activate the cohesion so I would let CohFrictMat become FrictMat
>>     by inheritance. The idea is to study the granular flow of viscous
>>     grains with one of the boundary made of cohesive spheres who
>>     sticks together.
>>
>>     I think there are two solutions : the first one seems easier
>>     because it just adds a new class, but the second one (which
>>     modifies a little the viscous classes logic) may deserves our
>>     consideration. The choice between one of them is the subject of
>>     my question.
>>
>>     1°) Create a new class : Ip2_FrictMat_ViscElMat_FrictPhys(). This
>>     functor would make an interaction physic just like
>>     Ip2_FrictMat_FrictMat_FrictPhys(), ignoring the viscosity and
>>     converting the young modulus of the frictional sphere to a stiffness.
>>
>>     2°) ViscElMat, unlike its name lets believe, doesn't inherit from
>>     ElastMat. The main reason I think is because a ViscElMat has
>>     stiffnesses {kn,ks} while an ElastMat has a young modulus and a
>>     poisson ratio {young,poisson}. FrictMat inherits from ElastMat,
>>     and the only additional attribute it has is the friction
>>     coefficient. As ViscElMat has a friction coefficient too, don't
>>     you think we could make ViscElMat a child of FrictMat ? To avoid
>>     breaking people's scripts, we can imagine that if the user sets
>>     {kn,ks}, those parameters will override {young,poisson} in the
>>     calculation of resulting contact stiffnesses. With this
>>     inheritance, and if the user sets at least {young,poisson} for
>>     both his FrictMat and ViscElMat, the contact will be possible
>>     between :
>>     - FrictMat + FrictMat => FrictPhys
>>     - ViscElMat + ViscElMat => ViscElPhys
>>     - FrictMat + ViscElMat(FrictMat by inheritance) => FrictPhys
>>
>>     Can people working with/on visco-elasticity give their opinion ?
>>     (Anton, Raphaël ...)
>>
>>     Thanks,
>>
>>     François
>>
>>
>>     _______________________________________________
>>     Mailing list: https://launchpad.net/~yade-dev <https://launchpad.net/%7Eyade-dev>
>>     Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx <mailto:yade-dev@xxxxxxxxxxxxxxxxxxx>
>>     Unsubscribe : https://launchpad.net/~yade-dev <https://launchpad.net/%7Eyade-dev>
>>     More help   : https://help.launchpad.net/ListHelp
>
>
>     -- 
>     _______________
>     Bruno Chareyre
>     Associate Professor
>     ENSE³ - Grenoble INP
>     Lab. 3SR
>     BP 53
>     38041 Grenoble cedex 9
>     Tél : +33 4 56 52 86 21
>     Fax : +33 4 76 82 70 43
>     ________________
>
>
>     _______________________________________________
>     Mailing list: https://launchpad.net/~yade-dev
>     <https://launchpad.net/%7Eyade-dev>
>     Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
>     <mailto:yade-dev@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~yade-dev
>     <https://launchpad.net/%7Eyade-dev>
>     More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp


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


Follow ups

References