Introduction

The rapid growth of the population as well as the expansion of industrial and agricultural activities leads to an increasing need for fresh water. Therefore, one of the most critical global issues is the surge in water demand and the resulting scarcity of water. Although about 97.5% of the surface of the earth is surrounded with water, however just 0.3% of the total fresh water resources are available as fresh water (Hamta and Dehghani 2017; Aydın and Tuna 2018; Ahmed et al. 2019). Groundwater, as a vital natural resource, is a key focus in water treatment due to its importance in meeting the escalating global demand for fresh water. The scarcity of fresh water resources, with only 0.3% of total fresh water available, highlights the urgency to explore innovative methods like desalination to produce fresh water on a large scale. Desalination processes, including membrane distillation (MD) and nanofiltration (NF), have emerged as effective solutions to address water scarcity challenges by purifying brackish water and enhancing water quality. Desalination methods like NF and MD are at the forefront of water purification technologies, offering energy-efficient alternatives to traditional processes like reverse osmosis (RO). MD, a temperature-driven process utilizing vapor pressure differences for separation, stands out for its advantages such as lower operating temperatures and pressures compared to conventional methods like multi-stage flash (MSF) and RO. The direct contact membrane distillation (DCMD) configuration, known for its simplicity and efficiency, is particularly suitable for groundwater desalination due to its ease of operation and maintenance. Consequently, investigations to find new ways to produce fresh water on a large scale has become an important and serious issue all over the world (Zhao et al. 2023). One of these processes, which has recently attracted much attention, is desalination process. Various water treatment and desalination processes can be divided into four categories: pressure-based, concentration-based, temperature-based and electrical-based driving force (Subramani and Jacangelo 2015; Hamta et al. 2017; Tawalbeh et al. 2018; Patel et al. 2020). The temperature-driven processes such as distillation and evaporation are no longer widely used because of the high energy consumption, various environmental issues and high investment cost (Chen et al. 2021). Other desalination methods are microfiltration (MF) (Jawad et al. 2021), ultrafiltration (UF) (Oré et al. 2022), nanofiltration (NF) (Rosentreter et al. 2021), reverse osmosis (RO) (Stein et al. 2021), electrodialysis (ED) (Generous et al. 2021), reverse electrodialysis (EDR) (Li et al. 2022) as pressure-driven processes and membrane distillation (MD) (Lee et al. 2022) as a temperature-driven process. Two types of the newest water purification methods which have attracted a lot of attention in recent years are NF and MD processes.

Currently, NF—a pressure-driven membrane process—is increasingly being used as a substitute for reverse osmosis in brackish water desalination, owing to its lower energy requirements in comparison with RO (Srivastava et al. 2021). The effective operating parameters in NF membranes, which are capable of removing low molecular weight molecules, are feed temperature, pressure, feed concentration and feed flow rate (Rosentreter et al. 2021; Kukučka and Kukučka Stojanović 2022).

The non-isothermal MD process combines two techniques of distillation and membrane separation. The MD process utilizes difference in vapor pressure as the driving force for separation, with the volatility difference of substances being the key factor in the process. The required difference in vapor pressure between membrane surfaces is achieved through a temperature difference (Luo et al. 2023). A membrane with hydrophobic properties is employed to facilitate the passage of water vapor through the membrane, while the liquid water is rejected, thereby producing water with an exceptionally high level of purity (Anbazhagan et al. 2023). Compared to other conventional desalination processes, the MD has several unique advantages, including lower operating temperature compared to multi-stage flash (MSF) and multi-effect distillation (MED), lower operating pressure compared to RO and also lower heat loss due to the low feed temperature (in the range of 20–80 °C). Fouling is considerably less pronounced in comparison with other membrane-based methods according to its hydrophobic nature and the large pore size of the membrane (Tayefeh 2022). It must be mentioned that the MD is a suitable process for applying sustainable energy options including solar, wind and bioenergy (Elhenawy et al. 2022).

With respect to condensation of vapors occurring on the permeate side, four configurations of MD generally exist: direct contact membrane distillation (DCMD), vacuum membrane distillation (VMD), air gap membrane distillation (AGMD) and sweeping gas membrane distillation (SGMD). Nevertheless, the DCMD has been reported to be the most applicable configuration because of its simplicity in design, operation and maintenance (Yang et al. 2022).

The operational parameters of the MD that effectively influence the process performance are feed properties, and membrane properties such as material, morphology and thickness. Even though the MD process has several advantages compared to usual desalination technologies for the treatment of salty water, the conventional MD membranes have several limitations such as low permeate flux and high thermal polarization (Alqaydi et al. 2022).

As the MD is a temperature-driven process, the heat transfer phenomenon and mass transfer phenomenon must be investigated simultaneously. Generally, the MD mass transfer is occurring because of the condensation of vapors on the permeate side as a result of vapor diffusion through the pores of the membrane. Extensive studies have been already performed on the vapor diffusion in the pores of hydrophobic membranes (Subramanian et al. 2019). In this way, different types of theoretical models for the prediction of vapor flux are available. The dusty model is a commonly employed framework for characterizing mass transfer in MD. This model comprises several mechanisms, namely molecular and surface diffusion, viscous flow and Knudsen diffusion. Bouchrit et al. (2015) studied the MD process to purify brackish water and investigated the Knudsen, molecular and Knudsen-molecular mass transfer models to predict the performance of MD (Bouchrit et al. 2015). According to their published results, the Knudsen-molecular mass transfer model is in acceptable agreement with the obtained data. Ismail et al. (2022) proposed a numerical model with two dimensions to simulate a DCMD module, and the study discovered that the vapor's transmembrane flux can be estimated using Fick's law, and the water flux is hardly influenced by the pressure differential across the membrane's two sides (Ismail et al. 2022). Shirzadi et al. (2022) described the performance of the ammonia in water separation and the transport phenomena of the VMD process by developing a CFD model (Shirzadi et al. 2022).

