Re: [Yade-users] [Question #688156]: How to create a regular prism in Yade
Question #688156 on Yade changed: https://answers.launchpad.net/yade/+question/688156 Status: Answered => Solved Huang peilun confirmed that the question is solved: Thank you, Jan! I'll do better next time. -- 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
Re: [Yade-users] [Question #688156]: How to create a regular prism in Yade
Question #688156 on Yade changed: https://answers.launchpad.net/yade/+question/688156 Jan Stránský proposed the following answer: > Here's another question in that case, next time please open a new question [1] > I want ... this cylinder ... have contact with spheres, what kind of IGeomFunctor and LawFunctor should I use? that is the point, currently there is none.. Use an approximation of cylinder made of facets or boxes (for facets there is facetCylinder function [2]) cheers Jan [1] https://www.yade-dem.org/wiki/Howtoask [2] https://yade-dem.org/doc/yade.geom.html#yade.geom.facetCylinder -- 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
Re: [Yade-users] [Question #688156]: How to create a regular prism in Yade
Question #688156 on Yade changed: https://answers.launchpad.net/yade/+question/688156 Huang peilun posted a new comment: Thank you, Jan! That solved my problem. I'll post what I have tried and why/how it went wrong. This time I just use O.bodies.append(Cylinder(length=1, radius=1)) I didn't figure out what type does the Cylinder class have. I want to make a penetration test, and I want a cylinder shaped rod to do this. Here's another question, I want to apply gravity to this cylinder and have contact with spheres, what kind of IGeomFunctor and LawFunctor should I use? Now the current script is as followed. The cylinder just disappeared at the beginning of the simulation. from yade import pack O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31)) rod=Body() rod.shape=Cylinder() rod.shape.length=.5 rod.shape.radius=.2 rod.state.pos=(.5,.5,1.8) O.bodies.append(rod) sp=pack.SpherePack() sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.3) sp.toSimulation() O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Cylinder_Aabb(),Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_ChainedCylinder_CylScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack(),Law2_CylScGeom_FrictPhys_CundallStrack()] ), # update position using Newton's equations NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4), # call the checkUnbalanced function (defined below) every 2 seconds PyRunner(command='checkUnbalanced()',realPeriod=2), ] O.dt=.2*PWaveTimeStep() def checkUnbalanced(): if O.forces.f(rod.id)[2]==0: return ball.state.blockedDOFs='xyXYZ' ball.state.vel=(0,0,2) if unbalancedForce()<.05: O.pause() O.saveTmp() Thanks! -- 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
Re: [Yade-users] [Question #688156]: How to create a regular prism in Yade
Question #688156 on Yade changed: https://answers.launchpad.net/yade/+question/688156 Status: Needs information => Answered Jan Stránský proposed the following answer: > I want to create a body shaped as a prism. use box [1] > I tried couple of times, I can't create a body shaped as a cylinder by this class. next time please post also what you have tried and why/how it went wrong. E.g. you can try something like: ### b=Body() b.shape=Cylinder() b.shape.length=1 b.shape.radius=1 O.bodies.append(b) ### What do you want to do with the cylinder? just that Yade currently (AFAIK) is not able to work reasonably with "pure" cylinders.. cheers Jan [1] https://yade-dem.org/doc/yade.utils.html#yade.utils.box -- 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
Re: [Yade-users] [Question #688156]: How to create a regular prism in Yade
Question #688156 on Yade changed: https://answers.launchpad.net/yade/+question/688156 Huang peilun posted a new comment: I want to create a body shaped as a prism. By "not round cylinder" I mean not the cylinder for yade.gridpfacet module, I see from the yade book that there is a class yade.wrapper.Cylinder. However, I tried couple of times, I can't create a body shaped as a cylinder by this class. Thanks. -- 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
Re: [Yade-users] [Question #688156]: How to create a regular prism in Yade
Question #688156 on Yade changed: https://answers.launchpad.net/yade/+question/688156 Status: Open => Needs information Robert Caulk requested more information: Hello, Welcome to yade :-) I think you will need to be a bit more specific. Are you trying to create a prism to fill with spheres? Or body shaped as a prism? Same question with the cylinder. Except what exactly is a "not round cylinder"? Cheers, Robert -- 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
[Yade-users] [Question #688156]: How to create a regular prism in Yade
New question #688156 on Yade: https://answers.launchpad.net/yade/+question/688156 Hi, I just begin to learn Yade. I'm wondering if there is a function or method to create a regular prism without calculate the coordinates of each vertexes by myself. And if there is a method to create a cylinder(not a round cylinder). Thanks in advance. -- 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