Abstract -- Abundances of heavy elements decreases with increasing galactocentric distance almost in all disk galaxies. The observed gradient is d lg Z/d R ~ -0.03 -- -0.1 kpc-1. In this paper we consider possible causes of the formation of the gradient with a model of a disk galaxy. It is shown that in an isolated galaxy the radial gradient of the heavy element abundance exists only during early stages of a galaxy evolution (for a few Gyrs) and later basically disappears. To explain this gradient in young objects and in the interstellar gas one has to assume that a typical disk galaxy is an open system, i.e. it expels some synthesized heavy elements into the circumgalactic space and/or accretes intergalactic gas with zero metallicity, with rates of both processes depending on the galactocentric distance.