Since a few economic studies have been conducted on membrane distillation and there is no deep understanding in this regard, after a technical assessment, economic evaluation is necessary to the MD technology implementation (Usman et al. 2021). Thus, in order to assess the economic viability of the MD technique, a techno-economic investigation has been conducted to evaluate its potential for water purification. To estimate the total investment cost, the membrane process financial evaluation was studied by calculating the capital cost (CAPEX) and operating costs (OPEX), and finally the cost modeling was applied (Nthunya et al. 2022).

So far, many studies have been conducted on MD and NF processes, separately; nevertheless, no comprehensive study has been carried out to compare these two processes from the economic and process point of view (Halder et al. 2024). The work aims to study the economic evaluation and the feasibility study of the DCMD and the NF processes in the desalination of the groundwater. These two desalination processes were chosen to improve the quality of specific underground water. After analyzing the impact of various factors on the efficacy of both procedures, the MD process was scrutinized with regard to feed temperature and the flow rate, while the NF process was evaluated based on feed pressure and feed flow rate. Then, using the results, two processes were scaled up and evaluated according to the existing economic methods. Finally, two processes were compared with each other in terms of performance and economy. Due to the consumed energy price and the heating value on the total cost of the process, it was appropriately discussed economically. In this way, the performance of DCMD and NF using a commercial polytetrafluoroethylene membrane is investigated, and the most critical variables are studied including feed temperature and feed flow rate. Then a predictive model is developed by concurrently solving the heat transfer and mass transfer models.

The novelty of this work lies in its comprehensive techno-economic evaluation of DCMD and NF processes for water treatment. Unlike previous studies that have primarily focused on the technical aspects of these processes, our research bridges the gap by assessing the financial feasibility of employing DCMD and NF technologies for water desalination. By scrutinizing the performance of hydrophobic microporous flat sheet membranes in desalinating brackish water through DCMD and NF processes, we offer a unique perspective on the practical application of these technologies. Additionally, our use of an analytical model based on heat and mass transfer equations to predict process performance across diverse scenarios adds a novel dimension to our study. The model's high level of accuracy in flux predictions, coupled with our detailed comparison of the cost of permeated water between DCMD and NF processes, highlights the cost efficiencies associated with NF over DCMD in water treatment applications. These novel contributions make our research a valuable addition to the existing body of knowledge in the field of water treatment, providing insights that can inform decision-making in the industry.

Materials and methods

Membrane process

Qingfeng Filter Equipment Material Co., Ltd. provided a commercially available flat-sheet membrane composed of polytetrafluoroethylene (PTFE) and supported by a non-woven polypropylene (PP). The membrane specifications include a pore size of 0.45 µm, porosity of 75% and a contact angle of 115 degrees.

Polytetrafluoroethylene membranes are known for their high porosity and surface-to-surface dust-removal performance, ensuring stable pressure maintenance. PTFE is widely recognized for its excellent physico-chemical properties and is commonly used in various applications, including air filtration systems. The non-woven polypropylene (PP) support provides additional structural integrity to the membrane.

The membrane’s pore size of 0.45 µm ensures efficient filtration capabilities, while the high porosity of 75% enhances the performance. Additionally, the contact angle of 115 degrees indicates the membrane's hydrophobic nature, making it suitable for applications requiring water resistance. Overall, the membrane's composition of PTFE and non-woven PP, along with its specific characteristics, makes it a promising material for filtration applications due to its durability, porosity and hydrophobic properties. The brackish groundwater was collected and was used without any pretreatment as the feed. The features of the feed are presented in Table 1.

Table 1 The features of the brackish groundwater as the water source

A schematic representation of the experimental setup for NF is presented in Fig. 1, which illustrates the use of a gauge to record the output pressure of the module. A ball valve is also included in the return flow path to regulate the Reynolds number. Additionally, the flow rate is measured applying a flow meter. During the process, the permeate flux is determined with the help of a digital scale that has an accuracy of ± 0.001 g. Furthermore, a Hypro model roller pump is applied to provide the required pressure of the process. In order to control the feed pressure, a PID controller is used, which operates by adjusting the pump electric motor.

Fig. 1
figure 1

Schematic diagram of NF experimental setup

To perform the NF process, first, the desired membrane was subjected to compression using deionized water for 2 h under the operating conditions in terms of pressure and feed flow rate, which should be carried out to prevent undesirable changes in the membrane hydraulic resistance through the process. Then, the desired feed is pumped to the membrane module, where the applied pressure and feed flow rate are adjustable using a controller and a control valve, respectively.

