Introduction

Sustainability is now a global priority for every community, which has led researchers to consider using wastewater treatment plants as water resource recovery facilities (Safwat et al. 2019c). Efforts have been made not only to reduce the energy required to treat industrial wastewater, but also to generate energy from wastewater that can be used to operate treatment plants. Theoretically, about 2 kWh can be obtained from treating 1 m3 of domestic wastewater (Kim and Logan 2013). Phenol is a pollutant which attracts great interest. Phenol is one of the organic compounds found in several types of industrial wastewater and can cause significant environmental damage (Safwat et al. 2019c, a). Industries that generate phenol in wastewater effluent include oil refineries, pesticide manufacturing, petrochemicals, coke manufacturing, and others (Pradhan et al. 2015; Elawwad et al. 2016). Because phenol can harm living organisms even at low concentrations, it is considered a priority pollutant (Safwat et al. 2019a; Khan et al. 2020). It can be toxic at a concentration of 10 mg/L (Villegas et al. 2016; Safwat et al. 2019b). Severe health problems can be caused by exposure to phenol at elevated concentrations. These health problems include diarrhea, anorexia, irregular breathing, coma, muscle weakness, irritation of the eyes and skin, and problems with the kidneys, liver, and central nervous systems (Villegas et al. 2016; Safwat et al. 2019a). For these reasons, international regulatory agencies have set maximum contamination levels for phenol in surface water. The Environmental Protection Agency (EPA), for instance, states that phenol concentration should not exceed 1 ppb in surface water (Villegas et al. 2016). Moreover, the efficiency of wastewater treatment by biological means can be adversely affected when the phenol concentration exceeds 400 mg/L (Pradhan et al. 2015). Several methods have been used to degrade and biodegrade phenol. These methods include chemical oxidation, adsorption, ion exchange, Fenton reaction, electrochemical oxidation, and membrane processes (Pradhan et al. 2015; Safwat et al. 2019b). However, these methods can be costly, inefficient, or have the potential to produce toxic by-products (Pradhan et al. 2015). Because the presence of phenol can cause health and environmental problems and affect the efficiency of biological treatment processes, it is essential to develop a suitable treatment method to reduce the concentration of phenol in wastewater and overcome the disadvantages of other treatment methods (Trujillo–Reyes et al. 2019; Safwat and Matta 2021).

In addition, desalination of brackish and saline water is crucial for both drinking purposes and for some specific industrial uses. Desalination is the process of reducing the concentration of minerals in brackish and saline water to acceptable levels. Reverse osmosis is one of the popular desalination technologies, but is a very expensive technique. The amount of energy consumed for the desalination of 1 m3 of water using conventional technologies can reach 6 kWh (Ragab et al. 2019a). Most desalination plants perform their work in multiple stages, and these stages are based on the use of fossil fuels that increase greenhouse gas emissions (Zahid et al. 2022a). It is therefore crucial to focus on other technologies that can achieve the same results while minimizing the high operating cost of conventional technologies (Elawwad and Hazem 2017; Safwat et al. 2019c).

Bioelectrochemical systems, such as microbial fuel cells and microbial desalination cells, are gaining a wide interest in wastewater treatment (Yang et al. 2016; Wilberforce et al. 2021; Topcu and Taşkan 2021). Microbial desalination cells (MDCs) are a promising potential solution for desalination and wastewater treatment alongside power generation (Elawwad et al. 2020; Liaquat et al. 2021). The main objective of developing MDCs was to find a way to treat wastewater in order to produce electricity and simultaneously accomplish efficient water desalination (Santoro et al. 2017). Like microbial fuel cells, MDCs have the ability to generate fuel or electricity from wastewater treatment (Ahmed et al. 2015, 2016). Moreover, MDCs can be used for desalination and/or resource recovery (Salehmin et al. 2021). The system was proposed in 2009 for simultaneous power generation in conjunction with desalination and wastewater treatment (Cao et al. 2009). It consists of three chambers: an anode chamber, which contains the anode and the wastewater to be treated; a cathode chamber, which contains the cathode and the electron acceptors; and a middle chamber, which contains salt water (Cao et al. 2009). The three chambers’ contents are separated using an anion exchange membrane (AEM) and a cation exchange membrane (CEM). The anode and cathode are connected externally through a wire to close the circuit. The working mechanisms of an MDC are as follows: (a) microorganisms in the anode chamber biodegrade wastewater, and a half reaction occurs producing electrons and protons; (b) electrons transfer to the cathode chamber through the external wire and an electric current is produced; (c) the electrons consume protons at the cathode chamber to form the other half of the reaction; and (d) the protons generated in the anode chamber are balanced with the negative ions that migrate from the middle chamber through the AEM, while the positive ions compensating for the protons consumed at the cathode chamber migrate from the middle chamber through the CEM, and as a result, desalination occurs. The production of energy associated with MDCs can significantly reduce the operating costs of desalination and wastewater treatment. MDCs show a great deal of promise as a desalination technique.

