2d simulation with Yade

Asked by anna effeindzourou

Hi all,
In order to do a test in "2D" with Yade I have checked the available examples like ring2d.
I have done some changes:
- define bodies only in one plane
using the loop:

for b in O.bodies:
 if isinstance(b.shape,Sphere):
   b.state.blockedDOFs='zXY'
(considering that my working plane is xy)

- modify the mass and inertia of the spheres using the ones of a cylinder. For that I have added the following loop:
  for i in O.bodies:
      if (type(i.shape)==Sphere):
   r=i.shape.radius
   i.mask=3
   i.state.mass=3*i.state.mass/(4*r)
   coef=(5/(2*pow(r,2)))*(pow(r,2)/4+1/12.)
   i.state.inertia[0]=coef*i.state.inertia[0]
   i.state.inertia[1]=coef*i.state.inertia[1]
   i.state.inertia[2]=(5/4.)*i.state.inertia[2]

What do you think about that?
Thanks in advance,
Anna

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello Anna,

In order to do a test in "2D" with Yade I have checked the available
> examples like ring2d.
> I have done some changes:
> - define bodies only in one plane
> using the loop:
>
> for b in O.bodies:
> if isinstance(b.shape,Sphere):
> b.state.blockedDOFs='zXY'
> (considering that my working plane is xy)
>
>
I agree with this approach :-) it also corresponds to similar questions:
https://answers.launchpad.net/yade/+question/224128
https://answers.launchpad.net/yade/+question/198183
https://answers.launchpad.net/yade/+question/215571
https://answers.launchpad.net/yade/+question/174453

> - modify the mass and inertia of the spheres using the ones of a
> cylinder. For that I have added the following loop:
> for i in O.bodies:
> if (type(i.shape)==Sphere):
> r=i.shape.radius
> i.mask=3
> i.state.mass=3*i.state.mass/(4*r)
> coef=(5/(2*pow(r,2)))*(pow(r,2)/4+1/12.)
> i.state.inertia[0]=coef*i.state.inertia[0]
> i.state.inertia[1]=coef*i.state.inertia[1]
> i.state.inertia[2]=(5/4.)*i.state.inertia[2]
>
>
Nice approach if you want to simulate really cylinders/discs. As X and Y
rotations are blocked, setting i.state.interia[0] and i.state.inertia[1]
has no effect, but it is no problem at the same time :-)

cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask anna effeindzourou for more information if necessary.

To post a message you must log in.