Figure 2 shows a DCMD experimental setup schematic diagram that consisted of feed and permeate loops which is connected to a module. The feed was warmed through a heat exchanger in a feed tank before transport to the module. The permeate flow was cooled to 20 °C in permeate tank using a chiller. The hydrophobic membrane with active membrane area of 32 cm2 was fixed in the module. A flow control valve was applied to adjust the feed flow into the module using a flow meter for accurate adjustment. The pressure and the temperature of the flows were measured using a manometer and a thermocouple, respectively. The permeate flow was weighed in a permeate reservoir by applying a digital weight balance with an accuracy of ± 0.001 g to calculate the permeate flux.

Fig. 2
figure 2

Schematic diagram of DCMD experimental setup

The data were conducted under various operation conditions, and to study the process performance the flux and rejection were monitored in each experiment. It must be mentioned that the rejection value was calculated using an Electrical Conductivity Meter (EC meter, Emcee Electronics Inc, model 1152, USA). The experiments were performed at different feed flow rates (from 1 LPM to 2.5 LPM with an interval of 0.5 LPM) with the feed temperature varying from 35 to 65 °C with an interval of 10 °C (totally 16 experimental runs). In all the experiments, the temperature was 24oC and the feed flow rate on the cold side was 1.3 LPM.

Heat and mass transfer modeling

One of the most challenging characteristics of MD is the simultaneous operations of heat transfer and mass transfer between the permeate and feed sides. On the other hand, to prognosticate the flux of permeate and interfacial membrane temperature from the MD models, perception of the heat and the mass transfer is essential. To investigate the mass transfer rate in the MD method, the pressure differential of the vapor on either side of the membrane is required. To calculate the vapor pressure, the mean temperature at the interface of the fabricated membrane can be used, which is calculated from the bulk temperature.

Generally, there are three regions, which heat transfer occurs in a specific flux. In the feed region, heat is convectively transferred from the bulk to the surface of the membrane through the boundary layer. The second region is inside the membrane where heat transfer occurs by two ways; the first way is across the membrane by conduction, and the second mechanism pertains to the diffusion of vapor via the pores that the first one is kind of sensible heat and the second one is latent heat. And the third, convective heat transfer which occurs from the boundary layer to the permeate solution bulk. These three regions are as follows (Santos et al. 2021):

  1. (a)

    On the feed membrane side, the mechanism of heat transfer is described by Eq. (1)

    $$Q_{f} = h_{f} \left( {T_{bf} - T_{mf} } \right)$$
    (1)

    where hf represents the feed heat transfer coefficient and Tmf and Tbf are the membrane surface and bulk temperature in the feed side, respectively.

  2. (b)

    As mentioned above, in the membrane matrix, there are generally two forms of mechanisms of heat transfer, including heat transfer by conduction and heat transfer by evaporation mass flux, which are expressed in Eq. (2).

    $$Q_{m} = h_{m} (T_{mf} - T_{mp} ) + J_{w} \times \Delta H_{v}$$
    (2)

    where Tmf and Tmp represent the temperature of the membrane on the feed and permeate, respectively. Furthermore, ΔHv, hm and Jw are the enthalpy of vaporization, the membrane heat transfer coefficient and the permeate flux, respectively. The Hv and the hm can be represented by Eqs. (3) and (4), respectively, where Tmf is the temperature of the surface of the membrane at the feed side.

    $$H_{v} = 1.7535 \times T_{mf} + 2024.3$$
    (3)
    $$h_{m} = \frac{{k_{m} }}{\delta }$$
    (4)

    The variables km and δ correspond to the membrane's thermal conductivity and thickness, respectively. Generally, km is estimated by two models, as below:

    $$k_{m} = (1 - \varepsilon )k_{mm} + \varepsilon k_{g}$$
    (5)
    $$k_{m} = \left[ {\frac{1 - \varepsilon }{{k_{g} }} + \frac{\varepsilon }{{k_{mm} }}} \right]^{ - 1}$$
    (6)

    where ε, kg and kmm are the membrane porosity, thermal conductivity of water vapor in the membrane pores and thermal conductivity, respectively.

  3. (c)

    On the permeate side, the mechanism of heat transfer is described by Eq. (7).

    $$Q_{P} = h_{p} (T_{mp} - T_{bp} )$$
    (7)

    where hp represents heat transfer coefficient of permeate. Tbp and Tmp are the temperature of permeate bulk and temperature of the permeate side surface of the membrane, respectively. It is obvious that at the steady-state condition we can write:

    $$Q_{f} = \; Q_{m} = Q_{p}$$
    (8)

The temperature of the surface of the membrane on both, the permeate and the feed sides, in the DCMD module can be calculated using energy balance in Eq. (8). Finally, Eqs. (9) and (10) are iteratively used to predict the temperature of two sides of the membrane surface (Manawi et al. 2014).

$$T_{mf} = \frac{{h_{m} \left( {T_{bp} + \left( {\frac{{h_{f} }}{{h_{p} }}} \right)T_{bf} } \right) + h_{f} T_{bf} - J_{w} \Delta H_{V} }}{{h_{m} \left( {1 + \frac{{h_{f} }}{{h_{p} }}} \right) + h_{f} }}$$
(9)
$$T_{mp} = \frac{{h_{m} \left( {T_{bf} + \left( {\frac{{h_{f} }}{{h_{p} }}} \right)} \right) + h_{p} T_{bp} + J_{w} \Delta H_{v} }}{{h_{m} \left( {1 + \frac{{h_{p} }}{{h_{f} }}} \right) + h_{p} }}$$
(10)

The heat transfer coefficient of the feed (hf) and the permeate sides (hp) can be presented by Eqs. (11) and (12), respectively.