MDCs have been examined as a pretreatment method for the reverse osmosis system (Mehanna et al. 2010). The results showed that when an air cathode MDC was operated using acetate solution, the maximum removal efficiency for the conductivity of saltwater reached 68%, with a power density production of 480 mW/m2 (Mehanna et al. 2010). Another study was conducted using upflow MDCs for desalination and power generation with a hydraulic retention time of 4 days (Jacobson et al. 2011). The elimination efficiency of sodium chloride from the salt solution exceeded 99%, when the initial concentration of total dissolved solids was 30,000 mg/L. Moreover, current production was 62 mA (Jacobson et al. 2011). MDCs also showed promising results in the removal of pollutants from wastewater alongside desalination. A study by An et al. (2014) showed that copper can be removed from synthetic wastewater using MDCs: removal efficiencies for salt and copper were around 44% and 94%, respectively (An et al. 2014). The maximum current density reached 2 A/m2 (An et al. 2014). Another study investigated the ability of MDCs to treat diluted industrial wastewater with a chemical oxygen demand (COD) of approximately 8700 mg/L (Zuo et al. 2017). The removal efficiency of COD reached 98%, and the removal efficiency of conductivity reached 32%. The maximum power density obtained in this study was 566 mW/m2 (Zuo et al. 2017). A 2018 study showed that MDCs can be used to remove both lead and chromium from industrial wastewater (Gholizadeh et al. 2018). The removal efficiency of lead and the power generation associated with this removal were 98% and 568 mW/cm2, respectively, while the removal efficiency of chromium and associated power generation associated with this removal were 99% and 812 mW/cm2, respectively (Gholizadeh et al. 2018). A previous study, conducted in our laboratory by Ragab et al. (2019a, b), examined the ability of an MDC to treat synthetic wastewater with different substrate strengths (Ragab et al. 2019b). The results showed that the COD removal efficiencies reached 90%, 92%, and 53% when the initial COD values were 500, 1500, and 3000 mg/L, respectively (Ragab et al. 2019b). One study investigated the removal of phenol, in the presence of glucose, in a multi-chamber MDC using pure cultures of microorganisms; efficiency of phenol removal and power generation were 90% and 27.5 mW/m2, respectively (Pradhan et al. 2015). However, this study investigated the usage of five chamber MDCs, and it investigated neither the effect of phenol as a sole substrate nor the effect of other operating parameters such as pH and temperature.

Although several configurations have been proposed for MDCs, the three-chamber MDC still receives a great attention due to its simplicity compared to other configurations (Santoro et al. 2017). This is an important factor that facilitates the process of scaling up the system in the future. Moreover, using anaerobic sludge obtained from wastewater treatment plants is more economically feasible than using pure cultures. In addition, power generation can be improved by adjusting operating conditions (Du et al. 2007). Therefore, understanding the performance of the cells under various operating conditions is essential for the development process. To the best of our knowledge, the performance of three-chamber MDCs inoculated with anaerobic sludge from wastewater treatment plants for desalination and phenol biodegradation as a sole substrate has not yet been reported. Thus, the aim of this study is to investigate the performance of three-chamber MDCs on phenol removal under various operating conditions. These conditions include the effect of co-substrate existence with phenol, various temperatures, various pH values, and various salt concentrations. To further elucidate the impact of pH on removal rates, a principal component analysis (PCA) was performed. The present study is the first to investigate these key parameters of the performance of three-chamber MDCs in eliminating phenol along with the anaerobic sludge inoculum from wastewater treatment plant. The findings of this study are expected to be useful for the development and future application of MDCs in the actual treatment of wastewater to reduce phenol and simultaneously remove salts, to promote the reuse of industrial wastewater in addition to the harvesting of energy.

Materials and methods

Characteristics of solutions of the three chambers

The most common electron donor used as the startup of MDCs is derived from acetate (Rahman et al. 2021a; Zahid et al. 2022a). Thus, acetate was used during the startup period. The synthetic wastewater used in the anode chamber was prepared as follows: sodium acetate trihydrate 3.19 g (added in the startup period for all cells); NaCl, 0.15 g; CaCl2, 0.015 g; MgSO4, 0.02 g; NH4Cl, 0.22 g; KH2PO4, 0.55 g; K2HPO4, 1.10 g. The phenol concentration gradually changed to 250 mg/L to reach the desired condition. Phenol crystals (LobaChemie, India) were dissolved in the synthetic wastewater to obtain the desired concentration. Anaerobic sludge from a wastewater treatment plant (WWTP) located in Cairo, Egypt, was used for the inoculation of the anode chamber. The cathode chamber was fed with phosphate buffer solution (50 mM as phosphate with pH = 7.0). The desalination chamber was fed with synthetic saline water using NaCl solution. The cathode chamber contained a phosphate buffer solution.

Setup and operation of MDC

