← Back to team overview

yade-users team mailing list archive

Re: [Question #224128]: How to learn and start a 2D simulation in YADE

 

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

Bruno Chareyre proposed the following answer:
You can find examples of 2D simulations in examples/ring2d.
As Jan explained, there is nothing special to do for building a 2D
problem, except that you will align all spheres in one plane.
Even blocking 'zXY' is not necessary in my experience. If all spheres
are in one plane initially, they will sit there (all contact forces will
be strictly 0 in z, hence there is no out-of-plane numerical error).

For a 2D triaxial, it is enough to generate random positions using
makeCloud with a flat box.

Try this for instance:

O.periodic=1
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0.5),(1,1,0.5),-1,.4,200,periodic=True)
O.bodies.append([utils.sphere(s[0],s[1]) for s in sp])

or (if not periodic)

O.periodic=0
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0.5),(1,1,0.5),-1,.4,200)
O.bodies.append([utils.sphere(s[0],s[1]) for s in sp])

For the fun, you can also do this, but it is no longer 2D...

O.periodic=0
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0.5),(1,1,0.5),-1,.4,200)
sp.makeCloud((0,0.5,0),(0.8,0.5,0.7),-1,.4,200)
O.bodies.append([utils.sphere(s[0],s[1]) for s in sp])

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.