New question #664343 on Yade:
https://answers.launchpad.net/yade/+question/664343

I am studying the interaction of pfacets with other objects, since I have it 
not completely clear in my mind. I've seen that pfacets interact "apparently 
realistically" with other pfacets. However I have an example where a sphere 
collides with a pfacet, bounces back correctly but does not transfer any 
momentum to the pfacet (no nodes or connections move after the end of the 
impact). Why?

This is my code

-----------------------------------------------------------------------------------------------------------------------

from yade.gridpfacet import *
from yade import pack,ymport,export,geom,bodiesHandling,qt

vr=0.2  
vh=0.4   
rr=0.02  

phimat=30.      # friction angle
E=1e8   # Young's modulus

f = open("state.dat", "w")

intf = 0

def state(si,intf):
  if (len(O.interactions.withBody(si))>0):
    forc = O.interactions.withBody(si)[0].phys.normalForce[1]
  else:
    forc = 0
  intf += forc*O.dt/O.bodies[si].state.mass
  f.write ("%d %f %f %f %f\n" % 
(O.iter,O.bodies[si].state.se3[0][1],O.bodies[si].state.vel[1],forc,intf))
  #                            tempo          coord y sfera             vel y 
sfera          forza sulla sfera     integr-forza
  f.flush()
  return intf


#### Engines ####
O.engines=[
        ForceResetter(),
        InsertionSortCollider([
                Bo1_Sphere_Aabb(),
                Bo1_Wall_Aabb(),
                Bo1_PFacet_Aabb(),
                Bo1_Facet_Aabb(),
        ]),
        InteractionLoop(
                [
                  Ig2_GridNode_GridNode_GridNodeGeom6D(),#internal = ScGeom6D
                 Ig2_Sphere_PFacet_ScGridCoGeom(), #cyl-facet 
                 Ig2_Wall_Sphere_ScGeom(),#cyl-wall
                 Ig2_Wall_PFacet_ScGeom(),
                 Ig2_PFacet_PFacet_ScGeom(),
                 Ig2_Sphere_Sphere_ScGeom(),
                 Ig2_Facet_Sphere_ScGeom(),
                ],
                [
                  
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),
 
                 Ip2_FrictMat_FrictMat_FrictPhys()      
                ],
                [
                  Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),  
                 Law2_ScGeom_FrictPhys_CundallStrack(),       
                ]
        ),
        NewtonIntegrator(gravity=(0.,0,0),damping=0),
#        
qt.SnapshotEngine(fileBase='experiment',iterPeriod=2000,label='snapshot'),
        PyRunner(command='intf = state(sphId,intf)',iterPeriod=1), # call 
myFunction every 100 steps
]



#### Creat materials ####
O.materials.append( CohFrictMat( 
young=E*1e2,poisson=0.3,density=100,frictionAngle=radians(phimat),normalCohesion=1e10,shearCohesion=1e10,momentRotationLaw=True,label='cMat'
 ) ) # material to create the gridConnections
O.materials.append( FrictMat( 
young=E,poisson=0.3,density=1000,frictionAngle=radians(phimat),label='fMat' ) ) 
# material for general interactions

##### Create ONE WALL #####
xw = 0
yw = 0
lwall = 10*vr
hwall = 2*vh

v1=Vector3(xw,yw,0)
v2=Vector3(xw+lwall,yw,0)
v3=Vector3(xw,yw,hwall)
vertices=[v1,v2,v3]
pfacetCreator1(vertices,rr,nodesIds=[],cylIds=[],pfIds=[],wire=False,color=[1,1,1],fixed=False,materialNodes='cMat',material='fMat')


#sphId = O.bodies.append(sphere([xw+lwall/3.,yw+rr*4,hwall/3.], 
radius=rr,color=(1,0,0)))
sphId = O.bodies.append(sphere([0,rr*4,0], radius=rr,color=(1,0,0)))

O.bodies[sphId].state.vel = Vector3(0,-0.1,0)



#### For viewing ####
from yade import qt
qt.View()
Gl1_Sphere.stripes=True
qtr = qt.Renderer()

#### Set a time step ####
#O.dt=1e-05
O.dt=PWaveTimeStep()  # non accurate time-step

#### Allows to reload the simulation ####
O.saveTmp()



-- 
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     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to