yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02713
Re: Interaction at distance
> I see in Ig2_Sphere_Sphere_ScGeom that part of the condition we create
> a ScGeom instance is:
> penetrationDepthSq>0 || c->isReal()
> Is this condition accessed only for potential interactions previously
> created? I mean, potential interactions are created because overlap
> occurs between bounding boxes, right? So has this class the power to
> create the interaction alghough no potential one exists?
No, it doesn't have such power: the functor is called for all
interactions that exists already (both potential and real); it is the
collider that creates potential interactions for overlapping bboxes. Ig2
functors in general can turn potential interaction into a real one (as
their purpose is exact collision detection + updating existing
geometry); they however cannot (|| c-> isReal()) erase an interaction
that already exists, even if spheres are far apart (it is Law2 that is
supposed to handle this).
> I need a distance of separation (that will depend on various
> parameters) between particles for the creation of the interaction.
> Should I derive a new Ig2 for sphere-sphere interaction? Now I see
> that there is a detection factor that would do something similar but I
> need something just a little more complicated.
If you derive from the geometry functor, you will end up duplicating
fairly complicated geometrical code; I would advise against that.
If I understand, you will have no interaction unless there is some
distance between the spheres?
The easiest would be to set the detection factor to minimum value that
satisfies your needs (e.g. 1.5 if you need sometimes 1.2, sometimes 1.3
and sometimes 1.5) and then, in the Law2 functor, make the decisions. If
the particles are too close, you will just exert no forces on particles.
Cheers, Vaclav
Follow ups
References