4
$\begingroup$

With cylinder I have:

 body = Cylinder[{{-l/2, 0, 0}, {l/2, 0, 0}}, r];
 (\[ScriptCapitalI] = \[Rho] MomentOfInertia[body, 
 Assumptions -> l > 0 && w > 0 && h > 0]) // MatrixForm; 
 m Cancel[\[ScriptCapitalI]/(\[Rho] Volume[body])] // MatrixForm(*Code from MMA help*)

 (*{{(m*r^2)/2, 0, 0}, {0, (m*(l^2 + 3*r^2))/12, 0}, {0, 0, (m*(l^2 + 3*r^2))/12}}*)

But how do this with half cylinder? enter image description here

$\endgroup$
2
  • $\begingroup$ Replace body with DiscretizeRegion[Cylinder[], {{0, 1}, {-1, 1}, {-1, 1}}] $\endgroup$ – N.J.Evans Jan 11 at 15:51
  • 2
    $\begingroup$ @N.J.Evans.Yes works ,but I what solutions with:l,m ,r ? $\endgroup$ – Mariusz Iwaniuk Jan 11 at 15:54
5
$\begingroup$

Takes a few seconds, but ImplicitRegion works:

body = ImplicitRegion[
  y^2 + z^2 <= r^2 && z >= 0 && -L/2 <= x <= L/2, {x, y, z}]
(ℐ = ρ MomentOfInertia[body, 
     Assumptions -> L > 0 && r > 0]) // MatrixForm
m Cancel[ℐ/(ρ Volume[body, 
       Assumptions -> r > 0 && L > 0])] // MatrixForm
$\endgroup$
3
  • 2
    $\begingroup$ The representation body = RegionIntersection[Cylinder[{{-L/2, 0, 0}, {L/2, 0, 0}}, r], HalfSpace[{0, 0, -1}, {0, 0, 0}]] also works. $\endgroup$ – J. M.'s torpor Jan 11 at 16:21
  • $\begingroup$ @J.M.'sennui I tried that, but the integral didn't finish. Maybe I didn't wait long enough. $\endgroup$ – Michael E2 Jan 11 at 16:22
  • 3
    $\begingroup$ @J.M.'sennui OK, it doesn't take longer than it takes to go get a cup of coffee. :) $\endgroup$ – Michael E2 Jan 11 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.