Engineering playground · hands-on

Physics you can get hold of.

Here you will find the basics of a mechanical engineering degree as animations you can play with yourself. I programmed them myself, and everything is calculated live in your browser.

↓ Nine experiments: drag the sliders and open the derivations.

The slider-crank

The crank drive turns rotation into a back-and-forth movement, as in every piston engine.

01 Slider-crank Kinematics of mechanisms
Crank angle
0°
Piston travel (from TDC)
0%
Piston speed (rel.)
0
The piston travel is not a pure sine curve. This very deviation creates the inertial forces that have to be balanced in an engine.
Derivation & calculation

Wanted: the piston travel x as a function of the crank angle φ. Crank (radius r) and connecting rod (length l) form a triangle; the piston runs along the cylinder axis.

1
The crank pin is at (r·cos φ, r·sin φ). The piston sits on the axis; the connecting rod of fixed length l joins the two. Pythagoras gives x.
x = r·cos φ + √( l² − r²·sin²φ )
2
The square root is unwieldy. With λ = r/l and an approximation it becomes an easily readable sum:
x ≈ r·( cos φ + (λ/4)·cos 2φ ) + const
the cos 2φ term is the second-order component
3
Why it matters: Differentiating twice with respect to time gives the acceleration, and therefore the inertia force. The cos 2φ component oscillates at twice the rotational speed: this is the second-order inertia force, which in-line engines are specifically balanced against.

Example: at φ = 90°, cos φ = 0, but cos 2φ = −1. So the piston is not in the middle but closer to bottom dead centre. That is exactly what the animation above shows.

Gears & gear ratio

The ratio of the tooth counts is the gear ratio.

02 Spur gear pair Machine elements
Gear ratio i = z₂/z₁
2.00
Input
100min⁻¹
Output n₂
50min⁻¹
When a gear with few teeth drives one with many, the large gear turns more slowly but with more torque.
Derivation & calculation

Two gears mesh without slip. At the point of contact (the pitch point, marked in orange) both have exactly the same circumferential speed v.

1
Equal circumferential speed: v = ω₁·r₁ = ω₂·r₂. Because the module m (the tooth size) must be the same for both, r = m·z/2. So the pitch circle is proportional to the number of teeth z.
2
Replace r with z and rearrange:
i = ω₁ / ω₂ = n₁ / n₂ = z₂ / z₁
3
Without friction the power is conserved, P = M·ω. If the speed drops by a factor i, the torque rises by i:
M₂ = i · M₁ slower, but stronger

Example z₁ = 14, z₂ = 28: i = 2. 100 min⁻¹ becomes 50 min⁻¹, and the torque doubles. This is exactly how a gearbox turns a fast, weak motor into a slow, strong drive.

The damped oscillation

Mass, spring and damper form the basic model of every vibration.

03 Spring-mass-damper Engineering mechanics
Natural angular freq. ω₀
6.3rad/s
Damping ratio ζ
0.12
Behaviour
underdamped
What matters is the damping ratio ζ = c / (2·√(k·m)). Below 1 the system oscillates, at exactly 1 it settles fastest, and above 1 it creeps slowly back.
Derivation & calculation

Newton for the mass m: the spring pulls back with −k·x, the damper brakes with −c·ẋ (proportional to the velocity ẋ).

1
Sum of forces m·ẍ = −k·x − c·ẋ, rearranged:
m·ẍ + c·ẋ + k·x = 0
2
Without damping (c = 0) it oscillates purely sinusoidally at the natural angular frequency:
ω₀ = √( k / m ) [rad/s]
3
How strongly it is damped is measured by the dimensionless damping ratio ζ. It compares the damping with the “critical” damping:
ζ = c / ( 2·√(k·m) )
4
ζ < 1 underdamped (oscillates and decays), ζ = 1 critically damped (fastest return without overshoot, this is how shock absorbers are designed), ζ > 1 overdamped (creeps back).

Example k = 40 N/m, m = 1 kg → ω₀ = 6.3 rad/s (≈ 1 Hz). With c = 1.5 Ns/m, ζ = 0.12: lightly damped, it keeps oscillating for a long time.