Three-chamber MDCs were used, as shown in Fig. 1. The cells were cuboid shaped, and each cell had a width and a height of 6 cm and 7 cm, respectively. Previous studies have shown that a high ratio between the volume of the anode chamber and that of the middle chamber is recommended to achieve high desalination rates (Rahman et al. 2021a). The lengths of the anode chamber, the cathode chamber, and the middle chamber were 4 cm, 3 cm, and 2.5 cm, respectively. The relationship between the electrodes and the microbes depends mainly on the cohesion of biofilms formed on the electrodes in the anode chamber and the way in which these microbes are connected to them (Zahid et al. 2022a). Furthermore, the slow redox reaction of carbon materials causes disadvantages. Platinum (Pt) acts as a catalyst to reduce the activation potential of oxygen as a solution to this problem (Zahid et al. 2022a). Therefore, plain carbon cloth (5 cm*6 cm) was used as the anode electrode due to its low cost and high stability, while a carbon cloth covered with 0.5 mg/cm2 20% Pt (5 cm*5 cm) was used as the cathode electrode (Fuel Cell Earth, USA) (Salehmin et al. 2021). Titanium wire was used to connect the two electrodes externally, and a resistor board was used to change the value of the external resistance to obtain polarization curves (Safwat 2019). Anion exchange membranes (AEM) and cation exchange membranes (CEM) were used to separate the three chambers (Membranes International, USA). Before operating the MDC, the electrodes were left in distilled water for about 2 h, while the membranes were immersed in a 5% NaCl solution for 24 h, as recommended by the manufacturer. The MDCs were operated in batch mode. Two MDCs (C1 and C2) were used. The cycle of each run was 48 h. The solution in the three chambers was replaced after each batch cycle.

Fig. 1
figure 1

a A schematic diagram of the MDC. Anion exchange membranes and cation exchange membranes are abbreviated as AEM and CEM, respectively

The experimental work was conducted in several stages. First, the two cells were operated, under identical conditions, with synthetic wastewater containing acetate to enhance the formation of a biofilm until they reached a stable voltage. This stage lasted for 1 month. Phenol was then gradually introduced to the two cells until a concentration of 250 mg/L was reached, while acetate was removed gradually from one of the cells. At this stage, the two cells were operated for six cycles. After the end of this stage, C1 was operated with synthetic wastewater with an average COD = 2000 mg/L in the presence of phenol and acetate in the anode chamber, while C2 was operated with synthetic wastewater with an average COD = 500 mg/L in the presence of phenol only in the anode chamber. This was done to evaluate the performance of MDCs in the presence and absence of co-substrate with phenol. The operating conditions of the two cells in these stages were as follows: temperature = 30 ± 1 °C, pH = 7 ± 0.1, salt concentration = 10,000 ppm, and external resistance = 1000 Ω. The performance of the two cells was then monitored and evaluated under additional operating conditions. These conditions included various temperatures (18 °C, and 37 °C), various pH values (6 and 8), and various salt concentrations (2000 ppm, 5000 ppm, 20,000 ppm, and 30,000 ppm).

Analysis of samples

Phenol concentrations were measured using HPLC (YL9100). COD was obtained using a UV–Vis spectrophotometer (DR4000, Hach, Germany). A salinity sensor (SAL-BTA) was used to measure salt concentrations. A pH meter was used to measure pH values and temperatures. Voltage was recorded every 1 min using a data acquisition system (SensorDAQ, Vernier, USA). Current density values were obtained by dividing the values of voltage by the values of external resistances. Variation of the external resistances ranging from 10 to 10,000 Ω was performed to obtain the polarization curves. Current density and power density were normalized to the surface area of the anode electrode. Substrate removal efficiencies, desalination efficiencies, and Coulombic efficiencies (CEs) were obtained, as described elsewhere (Ragab et al. 2019a; Koomson et al. 2022). To evaluate the relationship and variation between pH treatments, and to check the clusters and differences between them, a PCA and a cluster analysis were conducted using Minitab (Safwat et al. 2022). The average values of duplicate cells were reported. Scanning electron microscope (SEM) images were obtained to show the morphology of the anode electrodes. The P value < 0.05 is considered statistically significant. Measurements were conducted according to the standard methods (Rice et al. 2017).

Results and discussion

Response of MDC to co-substrate existence

The effect of the presence and absence of co-substrate with phenol on the performance of two cells (C1 and C2) was examined. During four cycles, voltage generation, COD removal efficiencies, phenol removal efficiencies, and desalination efficiencies were monitored. The evaluation of the system’s performance in terms of substrate removal, desalination efficiencies, and electricity production relied mainly on the formation of anode biofilm (Rahman et al. 2021a). Thus, SEM images for the anode electrodes in each cell were obtained, as shown in Fig. 2. The SEM images indicate the successful formation of a biofilm after the end of the four cycles, confirming the presence of the microorganisms responsible for the biodegradation of the substrate. The successful development of biofilms is essential to the optimal performance of MDCs (Imoro et al. 2021).

Fig. 2
figure 2

SEM Images of the anode electrodes at 1000X: a before treatment, b after treatment for C1, and c after treatment for C2

