Hydrostatic equilibrium (source code)

= Hydrostatic equilibrium
{wiki}

<Hydrostatic equilibrium> is static balance between <pressure gradients> and a <body force> in a fluid. For upward coordinate $z$ and downward uniform <gravity>,
$$
\frac{dp}{dz}=-\rho g.
$$
The fluid can remain at rest because the higher <pressure> below a small fluid element supplies the upward <force> needed to balance its weight. At constant <mass density>, $p(z)=p(z_0)-\rho g(z-z_0)$.

A connected pair of liquid columns or a <mercury barometer> makes the height-pressure relation measurable. In a compressible atmosphere the <mass density> varies with height, so an <equation of state> and thermal assumptions are needed as well. An <isothermal atmosphere> gives an exponential profile for an <ideal gas>, whereas constant density gives a linear profile. <Hydrostatic equilibrium> is a mechanical condition and does not by itself establish <thermal equilibrium> or stability against <convection>.