← Back to team overview

yade-users team mailing list archive

Re: [Question #690280]: Implementing a new contact law very different from the usual ones

 

Question #690280 on Yade changed:
https://answers.launchpad.net/yade/+question/690280

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

just a note, are you sure that what you are looking for is not already
implemented in Yade? Just scanning the documentation, I see surface
tension, viscosity.. so double check if it really does not exist yet..

> that can not be derived from the other classical contact laws from
Yade

in fact, (almost) all Yade laws (Law2) are derived independently [1].
Sometimes Material and/or IPhys are shared, but it is usual that a law is independent bundle of Material, IPhys, Ip2, Law2.

> Could you give guidance on the way and methodology to implement this
new law in Yade ???

the best guidance is to have a look at existing laws, e.g. the "best known" FrictMat [2], Ip2_FrictMat_FrictMat_FrictPhys [3,4], FrictPhys [5], Law2_ScGeom_FrictPhys_CundallStrack [6,7].
We can help with partial questions here.

In your case, I think the clean way could be:
- new Material storing material parameters (mu,gamma)
- new IPhys, storing interaction data (mu,gamma,alpha)
- new Ip2, combining two Matrial and creating IPhys
- new Law2, computing forces and updating alpha

cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#lawfunctor
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/common/ElastMat.hpp#L23
[3] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/FrictPhys.hpp#L45
[4] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/FrictPhys.cpp#L10
[5] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/FrictPhys.hpp#L17
[6] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/ElasticContactLaw.hpp#L18
[7] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/ElasticContactLaw.cpp#L62

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