Abstract : A sedimentary basin is a large porous medium (several hundred kilometers in length and in width and five kilometers in depth) which evolve in the course of time with the sedimentation and compaction effects. During this evolution, hydrocarbons appear and then flow in this basin. We also establish a model which permits to simulate a sedimentary basin evolution (compaction, sedimentation) and the hydrocarbon flows generation, migration and trapping. These phenomena occured during millions of years. Consequently, we mainly study time discretisation of these equations. We exhibit a time local refinement strategy. The main idea of this strategy consists to distinguish the regions where the solution is well computed and those where an improvement of the accuracy is necessary. In the latter, the accuracy is improved by means of a time step refinement and a new computation of all the quantities. Nethertheless, the distinction between good and bad areas constitues a very serious difficulty. We overcome this issue using adequate a posteriori estimators for which we obtain several theorical and numerical results in the case of linear parabolic equations.