ABSTRACT
This study enhances nitrate recovery from groundwater using a hybrid membrane process, combining electrodialysis (ED) and nanofiltration (NF) with response surface methodology (RSM). Employing the Box–Behnken design (BBD), the research explored key operational factors affecting nitrate removal. A quadratic model demonstrated strong predictive accuracy, with an R2 close to 1 and errors below 5% for responses such as nitrate content, specific energy consumption (SEC), and water recovery (Y%). While a single NF system achieved less than 60% nitrate removal, combining it with ED resulted in a total nitrate removal rate of up to 91%, a recovery rate of 75.25%, a lower SEC of 1.25 kWh/m³, and a nitrate level of 46.10 mg/L, producing water that meets drinking water standards, but which is slightly corrosive yet non-scaling.
HIGHLIGHTS
A hybrid process combining electrodialysis (ED) and nanofiltration (NF) was developed for nitrate recovery.
Response Surface Methodology (RSM) was applied to optimize the process.
The Box-Behnken Design (BBD) demonstrated high predictive accuracy, with R-values close to 1 for nitrate content, specific energy consumption (SEC), and water recovery (Y%).
INTRODUCTION
Morocco falls within the classification of an arid or semi-arid region, signifying limited availability of freshwater resources. Particularly, the availability of water from groundwater (GW) is extremely limited (Jounaid et al. 2020). These waters constitute a vital resource utilized for human consumption, agriculture, and industrial purposes. Due to these activities, however, nitrate concentrations in GW are consistently on the rise in numerous regions worldwide, surpassing the World Health Organization's (WHO) accepted standard of 50 mg/L (WHO n.d.). This contamination has led to the closure of wells and the rendering of many aquifers unsuitable for drinking water sources. In some regions of Morocco, the concentration of nitrate in GW exceeds 250 mg/L (El-Ghzizel et al. 2019). This increase is attributed to the intensive use of nitrogen fertilizers, irrigation of crops with domestic wastewater, the rise in industrial nitrate waste, and the application of manure (Kihampa & Wenaty 2013; Howard et al. 2016). The contamination of drinking water with nitrates poses a significant health risk, especially to children (<1 an). can transform into
, which can combine with hemoglobin in the blood cells of living beings, leading to a condition commonly known as ‘blue baby syndrome, (Maran et al. 2005; Ludlow et al. 2022).
To address nitrate contamination in brackish water (BW) and GW, several approaches have been proposed, including electrodialysis (ED) and nanofiltration (NF) (El Midaoui et al. 2001; Menkouchi et al. 2008). These techniques aim to reduce nitrates in water supplies to minimize associated risks. However, a significant drawback associated with ED and NF membrane techniques is the occurrence of membrane fouling, which has substantial implications for the membrane's life time as well as the quality and quantity of treated water that are primarily impacted under normal operating conditions. In the same context, the generation of a large volume of brine presents the demerits of the mentioned treatment technologies (Mohammad et al. 2015; Zhang & Dong 2018).
To elaborate further, when nitrate concentrations surpass the 400 mg/L threshold, the challenges posed by membrane fouling intensify significantly. High nitrate levels exacerbate fouling mechanisms, such as cake formation and concentration polarization, leading to more frequent cleaning cycles and reduced membrane performance over time. Additionally, the presence of other contaminants commonly found in BW and groundwater, such as organic matter and suspended solids, can exacerbate membrane fouling, further diminishing treatment efficiency. Moreover, the increased generation of brine, a byproduct of ED and NF processes, becomes even more problematic at higher nitrate concentrations. Disposal of this concentrated brine stream presents environmental concerns, as it can adversely impact local ecosystems if not managed properly. The cost and energy requirements for brine disposal also escalate with higher nitrate concentrations, adding to the economic and operational burdens of these treatment technologies (Elazhar et al. 2021a, 2021b, 2021c).
These issues, as identified in the literature, underscore the need for careful consideration and proactive measures to address membrane fouling, ensuring sustained performance and overall effectiveness of these nitrate removal methods. To overcome these operational challenges, several alternative solutions and propositions have been considered. One promising approach is the integration of advanced hybrid membrane systems. These systems have demonstrated the capability to achieve solutions with higher concentrations of components when compared to single membrane treatment. This enhancement ensures a more efficient separation of brine and permeate product (Menkouchi et al. 2008; Tong et al. 2020). Furthermore, this not only contributes to a more sustainable approach but also helps in minimizing the environmental impact associated with the disposal of brine (Panagopoulos & Joanne Haralambous 2020).
However, the novelty of our study lies in advancing beyond this existing research paradigm. Instead of focusing solely on low nitrate concentrations, we aim to assess the effectiveness of a novel hybrid NF-ED system specifically designed for treating high nitrate concentrations (>400 mg/L). By merging these two membrane technologies, our study aims to address the critical need for efficient nitrate removal in scenarios where conventional methods may fall short. This strategic approach not only addresses water quality concerns but also seeks to enhance the overall process recovery rate and reduce the discharged brine volume by combining NF and ED brines, thus offering a promising and sustainable solution to water treatment challenges associated with elevated nitrate levels.
Additionally, it is crucial to emphasize that the performances of both stages in the NF-ED hybrid process are interconnected, necessitating a meticulous balance in parameter conditions between them. To achieve this equilibrium, Response Surface Methodology (RSM) was employed to independently optimize the input factors’ values for each stage, validating the effectiveness of the optimization process. Therefore, based on previous investigations on RSM, several advantages emerge, including minimizing process variability, reducing both capital expenditure (CAPEX) and operating expenditure (OPEX) costs, and saving time compared to traditional approaches. Also, it can help to create a blueprint to guide the successful execution of the process.
EXPERIMENTAL
Characteristics of the feed water
Table 1 illustrates the composition of the GW utilized in this study. The levels of all ion compositions significantly exceed the standards established by Moroccan regulations and WHO for drinking water (WHO n.d.). However, it is GW with very high nitrate content (470 mg/L), hardness of 110°F, and slight scale formation and corrosion according to the Langelier saturation index.
Characteristics of the feed GW
Parameters . | Feed GW . | Moroccan guidelines (WHO) . |
---|---|---|
Temperature (°C) | 30 | 35 |
TDS (ppm) | 1,280 | <500 |
pH | 7.80 | 6.5–8.5 |
Ca2+ (mg/L) | 237 | 270 |
![]() | 470 | 50 |
Na+(mg/L) | 550 | 200 |
K+ (mg/L) | 43 | – |
Mg2+ (mg/L) | 120 | <50 |
Cl− (mg/L) | 629 | 250 |
![]() | 454 | 200 |
LSI | −0.45 | −0.2 < LSI < 0.2 |
Parameters . | Feed GW . | Moroccan guidelines (WHO) . |
---|---|---|
Temperature (°C) | 30 | 35 |
TDS (ppm) | 1,280 | <500 |
pH | 7.80 | 6.5–8.5 |
Ca2+ (mg/L) | 237 | 270 |
![]() | 470 | 50 |
Na+(mg/L) | 550 | 200 |
K+ (mg/L) | 43 | – |
Mg2+ (mg/L) | 120 | <50 |
Cl− (mg/L) | 629 | 250 |
![]() | 454 | 200 |
LSI | −0.45 | −0.2 < LSI < 0.2 |
NF-ED experimental setup
Ions analysis
The experiments are performed at 29 °C. Samples of permeate and concentrate of various tested processes are collected and the water parameters are determined analytically following standard methods previously described (El Mrabet et al. 2022). The parameters studied are as follows:
- Electrical conductivity (EC), potential of hydrogen (pH), and the contents of sulfates, chloride, sodium, calcium, magnesium, and nitrates.
Experimental
NF recovery rate
ED water recovery
Energy calculation
Process optimization
Independent input variables range in terms of coded levels
Stage . | Factors . | Variables . | Coded level . | ||
---|---|---|---|---|---|
− 1 . | 0 . | + 1 . | |||
NF | TMP (bar) | A | 8 | 12 | 16 |
pH | B | 6 | 7 | 8 | |
Time (min) | C | 4 | 5 | 6 | |
ED | Nitrate content of NF stage | A′ | 70 | 7 | 200 |
DR (%) | B′ | 10 | 45 | 80 | |
Applied voltage (V) | C′ | 5 | 8.5 | 12 |
Stage . | Factors . | Variables . | Coded level . | ||
---|---|---|---|---|---|
− 1 . | 0 . | + 1 . | |||
NF | TMP (bar) | A | 8 | 12 | 16 |
pH | B | 6 | 7 | 8 | |
Time (min) | C | 4 | 5 | 6 | |
ED | Nitrate content of NF stage | A′ | 70 | 7 | 200 |
DR (%) | B′ | 10 | 45 | 80 | |
Applied voltage (V) | C′ | 5 | 8.5 | 12 |