Kármán vortex street

Behind a cylinder in a flow, vortices break away on alternating sides. They make chimneys sway and power lines sing.

04 Flow around a cylinder Fluid mechanics
Strouhal number: The faster the wind, the more often vortices shed. That is why it whistles higher or lower.
The physics behind it

The base flow here follows the potential flow around a circular cylinder, which is why the streamlines split cleanly and close again behind the cylinder:

u = U·( 1 − R²·(x²−y²)/r⁴ ) , v = −U·2R²·x·y/r⁴
r = distance from the cylinder centre, R = radius
1
In reality the flow separates at the rear and rolls up into vortices, alternately at the top and bottom. Each one is modelled as a Rankine vortex: a rigid core inside, v ∝ 1/r outside.
2
How often a vortex is shed is given by the dimensionless Strouhal number St:
f = St · U / D with St ≈ 0.2 for the cylinder
3
Everyday life: For a thin wire D is small, so f is high → it whistles. For a thick chimney f is low. If it matches the chimney's natural frequency, it can oscillate dangerously (hence the helical strakes on tall chimneys).

Fourier: waves from circles

Any periodic curve can be drawn from rotating circles.

05 Epicycle synthesis Advanced mathematics
Gibbs phenomenon: A small overshoot always remains at the jumps.
Derivation & calculation

Idea: every periodic function is a sum of pure sine waves: a fundamental plus overtones. A rotating circle produces exactly one sine (its height above the centre).

1
A circle with radius Aₙ rotating at frequency n gives the height Aₙ·sin(n·ω·t). Link many of them together and their heights add up. The tip of the chain draws the sum.
f(t) = Σ Aₙ · sin(n·ω·t)
2
The square wave needs only the odd multiples (1, 3, 5, …), and the amplitude falls with 1/n:
Aₙ = 4/(π·n) , n = 1, 3, 5, … Sawtooth: all n · Triangle: ∝ 1/n²
3
The more terms, the squarer, but at the jumps an overshoot of ≈ 9 % remains, the Gibbs phenomenon, which never quite disappears.

Exactly this decomposition is behind MP3, JPEG and every vibration analysis: split a signal into its frequencies and leave out what does not matter.

The double pendulum

Hang one pendulum from another, and simple mechanics turns into chaos.

06 Chaotic pendulum Dynamics
Deterministic, but unpredictable: The tiniest change at the start gives a completely different path.
Derivation: nonlinear coupling

The upper and lower pendulums pull on each other: their motions are coupled. The Lagrangian formalism yields two linked differential equations for the angles φ₁, φ₂.

1
The angular acceleration of the upper pendulum depends on both angles and both angular velocities:
φ̈₁ = f( φ₁, φ₂, φ̇₁, φ̇₂ )
a non-linear expression with sin(φ₁ − φ₂)
2
The sin(φ₁ − φ₂) term makes the system non-linear. There is no closed-form solution. It is computed step by step (here by time integration, 8 sub-steps per frame).
3
Sensitivity: A starting angle that differs by 0.1° leads to a completely different path within seconds: the “butterfly effect”, the same mathematics as in weather.

The Otto cycle

The area in the p-V diagram is the work gained.

07 p-V cycle Thermodynamics
Stroke
Compression
Efficiency η
60%
Peak pressure
65bar
The higher the compression ratio ε, the higher the efficiency η, until the mixture ignites by itself. This is called knocking.
Derivation & calculation

Efficiency is the share of the heat supplied that turns into work: η = W/Qin. For the ideal Otto cycle (two isentropic + two isochoric steps) almost everything cancels. What remains is a surprisingly simple formula:

1
Compression (1→2) and expansion (3→4) are isentropic, so T·Vκ−1 = const. The volume ratio between the isochores is exactly ε.
2
Heat flows only at constant volume (Q = m·cv·ΔT). Substitute the temperatures and cancel. Only ε remains:
η = 1 − 1 / εκ−1 κ ≈ 1.4 for air
3
Calculation: ε = 10 → η = 1 − 1/100.4 = 1 − 0.40 = 60 % (ideal). A real engine achieves about half of that: friction, heat losses, real gas.

