how to find the facet-sphere contact
I want to get the contact information about the shaft and spheres.
below is the code:
#######
O.reset()
facets = O.bodies.
print('the ids of the facets:',facets)
x0=0.2;
cylinderIDS= O.bodies.
radius=
print('here is the ids for the cylinder:
facets2 = O.bodies.
from yade import pack, plot,export
sp=pack.
sp.makeCloud(
sp.toSimulation()
print "num_spheres= ", len(O.bodies)
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
# handle sphere+sphere and facet+sphere collisions
[Ig2_
[Ip2_
[Law2_
),
NewtonIntegrat
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(
# call the addPlotData function every 200 steps
#PyRunner(
]
O.dt=.5*
O.trackEnergy=True
def checkUnbalanced():
if unbalancedForce
O.pause()
O.run(10000000,
#######
for i in O.interactions:
if not i.isReal: continue
if isinstance(
#for i.id1 in cylinderIDS:
O.bodies[
#######
I want to get the contact information for the inner cylinder (here I call it cylinderIDS).
when the particle falls down , I want to capture the contact force and the contact normal.
#########: if isinstance(
#### we know the facet IDS contains in "cylinderIDS"..
###### this line here::: for i.id1 in cylinderIDS:
#######
besides, I have some another question about the i.id1 and i.id2.
If the contact is between the facet and sphere, I want to know which ids belong to facet group? which ids belong to sphere group? because here is a sentence methioned that "facet are only stored in id1 "
references:
[1]https:/
thanks!
Yong
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: