Experimental and economic evaluation of nitrate removal by a nanofiltration membrane

Membrane nanofiltration (NF) process was employed to remove nitrate from synthetic and natural waters. The optimum technical and economic ranges of governing parameters for the water treatment process were determined using central composite design method and Verbernen’s economic model. The results of nitrate removal from synthesized water showed the minimum and maximum rates of permeation were 16.5 and 84.3 L/m2h (LMH), respectively. The minimum and maximum nitrate rejection were 44.1% and 78.4%, respectively. Increasing pH had no significant effect on permeation flux but increased the nitrate removal rate. Additionally, as pressure was increased, the nitrate rejection and permeation flux both increased; but, as temperature was increased, the permeation flux increased while the nitrate removal decreased. In the case of natural water, the minimum and the maximum flow rate were 7.7 and 68.1 LMH. Furthermore, the minimum and maximum rejection rates of nitrate were 22.1% and 74.8%. The effects of variables on the permeation flux and nitrate removal for natural water were similar to those for synthetic water. However, by increasing pH, the amount of water passing through the membrane decreased. In all experiments, natural water had less permeation flux and less nitrate rejection than synthesized water. The presence of other anions and cations in the natural water decreases the amount of the nitrate removed. The total investment cost reduced as the pressure increased. The cost per m3 of treated water decreased from 3 to 7 bars, then increased as the pressure increased.


Introduction
Over the past decade, the demand for drinking water has escalated especially for arid and semi-arid regions, while the freshwater resources are limited. So, it is important to gain new waters via wastewater treatment and desalination (Madaeni et al. 2011;Rahimpour et al. 2018). Nitrate is a typical monovalent anion that is found in a wide variety of natural waters and wastewaters. Nitrate is a prominent contaminant in groundwater and is linked to the eutrophication of water bodies as well as methemoglobinemia, also known as the "blue baby syndrome" (Oh et al. 2014). The recommended maximum level of nitrate in water, according to the World Health Organization (WHO), is 11.3 mg/L as NO 3 , and it is 10 mg/L according to the United States Environmental Protection Agency (USEPA) (World Health Organization 1985;Li et al. 2013;Rezvani et al. 2019). A variety of approaches have been proposed and employed to remove nitrate from groundwater. These include nanofiltration (NF), ion exchange, biological denitrification, chemical remediation, reverse osmosis, electrodialysis, and catalytic methods (Murphy 1991;Oldani et al. 1992;Reddy and Lin 2000;El Midaoui et al. 2002;Aslan and Turkman 2006;Mahvi et al. 2011).
In ion exchange, NO − 3 is exchanged for either chloride (Cl − ) or bicarbonate (HCO − 3 ), depending on the resin used. The drawback of this method is the production of waste (brine) containing NO − 3 , sulfate (SO 2− 4 ), Cl − , or HCO − 3 (Rogalla et al. 1991). In biological denitrification, microorganism converts NO − 3 and NO − 2 to N 2 This technique removes NO − 3 selectively and results in the production of small amounts of waste. However, due to temporal and spatial differences in population of denitrifying microorganisms and carbon content, the removal efficiency varies greatly (Reddy and Lin 2000). Electrodialysis is another desalting approach, which is powered by the electrical potential difference between two electrodes with opposing charges. The benefits of this approach are electivity and low chemical requirements; however, it cannot separate nitrate with any degree of selectivity and requires additional treatments (Jensen et al. 2014). Catalytic denitrification is a process that uses metals like aluminum, iron, copper, palladium, and rhodium to reduce nitrate. The difficulty of controlling the activity of catalysts to prevent ammonia generation and the restriction of the reaction rate by diffusion in big particles are the two main barriers to the commercialization of catalytic denitrification technology (Rezvani et al. 2019).
Membrane technology has attracted much attention for numerous applications including desalination and wastewater treatment (Chakrabortty et al. 2013;Maher et al. 2014;Mohammad et al. 2015;Sadeghian et al. 2015;Song et al. 2016;Nouri Alavijeh et al. 2017;Goh and Ismail 2018;Alavijeh et al. 2022). NF is a membrane process with separation characteristics between ultrafiltration and reverse osmosis (RO) processes. In comparison to RO, NF operates under lower operation pressures, has higher water fluxes, and requires lower capital investment (Zhou et al. 2015;Zou et al. 2019). The ion transport mechanism of NF membranes allows their application in moderate pressure but the mechanism is complicated (Paugam et al. 2004a). The separation mechanism of the NF process is influenced by the size of the molecules (for a non-ionic solution), the difference in permeability and solubility of feed components, and the electrical interactions (Donnan phenomenon) between membrane surface and separated ions (Luo and Wan 2013;Epsztein et al. 2018;Zhang et al. 2020).
NF is an efficient process for removing divalent and multivalent ions, pesticides, and synthetic dyes (Panagopoulos 2022). Paugam et al. (Paugam et al. 2004b) investigated the effect of operating variables such as pressure, pH, and ions composition on nitrate removal using a Nanomax-50 commercial membrane. Their results indicated that increasing pressure up to 6 bar led to a linear increase in permeation rate. However, at higher pressures, the permeation rate decreased due to the concentration polarization. In addition, at pH above the isoelectric point higher nitrate removal efficiency was achieved, which is attributed to an increase in the negative charge of the membrane surface, and consequently stronger repulsion between the nitrate ions and the membrane surface (Wang et al. 2005;Epsztein et al. 2018). Santafe-Moros et al. (Santafé-Moros et al. 2005) examined the performance of three NF90, NF270, and ESNA1-LF commercial NF membranes on nitrate removal at different concentrations, pHs, and anion. NF90-Dow Filmtec membrane demonstrated the best removal efficiency, however it showed the lowest permeate flux due to the compact structure of this membrane. Increasing the nitrate concentration in the feed from 100 to 275 mg/L did not have a significant effect on nitrate removal efficiency of the tested membranes. The same group (Santafé-Moros et al. 2007) investigated the influence of associated anions and cations on the nitrate removal efficiency of an NF90-Dow Filmtec commercial NF membrane. The membrane exhibited excellent performance for nitrate removal at different conditions.
Considering limited financial resources along with essential standards for water treatment processes, evaluation of capital and operating costs of these processes is very important. The cost of membrane processes for purification of drinking water is a function of a variety of parameters including production capacity, the type of operation, pretreatment process, operating conditions, and process design. Applying comprehensive models including parameters affecting costs is the best option for economic evaluation. For economic evaluation of membrane processes, especially the NF process, few models have been presented. This study aims to develop experimental evaluation, and an economic model for nitrate removal from synthetic and natural waters using a commercial NF membrane. Comparisons were made between the performance of NF90 membrane in rejecting nitrate from synthetic water containing KNO 3 and the same concentration of nitrate present in natural water. These comparisons were made to demonstrate the utility of NF membranes in real-world applications and to evaluate the influence of coexisting ions. Response surface method and central composite design were used to examine the effect of different parameters on nitrate rejection efficiency and permeate flux. Optimum conditions were obtained from statistical analysis and were compared with experimental results. An economic evaluation including capital and operating costs were carried out for nitrate removal from natural water using the commercial membrane. A major contribution of this study is to realize the significant factors in the nitrate rejection in terms of technical and economic aspects.

