how creat a new law between particle

Asked by lip on 2019-05-23

i am going to define a new contact geometry and a new contact law, the new geometry is serve for the new law. i want to know which file in yade is relavent to my work, is there any examples to guide me how todo that?
i woule appreciate if you can help me

Question information

English Edit question
Yade Edit question
No assignee Edit question
Last query:
Last reply:
Jan Stránský (honzik) said : #1


there is no really example, but the existing code should be instructive and inspirative enough.

In the most general case:
Shape - describes a geometry of a **Body**, e.g. Sphere, Polyhedra
Material - describes material properties of a **Body**, e.g. FrictMat, PolyhedraMat
IGeom - describes a geometry of an **Interaction**, e.g. ScGeom, PolyhedraGeom
IPhys - describes physics/material properties/physical history of an **Interaction**, e.g. FrictPhys, PolyhedraPhys
Ig2 - takes two Shapes and creates/updates IGeom
Ip2 - takes two Materials and creates/updates IPhys
Law2 - takes IGeom and IPhys and calculates forces, possibly updates IPhys

For new staff (in most general case):
- new law needs new Law2 functor
- new IGeom needs new IGeom subclass and new Ig2 functor(s)
- new Shape needs new Bo1 functor, new Ig2 functor(s) and possibly new IGeom
- new IPhys needs new IPhys subclass and new Ip2 functor(s)
- new Material would need new Ip2 functor(s), possibly new IPhys

Look at the most basic/used existing cases:
IGeom: ScGeom [1,2]
Ig2: Ig2_Sphere_Sphere_ScGeom [3,4], Ig2_Wall_Sphere_ScGeom [5,6]
Law2: Law2_ScGeom_FrictPhys_CundallStrack [7,8]



Robert Caulk (rcaulk) said : #2

Thank you for the thoughtful response, Jan.