← Back to team overview

yade-users team mailing list archive

[Question #225770]: 2d simulation with Yade

 

New question #225770 on Yade:
https://answers.launchpad.net/yade/+question/225770

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

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