Side view with waterline, centre of buoyancy B (blue), centre of gravity G (red), metacentre M (green)
GZ Righting Arm Curve (righting lever vs heel angle)

About this simulation

This simulation models the buoyancy and transverse stability of a simplified box-shaped ship hull using Archimedes' principle. The upthrust equals the weight of displaced seawater (F_b = ρ·V·g, with ρ = 1025 kg/m³), so the vessel floats at a waterline where buoyancy balances weight. By adjusting beam, draught, hull height and cargo, you can watch the centre of buoyancy, centre of gravity and metacentre shift and see how the resulting metacentric height GM decides whether the ship rights itself or capsizes.

🔬 What it shows

A side-view hull with its waterline, plus the points B (centre of buoyancy), G (centre of gravity) and M (metacentre). It computes displacement (ρ·V), the metacentric radius BM = I/V where I = L·B³/12, then GM = KM − KG, the roll period T = 2π·k/√(g·GM) with k ≈ 0.35·B, and the righting lever GZ = GM·sin(θ). A second panel plots the GZ righting-arm curve against heel angle.

🎮 How to use

Use the sliders to set beam (8–40 m), draught (2–15 m), hull height and cargo load (0–100%, which raises the centre of gravity). The heel-angle slider (−45° to 45°) tilts the hull to test stability. Preset buttons load realistic vessels — container ship, low-GM tanker, sailing yacht, ferry and pontoon — and the live statistics panel reports displacement, GM, roll period, GZ and a stability verdict.

💡 Did you know?

A very large GM makes a ship "stiff" — it rights itself violently with a short, uncomfortable roll period — while a small positive GM gives a slow, gentle roll but little reserve against capsizing. Naval architects deliberately target a moderate GM to balance safety against passenger and cargo comfort.

Frequently asked questions

What is metacentric height (GM) and why does it matter?

GM is the vertical distance between a ship's centre of gravity (G) and its metacentre (M), calculated here as GM = KM − KG. When GM is positive the metacentre sits above the centre of gravity, so a small tilt creates a righting moment that returns the ship upright. If GM becomes negative the ship is unstable and will capsize, which is why it is the single most important measure of initial stability.

How does the simulation calculate buoyancy and displacement?

It uses Archimedes' principle: the upthrust equals the weight of displaced fluid, F_b = ρ·V·g. The submerged volume V is approximated as a box, beam × draught × length (length fixed at 80 m for display), and displacement is ρ·V with ρ = 1025 kg/m³ for seawater. The ship floats in equilibrium when this buoyant force equals its total weight.

What do the cargo and heel-angle sliders actually change?

The cargo slider raises the centre of gravity: KG = H·(0.45 + cargo·0.25), so heavier or higher loading lifts G and reduces GM, making the ship less stable. The heel-angle slider tilts the hull between −45° and 45° to test how it responds; the righting lever GZ = GM·sin(θ) is shown for that angle and traced across the full GZ curve.

Is this model physically accurate?

It captures the correct relationships — Archimedes' principle, BM = I/V, GM = KM − KG and GZ = GM·sin(θ) — so the trends it shows are realistic. However, it is simplified: the hull is treated as a box of fixed length, the GZ curve uses the small-angle GM·sin(θ) form rather than full cross-curves of stability, and centre-of-gravity height is estimated. It is a teaching tool, not a classification-society design calculation.

Why do tall, heavily loaded ships capsize more easily?

Stacking weight high — such as cargo on deck or a full top-side load — raises the centre of gravity G towards or above the metacentre M, shrinking GM. Once GM falls to zero or below, there is no righting moment and the vessel rolls over. This is why loading rules and ballast are used to keep G low and preserve a safe positive GM.