Motor meets load

A drive settles where motor torque and load torque are equal.

08 Speed-torque characteristic Drive dynamics
Speed
0%
Operating point n_B
-%
Torque M
0%
Accelerating torque: The difference motor − load drives the flywheel.
Derivation & calculation

Everything revolves around a torque balance at the flywheel (moment of inertia J):

J · dω/dt = Mmotor(n) − Mload(n)
1
The motor characteristic (here an induction motor, Kloss equation) has a breakdown torque and drops steeply towards rated speed. The load characteristic rises, for a fan with the square of the speed, Mload ∝ n².
2
As long as Mmotor > Mload, dω/dt > 0: the machine accelerates. The surplus shrinks as the intersection comes closer.
3
At the operating point both are equal, dω/dt = 0, and the speed stays constant:
Mmotor(nB) = Mload(nB)

A large flywheel (large J) runs up sluggishly but holds the speed steady. If the load exceeds the breakdown torque, the motor “stalls”: it never gets up to speed at all.

The jet engine

A jet engine draws in air, compresses it, burns fuel in it and expels the hot gas.

09 Turbofan Turbomachinery
Thrust
83kN
Gas after combustor
1420°C
Pressure ratio
38:1
Bypass
10:1
Modern engines save energy by accelerating a lot of air only a little. That is why they have such a large fan.
Derivation & calculation

Thrust comes from a change in momentum: the engine draws in air at vin and expels it faster at vout from the nozzle. By Newton (actio = reactio):

F = ṁ · ( vout − vin )
ṁ = air mass drawn in per second
1
Behind this runs the Joule/Brayton cycle: intake → compression (pressure ×40) → combustion at constant pressure → expansion in turbine and nozzle. The turbine only drives the compressor, the rest of the energy becomes thrust.
2
Why the large fan? The same thrust F can be achieved with a large ṁ and a small Δv (fan) or the other way round (core only). The wasted power lies in the Δv²: accelerating a lot of air gently costs less energy.
ηV = 2 / ( 1 + vout / vflight ) propulsive efficiency
3
That is why modern engines have a bypass ratio of ~10:1, ten times as much cold bypass air as hot core air. This saves fuel and makes them considerably quieter.

Astonishing numbers from engineering

Engineering facts that are hard to believe.

11 tonnes

On a finger-sized blade

The centrifugal force on a turbine blade equals a fully loaded coach.

Jet engine
1700 °C

Hotter than its melting point

The metal melts at ~1300 °C. Cooling air channels and ceramics protect the blade.

Materials
1 crystal

The blade without grain boundaries

Cast as a single metal crystal so it does not "creep" under heat.

Casting
×40

Hot before anything burns

Compressed about 40 times, the air reaches around 600 °C, before any kerosene burns.

Thermodynamics
1 t/s

The fan shovels air

The fan moves more than a tonne of air per second and provides around 85 % of the thrust.

Propulsion
13 t/s

Saturn V, the moon rocket

13 tonnes of fuel per second, as much power as about 85 Hoover Dams.

Spaceflight
300 km/h

The wind turbine blade tip

The rotor turns slowly, yet the blade tip races at around 300 km/h.

Wind power
15 cm

The Eiffel Tower in summer

On hot days the Eiffel Tower is around 15 cm taller than in winter.

Thermal expansion
7 m

How far a wing bends

In the break test, a wide-body jet's wing bends by several metres.

Strength
125 years

Concrete that is still curing

Without cooling pipes, the Hoover Dam would take around 125 years to cool down.

Civil engineering

Which programming language is in which project

The chart shows which programming languages I have used in my projects.

* Languages × projects Toolbox
Tip: tap a language or a project.

All models are simplified and provided without warranty. They are meant to help you understand, not to design real components. Your inputs are not saved.

Contact

Write to me if you have questions about a simulation or the physics behind it.

Arithmetic check Arithmetic task, shown as an image

Your details are processed in order to answer your enquiry. More in the privacy notice.

No Google captcha, no cookies, no disclosure to third parties. Alternatively by e-mail to info@timobritz.de.