Mathematical Modeling of the Self-Purification of Rivers