Materials, methods, and experimental design
Analytical grade of potassium nitrate (KNO 3 ) salt, hydrochloric acid (HCl), and sodium hydroxide (NaOH) were provided from Merck (Germany). HCl and NaOH solutions were used for adjusting pH. The WTW 720 pH meter was employed to measure the pH of the feed solutions. A synthetic aqueous solution containing 100 mg/L of nitrate ion was obtained using potassium nitrate salt. A natural water sample (pH 7.3) was obtained from a well in Isfahan, Iran. The composition of ions in the natural water is presented in Table 1. Nitrate concentration of 100 mg/L was chosen for the synthetic water since the natural counterparts have the concentration of around 95 mg/L. The NF module ( Fig. S-1) was equipped with a commercial NF90 membrane film manufactured by Filmtec (USA) which is a polyamide with the surface area of 48 cm 2 . The concentrations of nitrate ion were measured using a UV spectrophotometer (Shimadzu 240, Japan) at absorbance wavelength of 220 nm. A calibration curve built using standard nitrate solutions in the range of 0 to 50 mg/L was used for the nitrate concentration calculations ( Fig. S-2). The true absorbance of nitrate in the natural water samples was determined by subtracting absorbance at 220 nm and 275 nm. This is due to the fact that nitrate and other organic matters are able to absorb UV radiation at a wavelength of 220 nm, whereas only organic matters are capable of absorbing UV at a wavelength of 275 nm (Eaton et al. 1998;Edwards et al. 2001).
Continuous experiments were conducted by a pilot-scale NF system equipped with a polyethylene tank with a capacity of 50 L of feed water, low-pressure pump, high-pressure pump, a 5 micron filter, and membrane modules. All pipes was made of stainless steel. Flow rates and pressures were digitally measured. The volumetric flux was determined by measuring the volume of permeate collected in a time interval. Figure 1 illustrates a schematic of the NF system. Rectangular membrane modules with a 48 cm 2 active surface area were used in this system. The NF module utilizes the cross flow for the filtering flow, which has the benefit of reducing concentration polarization and fouling during the process of filtration. At the start of each experiment, the feed water pressure, temperature, and pH were adjusted according to the DOE settings. Then, allow the system to operate for 60 min to reach an equilibrium, which is the state in which the flow rate and nitrate concentration in the permeate remain consistent over time.
The following relation was used to calculate the nitrate rejection: where C pi and C pf are the nitrate concentrations in the permeate and feed solutions, respectively.
The Verberne's economic model was used for evaluating the NF process costs. Tables 2 and 3 show the equations used to calculate the capital and operating costs. Table 4 shows the values of the items taken into consideration in the economic model used in this research.
After performing the tests and recording the process response data, regression analysis was conducted to calculate the response model's coefficients, standard errors, and their significance. Given the impact of operational factors such as temperature, pressure, and pH on nitrate removal efficiency and permeation rate, which are two essential responses in the NF process, variable optimization is needed to attain the highest amount of nitrate removal (maximum response). The ranges of encoded operating variables are presented in Table 5.
The experimental design and analysis of variance (ANOVA) were carried out using Design-Expert 10 (State-Ease, USA) statistical software. The effects of process variables such as pH, temperature, and pressure on water permeation flux (LMH) and nitrate removal efficiency (%) were investigated using response surface methodology according to central composite design (CCD). The coded and actual values of the designed experiments are summarized in Table S-1. The experiments were conducted in suggested CCD designed matrix to visualize the effects of independent factors on responses. (1)