The voltage was continuously recorded, as shown in Fig. 3. The maximum voltage values obtained by C1 and C2 were 457 mV and 108 mV, respectively. The maximum voltage obtained from C2 was less than that obtained from C1. This can be attributed to the ability of electrogenic microorganisms to biodegrade acetate more easily than phenol: C2 contained a sole substrate that was less easily biodegradable than the substrate of C1, which contained acetate and phenol. This finding is consistent with what has been reported in a previous study of microbial fuel cells. Hao Wu et al. (2018) reported that using phenol as the sole substrate decreases the voltage output and that the existence of a co-substrate improves the cells’ ability to rapidly reach the maximum value of voltage (Wu et al. 2018). Polarization curves were generated at the end of this phase to illustrate the extent to which losses were related to the drop in voltage (Du et al. 2007). As illustrated in Fig. 4, the results show that the maximum power densities were 52.9 mW/m2 and 9.8 mW/m2 for C1 and C2, respectively. These values correspond to voltage values of 400 and 544 mV, respectively. The results show that the presence of a co-substrate improved power density. This could be related to the increase in the internal resistance caused by the absence of a co-substrate. Low internal resistance during MDC operation effectively minimizes electrochemical losses (Rahman et al. 2022).

Fig. 3
figure 3

Effect of presence and absence of co-substrate on voltage generation: a C1 and b C2

Fig. 4
figure 4

Effect of presence and absence of co-substrate: a power generation and b polarization curves

Figure 5a shows the differences in COD removal efficiency between the two cases. Average COD removal efficiencies were 61% and 38% for C1 and C2, respectively. The variation between the two cases can be explained in two ways: First, the existence of acetate in C1 facilitated the biodegradation process, as it can be biodegraded more easily than phenol; second, the influent COD value in C1 was higher than the influent COD value in C2. This variation in influent substrate concentration had a direct effect on overall removal efficiency. Ragab et al. (2019a, b) reported that substrate abundance affected the removal rate, as low substrate abundance decreases the removal rate and vice versa (Ragab et al. 2019b). Furthermore, the existence of phenol led to a decrease in the COD removal rate due to phenol toxicity, which can inhibit bacterial activity (Pradhan et al. 2015). CEs of 3.2% and 2.8% were calculated for C1 and C2, respectively (Fig. 5b). Observation of lower CEs with higher COD removal efficiencies implies that the electrogenic microorganisms were not the predominant type in the MDC system. Since the system contained a mixed culture of microorganisms, the predominant microbial community is presumed to be the microorganisms that obtain the most energy for growth. These results indicate that combinations between different factors affect CE. These factors include the electron source, the activity of the anode, and the low conductivity of wastewater (Ping et al. 2015).

Fig. 5
figure 5

Effect of presence and absence of co-substrate: a COD removal efficiencies, b Coulombic efficiencies, c Phenol removal efficiencies, and d salt removal efficiencies

The average phenol removal efficiencies for C1 and C2 were 38% and 35%, respectively, as shown in Fig. 5c. These results show that C1 and C2 had quite similar phenol removal efficiencies. This shows that the cells’ ability to remove phenol does not depend on the presence of a co-substrate. The low phenol removal efficiencies may have been due to the presence of methanogens and fermentative bacteria rather than phenol-degrading bacteria in the system (Pradhan et al. 2015). Haiping Luo et al. (2009) concluded that MFCs can degrade phenol as a sole substrate or in a mixture with other compounds (Luo et al. 2009). This can also be attributed to several microbial reactions that can occur in MDC and lead to the removal of organics or phenol in the anode chamber (Rabiee et al. 2022). The possibility of the oxidation of organic matters in the anode chamber can be an acceptable hypothesis for organics reduction through the electrons produced by exoelectrogenic bacteria, in accordance with Eq. (1) (Scott and Yu 2015):

$${\text{C}}_{{6}} {\text{H}}_{{{12}}} {\text{O}}_{{6}} + {\text{6H}}_{{2}} {\text{O }} \to {\text{ 6CO}}_{{2}} + {\text{24H}}^{ + } + {\text{24e}}^{ - }$$
(1)

The typical oxygen reduction reaction concurrently occurs in the MDCs cathode chamber in accordance with Eq. (2). The electron acceptors are involved in the reaction with the electron donor (i.e., phenol as an organic carbon) and the phenol-degrading microorganisms are responsible for the phenol degradation of in the MDCs in accordance with Eq. (3).

$${\text{O}}_{{2}} + {\text{2H}}_{{2}} {\text{O}} + {\text{ 4e}}^{ - } \to {\text{ 4OH}}^{ - }$$
(2)
$${\text{Organic Matter }} + {\text{O}}_{{2}} + {\text{OH}}^{ - } \to {\text{ CO}}_{{3}}^{{{2} - }} + {\text{H}}_{{2}} {\text{O}}$$
(3)

Desalination efficiencies are illustrated in Fig. 5d. The desalination efficiencies were 13.7% and 7.8% for C1 and C2, respectively. Desalination efficiency is a function of voltage: As the voltage increases, desalination efficiency increases as well (Pradhan et al. 2015). The results for desalination efficiency are consistent with the low CE values obtained during this stage.

Impact of temperature on MDC response

Temperature is one of the crucial factors that significantly impacts the formation of the main multiple species in the microorganism community (Gujjala et al. 2022a). Therefore, the two cells were operated at two different temperatures (30 and 37 °C) to evaluate the performance of MDCs in terms of temperature.

