New question #631723 on Yade: https://answers.launchpad.net/yade/+question/631723
Hi everyone: I want to apply force on the polyhedron and the force grows as the time grows. Question1: This is my code. Is that correct? Question2: Also I don't know how to print my added force in every iterPeriod. Could you give me some advice? ############################################ from yade import * from yade import polyhedra_utils matF = PolyhedraMat() matF.density = 10e15 matF.young = 2e11 matF.poisson = 0.1 matF.Ks = 1e14 matF.Kn = 1e15 matF.frictionAngle = 0.2 yade.O.materials.append(matF) # basic YADE engines fo tetrahedra contact O.bodies.append(polyhedra_utils.polyhedra(matF,v=[[-0.025,-0.025,-0.005],[-0.025,0.025,-0.005],[0.025,-0.025,-0.005],[0.025,0.025,-0.005],[-0.025,-0.025,0],[-0.025,0.025,0],[0.025,-0.025,0],[0.025,0.025,0]])) O.bodies.append(polyhedra_utils.polyhedra(matF,v=[[-0.025,-0.025,0.1],[-0.025,0.025,0.1],[0.025,-0.025,0.1],[0.025,0.025,0.1],[-0.025,-0.025,0.105],[-0.025,0.025,0.105],[0.025,-0.025,0.105],[0.025,0.025,0.105]])) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Polyhedra_Aabb(),Bo1_Wall_Aabb()],verletDist=0.1), InteractionLoop( [Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()], [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics" [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()] # contact law -- apply forces ), #GravityEngi NewtonIntegrator(damping=0.2), PyRunner(command='addForce()',iterPeriod=1) ] print "utils.PWaveTimeStep= "+str(utils.PWaveTimeStep()) def addForce(): O.forces.addF(0,Vector3(0,0,5*O.iterPeriod)) O.forces.addF(1,Vector3(0,0,-5*O.iterPeriod)) ################################################### Many Thanks! Liu -- 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