$$h_{f} = \frac{{{\text{Nu}}_{f} k_{f} }}{{d_{h} }}$$
(11)
$$h_{p} = \frac{{{\text{Nu}}_{p} k_{p} }}{{d_{h} }}$$
(12)

where kf and kp represent the thermal conductivities in the permeate and feed sides, respectively. Nuf and Nup are Nusselt numbers for the feed flow and the permeate stream, respectively, and dh is the hydraulic diameter.

Many equations are already presented for calculation of Nusselt number of laminar and turbulent flows, which have been reported in extensive studies (Meyer et al. 2019; Guo et al. 2021).

In this work, Eqs. (13) and (14) were applied to calculate the Nusselt number of laminar and turbulent flow (Chen et al. 2017), where Re presents the Reynolds number and Pr is the Prandtl number.

$${\text{Nu}}_{f,p} = 1.62(Re_{f,p} Pr_{f,p} (d_{h} /L))^{\frac{1}{3}} ,{\text{Re}} < 2300$$
(13)
$${\text{Nu}}_{f,p} = 0.023{\text{Re}}_{f,p}^{0.8} \Pr_{f,p}^{\frac{1}{3}} ,{\text{Re}} > 2300$$
(14)

In a nutshell, to have a prediction for the heat transfer and mass transfer, first of all, the physical properties of the membrane, the morphological membrane parameters, the module geometry and the DCMD operating conditions were defined (König 2023). Since surface temperature measurement of the membrane is not possible, the membrane surface temperature was predicted using the heat transfer method. Then, an iterative method was performed to solve the heat transfer and mass transfer equations simultaneously to measure the permeate flux. As an initial guess, the temperature of the permeate and feed sides were considered equal to the temperature of the bulk of the feed flow and the permeate side, respectively. It must be mentioned that the heat transfer coefficients of laminar and turbulent flows were predicted by Eqs. (13) and (14).

The mass transfer in the DCMD method can be categorized into three areas, which are analogous to heat transfer. The first mechanism involves mass transfer within the feed boundary layer. The second area is via the membrane itself, and the final area is in the permeate boundary layer (Mahmood et al. 2023). Darcy's law is utilized to demonstrate how mass is transported through the hydrophobic membrane's porous structure by Eq. (15).

$$J = B_{m} (P_{mf} - P_{mp} )$$
(15)

where Pmf, Pmp and Bm are the partial pressure of the feed flow and the permeate side and the membrane distillation coefficient, respectively. The Pmf and the Pmp can be calculated as follows:

$$P_{mf} = \alpha_{wf} P_{wf}^{0}$$
(16)
$$P_{mp} = \alpha_{wp} P_{wp}^{0}$$
(17)

where αwf and αwp are the water activity of feed flow and permeate side and P0mf and P0mp are the vapor pressures of the feed surface and the permeate surface, respectively. The αwf,p is given by Eq. (18), where xi is the mole fraction of i in the solution.

$$\alpha_{wf,p} = \, 1 - x_{i} - 10x_{i}^{2}$$
(18)

The interrelation of mass and heat transfer during the MD process is established through the use of the Antoine equation, which calculates the pressure of vapor at varying temperatures as follows:

$$P_{w}^{0} = \exp \left( {(23.1964) - \frac{3816.44}{{T_{m} - 46.13}}} \right)$$
(19)

where \(P_{w}^{0}\) represents the pressure of water vapor that can be applied on both the feed stream and the permeate side. The boundary layer mass transfer was analyzed using the film theory (Curcio and Drioli 2005) and the dusty-gas model (Lawson and Lloyd 1996), respectively. As was mentioned, molecular diffusion, Knudsen diffusion, as well as surface diffusion and viscous flow are some of the mechanisms of the mass transfer that are included in the dusty model. In order to simplify the model, in DCMD applications, viscous flow and surface diffusion can be disregarded, without significant effect on the correlation. The Knudsen number (Kn) can be exploited to identify the primary mass transport mechanism through the pores of the membrane in DCMD as below:

$$K_{n} = \frac{\lambda }{{d_{p} }}$$
(20)
$$\lambda = \frac{{k_{B} T_{m} }}{{\sqrt 2 \pi P_{m} \sigma_{v}^{2} }}$$
(21)

where kB is Boltzmann constant, Tm is average temperature, σv (0.2641 nm) is the diameter of water vapor collision, and Pm is average pressure of the pores.

Briefly, there are three different scenarios: (i) if Kn > 1, Knudsen diffusion is dominant, (ii) if Kn < 0.01, molecular diffusion is dominant, and (iii) Knudsen-molecular transition when 0.01 < Kn < 1.

In this work, the Knudsen-molecular mass transfer coefficient (Bm) was calculated as Eq. (22), where τ, δm, Pa, Tm, ε, PT, Dwa, dp and Mw are tortuosity, membrane thickness, average pressure of air inside the membrane, average membrane temperature, membrane porosity, total pressure, water–air diffusion coefficient, pore size diameter and water vapor molecular weight, respectively.

$$B_{m} = \frac{1}{{\frac{{3\tau \delta_{m} }}{{\varepsilon d_{p} }}\sqrt {\frac{{\pi RT_{m} }}{{8M_{w} }}} + \frac{{\tau \delta_{m} P_{a} RT_{m} }}{{\varepsilon P_{T} D_{wa} M_{w} }}}}$$
(22)

