Consolidation and wave propagation in a porous medium