Inertia Tensor for clumps with Intersecting Spheres
Hello community,
I was going through the Source code- Clump.cpp
The inertia tensor at local level for the intersecting spheres clump is calculated from the below equation (line no. 178):
Ig += m*( x.dot(x)
In the second part- "Matrix3r(
I believe it should be m*pow(dx,2)/6 but instead it computes dv*pow(dx,2)/6, was it a mistake in code or done purposefully?
Reference:
https:/
Thank you
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Robert Caulk
- Solved:
- 2019-04-23
- Last query:
- 2019-04-23
- Last reply:
- 2019-04-23
Robert Caulk (rcaulk) said : | #1 |
It looks like a mistake in the code. In fact, both terms were originally multiplied by dv. I think this commit [1] was aiming to fix it but only noticed the first term.
Can you confirm, Jan?
[1]https:/
Jan Stránský (honzik) said : | #2 |
Hello,
good point, it looks like a mistake, definitely there should be m instead of dv..
2 points:
- the term tends to zero as discretization tends to infinity
- at the moment I have no idea why it is computed with respect to principal axes of the voxel, I **think** it should be computed with respect to global coordinate system..
cheers
Jan
|
#3 |
Thanks Bokkisa, I submitted the merge request for changing dv to m [1].
Thanks Robert Caulk, that solved my question.
Dear Jan, thanks for your confirmation.
I think inertia of all the voxels are calculated w.r.t Global Coordinate System (GCS) only. Using parallel axis theorem inertia at principal axis of voxel is translated to GCS. (Line 178)
After computing the centre of mass (C.O.M) of the clump, the inertia is translated again to the C.O.M. (Line 215)
Jan Stránský (honzik) said : | #6 |
Yes, sorry, just ignore this part of my answer :-)
Jan