Several cycles were performed until the microorganisms were acclimated to the new temperature conditions, while the values obtained from the last cycle are the reported in temperature in our study. The voltage was continuously recorded, and the voltage values for each temperature are shown in Fig. 6. The maximum voltage values obtained were 341 mV for C1 and 38 mV for C2 at temperature  = 18 °C, while the values at temperature  = 37 °C were 391 mV for C1 and 97 mV for C2. The voltage decreased as the temperature decreased. The voltage generated in C1 slightly increased with increasing temperature, while there was a significant increase in the voltage generated in C2 with increasing temperature. The decrease in voltage generation with the decrease in temperature may be due to the kinetics of metabolic reactions. As the temperature decreases, the rates of biochemical reactions also decrease. A previous study on microbial fuel cells emphasized the same notion in which the voltage values generated at temperatures below 20 °C were relatively low compared to those generated at temperatures above 20 °C (Larrosa-guerrero et al. 2010). Polarization curves were calculated at the end of this stage. The results show that maximum power densities reached 41 and 2.5 mW/m2 at 18 °C, while these values were 60.6 and 8.8 mW/m2 at 37 °C for C1 and C2, respectively. This variation may be due to the conductivity of the anolyte, which increased with the increase in temperatures (Ragab et al. 2019a). This, in turn, decreased the cell’s internal resistance, which is the key parameter in power production.

Fig. 6
figure 6

Voltage data over time: a C1 at T = 18 °C, b C2 at T = 18 °C, c C1 at T = 37 °C, and d C2 at T = 37 °C

Figure 7 shows the response of MDC to various temperatures with respect to COD, phenol, and salt removal efficiencies. COD removal efficiencies were 33% and 16% at 18 °C for C1 and C2, respectively. At 37 °C, COD removal efficiencies were 80% and 41% for C1 and C2, respectively. The results show that the COD removal efficiencies for the two cells decreased with the decrease in temperature. CEs for C1 and C2 are also given in Fig. 7 and were 5.1% and 5.3% at 18 °C and 2.3% and 3.2% at 37 °C, for C1 and C2, respectively. CEs increased with the decrease in temperature. Temperatures between 30 and 37 °C are in the optimal temperature range for the growth of electrogenic microorganisms and methanogens, resulting in better COD removal efficiencies. In comparison, temperatures below 20 °C can inhibit the activity of methanogens and subsequently affect COD removal efficiencies (Ragab et al. 2019a). Since the rates of growth of electrogenic microorganisms and methanogens are different, high temperature can increase the rate of methanogen growth, leading to substrate consumption through these microorganisms, which have a different metabolic pathway from electrogenic microorganisms. The decrease in CE values may be due to the higher rate of substrate consumption by methanogens compared with electrogens (Ragab et al. 2019a).

Fig. 7
figure 7

Response of MDC to various temperatures with respect to removal efficiencies and coulombic efficiencies

Phenol removal efficiencies are shown in Fig. 7. Phenol removal efficiencies were 26% and 23, for C1 and C2, respectively, at 18 °C. At 37 °C, phenol removal efficiencies were 74% and 52%, for C1 and C2, respectively. These results show that the phenol removal efficiencies of the two cells decreased with the decrease in temperature. This is consistent with previous work conducted by Levén et al. 2012, which reported a positive increase trend in phenol degradation in anaerobic conditions with temperature increase [38]. With the same concept, the desalination efficiencies were 13% and 10.2%, for C1 and C2, respectively, at 18 °C and 17.7% and 11.8% for C1 and C2, respectively, at 37 °C (as shown in Fig. 7). The increase in desalination efficiencies with temperature may be due to the increase in the conductivity of the electrolytes, which in turn decreases internal resistance (Ragab et al. 2019a).

Response of MDC to various pH values

The pH value has a significant effect on all chemical and biochemical reactions. In order to evaluate the relationship between this parameter and the performance of MDCs, the two cells were operated under two initial pH values (6 and 8). Several cycles were performed until the microorganisms acclimated to the new pH conditions, and the values obtained from the last cycle are reported in this study. Figure 8 shows the variations in the voltage with time and the cycles under different pH conditions. For C1, the maximum voltage obtained at anode pH 8 was relatively high compared to that obtained at pH 6 (410 mV vs. 272 mV). However, switching to C2, the maximum voltages at pH 8 and 6 were quite similar and comparable (69 mV vs. 71 mV). These results suggest that pH plays an important role in MDC voltage. It is worth noting that the increase in one unit pH could lead to a decline in cell voltage by 59 mV (Kim and Logan 2013). This is evidenced by the behavior of C1 in which the voltage decreased with the decrease in pH in C1, while the increase in pH improved performance (in terms of voltage) in C2. The same trend was observed and confirmed by the increased maximum power densities at pH 8 in comparison with pH 6 for C1 and C2, respectively, and the maximum power densities were 58.4 and 8.5 mW/m2 at anode pH 8 versus 24.6 and 2 mW/m2 at anode pH 6.

Fig. 8
figure 8

