Sudden closing and slow closing of a valve

Sudden closing and slow closing of a valve is fundamentally more complicated than slow opening but it is not intractable. We can go a long way towards understanding and predicting the behaviour of the water in the pipe.

 

We have to build a mental picture of this behaviour using physics and then apply it as rigorously as circumstances warrant. So let me build that physics.