loading...
running...
The science
Apparent wind. A moving boat feels a different wind from the true wind. If the true wind of speed Vt comes from an angle γ off the bow and the boat moves forward at v, the air velocity relative to the boat is the vector difference, and its magnitude follows the law of cosines:
Va2 = Vt2 + v2 + 2 Vt v cos γ
As the boat speeds up the apparent wind swings towards the bow and strengthens; that is why fast boats seem to sail "closer" to the wind than the true wind direction suggests. The wind triangle on the 2D page draws exactly this vector relation.
Sail force. The sail is treated as a thin foil. With apparent wind angle β and trim angle δ (boom angle from the centre line) the angle of attack is α = |β| - δ. The model uses
CL = CLmax sin 2α, CD = CD0 + k CL2 + 1.2 sin4α, q = ½ ρ A Va2
Lift L = q CL acts perpendicular to the apparent wind, drag D = q CD along it. The forward component is the drive force Fx, the sideways one Fy heels the boat and is cancelled by the keel (leeway is neglected). With α ≤ 0 the sail is luffing and gives no force.
Speed. The hull resistance is R = c v2 and the equation of motion is 1.15 m dv/dt = Fx(v) - c v2. The steady speed is the stable root of Fx(v) = c v2; the polar diagram is that root with the best trim at every true wind angle. Because Fx vanishes pointing into the wind there is a no-go zone, and a boat cannot sail straight at a mark upwind: it tacks.
VMG and tacking. The speed made good towards the wind is VMG = v cos γ. The best upwind angle maximises it; the laylines are the two lines from the mark at that angle. Sailing the optimum angle on alternate tacks costs only the extra distance (a factor 1/cos of the tack angle against the straight line) but is the fastest legal route. The autopilot picks the heading with the highest VMG towards the mark on the current tack and tacks when the boat leaves a corridor 70 m either side of the course line. Downwind the same logic gives gybes.
Heel. The heeling moment Fy h (sail centre of effort h = 4 m) is balanced by a righting moment m g (0.9 m) sin θ, so sin θ = Fy h / (0.9 m g), capped at 0.8. Heel is shown in 3D but does not reduce the sail force in the model.
Checks (run in the page). (1) apparent wind squared from the components against the law of cosines; (2) drive minus resistance at the bisected steady speed; (3) a 400 s time integration from rest against that root; (4) zero speed straight into the wind and equal speed on both tacks; (5) the best upwind angle from the 3 degree polar scan against a golden-section search.
Simplifications. A flat-plate-like lift curve (the real maximum lift is near 15-20 degrees of attack and the stall is gentler), no leeway or induced drag from the keel, no wave resistance or added mass beyond a 15 % factor, no sail twist or gusts, constant wind speed and direction, instant helm response aside from a 0.55 rad/s turn rate, and no tacking penalty other than the natural loss of speed in the turn. The sea in 3D is a sum of four sine waves for appearance; it does not affect the boat speed. Numbers are those of a 8.2 m sloop with 34 m2 of sail; they illustrate the physics rather than rate a particular design.