The tortuosity (τ) can be estimated from Eq. (23):

$$\tau = \frac{{(2 - \varepsilon )^{2} }}{\varepsilon }$$
(23)

The product of PT and Dwa for water–air can be expressed in Pa m−2 s−1 and can be defined as Eq. (24).

$$P_{T} D_{wa} = 1.895 \times 10^{ - 5} T_{m}^{2.072}$$
(24)

The calculation flowchart of the heat transfer phenomena and the mass transfer is presented in Fig. 3.

Fig. 3
figure 3

The calculation flowchart of the heat transfer phenomena and the mass transfer

Results and discussion

NF performance

The features of the nanofiltration process permeate water are given in Table 2. By comparing the results of Table 2 with characteristics of the brackish groundwater (Table 1), it can be concluded that the conductivity is reduced to 4120 from 7150 µS/cm.

Table 2 The analysis of the nanofiltration process permeate water

As the pressure plays an essential role in the nanofiltration process, the pilot NF tests were conducted at three different pressure levels. An analysis was carried out to examine how the operational pressure impacts the flux of the permeate during the process of nanofiltration, at three pressure levels of 4, 6 and 8 bar. Figure 4 depicts the influence of operating pressure on the permeate flux. As can be seen, the flux of the permeate increases with raising the pressure. It is noteworthy that although the flux of the permeate increases significantly, this increase in pressure causes more compression of the formation of the layer of cake on the surface of the membrane and increases the rate of fouling.

Fig. 4
figure 4

The nanofiltration membrane permeate flux at different pressures

As a result of the feed’s low concentration, the flux of the permeate drop-off is less noticeable. Nevertheless, due to membrane fouling, the flux reaches a constant value, which depends on the pressure of the permeate flow. Generally, in pressure-based membrane separation systems, the operating pressure has a positive influence on the permeate; in fact, with increasing the pressure, the flux of the permeate increases, which can be presented as follows.

$$J_{v} = L_{p} (\Delta P - \sigma .\Delta \pi )$$
(25)

where, Lp, P, σ and Δπ are membrane permeability coefficient, operating pressure, reflection coefficient and osmotic pressure difference, respectively. As can be understood from Eq. (25), as the operating pressure raises, the flux of the permeate raises. Nevertheless, increasing the osmotic pressure has a negative effect on the flow rate. The osmotic pressure has a direct correlation with the concentration of the feed, as the osmotic pressure increases, the flow rate decreases.

The impact of pressure on the permeate TDS in the NF process can be observed in Fig. 5. The results show that the increase in pressure improves the quality of the product water in terms of the TDS.

Fig. 5
figure 5

The pressure affect on the TDS of the permeate in NF process

To explore how the rate of the feed flow affect the flux of the permeate, various flow rates were tested, and the permeate flux values were recorded and are displayed in Fig. 6. The results indicate that an elevated flow rate results in a higher mass transfer coefficient within the concentration polarization layer, as well as in the mixing near the surface of the obtained membrane. This is due to the reduction of the gel layer formed on the membrane surface and the decrease in resistance of the mass transfer. Therefore, the species that accumulate on the surface return to the bulk flow, leading to a raise in the flux of the permeate. It should be mentioned that increasing the flow rate requires more energy consumption, so choosing a higher flow rate is not economically desirable. But as can be seen in Fig. 6, raising the rate of the feed flow resulted in a minor raise in the flow rate of the permeate for the process. This outcome can be attributed to the low concentration of the feed, which resulted in the creation of a negligible amount of cake layer on the membrane surface.

Fig. 6
figure 6

The flux of the permeate of the nanofiltration process at different feed flow rates

DCMD performance

The DCMD process was also investigated to improve the condition of the permeated water. In this way, the DCMD permeate water was analyzed and the results are reported in Table 3. According to experimentally obtained data, it was found that the DCMD permeate water is not suitable for drinking and agricultural uses, due to the very low conductivity (25 µs/cm); nevertheless, it is more suitable for industrial applications that require pure water.

Table 3 The analysis of the DCMD process permeate water

The temperature gap between the feed stream and permeate flow is recognized as the most significant factor that impacts permeate flux in the DCMD method. However, the increase in temperature has limitations in terms of economics and membrane resistance, so that at high temperatures there is a possibility of destroying the membrane structure, or with an increase in temperature, the process may not be economically justified in terms of energy consumption. The temperature effects of the feed on the resulted flux in the DCMD of the permeate are depicted in Fig. 7. As can be understood from Fig. 7, the flux of the permeate has increased significantly with raising the temperature of feed and can be attributed to the notable rise in steam pressure. According to the findings, elevating the temperature of the feed from 35 to 65 °C results in a rise in the flux of the permeate from 7.88 to 35.2 L/m2 h when the flow rate of the feed is set at 1 LPM.

Fig. 7
figure 7

The temperature of the feed stream effects on the DCMD permeate flux

Based on Fig. 7, it is evident that at a feed flow rate of 2.5 LPM increasing the temperature of the feed stream from 35 to 65 °C results in a 395% rise in permeate flux. For feed flow rates of 1 LPM, 1.5 LPM and 2 LPM; the permeate flux increases by approximately 340, 353 and 370%, respectively. The results proved that at higher temperatures of the feed, an increase in the feed flow rate could be more potent to improve the total flux.

