← Back to team overview

yade-users team mailing list archive

Re: [Question #703805]: How to achieve the cohesion bond constraint between particles of CohFrictMat in code

 

Question #703805 on Yade changed:
https://answers.launchpad.net/yade/+question/703805

    Status: Needs information => Open

xuanshenyu gave more information on the question:
ok, we also can write a case of merely two particles and add a constant force F(-100,0,0) at the particle of ID=0.
 the particle of ID=0 and  the particle of ID=1  will move together at a constant velocity to the left. In theory, A and B are bonded as a whole, so they will move to the left as a whole, but how is the internal force between the other two particles calculated and added in the code? If I'm not clear enough, please let me know.
############
#locale.setlocale(locale.LC.ALL,'en_US.UTF-8')
rho=920
gravity=0
#mat
mat1 = O.materials.append(CohFrictMat(isCohesive=True, frictionAngle=radians(15.6), density=rho, poisson=0.33, young=5.358e8, alphaKr=0.242, alphaKtw=0.1, normalCohesion=2e5, shearCohesion=2e5))
Mat1=O.materials[mat1]

#sphere
coordinates=numpy.genfromtxt("zuobiao.csv",delimiter=",") //(0.01,0.01,0) (0.03,0.01,0)
particle=[sphere((x,y,z),radius=0.01,material=Mat1,color=(1,1,0)) for x,y,z in coordinates]
Particle=O.bodies.append(particle)

#add engines
O.engines=[
      ForceResetter(),
      InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.1), Bo1_Facet_Aabb()]),
      InteractionLoop(
              [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.1)],
              [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True),Ip2_FrictMat_FrictMat_FrictPhys()],
              [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
      ),
      NewtonIntegrator(gravity=(0, 0, -gravity), damping=0.2),
      PyRunner(command='addForce()',iterPeriod=1),
      VTKRecorder(iterPeriod=100,recorders=['all'],fileName='out-')
]

def addForce():
    O.forces.addF(0,Vector3(0,0,-100))
#timestep
O.dt = .1* PWaveTimeStep()
O.step()
O.run(5000,True)
O.saveTmp()
#############

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.