Solution (source code)

= Solution

For a fixed fluid domain, consider an incompressible Newtonian <Stokes flow> with prescribed <velocities> on its boundaries and prescribed far-field behaviour. Conservative body <forces>, such as gravity, may be absorbed into the <pressure>. Among all sufficiently regular divergence-free trial <velocity fields> with exactly those boundary <velocities> and far-field behaviour, the Stokes solution minimizes the <viscous dissipation>
$$
\mathcal D[\mathbf u]=2\mu\int_{\mathcal D}e_{ij}(\mathbf u)e_{ij}(\mathbf u)\,dV,
\qquad e_{ij}=\tfrac12(\partial_i u_j+\partial_j u_i).
$$
To see this <Minimum-dissipation theorem for Stokes flow>, write a trial field as $\mathbf v=\mathbf u+\mathbf w$, with $\nabla\cdot\mathbf w=0$ and homogeneous <velocity> boundary data. The <Newtonian fluid stress tensor> satisfies $\nabla\cdot\boldsymbol\sigma=0$, so integration by parts gives
$$
2\mu\int e(\mathbf u):e(\mathbf w)\,dV
=\int\boldsymbol\sigma:\nabla\mathbf w\,dV=0.
$$
Therefore
$$
\boxed{\mathcal D[\mathbf v]-\mathcal D[\mathbf u]
=2\mu\int e(\mathbf w):e(\mathbf w)\,dV\geq0.}
$$
Equality requires the difference to be a <rigid motion>, eliminated by the fixed wall and far-field data. The theorem varies the <velocity field> in one fixed geometry; it does not minimize over particle positions. If a nonconservative body <force> is prescribed, the appropriate variational functional also includes its work, rather than being the dissipation alone.