In order to have a comparison between the experimental results and the correlated data, the correlation was done at a flow rate of the feed of 1 LPM at different temperatures. The comparison of experimental and theoretical data is demonstrated in Fig. 8. Comparing the obtained data and the theoretical results, shows that the correlation error is less than 3%, which shows that the data prediction is quite reasonable and can be used in different operating conditions.

Fig. 8
figure 8

Comparison of experimental and modeling results in the membrane distillation process with feed flow rate of 1 LPM

Figure 9 shows the temperatures effects on the permeate TDS at different temperature difference from 35 to 65 °C using DCMD method. As it is depicted in Fig. 9, the amount of TDS has decreased slightly with the increase in feed temperature.

Fig. 9
figure 9

The temperatures effects on the permeate TDS at different temperature difference from 35 to 65 °C using DCMD process

Experiments were conducted at various flow rates of the feed to examine their impact on permeate flux. As depicted in Fig. 10, increasing the feed flow rate leads to a corresponding raise in flux of the permeate. For instance, elevating the feed flow rate from 1 LPM to 2.5 LPM at a temperature of 65 °C results in a raise in flux of the permeate from 2.35 to 5.46 L/m2 h. A similar investigation carried out at feed temperatures of 35, 45, 55 °C demonstrates a 28% raise in flux, which attributed to the rise in flow Reynolds number. As the rate of the feed and flow raises, the Reynolds number increases, leading to turbulent flow and a raise in the mass transfer coefficient within the membrane solution. Additionally, a raise in the Reynolds number can reduce resistance of the transfer of the mass and mitigate the effects of concentration and temperature polarization.

Fig. 10
figure 10

The permeate flux of the DCMD method at different flow rates of the feed and different temperatures

Considering the temperature variance across the permeate and feed stream sides is the primary operational parameter influencing permeate flux in DCMD, the impact of feed temperature on permeate flux was tested by changing the feed temperature from 35 to 65 °C in 10 °C increments. The results of permeate flux by varying the temperature from 35 to 65 °C, and flow rates of the feed from 1.5 LPM to 2.5 LPM are presented in Fig. 11 at a constant temperature of the permeate (20 °C).

Fig. 11
figure 11

Effect of temperature of the feed on flux of the permeate at different flow rates of the feed

As depicted in Fig. 11, elevating the flow rate of the feed from 1 LPM to 2.5 LPM results in an increase in the flux of the permeate from 35.2 to 46.5 kg/m2 h, which shows about 32% improvement in the flux at 65 °C. However, at the temperatures of 35, 45 and 55 °C the flux was improved about 28%, with the same change in the flow rate of the feed. This phenomenon is related to the raising the Reynolds number of channel flow by raising the flow rate of the feed and consequently increasing the mass transfer coefficient in the membrane/bulk interface. Furthermore, the transfer resistances can be reduced by raising the Reynolds number, consequently leading to lessening the concentration and the temperature polarization effect.

In order to have a comparison between experimental data and correlated ones, the experiments were repeated at the flow rate of the feed of 1 LPM at different temperatures. As Fig. 12 indicates, raising the temperature of the feed results in a noteworthy raise in permeate flux because of the increases in vapor pressure. In other words, an exponential increase, from 7.88 to 35.2 L/m2h, can be seen in the permeate flux by raising the feed temperature from 35 to 65 °C, which the process can be correlated with an increase in vapor pressure.

Fig. 12
figure 12

The impact of the feed temperature on the permeate flux at flow rate of the feed of 1 LPM

Upon comparing the experimental data and theoretical results (as shown in Fig. 12), it can be observed that the error is less than 2%, suggesting that the model's predictions are highly reasonable.

Economic assessment

The economic assessment of industrial units is generally divided into two parts: initial investment costs (CAPEX) and operational costs (OPEX). Each of these two costs consists of different sections and items, which will be discussed further. It should be mentioned that in this work, conventional cost estimation methods have been applied to calculate the expense of the membranes and process equipment.

The expense of the membrane comprises the price of the membrane module and the membrane itself, which is directly proportional to the membrane's active surface area used in the process. The construction and installation costs are related to the construction of buildings and structures required for the installation and operation of the equipment. The total electricity consumed cost during the construction of the unit, the expense of generators and the cost of energy consumed inside the site constitute the energy cost of the construction of the unit.

Piping costs include high-pressure pumps, process piping, pumps and transfer piping within the unit plant. Engineering costs also include the costs of contracts and personnel training. Indirect costs are usually considered as percentages of the total direct investment cost in economic estimates.

The operating costs are those costs incurred after the plant is in operation and during actual operations. These costs include energy costs (heating and electricity), replacement of membranes and other equipment, chemicals, labor and regular maintenance inspections. Most of the cost of the energy of water purification units is related to the consumption of the energy of the pumps. The high-pressure pumps applied in the NF process and pumps of other processes are among the major energy consumers in pressure-driven water treatment units.

The labor cost is another significant part of operating costs, which is related to the wages of employees and unit operators. The cost is determined by a percentage of the fixed expense. The cost of replacing and washing the membranes depends on the number of times of monthly washing and the lifetime of the membrane. Determining the membrane washing times is not possible without conducting a practical pilot test in a long period of time, and in different units, it varies from several times a month to once every six months, and it is dependent on the type of feed and pre-treatment steps. To calculate the membrane washing costs, the washing times is determined based on the fouling data obtained from the laboratory setup and other similar industrial units. The membrane replacement time is also determined based on the recommended lifespan of the manufacturer and the information of similar industrial units. The repairment and replacement costs of the equipment, chemicals and side costs such as insurance and laboratory costs are among other items considered in this economical estimation.

