The main problem during the fermentation process is competition between microorganisms and provision of favorable conditions for archaea. The elements like magnesium, sodium and calcium play an important role during the anaerobic digestion, due to its capability to maintain normal life activities. Besides magnesium can work like effective catalyst during the fermentation process. Therefore, this work reports the influence of the mentioned elements on methane production. Moreover, mathematical model for biogas production for anaerobic digester was presented, which based on a continuous technology. This high-activity and cost-effective mathematical model could improve biogas production efficiency as a tool support for understanding fermentation process.