Statistical evaluation of permeation flux for synthetic water
The nitrate solution with 100 mg/L concentration was prepared using potassium nitrate and distilled water. The order and quantity of tested variables were determined using the RSM and CCD. The results of the experiments including water permeate flux and nitrate removal rate are summarized in Table S Quality control and installation Table 4 The items and their values that were utilized in this study to make economic analyses. Economic data used for the evaluation of the investment and operating costs are given for the third quarter 2020, Iran

Parameter Unit Value
Cost of each membrane module with a surface area of 37 m 2 (m) $ 1000 Working hours during the year (A) h 8640 Cost of electricity consumption per kWh (S) $ 0.08 Consumption energy to pump per m 3 (F) kWh 0.04 Pump Efficiency (η) -0.7 Ratio of treated water to feed water (R) -0.8 The model used to fit experimental results is a secondorder model (Eq. 2).
where T is the feed temperature (°C) and P is the pressure (bar). The ANOVA of the permeate flux is presented in Table S-3. The high value of 37.77 for F in the model presented in Table S-3 indicates that this model has a high confidence level. To obtain the model or any of its variables being significant, their prob > F values should be less than 0.05. Given the fact that this value is less than 0.0001 in the model, the proposed model is meaningful. In addition, variables such as temperature, pressure, and temperature-pressure interactions are significant based on the amount of prob > F less than 0.05.
The F-value for the lack of fit term is 1.19. This means that this variable is not important and meaningful in comparison with the net error. The higher the F-value for a variable, the higher the effect of the variable on the response. Accordingly, the F-values for the pressure, temperature, and the interaction of temperature-pressure variables are 244.84, 75.76, and 14.83, respectively, which demonstrate that these variables have the highest impacts on the permeability of the product passing through the membrane.
In order to have a highly reliable and predictable model, there must be a relation between the experimental data and predicted response by suitable matching polynomials. This relation is measured by the coefficient of determination (the R-squared, R 2 ). In fact, R 2 , as a validity criterion is the most trustworthy parameter for assessing the inconsistency of variables and regression. The value of R 2 is between zero and one and as much as it is closer to one, it indicates that the polynomial results are more consistent with the experimental results. The value of R 2 = 0.9714 indicates that there is very good agreement between the experimental results and the results of the polynomials. Thus, the second-order polynomial can be used to predict the results in the range that the variables were studied. A comparison between experimental and predicted results by second-order model is shown in the supplementary information, Fig. S The response surface curves for permeation flux (LMH) using the NF process are shown in Fig. 2a-c. The effect of pH on flux can be seen in Fig. 2a and b. Due to the prob > F value of 0.2889 for pH, changing pH did not have a significant effect on the permeation flux from NF90 membrane; however, the effect of pH may be different for other NF membranes. To increase the amount of permeation flux, a change in the feed water or the structure of the membrane should be made. No remarkable improvements in the permeation flux with changes in pH indicates that feed acidity

