The continuity equation (Av = constant) is derived from the conservation of mass for an incompressible fluid in steady flow. Gravity affects the speed of the fluid, which in turn affects the cross-sectional area to maintain constant volume flow rate.