A comet model. I. The acceleration of Comet Encke