Furthermore, the Analysis of Variance (ANOVA) test was conducted independently for each process to ascertain the interactions between the process factors and to assess the accuracy of the mathematical model expressed in both coded and actual values. This statistical analysis provides a quantitative means to comprehend and predict the relationship between variables based on experimental observations.
RESULTS AND DISCUSSION
NF-ED modeling performances
The modeling performance of the NF-ED hybrid system in terms of nitrate content, recovery rate, and energy consumption is depicted in Tables A1 and A2 (Annex 1).
The results demonstrate that the NF membrane alone is not sufficient for the treatment of BW that meets the requirements for drinking water quality in terms of nitrate content at varying feed conditions using NF270, for which the average concentration was 150.6 ± 28.8%. The lower retention of monovalent ions is attributed to their small hydrated radius compared to divalent ions allowing them to easily cross NF membranes (Oumar Anne et al. 2001). The results also indicate that the average recovery rate was 35 ± 13% with an energy consumption range of 1.6 ±0.24%. This means that further treatment of the NF product should be considered before disinfection and distribution for human consumption. Moreover, the NF process results in a permeate rich in monovalent ions, while the concentrate contains a higher proportion of divalent ions. For this, the ED process was placed downstream of the NF process in order to improve the quality of the produced water in terms of nitrate removal and also improve the overall recovery rate in the system. The regression equations for nitrate content, energy consumption, water recovery for NF were generated independently for NF (7–9) by the following second-order polynomial equation in terms of coded variables. Indeed, it appears that each response equation for both stages encompasses three types of effects, namely, individual effects (A, B, and C), squared effects (A², B², C²), and interaction effects (AB, BC, AC).
Based on the results presented in Table A2, the nitrate content in the ED final product water was determined to be 36.3 ± 8.5% (mg/L). This level falls within the recommended values for using per the guidelines set by the WHO or the Food and Agricultural Organization (FAO) for irrigation reuse.

