← 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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

there are no 2d discs in Yade, but you can do "fake 2d simulation with
discs" by using spheres and blocking some (out of plane) degrees of freedom
[1]:

for b in O.bodies:
  b.state.blockedDOFs = 'zXY' # to make 2d simulation in xy plane, z
displacement and rotations arounx x and y axes are blocked

cheers
Jan

[1]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.State.blockedDOFs


2013/3/14 Fu zuoguang <question224128@xxxxxxxxxxxxxxxxxxxxx>

> Question #224128 on Yade changed:
> https://answers.launchpad.net/yade/+question/224128
>
>     Status: Answered => Open
>
> Fu zuoguang is still having a problem:
> Dear Jan Stránský:
>
>       Thanks for helping me yesterday, now I am starting to Complete this
> case, as the first step I intend to modify the example of "Bouncing
> sphere" and I have changed nothing but the O.bodies.append([...]). The
> script is as follow:
>
> O.bodies.append([
>
>    utils.sphere(center=(0,0,0),radius=.5,fixed=True),
>
>    utils.sphere((0,2,0),.5)
> ])
>
> O.engines=[
>    ForceResetter(),
>    InsertionSortCollider([Bo1_Sphere_Aabb()]),
>    InteractionLoop(
>       [Ig2_Sphere_Sphere_L3Geom()],
>       [Ip2_FrictMat_FrictMat_FrictPhys()],
>       [Law2_L3Geom_FrictPhys_ElPerfPl()]
>    ),
>
>    GravityEngine(gravity=(0,-9.81,0)),
>
>    NewtonIntegrator(damping=0.1)
> ]
>
> O.dt=.25e-4*utils.PWaveTimeStep()
>
>      Changing the Z-axis to zero is used to simulate the 2D disks. But I
> failed, and the reason for this is that there is nothing different from
> the initial script. There are no 2D disks but the 3D spheres appearing.
> My question is, of course, how to correct this script?
>
>      seeking your help!
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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