Question #696052 on Yade changed: https://answers.launchpad.net/yade/+question/696052
Jan Stránský proposed the following answer: > I want to have to contact laws to = two? As I mentioned before, in principle it is possible to have multiple Law2 functors. Just specify them the same way as you have multiple Ig2 functors. The other point is how it will work. Law2 to be used for the interaction is determined by IGeom and IPhys. IGeom is created / updated by Ig2 functor. Ig2 to be used is determined by shapes of interacting particles. E.g., the collider detects interaction between sphere-sphere, so Ig2_Sphere_Sphere_ScGeom is used, resulting in ScGeom Or e.g. the interaction is between sphere-facet, so Ig2_Facet_Sphere_ScGeom is used, resulting again in ScGeom (but can be other IGeoms in principle). Similarly it works for IPhys IGeom is created / updated by Ip2 functor. Ip2 to be used is determined by materials of interacting particles. E.g. the materials of both interaction bodies is LudingMat, then you can use Ip2_LudingMat_LudingMat_LudingPhys to create LudingPhys and together with ScGeom you can use Law2_ScGeom_LudingPhys_Basic. Or e.g. the materials of both interaction bodies is FrictMat, then you can use Ip2_FrictMat_FrictMat_MindlinPhys to create MindlinPhys and together with ScGeom you can use Law2_ScGeom_MindlinPhys_Mindlin. Now, you could use LudingMat for spheres and FrictMat for walls. Then you could use Ip2_LudingMat_LudingMat_LudingPhys and Ip2_FrictMat_LudingMat_MidlinPhys. Sphere-sphere (or more precisely Luding-Luding) contanct would result in LudingPhys and Law2_ScGeom_LudingPhys_Basic would be used. Sphere-wall (or more precisely FrictMat-LudingMat) contacts would result in MindlinPhys and Law2_ScGeom_MindlinPhys_Mindlin would be used. However, Ip2_FrictMat_LudingMat_MidlinPhys is not implemented in Yade :-( You would have to implement it in the C++ source code. How it works for the Cpm case I described before: The point here is that CpmMat is derived from FrictMat, so CpmMat may be treated as FrictMat. Spheres have CpmMat, walls have FrictMat. Ip2 are Ip2_CpmMat_CpmMat_CpmPhys and Ip2_FrictMat_FrictMat_FrictPhys Sphere-sphere (or more precisely cpm-cpm) contanct would result in CpmPhys and Law2_ScGeom_CpmPhys_Cpm would be used. Sphere-wall (or more precisely cpm-frict wich are essentially frict-frict) contacts would result in FrictPhys and Law2_ScGeom_FrictPhys_CundallStrack would be used. You cannot do the same trick with LudingMat, as LudingMat is derived directly from Material class, not FrictMat... [3] A general note aboutsing multiple shapes / materials. You have to be careful: 1) not to miss a desired combination. E.g. without Ig2_Facet_Sphere_ScGeom, spheres would pass through facets without interaction, but without any error at the same time 2) not to define ambiguous functors - the same input could result in more than one result. Yade woudl give you run time error in that case cheers Jan [3] https://yade-dem.org/doc/yade.wrapper.html#material -- 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 : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

