Control volume for derivation of conservation equations. From Fluid Mechanics by Streeter and Wylie
Applying Newton's Law to an element of mass in a pipe (mA = F):
Simplifying, recalling that yields
and since the wave speed is typically much higher than the fluid velocity, thus , the total derivative may be approximated as the partial derivative with time.
The change in mass within a control volume must equal the difference between the inflow and the outflow.
Simplifying the above yields
By considering the expansion of the pipe and the compression of the fluid the first two terms may be expressed in terms of pressure as
so that, by back substitution,
Once again the partial derivative may be used to approximate the total derivative.
Revised by Rick Sellens, 96.02.26
http://sellensr.me.queensu.ca/sellens/451/hammer3.htm