Interactive simulation of buoyancy, density, and fluid displacement with floating/sinking behavior
Archimedes' principle states that any object wholly or partially immersed in a fluid experiences an upward buoyant force equal to the weight of the fluid displaced. This principle explains why ships float and balloons rise in air.
The buoyant force (F_b) is calculated as F_b = ρ_fluid × V_displaced × g, where ρ_fluid is the fluid density, V_displaced is the volume of fluid displaced, and g is gravitational acceleration (9.81 m/s²). This force always points upward and opposes gravity.
An object floats when its density is less than the fluid density, sinks when it's denser than the fluid, and can remain suspended when densities are equal. When floating, the object displaces just enough fluid so that the buoyant force equals its weight.
Despite being made of dense materials, ships float because their shape displaces enough water to create a buoyant force that equals their weight.
Submarines control their buoyancy by adjusting the amount of water in ballast tanks, allowing them to surface, dive, or maintain depth.
Hot air balloons rise because heated air inside is less dense than the surrounding cold air, creating an upward buoyant force.