NF process economic assessment

The detail of the Sethi and Wiesner (Sethi and Wiesner 2000; Hashemi et al. 2022) cost model is presented in Table 4, and the economic data required for the economic calculations of the nanofiltration process are given in Table 5.

Table 4 The details of the Sethi & Wiesner (Sethi & Wiesner 2000) cost model
Table 5 Data and assumptions of the NF economic study

In order to estimate and check the costs of the treatment unit, basic design was carried out for different input feed capacities. The type of treatment unit design has a significant effect on costs. In this case, designs were made to achieve a recovery rate of 70%. A summary of the design specifications of the nanofiltration unit can be seen in Table 6. These specifications as well as the information obtained from the experiments and similar units were used to estimate the costs.

Table 6 The design specifications of the nanofiltration process

The economic assessment of the nanofiltration process for the capacity of 2000 m3/day was carried out using the Sethi and Wiesner model (Sethi and Wiesner 2000). The annual unit cost, which is calculated per m3 of obtained water, represents the total of the yearly capital return and operating expenses. The annual return of capital is the amount of annual payment with a certain percentage of interest to compensate the initial investment cost during n years of the unit's life. The unit cost of water calculated for the nanofiltration process using the mentioned method is 0.63 ($/m3).

In these calculations, the details of fixed costs were specified. In this method, the initial investment costs of a membrane water treatment unit consist of various components, like the price of membranes, pumps, tanks, pipes and connections, equipment installation and commissioning. Table 7 summarizes the fixed costs of the NF process.

Table 7 The fixed costs of the NF process

Also, the operating costs of a water treatment unit in this model using NF process include energy costs, maintenance, membrane replacement costs, waste disposal costs and chemical costs which are listed in Table 8.

Table 8 The operating costs of the NF process

Moreover, to check the effect of the unit capacity on the output water expense, these calculations were repeated for other capacities. As it can be understood from Fig. 13, with the increase in the capacity of the process, makes the process more economical. It can be seen that the effect of increasing the capacity in smaller units is very significant in such a way that by doubling the input flow of the process, therefore, the annual cost is reduced to $0.28. But this trend decreases in higher capacities and reaches $0.05 for doubling the capacity.

Fig. 13
figure 13

The effect of nanofiltration unit capacity parameter on the price of the obtained water

According to Fig. 14, it can be understood that the effect of increasing the capacity on the initial investment is much more significant. This means that the annual return of capital compared to the annual operating costs constitutes a much larger component of the total annual cost in small units. This ratio decreases from 62% for the smallest unit to 51% for the largest unit.

Fig. 14
figure 14

The effect of nanofiltration unit capacity on fixed and operating costs

DCMD process economic assessment

To assess the economic viability of the DCMD plant, it is necessary to calculate the water unit cost. The CAPEX involves direct and indirect capital cost. The direct cost is composed of civil work, pretreatment, pumps, membrane and heat exchanger, while the indirect cost is composed of insurance, freight and construction overhead. According to literature, it was found that the indirect cost can be considered equal to 10% of the direct cost in the case of the DCMD plant (Tavakkoli et al. 2017). On the other hand, the OPEX consists of electrical energy, labor, maintenance, spares, chemicals, membrane replacement, brine disposal and steam.

In this work, the economic calculation was carried out based on the recent economic data (Sethi and Wiesner 2000) for a DCMD process (2000 m3/day). The capital cost and operating cost equations as well as economic assumptions are presented in Tables 9 and 10, respectively.

Table 9 The capital cost and operating cost equations
Table 10 Data and assumptions of the DCMD economic study

The temperature difference (ΔT) effect on OPEX, CAPEX and water unit cost is investigated. In order to set the ΔT, a trade-off should be carried out because elevating the ΔT can enhance the permeate flux, so less membrane area is needed that can reduce the CAPEX; on the other hand, more heat energy is required at higher temperature differences which can increase the OPEX. Consequently, in order to minimize the water cost, an optimization has to be considered between the membrane and the heating costs by increasing the operating temperature differences between the two membrane sides of DCMD. Figure 15 illustrates that the minimum water cost is $1.34/m3, which is obtained when the plant operates at the temperature difference of 35 °C.

Fig. 15
figure 15

Effects of the temperature difference (ΔT) on membrane, steam and water cost

As DCMD should be a cost-competitive plant, a cost comparison is essential between the DCMD and other conventional technologies. The evaluated water cost in the case of MD using economic evaluation is $1.34/m3, while the water cost in the case of MED, MSF and RO is $1.4/m3, $1/m3 and $0.5/m3, respectively (Turchi et al. 2015). In addition to its competitive cost, it should be noted that the cost of the DCMD can be reduced further using available waste heat.

As the DCMD plant's capacity is a significant cost determinant, a broad spectrum is selected to distinctly observe the impact of scale-up on the cost of water per unit. Figure 16 shows the economic study of the DCMD plant for the capacity in the range of 2000–50,000 m3/day.

Fig. 16
figure 16

Effect of plant capacity on water cost

The components of the total annual cost are shown in Fig. 17.

Fig. 17
figure 17

Total cost distribution over different annual cost components

