  We present a dynamical analysis of the flow in the jets of the low-luminosity
radio galaxy 3C 31 based on our earlier geometrical and kinematic model and on
estimates of the external pressure and density distributions from Chandra
observations. We apply conservation of particles, energy and momentum to derive
the variations of pressure and density along the jets and show that there are
self-consistent solutions for deceleration by injection of thermal matter. We
initially take the jets to be in pressure equilibrium with the external medium
at large distances from the nucleus and the momentum flux to be energy flux/c;
we then progressively relax these constraints. We infer that the jets are
over-pressured compared with the external medium where they start to expand
rapidly. Local minima in the density and pressure and maxima in the mass
injection rate and Mach number occur at approximately 3 kpc. Further out, the
jets decelerate smoothly with a Mach number close to 1. The mass injection rate
we infer is comparable with that expected from stellar mass loss at 1 - 2 kpc,
but significantly exceeds it at large distances. We conclude that entrainment
from the galactic atmosphere is the dominant mass input process far from the
nucleus, but that stellar mass loss may also contribute closer in. The
occurrence of a significant over-pressure where expansion begins leads us to
suggest that there is a stationary shock system, perhaps caused by
reconfinement of an initially free jet. Our results are compatible with a jet
consisting of electron-positron plasma on parsec scales which picks up thermal
matter from stellar mass loss to reach the inferred density and mass flux at 1
kpc, but we cannot rule out an electron-proton composition with a low-energy
cut-off. [Abridged]