Voltage data over time: a C1 at pH = 6, b C2 at pH = 6, c C1 at pH = 8, and d C2 at pH = 8

Figure 9 shows the response of MDC to various pH with respect to COD, phenol, and salt removal efficiencies. COD removal efficiencies were 49% and 28%, at anode anolyte pH 6, for C1 and C2, respectively. At an anode anolyte pH of 8, COD removal efficiencies were 56% and 36% for C1 and C2, respectively. The observed trend was that COD removal efficiencies for the two cells decreased with the decrease in the pH of the anode anolyte. Such variation in COD removal efficiencies may be due to a change in the mixed culture of microorganisms present in the cells as a result of the variation in pH values. To gain a better understanding, CEs for C1 and C2 were calculated and are shown in Fig. 9. These were 2.4% and 1.3% at an anode anolyte pH value of 6, while the values increased to 3.7% and 4.3% at an anode anolyte pH of 8 for C1 and C2, respectively. Coulombic efficiencies decreased with the decrease in the pH of the anode anolyte. This indicates that electrogenic microorganisms were active at high pH values, and this result is consistent with previous studies (Safwat et al. 2019c).

Fig. 9
figure 9

Response of MDC to various pH with respect to removal efficiencies and coulombic efficiencies

Phenol removal efficiencies were 48% and 35% for C1 and C2, respectively, at an anode anolyte pH of 6. For an anode anolyte pH of 8, phenol removal efficiencies were 37% and 39% for C1 and C2, respectively. These results show that phenol removal efficiencies for C1 and C2 increased with the decrease in the pH of the anode anolyte. This may be related to the nature of phenol-degrading microorganisms, which can survive at a wider range of pH values than other heterotrophic microorganisms (Liu et al. 2016).

Desalination efficiencies were 15.9% and 11.5% for C1 and C2, respectively, at an anode anolyte pH value of 6. At an anode anolyte pH value of 8, desalination efficiencies were 19.6% and 17.1% for C1 and C2, respectively. The desalination efficiency of C1 exhibited a small response to the change in the pH of the anode anolyte. The desalination efficiency of C2 increased with the increase in the pH of the anode anolyte. An increase in the proton concentrations in the anodic chamber causes pH imbalances in the MDC during operation, leading to adverse effects on the efficiency of desalination (Gujjala et al. 2022b). This may be the reason why the desalination efficiencies of C1 and C2 improved with increasing anode anolyte pH.

A PCA was performed to further elucidate the impact of pH on removal rates for COD and phenol (“Response of MDC to co-substrate existence” and “Response of MDC to various PH values” section) (Fig. 10). The respective contribution to the total variance in the PCA of the samples was manifested by variation percentages of 97.3% and 2.1%. The maximum variations contributed to 97.3% of the total variance and were observed in the PC1 direction, strengthening the broad separation of conditions in this direction. High pH values of 7 or 8 were grouped together in the top quadrants. On the other hand, the desalination condition of pH 6 was grouped in the bottom quadrant. The results for C1 and C2 were slightly clustered. COD removal in both cycles demonstrated a better association with high pH range loading vectors (i.e., pH values of 7 and 8): COD removal was positively altered toward the top quadrant. In comparison with COD removal, for both salt removal and Columbic efficiency distinct samples were strongly associated and directed to the opposite left corner close to the origin. The PCA generally emphasized the increase in COD removal at pH values of 7 and 8 after increasing pH in both cycles from pH 6. This is consistent with the positive scores of these conditions on PC1 and their relative positions in the same cluster, and what was stated earlier with regard to the trend of COD removal increasing with pH.

Fig. 10
figure 10

a Score plot for PCA analysis of samples, PC 1 (97.3%) and PC 2 (2.1%), b biplot with project lines of samples, and c loading plot where sample loadings are represented as vectors radiating from the origin. Sample scores are indicated by symbols, samples that are similar will plot near to each other (clustered together), and samples are color-coded by cycle

During the operation process of MDCs, a reduction in the pH can occur in the anode due to the accumulation of hydrogen ions. It should be noted that different effective routes of ion transfer are significant investigative factors in MDCs to avoid any possibility of pH imbalance and contamination of electrolytes (Al-Mamun et al. 2018). Overall microbial activity is affected by the reduction in the anode’s pH value. While the migration of ions governs the desalination and treatment processes in MDCs, the pH levels of the catholyte and the anolyte during the treatment process become imbalanced due to the movement and accumulation of ions in the three chambers. This, in turn, will affect desalination efficiency as well as the substrate removal. In three-chamber MDCs, the membranes separating different chambers allow the transportation of cations and anions, leading to a drop in the pH of the anode chamber and an increase in the pH of the cathode chamber. The pH drop in the anode chamber affects biological activity through inhibition of the metabolisms of electrogenic bacteria (Rahman et al. 2021a). At neutral or near-neutral pH conditions, MDCs are expected to perform well (Imoro et al. 2021) In MDCs, electricity cannot be generated through electrogenic microorganisms at a pH below 5 (Zahid et al. 2022a). Due to environmental problems and financial costs, adding a phosphate buffer solution to a large-scale MDC and a substrate/base is not feasible. Therefore, the development of designs which can successfully and cost-effectively regulate pH over the long term is essential (Gujjala et al. 2022a).