In the ED stage, the regression equations highlight the pivotal role of nitrate content generated by NF in the first stage (A′) as the most crucial factor influencing the nitrate content produced by ED. Following closely are the DR (B′) and the applied voltage (C′). Notably, the applied voltage emerges as the most significant factor for both individual and square effects on the recovery rate Y and SEC, with the DR also exerting notable influence.
Furthermore, examining the interaction effects between various factors reveals substantial significance. The interaction between applied voltage and DR (B′C′) notably impacts the SEC, with the A'B′ interaction following closely. In addition to the previously highlighted findings, a noteworthy interaction is observed between the applied voltage and the nitrate content generated in the first stage (A′C′) regarding the quality of ED produced water in terms of nitrate levels. This interaction takes precedence, emphasizing its significance in influencing the nitrate content. Following closely are the A′B′ and B′C′ interactions. Moreover, the same interaction pattern is mirrored in the recovery rate Y, underscoring its importance in the overall performance of the hybrid process.
The ANOVA for analysis of regression parameters for each predicted response surface reveals that the models employed for nitrate content, recovery rate, and SEC are statistically significant, evidenced by low p-values (<0.0001) and high Fisher coefficients (F-values). Moreover, all adequacy measures, represented by R2 values close to 1, indicate a robust regression fit for model development. Also, the adaptability of the generated model was confirmed by the adjusted R2 () and Predicted R2 (
), for which the value is >= 0.95. Table 3 gives the values of p-values, R2, adjusted R2, and Predicted R2 for both stages.
ANOVA of NF and ED processes for each studied response
Source . | NF stage . | ED stage . | ||||
---|---|---|---|---|---|---|
[![]() | Recovery rate Y . | SEC (kWh/m3) . | [![]() | Water recovery Y1 . | SEC (kWh/m3) . | |
p-value | <0.0001 | <0.0001 | <0.0001 | <0.0001 | <0.0001 | <0.0001 |
R2 | 0.9972 | 0.9972 | 0.9928 | 0.9972 | 0.9972 | 0.9928 |
Adjusted R2 | 0.9920 | 0.9920 | 0.9797 | 0.9920 | 0.9920 | 0.9797 |
Predicted R2 | 0.9552 | 0.9552 | 0.9028 | 0.9552 | 0.9552 | 0.9028 |
Source . | NF stage . | ED stage . | ||||
---|---|---|---|---|---|---|
[![]() | Recovery rate Y . | SEC (kWh/m3) . | [![]() | Water recovery Y1 . | SEC (kWh/m3) . | |
p-value | <0.0001 | <0.0001 | <0.0001 | <0.0001 | <0.0001 | <0.0001 |
R2 | 0.9972 | 0.9972 | 0.9928 | 0.9972 | 0.9972 | 0.9928 |
Adjusted R2 | 0.9920 | 0.9920 | 0.9797 | 0.9920 | 0.9920 | 0.9797 |
Predicted R2 | 0.9552 | 0.9552 | 0.9028 | 0.9552 | 0.9552 | 0.9028 |
Predicted values vs. experimental values of nitrate content, Y, and SEC for NF stage.
Predicted values vs. experimental values of nitrate content, Y, and SEC for NF stage.
Predicted values vs. experimental values of nitrate content, Y, and SEC for ED stage.
Predicted values vs. experimental values of nitrate content, Y, and SEC for ED stage.
Optimization and prediction of modeling using RSM of NF-ED
The optimization of the overall NF-ED hybrid process was conducted with a specific focus on meeting Moroccan regulations (human consumption and water irrigation) in terms of nitrate and TDS as well as to minimize the energy consumption and maximize the water recovery. Table 4 presents the RSM predicted and experimentally optimum response values and the corresponding percentage error during experimental validation of the developed models. The experimental results were very similar to that predicted by RSM with a maximum error value not exceeding 5%, thus confirming the validity of the proposed models for both processes. Therefore, the desirability function value of each response ranged between 0.97 and 1, which corresponds to perfect desirability (Elazhar et al. 2022).
RSM predicted and experimentally optimum values of the developed models
NF stage . | ED stage . | ||||||||
---|---|---|---|---|---|---|---|---|---|
Optimum input variables | |||||||||
Pressure (bar) | 12 | Voltage (V) | 12 | ||||||
pH | 6 | DR (%) | 75 | ||||||
Time (min) | 8 | Nitrate content (mg/L) | 170 | ||||||
Response optimization . | Exp . | Pred . | Err (%) . | Desi . | Response optimization . | Exp . | Pred . | Err (%) . | Desi . |
[![]() | 195.05 | 175 | 2.73 | 0.98 | [![]() | 45.25 | 46.10 | 1.87 | 0.99 |
Y (%) | 44.02 | 45.78 | 3.9 | 1.0 | Y1 (%) | 72.85 | 75.25 | 0.04 | 0.98 |
SEC (kWh/m3) | 0.713 | 0.80 | 3 | 0.98 | SEC (kWh/m3) | 1.02 | 1.45 | 4.02 | 0.96 |
NF stage . | ED stage . | ||||||||
---|---|---|---|---|---|---|---|---|---|
Optimum input variables | |||||||||
Pressure (bar) | 12 | Voltage (V) | 12 | ||||||
pH | 6 | DR (%) | 75 | ||||||
Time (min) | 8 | Nitrate content (mg/L) | 170 | ||||||
Response optimization . | Exp . | Pred . | Err (%) . | Desi . | Response optimization . | Exp . | Pred . | Err (%) . | Desi . |
[![]() | 195.05 | 175 | 2.73 | 0.98 | [![]() | 45.25 | 46.10 | 1.87 | 0.99 |
Y (%) | 44.02 | 45.78 | 3.9 | 1.0 | Y1 (%) | 72.85 | 75.25 | 0.04 | 0.98 |
SEC (kWh/m3) | 0.713 | 0.80 | 3 | 0.98 | SEC (kWh/m3) | 1.02 | 1.45 | 4.02 | 0.96 |
Operational modeling parameters and their impact on NF-ED performances
Performance validation of the NF-ED hybrid system after RSM optimization
Parameters . | Feed water . | NF permeate water . | ED diluate . | Moroccan drinking water standards . |
---|---|---|---|---|
pH | 8.53 | 7.72 | 6.42 | 6.50–8.50 |
TDS (mg/L) | 2,280 | 1,245.93 | 185.59 | 500 |
[![]() | 120.15 | 55.78 | 21.2 | – |
Ca2+ (mg/L) | 273.2 | 142.11 | 43.29 | <270 |
Mg2+ (mg/L) | 120.3 | 47.23 | 9.8 | <50 |
Na+ (mg/L) | 550 | 423.26 | 85.12 | 200 |
![]() | 102 | 9.6 | 4.31 | 200 |
Cl− (mg/L) | 629 | 376 | 73.69 | 250 |
![]() | 470 | 195.05 | 46.18 | 50 |
LSI | 1.02 | −0.12 | −0.35 | −0.2 < LSI < 0.2 |
Recovery rate (%) | – | Y1: 44.25 | Y: 75.25 | – |
Parameters . | Feed water . | NF permeate water . | ED diluate . | Moroccan drinking water standards . |
---|---|---|---|---|
pH | 8.53 | 7.72 | 6.42 | 6.50–8.50 |
TDS (mg/L) | 2,280 | 1,245.93 | 185.59 | 500 |
[![]() | 120.15 | 55.78 | 21.2 | – |
Ca2+ (mg/L) | 273.2 | 142.11 | 43.29 | <270 |
Mg2+ (mg/L) | 120.3 | 47.23 | 9.8 | <50 |
Na+ (mg/L) | 550 | 423.26 | 85.12 | 200 |
![]() | 102 | 9.6 | 4.31 | 200 |
Cl− (mg/L) | 629 | 376 | 73.69 | 250 |
![]() | 470 | 195.05 | 46.18 | 50 |
LSI | 1.02 | −0.12 | −0.35 | −0.2 < LSI < 0.2 |
Recovery rate (%) | – | Y1: 44.25 | Y: 75.25 | – |
Here Ka2 and Kso are the thermodynamic equilibrium constants of and CaCO3, respectively, and are corrected to temperature. It should be noted that [Ca2+] and [
] are the molar concentrations. The symbols γCa2+ and
represent the activity coefficients for calcium and bicarbonate ions.
Table 5 indicates that the NF system implemented in the first stage exhibits a favorable LSI range (−0.2 < LSI < 0.2), suggesting that permeate production occurs without exhibiting scaling phenomena. This characteristic is crucial as it poses no risk to the subsequent ED process in the second stage, thereby contributing significantly to an overall improvement in the efficiency of the hybrid system, especially concerning the flow and recovery rate, which are 1,586 L/h and 44%, respectively. Hence, the LSI calculation for the ED permeate becomes more negative with low concentrations of hardness and alkalinity, indicating that the permeate water tends to be slightly corrosive and non-scaling. This can significantly impact water equilibrium (water quality standards) and the longevity of the water distribution network. Therefore, to address these critical issues, remineralization post-treatment is essential to adjust the calco-carbonic balance, as it is a fundamental strategy adopted by many large-scale plants around the world (Rafferty 1999; Oumar Anne et al. 2001; Hilal et al. 2005; Biyoune et al. 2020; Panagopoulos & Joanne Haralambous 2020; Tong et al. 2020; Elazhar et al. 2021b, c; Elazhar et al. 2022). The experimental validation also showed that the ED stage achieved a high recovery rate of approximately 90%, with efficient reduction of salinity and nitrate content to meet the Moroccan standards.
CONCLUSION
In this study, a BBD approach using the RSM was adopted to optimize the operational input factors for each hybrid NF-ED process in terms of nitrate content, SEC, and water recovery. After optimization, the LSI was also assessed to investigate the influence of specific optimal conditions identified through RSM on the balanced water quality. In summary, the main findings of this study are succinctly outlined as follows:
- RSM modeling has been utilized effectively to optimize the operational parameters of the hybrid NF-ED system. The results, supported by ANOVA, reveal a high coefficient of determination (R² close to 1) for each process and response, with the error percentage between experimental and predicted values being less than 5%. This underscores the model's strong predictive accuracy.
- A single NF system was inadequate for GW treatment due to its comparatively low nitrate removal rate of less than 60%. However, by combining it with the ED unit, the system effectively eliminated the remaining salts in the NF-treated water, resulting in a total nitrate removal rate of up to 91%.
- The hybrid NF-RO process is highly promising for addressing nitrate issues in nitrated feed water and could potentially provide a groundbreaking solution for several regions worldwide. Furthermore, under optimal conditions for these three variables, the NF-ED system achieved a total recovery rate of 75.25%, with a lower specific energy consumption (SEC) of 1.25 kWh/m³ and a satisfactory nitrate level of 46.10 mg/L, while producing water that meets drinking water standards, but which is slightly corrosive yet non-scaling.
- Consequently, future studies on LSI optimization using RSM may deepen the understanding of the hybrid NF-ED process, helping to mitigate corrosion risks and enhance the economic viability and efficiency of the system.
DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.
CONFLICT OF INTEREST
The authors declare there is no conflict.