Cavity generation by accelerated relative motions between solid walls contacting in liquid