In this paper, a nonlinear constitutive law and a curve fitting, two relationships between the stress-strain and the shear stress-strain for sandstone material were used to obtain a second-order polynomial constitutive equation. Based on the established polynomial constitutive equations and Newton's second law, a mathematical model of the non-homogeneous nonlinear wave equation under an external pressure was derived. The external pressure can be assumed as an impulse function to simulate a real earthquake source. A displacement response under nonlinear two-dimensional wave equation was determined by a numerical method and computer-aided software. The results show that a suit pressure in the sandstone generates the phenomenon of stress solitary waves