# Computing inertias in 2D

Even in the simplest planar problems we need the moment of inertia $I_{z,G}$ of each link. This page shows how to compute it for the most common links of a mechanism.

## Definition

:::{card} Moment of inertia of a planar body
The moment of inertia of a planar body about the $z$ axis through a point $P$ is:

$$ I_{z,P} = \int_{\text{area}} \left( x'^2 + y'^2 \right) dm = \int_{\text{area}} r'^2\, dm $$

where $(x', y')$ are the coordinates of each element $dm$ relative to $P$, and $r'$ its distance to the axis.
:::

<img src="figs/definicionMomentoInercia2D.png" alt="Definition of the moment of inertia" width="380px">

It measures **how much mass is far from the axis**: the larger it is, the more torque is needed to change the rotation of the body. Its units are kg·m². The reference point will normally be the **center of mass** $G$ (in numerical methods this is not always the case).

This formula **always works**, but computing it is tedious. In practice, a few common cases are memorized and combined with the tools below.

### What is the mass differential $dm$?

- **Planar link (2D):** $dm = \rho(x', y')\, dx'\, dy'$, with $\rho$ the surface density. For total mass $M$, area $A$ and uniform density: $dm = \frac{M}{A}\, dx'\, dy'$.
- **Approximately linear link (1D):** if the link is much longer than it is wide and thick, its mass is assumed to be distributed only along its axis (for instance, $x'$) and the other dimension is ignored: $dm = \rho(x')\, dx'$. For mass $M$, length $L$ and uniform density: $dm = \frac{M}{L}\, dx'$.

## Tools

### Steiner's (parallel axis) theorem

:::{card} Steiner's theorem
Given the moment $I_{z,G}$ about the center of mass $G$, the moment about a parallel axis through another point $P$ is:

$$ I_{z,P} = I_{z,G} + M d^2 $$

where $M$ is the total mass and $d = |PG|$ the distance between both axes.
:::

As a consequence, the moment of inertia is **minimum** about an axis through $G$. The theorem can only be applied starting from $G$ (or to go back to $G$); to move between two arbitrary points $P$ and $Q$, one must go through $G$: $I_Q = I_P - M\,|PG|^2 + M\,|QG|^2$.

### Composition: addition and subtraction

As long as all moments of inertia are taken about **the same axis and the same point**, the moments of the parts of a composite body can be added:

<img src="figs/momentoInercia2Dsuma.png" alt="Adding inertias" width="480px">

$$ I_{z,P}^{\text{total}} = I_{z,P}^{A} + I_{z,P}^{B} $$

And those of holes, subtracted:

<img src="figs/momentoInercia2Dresta.png" alt="Subtracting inertias" width="480px">

$$ I_{z,P}^{\text{total}} = I_{z,P}^{A} - I_{z,P}^{B} - I_{z,P}^{C} - I_{z,P}^{D} - I_{z,P}^{E} $$

## Common cases

### Point mass

A massless string or rod with a mass $M$ at its end, at a distance $d$ from $P$:

<img src="figs/eslabonMasaConcentrada.png" alt="Point mass" width="260px">

$$ I_{z,P} = M d^2 $$

(It can be proven, for instance, using a Dirac delta as density.) Food for thought: what happens if moments are taken about the very point where the mass is?

### Slender bar

Bar of length $L$ and uniform mass $M$, much longer than it is thick, **about its center of mass**:

<img src="figs/eslabonVarillaFina.png" alt="Slender bar" width="420px">

$$ I_{z,G} = \frac{1}{12} M L^2 $$

:::{dropdown} Proof
With the 1D model, $dm = \frac{M}{L}dx'$ and $y' \approx 0$:

$$
I_{z,G} = \int_{-L/2}^{L/2} \left( x'^2 + \cancel{y'^2} \right) \frac{M}{L}\, dx'
= \frac{M}{L} \left[ \frac{x'^3}{3} \right]_{-L/2}^{L/2}
= \frac{M}{L}\, \frac{1}{3}\left( \frac{L^3}{8} + \frac{L^3}{8} \right)
= \frac{1}{12} M L^2
$$

About one end, by Steiner's theorem with $d = L/2$: $I_{z,\text{end}} = \frac{1}{12}ML^2 + M\frac{L^2}{4} = \frac{1}{3}ML^2$.
:::

### Solid disk or cylinder

Disk of radius $R$ and uniform mass $M$, **about its center**:

<img src="figs/eslabonDisco.png" alt="Disk" width="230px">

$$ I_{z,G} = \frac{1}{2} M R^2 $$

:::{dropdown} Proof
The disk is split into rings of radius $r$ and width $dr$, with area $2\pi r\,dr$, so $dm = \frac{M}{\pi R^2}\, 2\pi r\, dr$. All points of a ring are at a distance $r$ from the axis:

$$ I_{z,G} = \int_0^R r^2 \frac{2M}{R^2}\, r\, dr = \frac{2M}{R^2}\, \frac{R^4}{4} = \frac{1}{2} M R^2 $$
:::

### Summary table

| Link | $I_{z,G}$ |
|---|---|
| Point mass at distance $d$ (about the axis) | $M d^2$ |
| Slender bar of length $L$ | $\frac{1}{12} M L^2$ |
| Slender bar, about one end | $\frac{1}{3} M L^2$ |
| Rectangular plate $a \times b$ | $\frac{1}{12} M \left(a^2 + b^2\right)$ |
| Solid disk or cylinder of radius $R$ | $\frac{1}{2} M R^2$ |
| Thin ring or tube of radius $R$ | $M R^2$ |
| Hollow cylinder with radii $R_1$ and $R_2$ | $\frac{1}{2} M \left(R_1^2 + R_2^2\right)$ |
| Solid sphere (about a diameter) | $\frac{2}{5} M R^2$ |
| Thin hollow sphere (about a diameter) | $\frac{2}{3} M R^2$ |

Sometimes the **radius of gyration** $k$ is given instead, defined by $I_{z,G} = M k^2$: it is the distance at which all the mass would have to be concentrated to get the same inertia.

## Example: plate with a hole

A steel plate ($\rho = 7850$ kg/m³) of $a \times b = 300 \times 100$ mm and thickness $t = 10$ mm has a hole of radius $r = 25$ mm, whose center $G_B$ is at $d = 70$ mm from the center $G_A$ of the plate. Compute its moment of inertia about its center of mass $G$.

<img src="figs/L03_inertia_plate_hole.png" alt="Plate with a hole" width="420px">

:::{dropdown} Solution
**Masses.** Full plate and "hole" disk:

$$ m_A = \rho\, a\, b\, t = 7850 \cdot 0.3 \cdot 0.1 \cdot 0.01 = 2.355~\text{kg}, \qquad m_B = \rho\, \pi r^2 t = 0.1541~\text{kg} $$

The mass of the part is $m = m_A - m_B = 2.2009$ kg.

**Inertias about $G_A$.** Plate: $I^A_{G_A} = \frac{1}{12} m_A (a^2+b^2) = 0.019625$ kg·m². Disk: about its center, $\frac{1}{2} m_B r^2 = 4.82\cdot 10^{-5}$ kg·m², and about $G_A$ by Steiner's theorem:

$$ I^B_{G_A} = 4.82\cdot 10^{-5} + m_B\, d^2 = 4.82\cdot 10^{-5} + 0.1541 \cdot 0.07^2 = 8.034\cdot 10^{-4}~\text{kg·m}^2 $$

Subtracting (both refer to the same point $G_A$): $I_{G_A} = 0.019625 - 0.000803 = 0.018822$ kg·m².

**Center of mass.** The hole shifts $G$ to the opposite side, a distance $e$ from $G_A$:

$$ e = \frac{m_B\, d}{m} = \frac{0.1541 \cdot 0.07}{2.2009} = 4.90~\text{mm} $$

**Inertia about $G$.** Applying Steiner's theorem "backwards" (from $G_A$ to $G$):

$$ I_G = I_{G_A} - m\, e^2 = 0.018822 - 2.2009 \cdot 0.0049^2 = 0.018769~\text{kg·m}^2 $$

The correction due to the shift of $G$ is small here (0.3 %), but it is not always so.
:::

For complex parts, CAD software directly provides the mass, center of mass and inertia tensor from the solid model.