According to Fig. 17 it was found that the steam price is the main cost to supply the required thermal energy for heating the feed stream. It is evident that in order to generate the required steam in the DCMD plant, an available fuel should be used. The steam cost depends on two factors, the fuel cost and the heating value of the fuel. As a result, the selection of the appropriate fuel has a considerable effect on the unit water cost. For the purpose of comparison, the water unit cost was calculated for four different fuels, and the results are plotted in Fig. 18. According to the results, natural gas is the best fuel for the steam production in the DCMD plant that can reduce the water cost to about one quarter compared to gasoline.

Fig. 18
figure 18

The effect of different fuels on water unit cost

The cost of the membrane is one of the effective parameters in the produced water cost using this process. This parameter has a direct impact on both initial investment costs and operational costs. Therefore, the produced MD process water cost is influenced by membrane expenses. As depicted in Fig. 19, the price of the obtained water increases with the raise in the unit price of the applied membrane. Therefore, with the advancement of the applied membrane technology of the MD method, it is hoped that the price of membrane distillation membranes will decrease and of course this process will become more economical.

Fig. 19
figure 19

The impact of membrane cost on the water production price in the DCMD method

Nanofiltration and direct contact membrane distillation had different performances in improving the desired groundwater. So, the process of nanofiltration improves the water sample for agricultural purposes by reducing the TDS of the desired water to about 2000 ppm. The output water from the nanofiltration process is not suitable for drinking purposes. But direct contact membrane distillation process produces water with TDS = 18 ppm, providing very high-quality water. The water produced from MD process is not suitable for agricultural and drinking purposes neither. Nevertheless, the nanofiltration process permeate flux is higher than the DCMD process (46.5 and 65 L/m2 h for the DCMD and nanofiltration processes, respectively).

The economic analysis showed that the nanofiltration process has the lowest unit price of produced water compared to the DCMD process (1.34 and 0.9 $/m3 for DCMD and nanofiltration, respectively). The estimated fixed cost for the nanofiltration process is higher than the DCMD process, but the operating costs of the membrane distillation process are significantly higher than the nanofiltration process.

The most important reason for the increase in operating costs of membrane distillation is the high consumption of the energy to warm the saline water of the feed. As this parameter has the greatest impact on the costs of this system, the unit price of the membrane distillation process permeate water becomes much more suitable and competitive if other energy sources can be used.

According to the presented results, the price of the obtained water from the MD system is less sensitive to the increase in the unit capacity, while this parameter is more sensitive for the nanofiltration system, and with the increase in the unit capacity, the decrease in the price of water is more noticeable than in the MD process. The results show that the nanofiltration process has the ability to remove 50% of dissolved solids in the target water sample, which is suitable for agricultural purposes. However, the DCMD process has the ability to remove more than 99.9% of dissolved solids in the desired water sample, which is suitable in industrial applications due to its high purity.

Conclusions

So far, many studies have been conducted on MD or NF processes; nevertheless, no comprehensive study has been carried out to compare these two processes from the economic and process point of view. In this work, these two desalination processes were chosen to improve the quality of specific underground water with the aim of improving the quality for industrial purposes. According to the impact of various factors on the efficiency of these two processes, two parameters of temperature of the feed and the flow rate of the feed for MD process, and feed pressure and flow rate of the feed for NF process were evaluated. Then, using the obtained data, two processes were scaled up and evaluated according to the existing economic methods. Finally, two processes were compared with each other in terms of performance and economic efficiency. Due to the consumed energy price and the heating value on the total cost of the process, it was appropriately discussed economically. In this way, the performance of DCMD and NF using commercial polytetrafluoroethylene membrane was investigated, and the most critical variables were studied including flow rate of the feed and temperature of the feed. The unit cost of DCMD was calculated using experimental methods. The price of obtained water for a unit of 2000 cubic meters per day was 1.37 ($/m3). By performing economic calculations in different capacities, it was observed that the process becomes more economical with increasing capacity. Finally, a predictive model is developed employing mathematical equations to solve for heat and mass transfer, concurrently. Comparing the experimental data and the results obtained from the MD process correlation using equations governing heat transfer and mass transfer, showed that the error of the performed modeling was less than 3%, which shows that the prediction of the model is quite reasonable and can be used in different operating conditions. It should be mentioned that even though the cost of the water production using DCMD is slightly higher than RO but quite comparable with other conventional desalination methods. This may be due to the fact that this technology is not developed very well in comparison with other well-known desalination methods, industrially; nevertheless, the research trend reveals that it has a great potential to be a bright technology in the field of water desalination. It must be mentioned that the cost of water can be even lower by reducing the steam-generating costs using inexpensive fuels or renewable energy in DCMD. It would be more feasible, if the water production plant had access to excess low-pressure vapor in industry plants like refineries, power plants, etc. It is suggested that, in the continuation of this work, the performance of the NF-DCMD hybrid method for the treatment of different waters and its economic evaluation is carried out. In addition to evaluating the performance of the NF-DCMD hybrid method for treating different waters and conducting its economic assessment, future work will consider incorporating economic assessments specifically for feedwaters with higher salinity levels, such as brackish water with TDS around 12,000 ppm. This inclusion aims to assess the cost-effectiveness and feasibility of implementing the NF-DCMD hybrid method in scenarios involving more saline feeds, aligning with the intended application of MD processes for handling extremely saline waters.