Fig. 2
3D graph of response surface for variation in permeation flux in terms of a pH and temperature, b pH and pressure, and c temperature and pressure. The experimental error for the permeate flux based on the standard deviations of the response at central points is 3.9 LMH or alkalinity has no significant effect on feed water profile and membrane pore size (Richards et al. 2010).
Studying 3D plots ( Fig. 2a and c) reveal that the effect of temperature on the permeation flux is considerable. By increasing the temperature, the amount of flux permeation increases in a nearly linear relationship. In fact, increasing temperature reduces viscosity and consequently increases water penetration coefficient. Moreover, raising temperature enhances the mobility of the membrane polymeric chain, which leads to an increase in the membrane pore size and the permeability of the membrane (Koyuncu 2002). The prob > F value for pressure as an independent variable is less than 0.0001 and the F value is 244.84. The contour plots as well as the response surfaces in Fig. 2b and c demonstrate that pressure is a significant variable in the proposed quadratic model. Pressure has the greatest impact on the rate of permeation flux in the designed experiments for removing nitrate from synthetic water. By increasing the pressure, the driving force in the membrane process increases that improves the permeation rate. The linear relationship between pressure and permeation flux indicates that concentration polarization phenomena does not occur on the surface of membrane (Santafé-Moros et al. 2007).

Statistical evaluation of nitrate removal by membrane for synthetic water
Equation (3) shows the quadratic model that predicts the nitrate rejection from the synthetic water as a function of several experimental variables and their interactions. The result of ANOVA for the related model is presented in Table S-4.
The F value of the model is 28.50 that shows the model is significant. Given that the prob > F value in the proposed model is less than 0.0001, the proposed model is meaningful and can accurately predict the experimental data. Moreover, prob > F values of pH, temperature, pressure, and pressure square variables are less than 0.05 which indicates they are the most significant terms in this model. The positive sign of the variables in the model indicates with increasing them, the response also increases. The lack of fit of the model is not significant based on the prob > F value in Table S-4. As mentioned in the previous section, the greater the F value of a variable in the model is, the more effective the variable is on the output response. Accordingly, the pressure F value with the value of 102.12, temperature with 91.04, and pH with 43.8, respectively, have the most impact on the removal of nitrate from the synthetic water by the NF process. In addition, the value of R 2 = 0.9625 indicates that there is a good agreement between the experimental results and the predicted values of the quadratic polynomial. Experimental and predicted results for the nitrate removal by the polynomial relationship can be found in Fig. S-4.
Similar to the permeation flux, the effect of operating parameters on the nitrate removal (%) by NF membrane process was investigated and illustrated via 3D diagrams. As can be seen in Fig. 3a and b, changing pH in the range of 5.5 to 8.5 has a significant effect on the nitrate removal (%). In NF membranes, which are used to separate watersoluble ions, in addition to the screening mechanism, the electrical interaction between the membrane and the solutes is also an effective mechanism for separation. The isoelectric point for NF90 membrane is 4.3 that means with increasing pH up to 8.5, the surface of membrane becomes highly negatively charged that causes an increase in nitrate removal due to the repulsive forces between the membrane surface and the ions with the same charge (Richards et al. 2010;Epsztein et al. 2018). However, the results show the increases in rejection when the pH increases from 5.5 to 7 is greater than when the pH increases from 7 to 8.5. This is due to a so-called membrane swelling phenomenon, in which the membrane pore size increased at alkaline conditions (Luo and Wan 2013).
The effect of temperature on nitrate removal (%) is shown in Fig. 3a and c. Results show increasing temperature from 13 to 27 (°C) leads the nitrate rejection (%) to decrease. This is attributed to the reduction of the feed water viscosity by raising temperature that leads to an increase in the water permeability coefficient. In addition, the mobility of the polymeric chain of the membrane is increased and consequently, the rate of water and the transported component (nitrate) passing through the membrane is increased by increasing the temperature. Therefore, increasing temperature leads to a decrement in the rejection of nitrate (Koyuncu 2002). The nitrate rejection (%) was found to be a strong function of pressure and temperature (see Table S -4). At the lower levels of pressure, the nitrate rejection (%) increases with an increase in the pressure (Fig. 4b and c). However, at the highest level of pressure the nitrate rejection (%) was found to decrease with an increase in pressure. By increasing the driving force, the performance of the membrane process is improved, and the rate of the nitrate removal is increased accordingly. Other reasons for increasing the amount of rejection can be indicated by compressing the membrane with increasing pressure (Torabian et al. 2007). The pressure increment beyond a certain level leads to a decrement in nitrate rejection (%), which can be due to the increase of the nitrate concentration on the feed side of membrane  surface that leads to a concentration polarization and a decrease in the observed rejection (Luo and Wan 2013).