MDC performance with respect to salt concentrations

Evaluating MDC system’s performance under various conditions of salt concentration in the middle chamber is essential where the middle chamber connects both the anode and the cathode chambers. The continuous record of the voltages at each salt concentration are shown in Fig. 11. For C1, the maximum voltage values obtained were 371, 436, 410, and 382 mV at salt concentrations of 2000, 5000, 20,000, and 30,000 ppm, respectively. For C2, the maximum voltage values obtained were 90, 77, 68, and 81 mV at salt concentrations of 2000, 5000, 20,000, and 30,000 ppm, respectively. A low concentration of salts can inhibit voltage and power generation due to low conductivity; however, a salt concentration of 2000 ppm seems to be sufficient to prevent this inhibition (Zhang et al. 2012; Jafary et al. 2018). Our results demonstrated an agreement with Hong and coauthors findings, in which the threshold of the salt concentration is up to 20,000–23,000 ppm (270–300 mM) to observe an improvement on voltage and power generation (Hong et al. 2011). It is worth remarking that an increase in salt concentration is not usually associated with a similar increase in voltage generation. This can be attributed to the relations that govern the performance of cells are complex, and some interrelations should be considered. For instance, variation in the pH due to the movement of ions in each chamber can cause pH imbalance of the chamber’s electrolytes, which will influence the electrogenic microorganisms and power generation (Rahman et al. 2021b).

Fig. 11
figure 11

Voltage data over time for various Salt Concentrations: a C1 with 2000 ppm, b C2 with 2000 ppm, c C1 with 5000 ppm, d C2 with 5000 ppm, e C1 with 20,000 ppm, f C2 with 20,000 ppm, g C1 with 30,000 ppm, and h C2 with 30,000 ppm

COD removal efficiencies are shown in Fig. 12a. For C1, COD removal efficiencies were 43%, 51%, 82%, and 84% for salt concentrations of 2000 ppm, 5000 ppm, 20,000 ppm, and 30,000 ppm, respectively. For C2, COD removal efficiencies were 27%, 34%, 39%, and 44% for salt concentrations of 2000 ppm, 5000 ppm, 20,000 ppm, and 30,000 ppm, respectively. These results show that COD removal efficiency increased as salt concentration increased. High salt concentrations led to higher osmotic pressure and low internal resistance, which modified the activity of the bacteria (Liaquat et al. 2021). CEs for C1 and C2 are shown in Fig. 12b. CEs for C1 were 4%, 3.5%, 2%, and 1.9% at salt concentrations of 2000, 5000, 20,000, and 30,000 ppm, respectively. For C2, CEs were 4.1%, 5.6%, 3.2%, and 3.7% at salt concentrations of 2000, 5000, 20,000, and 30,000 ppm, respectively. The Coulombic efficiencies of C1 and C2 were similar to a large degree. The observation of lower Coulombic efficiencies with higher COD removal efficiencies implies that the electrogenic microorganisms were not the predominant type in the MDC system. Thus, a great portion of the organic matter was biodegraded by non-electrogenic microorganisms (Ahmed et al. 2015).

Fig. 12
figure 12

Response of MDC to various salt concentrations: a COD removal efficiencies, b Coulombic efficiencies, c phenol removal efficiencies, and d salt removal efficiencies for various salt concentrations

Phenol removal efficiencies are shown in Fig. 12c. For C1, phenol removal efficiencies were 26%, 32%, 64%, and 70% for salt concentrations of 2000 ppm, 5000 ppm, 20,000 ppm, and 30,000 ppm, respectively. For C2, phenol removal efficiencies were 30%, 33%, 41%, and 42% for salt concentrations of 2000 ppm, 5000 ppm, 20,000 ppm, and 30,000 ppm, respectively. At low salt concentrations, the presence of co-substrate did not significantly affect phenol removal efficiency. However, at high salt concentrations (20,000 ppm and 30,000 ppm), the presence of a co-substrate improved phenol removal efficiency. This improvement in phenol removal efficiency in the presence of the co-substrate may be due to high substrate concentrations and the variation in the pH values during the operation process. Different microbial species could have been developed at high substrate concentrations and contributed to phenol removal through various mechanisms (Ragab et al. 2019b). On the other hand, higher salt concentrations increased the movement of ions between chambers, leading to a variation in the pH values. This variation was suitable for the growth of phenol-degrading microorganisms that can survive at a wider range of pH values than other heterotrophic microorganisms (Liu et al. 2016).

