With rapid population growth, economic development, the demand for safe freshwater increased considerably . More than one-third of the world’s population lives in water-stressed countries, this situation is predicted to increase to nearly two-thirds in 2025 . Desalination of brackish water and seawater has been used to produce potable water in many parts of the world, but most water desalination technologies are considered energetic and costly . Traditional desalination processes currently used are reverse osmosis, solar desalination, electrodialysis, thermal desalination, etc. Traditional desalination processes currently used are reverse osmosis, solar desalination, electrodialysis, thermal desalination, etc. Since the high energy requirements of these technologies constitute a major challenge, it is important to develop techniques for the desalination of seawater and brackish water powered by renewable energies .
Bioelectrochemical Systems (BES) are emerging and promising concepts in energy recovery and wastewater treatment, that apply microorganisms to convert chemical energy present in wastewater to electrical energy through various reactions    . BES is studied with different configurations and designs, including microbial fuel cells, microbial electrolysis cells and microbial desalination cells     .
MDC is a recent and potential method of brackish water desalination. This innovative technology can concurrently treat wastewater and generate electrical energy from wastewater without using external electricity .
A typical MDC consists of three chambers, an anode, middle, and a cathode, separated by an Anion Exchange Membrane (AEM, between the anode and the middle chambers) and a Cation Exchange Membrane (CEM, between the cathode and the middle chambers), respectively.
The anode is responsible for electricity production by the degradation of organic matter containing in the wastewater, in the middle chamber the salt remove from saline water. In this process, the anions (Cl−) move across the AEM to the anode chamber and the cations (Na+) migrate across the CEM to the cathode chamber, whereas the cathode completes the electrical circle .
Through mathematical modeling tools, we can better understand the MDC process, analyze it, and demonstrate the feasibility of this technology both for the production of freshwater with low energy consumption and the treatment of wastewater.
The use of mathematical models will provide an analytical description that might convert complex systematic phenomena into simple series of mathematical expressions to describe the effect of every component on the overall output  .
In this study, differential equations are used as main mathematical equations combined biological, physical, chemical, and electrochemical principles to solve specific problems.
A multiplicity of studies has been conducted to study the performance of MDC who is affected by biological, electrochemical and physical aspects (microbial community, configurations, etc.)    and considerable works have been conducted to optimize the above aspects      .
Reduction in energy production due to loss of substrate consumed by methanogens makes methanogenesis a serious limitation in the performance of Microbial Fuel Cells (MFCs) .
Many authors have examined methanogen activity in microbial fuel cells when exposed to various environmental stresses, such as oxygen, low pH, low temperature, and the addition of methanogenesis inhibitors.
Somdipta, B. and Manaswini, B.  observed that Aluminum (Al) due to its antibacterial properties easily affects methanogens (Gram+), which have a thinner cell membrane, therefore, more sensitive to Al and a growth rate slower. Whereas, Gram− exoelectrogens have a thick cell membrane, thus remaining unaffected.
Chae et al.  concluded that a BES (2-bromoethanesulfonate) injection to the anode chamber was the most effective strategy for the selective inhibition of methanogens without damaging exoelectrogens which will increase the production of electricity and decrease the methane production in MFCs. Therefore, the kinetic parameters of electricigenic microorganisms were estimated using this data set by setting the methanogenic growth rate to zero.
2. Description of the Microbial Desalination Cell
As shown in Figure 1, the MDC unit consists of three chambers an anode, middle (water to be desalinated), a cathode, separated by an Anion Exchange Membrane (AEM) next to the anode and a Cation Exchange Membrane (CEM) by the cathode . At the anode chamber, bacteria consume and oxidize organic matters containing in waste water and form an aggregate cell known as biofilm  . This biofilm adheres to the anode surface and initiates the process of bio-catalysis to release protons and electrons .
The electrons produced from cell respiration move from the anode to the cathode through an external circuit that links the two electrodes and create an electrical field that separates salts in saline water .
At the cathode chamber, O2 uses the electrons from the external circuit to undergo reduction and produce pure water. This causes a potential gradient across the anode and cathode chambers. Therefore, to maintain electroneutrality, the anions (Cl−) flow across the AEM from the salt water in the middle chamber in to the anode, while the cations (Na+) migrate to the cathode chamber across the CEM .
Figure 1. Typical scheme of microbial desalination cell .
The equations of the anode and the cathode reactions are given, respectively, by:
3. MDC Modeling and Electrical Current Generation
Mathematical models are used to convert complexly phenomena into simple mathematical expressions and to describe the effect of each component on the overall output  . The major equations are combined with chemical, electrochemical and physical, principles to resolve specific problems.
3.1. MDC Modeling
3.1.1. Mass Balances for Substrate and Microorganisms in the Anode
Differential equations could be used to quantify the concentrations of the substrate and microorganisms (anodophillic and methanogenic) in the anode compartment. These differential equations were based on or modified from the study .
The mass balance for the substrate is shown in Equation (3):
• S: Concentration of the substrate which is the wastewater for this work (mgS∙l−1);
• Sin: Concentration of the influent substrate (mgS∙l−1);
• Ca and Cm: Concentrations of anodophilic and methanogenic microorganisms (mgC∙l−1), respectively;
• ks,a,max and ks,m,max: Maximum substrate consumption rates by anodophilic and methanogenic microorganisms (mgS∙mga−1∙day−1), respectively;
• MOX: Oxidized mediator fraction per anodophillic microorganism (mgM∙mga−1);
• Ka, Km, and KM: The half-saturation concentrations for the anodophillic microorganisms, methanogenic microorganisms, and the redox mediator (mgS∙l−1, mgS∙l−1, and mgM∙mga−1), respectively.
• Danode: The dilution rate (day−1) as defined by the below equation:
• Qin: Influent flow rate of the substrate (l∙day−1);
• Vanode: Volume of the anode compartment (l);
Differential equation for the anodophilic microorganism’s concentration in the anode compartment is shown in Equation (5):
Differential equation for the methanogenic microorganism’s concentration in the anode compartment is shown in Equation (6):
• kd,a and kd,m: Decay rates of the microorganisms (day−1);
• kα,x and km,x: Steepness factors for anodophillic microorganism (l∙mga−1) and methanogenic microorganisms (l∙mgm−1) for the biofilm retention;
• Cα,max and Cm,max: The maximum attainable concentrations for anodophillic and methanogenic microorganisms (mgm∙l−1);
• ka and km: Growth rates of the microorganisms (day−1) calculated by the Equations (7) and (8):
• ka,max and km,max: The maximum microorganism growth rates (day−1).
The intracellular material balance for the oxidized mediator can be shown below:
• Mtotal: Total mediator fraction per microorganisms (mgM∙mga−1);
• Mred: Reduced mediator fraction per microorganisms (mgM∙mga−1);
• YM: Stands for the mediator yield (mgM∙mgS−1);
• γ: Mediator molar mass (mgM∙moleM−1);
• IMDC: Current through the circuit of MDC (A);
• F: Faraday constant = 96,485 A. s. mole-1;
• ne: number of electrons transferred per mole of mediator (molee∙moleM−1).
3.1.2. Mass Balance of Salt
Ordinary differential equations shown below are developed to quantify the salt concentration during the desalination process:
• Csalt,m, Csalt,a and Csalt,c: Concentrations of salt in desalination, anode and cathode compartments (mg∙l−1) respectively;
• Dsalt: dilution rate (day−1) in the salt compartment (the ratio of the salt flow rate (Qsalt) over the volume of the salt compartment (Vsalt));
• d: membrane salt transfer coefficient (is the ratio between the product of diffusion coefficient and membrane surface area and the product of the membrane thickness and the anode volume (day−1)).
3.2. Electrical Current Generation
The MDC current is calculated as:
• OPconc: Overpotentiel concentration (v);
• Rint: Internal resistance of MDC (defined by  );
• Rext: External resistance (Ω);
• Voc: Open circuit Voltage (v).
According to the previous studies  the open circuit potential of the MDC used in the model was equal to 1.2 V.
4. Results and Discussion
The relationship between the current production and methanogenic growth rate is shown in Figure 2.
Table 1. Parameters values used in this study.
Figure 2. The current production vs. time for different methanogenic growth rate values (The influent substrate concentration Sin = 1000 mgS∙l−1).
Table 2. Parameters values used in the mathematical model .
Figure 2 shows that the current production increased with the decreasing of methanogenic growth rates. The result confirms that the maximum electrical production is reached if the growth rate of the methanogenic population is equal to zero (only the electricigenic population exists).
For various values of the influent substrate concentration the simulation result of current generation is shown in Figure 3.
Figure 3 shows that where methanogens have zero growth, the electrical current increases with the increasing of influent substrate concentration. In a period of 30 days the maximum current reached 1.4 A when the influent substrate concentration is more than 1000 mg/l.
The effect of varying salt solution flow rates on the change of the salt concentration in the middle compartment is shown in Figure 4. When the flow rate of saline water decreased, salt removal is more important. The salt concentration decreased significantly from initial 35 g/l to around 7 g/l when the salt solution flow rate is less than or equal to 0.1 l/day.
Figure 5 shows that the salt concentration in the middle compartment decreased with the time for different initial salt concentrations. The final salt concentration responded to the variation of initial salt concentration.
Figure 3. The current production vs. time for different influent substrate concentration values (the methanogenic growth rate km,max = 0).
Figure 4. The salt concentration in the desalination compartment vs. time for different salt solution flow rates.
Figure 5. The salt concentration in the desalination compartment vs. time for different initial salt concentrations (when Qsalt = 0.1 l/day).
The Microbial Desalination Cell (MDC) is an emerging and promising technique or concept for simultaneous wastewater treatment and water desalination. The principle of this technology is to use electricity generated by the bacteria existing in wastewater and create an electrical field that separates salts in saline water. In this study, a mathematical modeling and simulation study of a microbial desalination cell was performed using the MATLAB software program.
The results obtained allowed us to show that the developed program in this study will be a useful tool for the optimization of the operation of this system and to promote the production of electrical energy in order to improve the desalination efficiency by MDC.
The authors address the most sincere thanks to the European Union’s Horizon 2020 research and innovation program (under grant agreement No 685793) for its financial support for the MIDES project.
• MDC: Microbial Desalination Cell
• AEM: Anion Exchange Membrane
• CEM: Cation Exchange Membrane
• Voc: Open circuit Voltage (v)
• OPconc: Overpotentiel concentration (v)
• Rint: Internal resistance of MDC (Ω)
• Rext: External resistance (Ω)
• Csalt,m: Concentrations of salt in desalination compartment (mg∙l−1)
• Csalt,a: Concentrations of salt in anode compartment (mg∙l−1)
• Csalt,c: Concentrations of salt in cathode compartment (mg∙l−1)
• Qsalt: Flow rate of the salt solution in the desalination compartment (l∙day−1)
• Qanode: Flow rate of anolyte in the anode compartment (l∙day−1)
• Vsalt: Volume of the desalination compartment
• Vanode: Volume of the anode compartment
• Vcathode: Volume of the cathode compartment
• Csalt,in: Salt concentration in the salt influent (mg∙l−1)
• Dsalt: Dilution rate in the desalination compartment (day−1)
• Danode: Dilution rate in the anode compartment (day−1)
• d: membrane salt transfer coefficient (day−1)
• S: Concentration of the substrate (waste water in this work) (mgS∙l−1)
• Sin: Concentration of the influent substrate (mgS∙l−1)
• Ca and Cm: Concentrations of anodophilic and methanogenic microorganisms (mgC∙l−1), respectively
• ks,a,max and ks,m,max: Maximum substrate consumption rates by anodophilic and methanogenic microorganisms (mgS∙mga−1∙day−1), respectively
• MOX: Oxidized mediator fraction per anodophillic microorganism (mgM∙mga−1)
• Ka, Km, and KM: The half-saturation concentrations for the anodophillic microorganisms, methanogenic microorganisms, and the redox mediator (mgS∙l−1, mgS∙l−1, and mgM∙mga−1), respectively
• Qin: Influent flow rate of the substrate (l∙day−1)
• kd,a and kd,m: Decay rates of the microorganisms (day−1)
• kα,x and km,x: Steepness factors for anodophillic microorganism (l∙mga−1) and methanogenic microorganisms (l∙mgm−1) for the biofilm retention
• Cα,max and Cm,max: The maximum attainable concentrations for anodophillic and methanogenic microorganisms (mgm∙l−1)
• ka and km: Growth rates of the microorganisms (day−1)
• ka,max and km,max: The maximum microorganism growth rates (day−1)
• Mtotal: Total mediator fraction per microorganisms (mgM∙mga−1)
• Mred: Reduced mediator fraction per microorganisms (mgM∙mga−1)
• YM: Stands for the mediator yield (mgM∙mgS−1)
• γ: Mediator molar mass (mgM∙moleM−1)
• IMDC: Current through the circuit of MDC (A)
• F: Faraday constant (A∙day∙mole−1)
• ne: number of electrons transferred per mole of mediator (molee∙moleM−1)
 Carmalin, S.A., Bhalambaal, V.M., Lima, E.C. and Thirunavoukkarasu, M. (2016) Microbial Desalination Cell Technology: Contribution to Sustainable Waste Water Treatment Process, Current Status and Future Applications. Journal of Environmental Chemical Engineering, 4, 3468-3478.
 Li, W., Yu, H. and He, Z. (2013) Towards Sustainable Wastewater Treatment by Using Microbial Fuel Cells-Centered Technologies. Energy & Environmental Science, 7, 911-924.
 Pant, D., Singh, A., Van Bogaert, G., Olsen, S.I., Nigam, P.S., Diels, L. and Vanbroek-hoven, K. (2012) Bioelectrochemical Systems (BES) for Sustainable Energy Production and Product Recovery from Organic Wastes and Industrial Wastewaters. RSC Advances, 2, 1248-1263.
 Wang, H., Luo, H., Fallgren, P.H., Jin, S. and Ren, Z.J. (2015) Bioelectrochemical System Platform for Sustainable Environmental Remediation and Energy Generation. Biotechnology Advances, 33, 317-334.
 Mohanakrishna, G., Srikanth, S. and Pant, D. (2015) Bioelectrochemical Systems (BES) for Microbial Electroremediation: An Advanced Wastewater Treatment Technology. In: Applied Environmental Biotechnology: Present Scenario and Future Trends, Springer, New Delhi, 145-167.
 Logan, B.E., Hamelers, B., Rozendal, R., Schröder, U., Keller, J., Freguia, S., Aelterman, P., Verstraete, W. and Rabaey, K. (2006) Microbial Fuel Cells: Methodology and Technology. Environmental Science & Technology, 40, 5181-5192.
 Oon, Y.L., Ong, S.A., Ho, L.N., Wong, Y.S., Dahalan, F.A., Oon, Y., Lehl, H.K. and Thung, W.E. (2016) Synergistic Effect of Up-Flow Constructed Wetland and Microbial Fuel Cell for Simultaneous Wastewater Treatment and Energy Recovery. Bioresource Technology, 203, 190-197.
 Saeed, H.M., Husseini, G.A., Youssef, Sh., Saif, J., Al-Asheh, S., Abu, A., Fara, S., Azzam, R. and Khawaga, A. (2015) Aidan, Microbial Desalination Cell Technology: A Review and a Case Study. Desalination, 359, 1-13.
 Ortiz-Martínez, V.M., Salar-García, M.J., De Los Ríos, A.P., Hernández-Fernández, F.J., Egea, J.A. and Lozano, L.J. (2015) Developments in Microbial Fuel Cell Modeling. Chemical Engineering Journal, 271, 50-60.
 Zhi, W., Ge, Z., He, Z. and Zhang, H. (2014) Methods for Understanding Microbial Community Structures and Functions in Microbial Fuel Cells: A Review. Bioresource Technology, 171, 461-468.
 Song, H.-L., Zhu, Y. and Li, J. (2015) Electron Transfer Mechanisms, Characteristics and Applications of Biological Cathode Microbial Fuel Cells. A Mini Review. Arabian Journal of Chemistry, 7, 7 p.
 He, Z., Kan, J., Mansfeld, F., Angenent, L.T. and Nealson, K.H. (2009) Self-Sustained Phototrophic Microbial Fuel Cells Based on the Synergistic Cooperation between Photosynthetic Microorganisms and Heterotrophic Bacteria. Environmental Science & Technology, 43, 1648-1654.
 Pendyala, B., Chaganti, S.R., Lalman, J.A. and Heath, D.D. (2016) Optimizing the Performance of Microbial Fuel Cells Fed a Combination of Different Synthetic Organic Fractions in Municipal Solid Waste. Waste Management, 49, 73-82.
 Chae, K.-J., Choi, M.-J., Kim, K.-Y., Ajayi, F.F., Woosin, P., Kim, C.-W. and Kim, D.S. (2010) Methanogenesis Control by Employing Various Environmental Stress Conditions in Two-Chambered Microbial Fuel Cells. Bioresource Technology, 101, 5350-5357.
 Sevda, S., Yuan, H., He, Z. and Abu-Reesh, I.M. (2015) Microbial Desalination Cells as a Versatile Technology: Functions, Optimisation and Prospective. Desalination, 371, 9-17.
 Kim, H.B. (2006) Microbial Fuel Cell-Type Biochemical Oxygen Demand Sensor. In: Grimes, C.A., Dickey, E.C. and Pishko, M.V., Eds., Encyclopedia of Sensors, Volume 10, American Scientific Publishers, Stevenson Ranch, 1-12.
 Luo, H., Jenkins, P.E. and Ren, Z. (2011) Concurrent Desalination and Hydrogen Generation Using Microbial Electrolysis and Desalination Cells. Environmental Science & Technology, 45, 340-344.
 Ping, Q., Cohen, B., Dosoretz, C. and He, Z. (2013) Long-Term Investigation of Fouling of Cation and Anion Exchange Membranes in Microbial Desalination Cells. Desalination, 325, 48-55.
 Ping, Q., Zhang, C.Y., Chen, X.E., Zhang, B., Huang, Z.Y. and He, Z. (2014) Mathematical Model of Dynamic Behavior of Microbial Desalination Cells for Simultaneous Waste Water Treatment and Water Desalination. Environmental Science & Technology, 48, 13010-13019.
 Pinto, R.P., Srinivasan, B., Manuel, M.F. and Tartakovsky, B. (2010) A Two-Population Bioelectrochemical Model of a Microbial Fuel Cell. Bioresource Technology, 101, 5256-5265.