← Back to team overview

yade-users team mailing list archive

[Question #675246]: inertia calculation facetbox

 

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



Hi,

I am performing compression test with a facetbox with mass. I assign masses to the 12 facets in the facetbox. Then I perform Updateclumpproperties step, and get mass and intertia of the facetbox.

Below is an example with a cube.
The mass of the box from yade is correct. I expect the interia tensor with identical components values in the three rotation axes for a cube. This is not the case though. Any idea?
---------------------------------------------
from yade import pack
import shutil, sys, imp
import numpy as np

density_box = 3000.0
Mat_box=O.materials.append(FrictMat(young=1e8,density=density_box,poisson=0.2,frictionAngle=np.arctan(0.0)))

L = 1.0;
M_total = density_box*L*L*L
box_id = []
box_id.append(O.bodies.append(geom.facetBox(center=(L/2.0,L/2.0,L/2.0),extents = (L/2.0,L/2.0,L/2.0), material = Mat_box, wallMask=63)))
box_id=sum(box_id,[])
O.bodies.clump(box_id)

for ijk in box_id:
	if isinstance(O.bodies[ijk].shape,Facet):
		O.bodies[ijk].state.mass = M_total/12.0
		O.bodies[ijk].state.inertia = (1/12.0)*(M_total/12.0)*Vector3(2.0*L*L,2.0*L*L,2.0*L*L)
		
O.bodies.updateClumpProperties(discretization=100)
print O.bodies[-1].state.mass
print O.bodies[-1].state.inertia

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.


Follow ups