Desalination efficiencies are illustrated in Fig. 12d. For C1, desalination efficiencies were 15.7%, 14.4%, 16.8%, and 21.5% for salt concentrations of 2000 ppm, 5000 ppm, 20,000 ppm, and 30,000 ppm, respectively. For C2, desalination efficiencies were 4.3%, 5%, 13.2%, and 18.3% for salt concentrations of 2000 ppm, 5000 ppm, 20,000 ppm, and 30,000 ppm, respectively. The results show that the amount of salt removed increased with increasing salt concentration. The low amount of salt removal at low salt concentration was due to the effect of low conductivity increasing internal resistance (Sevda et al. 2015; Jafary et al. 2018). In addition, hydraulic retention time has an effect on internal resistance. Internal resistance increases with increasing hydraulic retention time (Zahid et al. 2022a). Two main factors affect desalination rates in MDCs. The first factor is the bioelectrochemical reactions, while the second is the variation in the electrical field formed between the different electrodes and the ion concentration between different chambers. The concentration gradient will be stronger when the conductivity of the solution in the middle chamber is high. This will increase desalination efficiency by pushing the ions to other chambers until an ionic balance is reached. However, suppose the conductivity of any of the catholyte or anolyte becomes higher than that of the solution in the middle chamber—in that case, the desalination efficiency would decrease because the electrolyte’s resistance would be the dominant factor (Rahman et al. 2021a).

Cost analysis

Considerable thought must be given to how much a treatment system will cost. The cost of an MDC includes the price of components, the cost of energy required to operate the system, and all other operating costs (including maintenance, labor, and sludge removal) (Safwat et al. 2023). The costs included in this analysis are those for the capital cost and the operating cost (Shaker et al. 2022). The capital cost associated with the main components of MDC includes the cost of the electrodes (carbon cloth and carbon cloth covered with Pt) and the membranes (AEM and CEM), as these components contribute more than 85% of the cost of the system (Zahid et al. 2022b). The capital cost was found to be 47.5 US$/100 cm3 of treated wastewater. On the other hand, the operating cost was mainly due to the energy needed for the aeration process in the cathode chamber. When the net energy production was determined by calculating the electricity generated by MDC, it was found that the electricity needed for aeration was compensated by the energy produced by MDC. Net energy consumption was found to be − 1.477*10–9 Kw per cycle. Assume that the industrial sector pays 0.1 US$/Kwh for electricity. The operating cost will be − 8.8*10–7 US$ per m3 (the negative sign means that the system adds benefit with respect to the cost). Therefore, the operating cost can be ignored. The cost analysis showed that the main cost in MDCs will be associated with the capital cost. Capital cost is an obvious economic element that could limit the potential for MDCs to be commercialized (Zhang and Angelidaki 2016). It is worth noting that the high-quality testing materials used in the laboratory scale are significantly more expensive than the low-priced industrial materials utilized in large-scale systems. Recent scale-up research on MDC systems showed that the capital cost assessment can be onefold lower than that of desalination plants and anaerobic digesters, indicating that the capital cost assessment at the laboratory scale is not precise in judgment of the feasibility of the technology compared to other available technologies (Zahid et al. 2022b). It can be reduced by using plain carbon cloth in the cathode chamber. In addition, more efforts can be directed toward reducing the costs of membranes. Furthermore, operating the system without aeration can provide reasonable energy production that can compensate the capital cost. In general, capital costs can be compensated for by the cost of fuel needed for other technologies.

Conclusion

This study investigated the performance of three-chamber microbial desalination cells for phenol removal and energy recovery. The effects of the presence of a co-substrate, various temperatures, various pH values, and various salt concentrations were studied. The results show that the maximum voltage obtained from C2 (phenol as a sole substrate) was less than that obtained from C1 (phenol with a co-substrate). The voltage increased with increasing temperature and pH values. The change in salt concentrations impacted the voltage, but this did not show a constant trend. Maximum COD and phenol removal efficiencies were obtained when treating phenol with co-substrate at temperature = 37 °C, pH = 7, and salt concentration = 10,000 ppm—these values were 80% and 74%, respectively. On the other hand, the maximum Coulombic efficiency was 5.3% and was obtained with phenol as the sole substrate at temperature = 18 °C, pH = 7, and salt concentration = 10,000 ppm. The maximum desalination efficiency was 21.5% and was obtained with phenol and a co-substrate at temperature = 30 °C, pH = 7, and salt concentration = 30,000 ppm. The efficiency of COD and phenol removal increased with increasing temperature, while removal efficiencies were very close at initial pH values of 7 and 8. Furthermore, the cell’s performance improved when using a co-substrate rather than a sole substrate. The results show that the presence of a co-substrate improved power densities, and the maximum power density obtained was 52.9 mW/m2. Since biochemical reactions are very complex, and because pH and temperature significantly affect the biological activity of microorganisms, it is not easy to obtain a constant relationship between the variation of the input values for pH and temperature and removal efficiency. In general, cells in all experiments showed low Coulombic efficiencies in the presence of phenol, although high removal efficiencies for phenol were obtained. In terms of the mechanism of MDC operation, the metabolic pathway of the microorganisms present was not the most desirable metabolic pathway for MDCs to generate electricity. Several approaches can be recommended to increase the removal efficiencies of phenol and COD along with increasing the columbic efficiencies such as recirculation and the use of two-stage MDCs. As such, further research on the effect of other complex substrates on the performance of MDCs could provide further information on this aspect. Furthermore, attention should be paid to the identification of microorganisms formed on the anode electrode, as it can provide useful information to understand how to optimize the system.