Statistical evaluation of permeation flux for well natural water
In the "Synthetic water" section, the results of the model for synthetic water at a concentration of 100 mg/l were presented. In this section, the experiments were performed on natural water at a nitrate concentration of 95 mg/l and the results were evaluated by ANOVA test and corresponding plots. The order and quantity of test variables were determined by using the design of the test-response surface and the central composite design (CCD) methods. The experimental results, which include two responses of permeation flux and nitrate removal (%), are summarized in Table S -5. The results showed that the maximum permeation flow was 68.1 LMH, whereas the minimum was 7.7 LMH. In addition, the minimum and maximum nitrate removal rate were 22% and 74.8%, respectively. Repeated tests are carried out at the central points to verify the repeatability and estimate the error of the tests. The results were obtained by analyzing the response surfaces and contours for each of the two responses and then the optimal conditions were determined.

Statistical evaluation of permeability of membrane flow
The parameters that influence the product flux in the NF process are examined using RSM with the CCD. The obtained results are verified using statistical analysis and a secondorder model is presented according to the results. The regression model equation for the product flux is expressed as Eq. (4).
where T is the temperature (°C), P is the pressure (bar), and Flux is the product permeation (LMH).
The ANOVA was applied to check the model's significance and fitness (Table S-6). The model F value of 102.31 indicates that the model is significant. There is only a 0.01% chance that the model F value this large could occur due to noise. In this case pH, temperature, pressure, pH × pressure, and temperature × pressure are the most significant model terms. P values greater than 0.1000 indicate that the model terms are not significant. The lack of fit's F value of 1.77 implies that the lack of fit is not significant relative to the pure error. Due to noises, the probability of getting F value = 1.77 for lack of fit is 27.30%. Non-significant lack of fit is appropriate.
The response surface plots are presented in order to understand the effect of different variables interactions on flux and to determine the optimum level of each variable for maximum permeation flux. The response surface curves for NF membrane permeation flux using NF90 membrane for natural water are shown in Fig. 4a-c. Each 3D plot represents the number of combinations of the two-test variables. According to prob > F value of 0.0219, there is a significant effect on the permeation flux when pH changes. By increasing the pH, the amount of permeation of the product decreases. However, this decrement is not notable and reduction has a mild slope (see Fig. 4a and b). Increasing pH results in a decrease in the thickness of the membrane's active layer which leads the flux permeation to decrease (Nanda et al. 2010).
As depicted in Fig. 4a and c, increasing the temperature leads the permeation flux to increase due to the similar reason explained for synthetic water. Among the input variables, operating pressure has the biggest influence on the permeation flux, with an F value of 720.29. By increasing the driving force, the membrane performance increases, and the amount of the product permeation increases linearly. Concentration polarization has no influence on the process, as evidenced by the linear relationship between pressure and permeation flow. This might be owing to the membrane's high flow velocity and resulted turbulences in the membrane modules (see Fig. 4b and c) (Koyuncu 2002;Kim et al. 2007;Santafé-Moros et al. 2007).

Statistical evaluation of nitrate rejection (%) by membrane for natural water
The analysis of variance for the nitrate rejection from the natural water is shown in Table S-7. Multiple regression analysis of the experimental data provides the following regression equation for the nitrate rejection: where R (%) is the percentage of rejected nitrate from feed water. The terms such as T and P are similar to the previous sections. A second-order model was used to fit experimental results. The value of regression coefficient (R-squared = 0.9859) is very close to one which shows that the correlation is best suited in predicting the values for the NF membrane process.
The model F value of 78.8 implies the model is significant. There is only a 0.01% chance that an F value this large could occur due to noise. In this case, pH, temperature, pressure, and pressure 2 are significant model terms. The F value of 0.27 implies that the lack of fit is not significant. As shown in the previous section, the higher the F value of a variable, the greater the effect of that variable on the output response. As a result, variables including pressure, temperature, and pH have the greatest impacts on the nitrate removal by the NF process. Furthermore, the value of R 2 = 0.986 indicates that there is a good match between the experimental results and the results of the quadratic model, which can be seen in Fig. S-4.
The 3D response surface curves are plotted for elucidating the interactions of the various variables. The response surface curves for the nitrate rejection by the NF system are presented in Fig. 5a-c. Each 3D plot represents the number of combinations of the two-test variable. The maximum nitrate rejection is indicated by the surface confined in the smallest curve of the plot.
NF system is used for the separation of ions, which are soluble in water. The electrostatic interaction between the membrane and the solution is an effective mechanism for the removal of nitrate ions. If the surface charge of the membrane is negative, the membrane tends to eliminate the ions with the same charge, and consequently, the amount of removal of the anion will enhance. With increasing pH of the feed solution, the membrane's surface charge becomes more negative, and subsequently repulsion between the membrane and the anions in the water, especially nitrate increases as well. As a result, the rejection rate of nitrate increases with increasing pH (Kim et al. 2007;Santafé-Moros et al. 2007).
The effect of temperature on nitrate removal is presented in Fig. 5a and c. The nitrate rejection (%) was found to decrease with an increase in temperature from 13 to 27 °C.
The larger magnitude of the coefficient for pressure in comparison to the coefficients for temperature and pH in Eq. 5 indicates that the effect of pressure on nitrate rejection is more significant. The F value of 497.22 shows that pressure plays an important role in nitrate rejection. As shown in Fig. 5b and c, increasing the rejection rate by pressure is in a nonlinear relationship. At the beginning, with increasing pressure, the nitrate rejection rate enhances; however, after the pressure increment more than 7 bar, the rejection decreases and the slope of the graph declines. By increasing the driving force, the membrane permeation is increased and the nitrate rejection (%) is increased accordingly. It should be mentioned that in case of rising pressure beyond a certain amount, the nitrate rejection declines. This can be attributed to an increase in the nitrate concentration on the feed side of the membrane surface, which causes concentration polarization and a reduction in the observed rejection (Luo and Wan 2013).

