A new linear model of unsteady flow in a real pump (compressor station) – pressure pipeline – valve (pressure regulator) system is constructed. The model is a symmetric t-hyperbolic system that accounts for friction. The boundary conditions are expressed through the slope of the pump characteristic s = dH/dQ and the linearised valve impedance ζ, and they reduce to the dimensionless reflection coefficients R1 = −(1+σ)/(1−σ) and RL = (β−1)/(β+1), where σ = s/Z, β = ζ/Z and Z = a/(gA) is the wave impedance of the pipe. Without friction, the system is shown to be exponentially stable if and only if (σ−β)(σ−β−1) > 0; with friction, the characteristic equation is derived. An upwind difference scheme is proposed in which the diagonal part of the friction term is treated implicitly and the coupling part explicitly. The scheme is solved by explicit sweep formulas without matrix inversion. Its L2-stability and, by means of a weighted discrete analogue of the Lyapunov function, its exponential stability are proved. In numerical experiments, the water hammer caused by partial valve closure agrees with the Joukowsky formula to within 1.5%. Oscillations decay in normal operation, whereas self-excited oscillations arise for a throttled valve on the rising branch of the pump characteristic. The numerical stability boundaries coincide with the theoretical boundaries obtained from the characteristic equation.