# Inertia (`inertia`)

> Adds rotating mass to a shaft, with an optional starting speed.

![inertia](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/inertia.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/mechanical/inertia/)

**Group:** Mechanical · **Kind:** `{"element":"inertia","kind":"mechanical"}`

## When to use it

Use it to add the inertia of a load, coupling or flywheel to a shaft. Do not use it for a machine rotor, because the machine already includes it.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `shaft` | mechanical | Shaft terminal, the other side is the frame |

## Common parameters

- `j`: How strongly the shaft resists speeding up (Default: required)
- `w0`: Initial speed (Default: 0)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `j` | kg·m² | required |  | How strongly the shaft resists speeding up |
| `w0` | rad/s | 0 |  | Initial speed |

_Parameter descriptions are in English in both languages._

## Model

The element is J·dω/dt = T, where T is the net torque flowing into the shaft net. It is solved as a capacitor J from the shaft net to the frame, with the speed ω in rad/s. The initial speed is w0, and the kinetic energy is J·ω²/2. The shaft is rigid and there is no loss, so add a Friction part for losses. The torque is i(J1) and the speed is w(net).

## Common mistakes

- A machine already carries its own rotor inertia j on the shaft net, and the two add. Enter only the extra load inertia here, or the rotor is counted twice and the acceleration is too slow.
- An inertia behind a Gear is scaled by the square of the ratio when seen from the other side. Enter the real value and let the Gear do the scaling.
- The unit is kg·m², so divide a datasheet GD² by 4 and multiply 1 g·cm² by 1e-7. w0 is a starting speed in rad/s, and every part on the same net starts at its own w0.

## Datasheet and sources

j is the load, coupling or flywheel inertia from the datasheet, in kg·m². w0 is 0 for a start from rest, or the running speed in rad/s for a run that begins at speed.

## Example

Open the example with the command `file.openExample` and the name `demo:inertia`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
