yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #24223
[Question #693691]: Sphere-Facets penetrationDepth
New question #693691 on Yade:
https://answers.launchpad.net/yade/+question/693691
Hello,
Can I have a question about the calculation of penetration depth in the case of an interaction sphere with two facets?
How it works?
Code below:
import math
# Spheres
color = [0.21, 0.22, 0.1]
r = 1.
sf = 3 # scale factor
trans = 0.2
sphere1 = sphere([0.8, 0., 0.], r, color=color, fixed=fixed),
sphere2 = sphere([2.6, 0., 0.], r, color=color, fixed=fixed),
sphere3 = sphere([0.8, -1.8, 0.], r, color=color, fixed=fixed),
sphere4 = sphere([0.8, -3.6, 0.], r, color=color, fixed=fixed),
side1 = facet(vertices=[(0.0, -2*r*sf, 0.),
(0.0, trans, 2*r*sf),
(0.0, trans, -2*r*sf)], fixed=True, wire=True),
side2 = facet(vertices=[(0.0, 2*r*sf, 0.),
(0.0, trans, 2*r*sf),
(0.0, trans, -2*r*sf)], fixed=True, wire=True)
O.bodies.append(sphere3)
O.bodies.append(side1)
O.bodies.append(side2)
O.bodies.append(sphere2)
O.bodies.append(sphere1)
O.bodies.append(sphere4)
# Solver
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb(), Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.1),
PyRunner(command='intCounter()', realPeriod=1),
PyRunner(command='testVF()', realPeriod=1)
]
# Make a step
O.step()
#for i in O.interactions:
# print(i.geom.penetrationDepth)
# print(i.geom.contactPoint)
########
from yade import pack, qt
v = qt.View()
v.axes = True
Sphere1 has interaction with Side1 and Side2.
BR
Przemek
--
You received this question notification because your team yade-users is
an answer contact for Yade.