In this paper, we present a theoretical study of the two phase system of flow, using a set of partial differential equations in a three-dimensional model in order to focus on the basic physical processes that control magma migration in porous media. it is found that under certain conditions (physically justifiable simplifications) a nonlinear dispersive wave equation which describes the flow of an incompressible fluid through a viscous matrix composed of incompressible solid grains may be derived to give the evolution of the porosity and the analytical solutions of the modeled equation, which exhibit a porosity shock and solitary waves. The types of solutions are defined and discussed over a reasonable range of geophysical parameters stemmed from Galeras volcano data in south-western Colombia. The dispersion properties and the relation between group and phase velocities of the model equation are discussed in the one-dimensional case. The diagrams are drawn to illustrate the physical properties of the solutions. (C) 2009 Elsevier Ltd. All rights reserved.