Capillary phenomena, heat-and-mass exchange, and wave processes in two-phase flow in porous systems and packings