5
$\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
    Commented Jan 11, 2021 at 15:51
  • 2
    $\begingroup$ @N.J.Evans.Yes works ,but I what solutions with:l,m ,r ? $\endgroup$ Commented Jan 11, 2021 at 15:54

1 Answer 1

6
$\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
  • 3
    $\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$ Commented Jan 11, 2021 at 16:21
  • 1
    $\begingroup$ @J.M.'sennui I tried that, but the integral didn't finish. Maybe I didn't wait long enough. $\endgroup$
    – Michael E2
    Commented Jan 11, 2021 at 16:22
  • 5
    $\begingroup$ @J.M.'sennui OK, it doesn't take longer than it takes to go get a cup of coffee. :) $\endgroup$
    – Michael E2
    Commented Jan 11, 2021 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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