The defects unavoidably existing on the optical component will modulate the phase and the amplitude of the beam propagation in the system. Based on the Fresnel diffractiond and split-step Fourier method, the two-dimensional intensity distributions of the Gaussion beam propagation in the nonlinear medium and the free space are simulated. And the intensity distributions of the beam propagation in the medium and the free space are also studied in the case where there exist defects on the front surface of thick medium. It is shown that the thicker the medium and the lager the nonlinear index of refraction, the stronger the beam focus and the closer to the medium surface the focal position is. The defects on the medium surface will lead to a strong beam intensity near the rear surface of the medium. And the intensity generated by the phase modulated defects is stronger than by the amplitude modulated defects.