Optimization of process parameters
One of the objectives of statistical approaches is to obtain the optimal operating conditions for processes. The objective in this study is the simultaneous optimization of the two responses, product flux and nitrate rejection, within the ranges of the input variables. Table 6 shows the boundary conditions of the input variables and responses.
Desirability is used when multiple responses should be optimized. For each of the responses, a degree of desirability is defined, and the total degree of desirability is calculated by the geometric mean of all degrees of desirability. This value is between zero and one and the obtained result is closer to target value when it is closer to one. Table 7 shows the best available optimal solutions calculated by the Design Expert software.
The results of experiments for the permeation flux (LMH) and nitrate rejection (%) via the NF process for the synthesized and natural water are shown in Fig. 6a and b, respectively. As can be seen from Fig. 9a, the water flux of the natural water is lower than that of the synthetic water in all the experiments. This can be attributed to the possible membrane fouling caused by more solutes, colloidal substances, and organic components in the natural water. Consequently, there is less active space to pass water through the membrane, which reduces the natural water permeation (Nanda et al. 2010;Firouzjaei et al. 2018). According to Fig. 6b, the rate of nitrate removal in the synthetic water is higher than the values obtained for the natural water in all experiments. In the natural water that contains a composition of different anions and cations with various charge valence (Table 1), the removal of nitrate is influenced strongly by the effect of membrane-solute and solute-solute interactions (Paugam et al. 2003(Paugam et al. , 2004b. The presence of divalent cations such as Mg 2+ and Ca 2+ leads to the neutralism of the membrane charge and thus to decline the membrane-anions repulsion.  The transfer of NO 3 − in the permeate is made easier and their retention decreases. Additionally, the presence of bicarbonate (HCO 3 − ) in the natural water results in an increase in the solution pH, which leads to an increase in the membrane negative charge density (Paugam et al. 2003(Paugam et al. , 2004a. The presence of sulfate ions (SO 4 2− ) cause the nitrate rejection to decrease. Due to their high valence, the sulfate ions are strongly rejected by the membrane. The transfer of nitrates was enhanced, which significantly reduced its rejection, due to the Donnan effect in order to restore the charge balance on both sides of the membrane (Donnan 1995;Paugam et al. 2004b). As a result of the combination of these interactions, the nitrate rejection from natural water is lower than that from the synthetic water with the same nitrate concentration.

Economic evaluation
The results of the technical evaluation indicate that pressure has the greatest effect on the water permeation and the rate of nitrate removal. Thus, the effect of pressure on the investment costs and operating costs of an industrial water treatment plant was investigated. Firstly, the effect of input water (the natural water) flow to the plant on the costs was evaluated. Coefficients of Verberne's economic model are displayed in Table 3. The input pressure to the membrane modules is assumed to be 6 bar. Moreover, water consumption per person was considered as 240 L/day. Hence, for cities with populations of 1000, 10,000, 100,000, and 1,000,000, the required water flows are 300, 3000 30,000, and 300,000 m 3 /day, respectively, assuming a ratio of 0.8 for the treated water flow to the input water flow. Based on the experimental results and membrane surface area of 37 m 2 , the number of the required membrane modules were calculated and are presented in Table 8. Obviously, by increasing the capacity, the number of needed membrane modules increases and reaches to 8208 modules in the maximum capacity.
The results of changes in the investment costs in terms of input water flow are shown (Fig. 7). As can be observed, all types of the investment costs increases at higher capacities. By increasing the capacity more membrane modules are required, which increases the investment costs. Increasing number of the required modules needs a larger construction structure with more complexity, which in turn leads to increment the cost of construction. Furthermore, larger and more complex mechanical and electrical equipment is needed. Accordingly, the total investment cost of about 1.5 million dollars for the feed flow of 12.5 m 3 /h enhances to 53 million dollars for the feed flow of 12500 m 3 /h.
As illustrated in Fig. 7b, the operating costs enhance due to the increment of feed capacity similar to the costs for modules. Due to the dependence of equipment depreciation cost to the investment costs, this parameter increases as well. The cost of energy depends on the energy consumed by electro-pumps. By increasing the capacity, more energy is required for pumps. The cost of the required chemicals in the process also depends on the capacity. At higher capacities, more chemicals are required, and the cost of the used chemicals enhances. Other costs such as quality control and maintenance are functions of the total investment cost and as a result by increasing the total investment cost these types of costs increase.  The cost of production per cubic meter of water as a function of input flow is shown in Fig. 8. According to Fig. 8, when the capacity increases the cost of production of water (per m 3 ) is reduced from $2.32 to $0.15 when the feed flow is higher than 1500 m 3 /h. This suggests that larger membrane processes have a relatively lower cost of water treatment and are more cost-effective.
Another important factor in an economic assessment is the calculation of the share of each cost. Distributions of different costs for the investment and operating costs are shown in Fig. 9a and b, respectively. According to Fig. 9a, the cost of construction (40% of total) has the highest portion, and the mechanical equipment with 35%, membrane module with 15%, and electrical equipment with 10% are the portions of other costs. The cost of membrane modules is only 15% of the total costs, which is due to the progress of the membrane modules production industry and finally the decrease in the final price of the membrane modules. According to Fig. 9b, among the operating expenses, the largest share belongs to depreciation with 31%, and the portion of electricity, chemicals, quality control, and maintenance costs are 24%, 20%, 17%, and 8%, respectively.

Effect of pressure on NF membrane modules
Pressure is one of the most critical factors in the design and operation of membrane water treatment systems, and changes in pressure will have a significant impact on the costs of both fixed and operating investments. To evaluate this, the effect of the pressure variation from 3 to 9 bar was studied. The temperature of the system is 20 °C and the feed input to the water treatment system is 30,000 m 3 per day. In addition, the ratio of permeation flux in terms of pressure at a constant temperature and pH was used to calculate the number of membrane modules required for the NF process. The number of membrane modules is one of the most important variables of the Verberne's economic model and its number in different pressures is given in Table 9.
The results of Table 9 show that with increasing pressure, the number of membrane modules needed for the process is reduced from 2049 modules at a pressure of 3 bar to 548 modules at a pressure of 9 bar, which indicates a decrease in the number of required modules with increasing the operating pressure. With increasing pressure, the permeation flux of treated water increases but given the fact that the final production of drinking water is considered constant, thus, less membrane area and smaller number of membrane modules is required. As a result, the cost of supplying membrane modules is reduced when the number of modules is reduced. Using the Verberne's economic model, the investment and operational costs of the NF membrane process were calculated at the pressure range of 3 to 9 bar. The results are shown in Figs. 10 and 11. Figure 10 shows that by increasing the pressure the construction cost decreases from 3.61 to 1.75 million dollars and the mechanical cost reduces from 3.4 to 2.4 million dollars. Moreover, as it is illustrated the membrane costs decreases from 0.24 to 0.548 million dollars. Increasing pressure, according to Table 9, results in a reduction in the number of needed modules, which, in turn, results in a reduction in Fig. 8 Cost of production per m 3 of water in terms of feed flow Fig. 9 Distribution of a the investment costs and b operating costs development expenses, mechanical equipment, and membrane module supply, all of which are proportional to the number of needed modules in the system. The reason for the increase in the electricity costs is its dependence on the input pressure. Electricity costs have risen from 1.6 to 2 million dollars. The total investment has risen from 10.67 million dollars to 35.6 million dollars, suggesting a 40% reduction in the total cost by tripling the input pressure flow into modules.
As shown in Fig. 11, when pressure increases from 3 to 7 bar, the cost of depreciation reduces from 0.86 to 0.474 million dollars, repair and maintenance costs decrease from 0.21 to 0.133 million dollars, and the quality control cost reaches to 0.267 from 0.42 million dollars. As pressure increases, the needed membrane modulus decreases, lowering the cost of construction and membrane, as well as depreciation, quality control, and installation operations costs. However, because the cost of the pump's energy consumption is the function of the pressure, when pressure increases from 3 to 7 bar, the energy costs enhances from 0.14 to 0.345 million dollars. In addition, the cost of consumable chemicals remains constant because it is a function of the input flow rate.
At a pressure of 7 bar, the total operating costs will reach at least 1.47 million dollars. At this pressure, the minimum operating cost is obtained. Hence, the pressure of 7 bar is considered as the optimal economical pressure for the water treatment via the NF process. With an increase in the pressure from 7 to 9 bar, the total operating costs increases to 1.512 million dollars. With the total operating cost and the annual capacity of the water treatment system, the cost of producing one cubic meter of treated water is calculated and summarized in Fig. 12.
According to Fig. 12, the cost per cubic meter of treated water decreased by increasing the pressure from 3 to 7 bar and increased after the pressure of 7 bar. Thus, the pressure of 7 bar is chosen as the economically optimal pressure for the water treatment process. By calculating the pressure of 7 bar as the optimum pressure, the distribution of investment and operating costs are given in Fig. 13a and b, respectively.
The mechanical equipment cost with the highest share of 33% has the largest share and construction cost, electrical equipment and membrane modules shares are 29%, 28%, and 10%, respectively. The cost of membrane modules, as low as 10% of the total cost, shows the progress in the membrane modules production industry which in turn leads to a reduction in the final price. Among operating costs, the depreciation costs with 32% has the largest share and the cost of electricity with 24% is the second. Additionally, quality control with 18%, chemicals with 17%, and repair and maintenance with 9% have allocated other costs.

Optimal technical and economic conditions
The results of the economic evaluation of the water treatment system show that at a given water temperature, and at a certain capacity, the pressure between 6 and 7 bar can produce purified water with the minimum operating cost.  The amount of nitrate removal in terms of temperature at pressures of 6 and 7 bar and at the normal pH of feed water is shown in Fig. 14.

Conclusion
In this study, we successfully examined the technical and economic aspects of removing nitrate from a natural well water sample and a model synthetic water with a nitrate concentration of 100 mg/L using an NF membrane process. The RSM-CCD technique was used for the design of the experiments and for the assessment of key parameters interactions such as pH, temperature, and pressure. The results of model synthesized water tests showed that the minimum and the maximum permeation fluxes were 16.5 and 84.3 (LMH), respectively. Moreover, the minimum and maximum nitrate rejection rates were 44.1% and 78.4%, respectively. In addition, with increasing pressure, the nitrate rejection and permeation flux increased, however, increasing temperature resulted in increasing the permeation flux and decreasing the nitrate removal. In addition, the pH increase had no significant effect on the amount of permeation, but it increased the nitrate rejection. Comparison of experimental results and the polynomial model presented by the statistical method to predict permeation flux and rejection indicated a good fit between the experimental results and the model results. A comprehensive economic evaluation of water production using the NF system in terms of investment and operating costs was performed. Focusing on the capacity of the water treatment plant and the operating pressure, which was shown to have the greatest impact on the permeate flux and the rate of nitrate removal, the investment and operating costs as well as the distribution of the various costs were analyzed. Results showed all types of investment costs increased at higher capacities. However, the cost of production per cubic meter of water reduces with increasing capacity, which suggests that larger membrane processes are more cost-effective. The effects of pressure on investment and operational costs indicated that as the pressure increased, the required membrane modulus decreased, lowering the cost of construction and membrane, as well as depreciation, quality control, and installation operations costs. However, increasing pressure results in an enhancement in energy costs due to the increase in the pump's energy consumption. When pressure increased from 3 to 7 bar, the energy costs enhances from 0.14 to 0.345 million dollars. With an increase in the pressure from 7 to 9 bar, the total operating costs increased to 1.512 million dollars. Hence, the pressure of 7 bars is achieved as the optimal economical pressure for the water treatment via the NF process. Calculations of the distribution of different costs showed that the cost of construction (40% of total) has the highest portion, and the mechanical equipment with 35%, membrane modules with 15%, and electrical equipment with 10% are the portions of other costs. Among the operating expenses, the largest share belongs to depreciation with 31%, and the portions of electricity, chemicals, quality control, and maintenance costs are 24%, 20%, 17%, and 8%, respectively. Considering the results of economic model for economic evaluation, the investment and operating costs, it can be concluded that (a) when the plant's input capacity is increased, the cost of fixed and operating investment increases, while the cost of production per m 3 decreases. This indicates the NF membrane system is cost-efficient in high capacities, (b) in a specific capacity, the pressure of 7 bar is the optimal pressure for the water treatment and it is economically feasible, and (c) among the operating costs, depreciation is the major contributor.
Author contribution Hossein Nouri Alavijeh, Morteza Sadeghi, and Ahmadreza Ghahremanfard were responsible for the study and contributed to the study's conception and design. Material preparation and data collection were performed by Ahmadreza Ghahremanfard. All authors contributed to the analysis and interpretation of data. Hossein Nouri Alavijeh wrote the first draft of the manuscript. All authors contributed to manuscript revision, read, and approved the submitted version.
Data availability Not applicable.

Declarations
Ethics approval and consent to participate This article does not contain any studies with human participants or animals performed by any of the authors.

Consent for publication Not applicable.
Consent to participate Not applicable.

Conflict of interest
The authors declare no competing interests.