This paper considers a dynamic model for a direct-contact membrane distillation process based on a 2D advection-diffusion equation. Thorough analysis has been carried on the equation including descritization using an unconditionally stable algorithm with the aid of Alternating Direction Implicit method (ADI). Simulations have showed a consistency between the proposed model results and the expected behavior from the experiments. Temperature profile distribution along each membrane side, in addition to flux and flow rate variations are depicted. Distribution of temperature of all the points in feed and permeate containers has been obtained with their evolution with time. The proposed model has been validated with a data set obtained from experimental works. The comparison between the proposed model and experiments showed a matching with an error percentage less than 5%. An optimization technique was employed to find optimum values for some key parameters in the process to get certain amount of mass flux above desired values.