Batch Reverse Osmosis Desalination Modeling under a Time-Dependent Pressure Profile

As world demand for clean water increases, reverse osmosis (RO) desalination has emerged as an attractive solution. Continuous RO is the most used desalination technology today. However, a new generation of configurations, working in unsteady-state feed concentration and pressure, have gained more attention recently, including the batch RO process. Our work presents a mathematical modeling for batch RO that offers the possibility of monitoring all variables of the process, including specific energy consumption, as a function of time and the recovery ratio. Validation is achieved by comparison with data from the experimental set-up and an existing model in the literature. Energetic comparison with continuous RO processes confirms that batch RO can be more energy efficient than can continuous RO, especially at a higher recovery ratio. It used, at recovery, 31% less energy for seawater and 19% less energy for brackish water. Modeling also proves that the batch RO process does not have to function under constant flux to deliver good energetic performance. In fact, under a linear pressure profile, batch RO can still deliver better energetic performance than can a continuous configuration. The parameters analysis shows that salinity, pump and energy recovery devices efficiencies are directly linked to the energy demand. While increasing feed volume has a limited effect after a certain volume due to dilution, it also shows, interestingly, a recovery ratio interval in which feed volume does not affect specific energy consumption.


Introduction
Humanity is facing the challenge of clean water resource depletion as predictions show that half of humanity may live in regions with water stress problem by 2030 [1]. This situation appears worse if other factors are included such as population growth, the evolving economy, water resource pollution and climate change. Consequently, it is critical to find solutions to increase fresh water production and to provide safe drinking water for the world's growing population while limiting energy requirements.
Seawater desalination has attracted growing attention in the last few decades as an alternative technology for fresh water augmentation. However, seawater desalination inevitably costs significantly more than treatment of any other surface water resource. Indeed, with consideration of the difference in salinity between raw water (seawater) and fresh water (under World Health Organization tap water regulations), desalination induces such a great difference in chemical potential that it inevitably consumes, from a thermodynamics point of view, a high amount of energy to remove dissolved salt.
Nowadays, the most energy-efficient seawater desalination technology is reverse osmosis (RO). This technology has improved considerably in the last five decades and is at present the most developed seawater desalination technology at industrial scale [2]. These improvements are mainly due to the enhancement of membrane performance (with a quite good compromise between permeability and selectivity), pump efficiency and the implementation of energy recovery devices (ERDs), which result in considerable decreases in energy consumption (from approximatively 15 kWh/m 3 in the early 1970s to less than 2 kWh/m 3 today). Nevertheless, this consumption can be further reduced by optimizing the pilot design and its associated operating mode. A new trend is to work with the batch system where the recirculation of the rejected brine goes back into the feed tank. This process is named batch and semi-batch RO configurations. Additionally, there is room for improvement from an energetic standpoint considering the size of the feed tank, the profile pressure applied to the ERD and pump efficiencies.
In continuous mode, the feed pressure depends on (1) the desired conversion yield and (2) the salt concentration to guarantee a minimum permeate flow at the end of the spiral wound. Whereas batch RO is, in theory, the only configuration where the required minimum energy is equal to the thermodynamic theoretical minimal specific energy consumption (SEC), by matching/adapting the applied pressure to the increasing osmotic pressure [3]. Thus, by having the possibility to reduce the difference between pump pressure and osmotic pressure, batch RO makes it possible to control and minimize the polarization layer. It has to be noted that, in reality, it is impossible to reach such a limit due to many potential energy losses such as electrical energy conversion into mechanical energy efficiency (pump efficiency) as well as the concentration of polarization (selective mass transfer), pressure loss (friction) and ERD energy loss. However, the minimum practical energy consumption is reduced by nearly 30% when one passes from a continuous RO configuration to a batch configuration (from 1.54 kWh/m 3 to 1.1 kWh/m 3 ) [3].
Indeed, in a conventional continuous configuration (Figure 1, Type A), the pressure is fixed according to the osmotic pressure of the outlet of the last pressure vessel module; this is to satisfy the objective of treatment in terms of water recovery. In the batch configuration, feed water is pumped and contained in a feed tank, which can be pressurized or not depending on the configuration. The feed is, then pumped through a pressurized membrane vessel where the RO filtration occurs. The permeate is recovered, while the retentate is recirculated to the feed tank resulting in an increase of its concentration. This operation, named a pass, is reconducted several times until reaching the desired water recovery. Then the feed tank is emptied (corresponding to the final concentrate) and refilled to start a new cycle. Two configurations can be adapted in batch mode. The first one requires an ERD to recover the pressure and transfer it to the feed stream ( Figure 1, Type B), and the second one requires a pressurized feed tank ( Figure 1, Type C). This last configuration, with the pressurized tank, seems, at first sight, easier, but it might be very constraining and difficult to set up at a larger scale. The feed pump in Type A delivers constant pressure, while it delivers time variable pressure in the rest of the processes, to keep producing permeate flux as feed osmotic pressure increases with time. ERDs are used to recover energy from the brine in processes A and B. The pressurized tank is schemed as a tank with a piston that retains the brine's energy, acting as an ERD.
The advantage of working with the batch RO configuration is that the pressure can be modulated and adapted precisely according to the osmotic pressure evolution (Figure 2). Batch RO can operate similar to an N-stage configuration by increasing pressure like a staircase function to overcome increasing osmotic pressure between stages. An alternative pressure profile is to place an osmotic pressure sensor (conductometer) to apply enough pressure that would keep the net driving pressure (NDP; NPD = ∆P − ∆π) constant to maintain a constant flux. Any random pressure profile that is greater than the osmotic pressure would be suitable for the batch RO. Figure 2 was drawn to compare the two different operating modes. The mean permeate flux was fixed at 12 L·m −2 ·h −1 for both configurations. The osmotic pressure stays parallel to the pump pressure for batch RO, whereas the osmotic pressure tends to reach the pump pressure for continuous RO. In continuous RO, the permeate flux is also a function of the module position in the pressure vessel (from 26 to 3 LMH), while in continuous RO, it remains constant as the batch RO pressure was set to deliver constant flux. Thus, the recovery ratio depends on the module's place in the pressure vessel (PV) for continuous configuration, whereas in batch RO it is a function of the process time. What is also important to note is that the salt convective flux (J S = J W ·C S ) is different, showing that the scaling risk is not the same.
Membranes 2021, 11, x FOR PEER REVIEW 3 of 20 Figure 1. Schemes of four reverse osmosis (RO) desalination processes: Type A, one-stage continuous RO; Type B, batch RO with ERD and non-pressurized feed tank; Type C, batch RO with pressurized feed tank; Type D, semi-batch RO.
The advantage of working with the batch RO configuration is that the pressure can be modulated and adapted precisely according to the osmotic pressure evolution ( Figure  2). Batch RO can operate similar to an N-stage configuration by increasing pressure like a staircase function to overcome increasing osmotic pressure between stages. An alternative pressure profile is to place an osmotic pressure sensor (conductometer) to apply enough pressure that would keep the net driving pressure (NDP; NPD = ΔP − Δπ) constant to maintain a constant flux. Any random pressure profile that is greater than the osmotic pressure would be suitable for the batch RO. Figure 2 was drawn to compare the two different operating modes. The mean permeate flux was fixed at 12 L.m −2 .h −1 for both configurations. The osmotic pressure stays parallel to the pump pressure for batch RO, whereas the osmotic pressure tends to reach the pump pressure for continuous RO. In continuous RO, the permeate flux is also a function of the module position in the pressure vessel (from 26 to 3 LMH), while in continuous RO, it remains constant as the batch RO pressure was set to deliver constant flux. Thus, the recovery ratio depends on the module's place in the pressure vessel (PV) for continuous configuration, whereas in batch RO it is a function of the process time. What is also important to note is that the salt convective flux (JS = JW·CS) is different, showing that the scaling risk is not the same. Another alternative to continuous RO desalination is the semi-batch configuration (Figure 1, Type D). The main difference with the batch process is that the recirculation stream is mixed instantly with the feed stream, instead of being stored in a feed tank. Feed salinity increases with time; thus, the pump pressure also increases to keep a positive permeate flux. While the main focus of our study is the modeling of batch RO desalination, it is worth mentioning that the semi-batch process, also known as closed circuit reverse osmosis (CCRO), is patented and commercialized by Desalitech Company under the name of Reflex CCRO [4]. The company claims a high recovery ratio of up to 98%, energy savings as well as less fouling and scaling. The main findings regarding the performance of CCRO were published in a series of papers exploring all aspects of this technology [5][6][7]. CCRO is now incorporated in different RO software such as ROSA [8], LewaPlus [9] and PROTON [10]. Another alternative to continuous RO desalination is the semi-batch configuration ( Figure 1, Type D). The main difference with the batch process is that the recirculation stream is mixed instantly with the feed stream, instead of being stored in a feed tank. Feed salinity increases with time; thus, the pump pressure also increases to keep a positive permeate flux. While the main focus of our study is the modeling of batch RO desalination, it is worth mentioning that the semi-batch process, also known as closed circuit reverse osmosis (CCRO), is patented and commercialized by Desalitech Company under the name of Reflex CCRO [4]. The company claims a high recovery ratio of up to 98%, energy savings as well as less fouling and scaling. The main findings regarding the performance of CCRO were published in a series of papers exploring all aspects of this technology [5][6][7]. CCRO is now incorporated in different RO software such as ROSA [8], LewaPlus [9] and PROTON [10].
Research on batch configuration is still limited, and large-scale use remains under investigation. Some patents were introduced by Szucz et al. [11], Oklejas [12] and Warsinger et al. [13]. Warsinger et al. [14] modeled the batch configuration and semi-batch configurations and found that they can save up to 64% and 37% of energy, respectively, for brackish water at high water recovery. They explained that the batch configuration exhibits higher energy efficiency than CCRO does because of the high entropy generated in CCRO caused by mixing brine with feed water, which is lessened in the batch process where the concentration difference between the brine and the feed is much lower (both stream concentrations increase). Another advantage of the batch mode is the less fouling propensity due to better control of the effective driving force, which allows to control the polarization concentration phenomena and thus reduces fouling. Warsinger et al. [15] explored the effect of batch configuration on scaling. They concluded that due to the shorter residence time of scalants and the cyclic concentration of the seawater feed, batch RO is more likely to resist inorganic fouling of Gypsum CaSO4 and could reach high recoveries greater than 75% while continuous RO is limited to 60% in order to avoid scaling under the same conditions. Our paper proposes an approach to modeling the batch RO process that is based on the works of Slater et al. [16] and is different than recent models. We opted for this model because it allows the use of time-dependent pressure profiles and detailed description of process variable dynamics, using a forward and direct analytical approach delivering dif- Research on batch configuration is still limited, and large-scale use remains under investigation. Some patents were introduced by Szucz et al. [11], Oklejas [12] and Warsinger et al. [13]. Warsinger et al. [14] modeled the batch configuration and semi-batch configurations and found that they can save up to 64% and 37% of energy, respectively, for brackish water at high water recovery. They explained that the batch configuration exhibits higher energy efficiency than CCRO does because of the high entropy generated in CCRO caused by mixing brine with feed water, which is lessened in the batch process where the concentration difference between the brine and the feed is much lower (both stream concentrations increase). Another advantage of the batch mode is the less fouling propensity due to better control of the effective driving force, which allows to control the polarization concentration phenomena and thus reduces fouling. Warsinger et al. [15] explored the effect of batch configuration on scaling. They concluded that due to the shorter residence time of scalants and the cyclic concentration of the seawater feed, batch RO is more likely to resist inorganic fouling of Gypsum CaSO 4 and could reach high recoveries greater than 75% while continuous RO is limited to 60% in order to avoid scaling under the same conditions. Our paper proposes an approach to modeling the batch RO process that is based on the works of Slater et al. [16] and is different than recent models. We opted for this model because it allows the use of time-dependent pressure profiles and detailed description of process variable dynamics, using a forward and direct analytical approach delivering differential equation describing the whole batch RO system concentrations. A Python algorithm was developed to that end. Validation is conducted by comparison to existing models and experimental data. An energetic comparison between batch RO and continuous RO configurations is discussed to highlight energetic performances. The batch RO process is also simulated under a wide set of parameter variations and under different pressure profiles to explore its energetic response.

Experimental Set-Up
A laboratory-scale system developed by Koch (labcell-CF-1 model) was used to conduct the batch RO experiment ( Figure 3) in order to properly validate the batch RO model. The selected batch RO configurations used were Type C and B with η ERD = 1 (Figure 1).

Experimental Set-Up
A laboratory-scale system developed by Koch (labcell-CF-1 model) was used to duct the batch RO experiment ( Figure 3) in order to properly validate the batch RO m The selected batch RO configurations used were Type C and B with = 1 ( Figure   Figure 3. Experimental set-up used to validate the batch RO model [17].
The set-up was composed of a 500 mL feed tank (pressurized with nitrogen ga tangential recirculation pump and a membrane filtration cell. A Filmtec XLE flat shee membrane with a 21.5 cm 2 surface area was used for this study. The temperature was constant at 25 °C by means of a cooling system, and the pressure was imposed manu by controlling the opening valve of the nitrogen pressurized bottle. Permeate wa trieved in a storage recipient while brine was put back into the feed tank by a recircula pump. Permeate volume was monitored during the process by measuring water we over time.
Water permeability was identified by measuring the pure water flowrate at diffe pressures. The value found was 11.08 L/m 2 /h/bar. Salt permeability was determine measuring permeate salinity with a conductometer for different pressures. The m value found was 4.12 10 −7 m/s. Two experiments were conducted with different initial concentrations and different feed volumes. Pressure was regulated manually; a stair pressure function of 10 bar + 2 bar/15 min was selected. The experiments were condu for an average time of 105 min, and permeate average concentration and its weight measured every 5 min.

Process Modeling
Batch RO with a non-pressurized feed tank was considered for this modeling s (Type B), which can also be suitable for Type C by fixing = 1. Figure 4 represent scheme of a batch RO configuration. The raw water is stored in a feed tank (with vol Vf [t]) and goes through the RO membrane. The produced water is stored in a perm tank (with volume Vp [t]) whereas the concentrate is recirculated to the feed tank. The tank volume decreases with time as the feed goes through an RO membrane (perme The set-up was composed of a 500 mL feed tank (pressurized with nitrogen gas), a tangential recirculation pump and a membrane filtration cell. A Filmtec XLE flat sheet RO membrane with a 21.5 cm 2 surface area was used for this study. The temperature was kept constant at 25 • C by means of a cooling system, and the pressure was imposed manually by controlling the opening valve of the nitrogen pressurized bottle. Permeate was retrieved in a storage recipient while brine was put back into the feed tank by a recirculation pump. Permeate volume was monitored during the process by measuring water weight over time.
Water permeability was identified by measuring the pure water flowrate at different pressures. The value found was 11.08 L/m 2 /h/bar. Salt permeability was determined by measuring permeate salinity with a conductometer for different pressures. The mean value found was 4.12 × 10 −7 m/s. Two experiments were conducted with different initial feed concentrations and different feed volumes. Pressure was regulated manually; a staircase pressure function of 10 bar + 2 bar/15 min was selected. The experiments were conducted for an average time of 105 min, and permeate average concentration and its weight were measured every 5 min.

Process Modeling
Batch RO with a non-pressurized feed tank was considered for this modeling study (Type B), which can also be suitable for Type C by fixing η ERD = 1. Figure 4 represents the scheme of a batch RO configuration. The raw water is stored in a feed tank (with volume V f [t]) and goes through the RO membrane. The produced water is stored in a permeate tank (with volume V p [t]) whereas the concentrate is recirculated to the feed tank. The feed tank volume decreases with time as the feed goes through an RO membrane (permeate). Feed tank concentration C f (t) increases because of the retentate recirculation. The permeate tank receives produced water at each pass at concentration C p (t) where the average concentration is denoted C pav (t) and the permeate volume is denoted V p (t). The pump is of variable pressure and can be adjusted as desired to overcome feed osmotic pressure increases, with a constant flowrate Q f (t). The permeate flowrate is denoted Q p (t). The retentate flowrate is given by Q r (t) = Q f (t) − Q p (t). The concentrate energy is retrieved via an ERD and channeled to the feed stream. This configuration is equivalent to batch RO with a pressurized feed tank if the ERD efficiency is ideal. ate tank receives produced water at each pass at concentration Cp (t) where the average concentration is denoted Cpav(t) and the permeate volume is denoted Vp(t). The pump is of variable pressure and can be adjusted as desired to overcome feed osmotic pressure increases, with a constant flowrate Qf (t). The permeate flowrate is denoted Qp(t). The retentate flowrate is given by Qr(t) = Qf (t) − Qp(t). The concentrate energy is retrieved via an ERD and channeled to the feed stream. This configuration is equivalent to batch RO with a pressurized feed tank if the ERD efficiency is ideal. The RO module is characterized by its surface area , water permeability and salt permeability . A cycle is composed of several passes, and it ends when a condition of one of the variables is reached, for example, the feed osmotic pressure or recovery ratio. The feed tank is then emptied and refilled to start another cycle. All concentrations, volumes, pressures and fluxes depend on time due to the transient nature of the batch process. With consideration that the recovery ratio per pass is very low compared to the recovery ratio per cycle, the spatial osmotic variation inside the membrane was neglected. Moreover, the batch RO process is usually constituted of only one or two elements per pressure vessel [18,19], thereby limiting the spatial osmotic variation. The feed osmotic pressure is time dependent due to the recirculation of concentrate which will also impact the inlet tank osmotic pressure. The following initial conditions are adopted:

Fluxes Models
Van't Hoff's law is used to express osmotic pressure as a function of feed concentration (Equation (1a,b)). The produced water is estimated through the solvent flux (L/h/m 2 ), whereas its quality is linked to the salt transport/transfer solute flux (kg/h/m 2 ) as shown in Equations (2) and (3). Equation (4) gives the relation between the water production and its quality. The pressure drop along the spiral wound is noted as Δ (Equation (5)). The RO module is characterized by its surface area S, water permeability A w and salt permeability B s . A cycle is composed of several passes, and it ends when a condition of one of the variables is reached, for example, the feed osmotic pressure or recovery ratio. The feed tank is then emptied and refilled to start another cycle. All concentrations, volumes, pressures and fluxes depend on time due to the transient nature of the batch process. With consideration that the recovery ratio per pass is very low compared to the recovery ratio per cycle, the spatial osmotic variation inside the membrane was neglected. Moreover, the batch RO process is usually constituted of only one or two elements per pressure vessel [18,19], thereby limiting the spatial osmotic variation. The feed osmotic pressure is time dependent due to the recirculation of concentrate which will also impact the inlet tank osmotic pressure. The following initial conditions are adopted:

Fluxes Models
Van't Hoff's law is used to express osmotic pressure π as a function of feed concentration (Equation (1a,b)). The produced water is estimated through the solvent flux J w (L/h/m 2 ), whereas its quality is linked to the salt transport/transfer solute flux J s (kg/h/m 2 ) as shown in Equations (2) and (3). Equation (4) gives the relation between the water production and its quality. The pressure drop along the spiral wound is noted as ∆L (Equation (5)). and where ∆P(t) represents both the booster pump pressure and main pump pressure.

Mass Balances
The mass balance made on the product tank gives dt , the mass balance becomes: The mass balance made on the membrane module gives The mass balance made on the feed tank gives As the feed tank is supposed to be a perfectly mixed tank reactor, with a combination of Equations (7) and (8) and with the knowledge that Q p (t) = − dV f (t) dt , the variation of the feed concentration is given by In this constant volume system (Batch reactor), the global mass balance yields In the same way, the fact that the total water volume is constant gives Equations (6) and (9) together form a coupled nonlinear differential system of Equation (12): Solving Equation (12) would allow one to find C f and C pav , from which the rest of the variables can be deduced. To do so, C p , Q p , V p and V f should be written as a function of C f and C pav .
Combining Equations (1)- (5) yields which can be rewritten as Solving the second order equation and keeping only a positive solution yields C p as a function of C f at any given time: The following constants are introduced to simplify the expressions: Further, C p can then be rewritten as Additionally, Q p can be deduced from Equation (2): Equations (10) and (11) allow V p and V f to be calculated as a function of C f and C pav : and The coupled differential Equation (12) becomes . Solving the coupled differential equations allows one to compute all variables of the process since they are all written as a function of C f , C p , C pav , ∆P and α i , making it possible to precisely monitor the whole process.
The input parameters are divided into design parameters (initial tank volume V f 0 and raw water quality C f 0 ), membrane properties (surface S and water and salt permeabilities A w and B s ) and the operating parameter (membrane pressure over time ∆P(t)).
A Python algorithm was developed to solve Equation (12) and to compute the variables over time using the Runge-Kutta fourth order method. This method was chosen because it does not require higher order derivatives of functions. Moreover, it has a total truncation error on the order of O(h4) (where h is the step size). It may be checked that there is no improvement in the accuracy of the computed trajectories (and thus of the values C f and C pav ) in using smaller time. Additionally, in this case, the computed values were inside the stability region of the RK4 method. The employed numerical solver offered both stability and convergence, therefore, it was deemed suitable to solve the studied model.
By entering the initial values, membrane characteristics and the pressure function, Equation (12) allows for the computation of C f and C pav for the next pass, which allows the use of Equation (13), (1), (14) and (10) to compute, respectively, the instantaneous permeate concentration, osmotic pressure, permeate flowrate and recovery ratio. The same steps are reconducted until a condition on the permeate average concentration or recovery ratio is reached.

Concentration Polarization
Concentration polarization (CP) is a complex phenomenon in which ions accumulate onto the membrane surface due to the convective flux J w . This phenomenon occurs at the interface of the feed solution and the membrane, and it leads to an increase of the local salt concentration (i.e., osmotic pressure), reducing the effective driving force and thus resulting in flux decline and more energy consumption [20]. This increase in the local osmotic pressure generates a CP layer. The film model, used for modeling, supposes a one-dimensional flow, and a concentrating polarization layer only based on C f as the conversion yield for one pass is weak in the batch RO process. Thus, with consideration of a boundary layer with a thickness of δ, interfacial membrane concentration C f is the solution of Equation (17), where CPF is the concentration polarization factor, C m is the solute concentrations at the membrane surface, ψ allows for the osmotic pressure calculation from C m and k represents the mass transfer coefficient. It is common to estimate the mass transfer coefficient using the Sherwood correlation, which illustrates its dependence on the Reynolds number, Schmidt number and Sherwood number. The literature offers a variety of correlations depending on the hydrodynamics regime and the geometric channel design. For the turbulent flow, a widely used Sherwood correlation [21] is shown in Equation (18): However, variables, which are usually constant in continuous mode, depend now on time as seen in model equations. Thus, since the feed concentration, permeate concentration and permeate flux depend on time, the concentration on the membrane interface C m will depend on time as well. For each iteration, Equation (19) will be solved after Equation (12) is solved. This means that CPF is a time variant:

Model Including Concentration Polarization
To include the CP phenomenon in the algorithm, the coupled equations in Equation (12) are changed as the effect of CP on the produced permeate volume V p_CP and permeate concentration C p_CP is included. The algorithm would also change to compute membrane concentration at each iteration and to take into account the effect of CP on osmotic pressure, permeate flux, permeate concentration, permeate produced volume and recovery ratio. The equations become .
At the beginning of each iteration, after C f is computed, C p is deduced using Equation (13), and then C m is computed using Equation (17). The mass transfer coefficient and permeate flux are computed using Equations (18) and (2).
The new permeate concentration which takes into account CP is computed using Equation (13), replacing C f with C m : The new osmotic pressure, flowrate, permeate produced volume and recovery ratio become The modified equations take into account CP in each iteration for further precise results. The process is reconducted at each iteration as depicted in Figure 5. The inputs are the initial water concentration C f0 , the initial water volume in the tank C f0 , the pressure function ∆P(t), the membrane surface area S and the water and salt permeabilities A W and B S . The step of the returning process variables delivers the value of all variables at any moment. The stop condition depends on the fixed objectives (the recovery ratio or feed concentration in the tank).
At the beginning of each iteration, after is computed, is deduced using Equ tion (13), and then is computed using Equation (17). The mass transfer coefficient a permeate flux are computed using Equations (18) and (2).
The new permeate concentration which takes into account CP is computed usi Equation (13), replacing with : The new osmotic pressure, flowrate, permeate produced volume and recovery ra become The modified equations take into account CP in each iteration for further precise sults. The process is reconducted at each iteration as depicted in Figure 5. The inputs the initial water concentration Cf0, the initial water volume in the tank Cf0, the pressu function ΔP(t), the membrane surface area S and the water and salt permeabilities AW a BS. The step of the returning process variables delivers the value of all variables at a moment. The stop condition depends on the fixed objectives (the recovery ratio or fe concentration in the tank).

Specific Energy Consumption
The SEC is the energy required to produce one cubic meter of permeate. Equation (19) computes the SEC at any moment while the process is running by calculating the sum of the energy used to produce permeate volume V p_CP under pressure ∆P pump , minus the energy that is not recovered in the concentrate by the ERD when recycling the brine volume (17). The whole is then divided by the pump efficiency and reduced to the produced permeate volume. The ERD energy efficiency is defined by η ERD .
The developed Python algorithm can compute the SEC at any time in the process. The pressure function, initial values and membrane characteristics are implemented at the beginning of the algorithm. Coupled differential Equation (12) is solved using the Runge-Kutta fourth order to compute C f and C pav of the same iteration, and C p is deduced from Equation (13). Further, C m is deduced using CP Equation (17). Additionally, C m and the newly computed C p_CP allow using Equations (14)- (19) to compute process variables while taking into account the CP phenomenon. The same iteration is reconducted until a stopping condition is reached:

Model Validation: Comparison with Experimental Results
Experimental data from the experimental set-up were used to verify the model. The first case study was done a simple aqueous salt (NaCl) solution of 3 g/L whereas the second case was performed with 6 g/L. The initial feed tank was set at 0.4 L, and a staircase pressure function of 10 bar + 2 bar/15 min was selected. Figure 6a,d compare cumulative permeate variation results over time between the experiment and model simulation for the first and second case (the different initial feed concentrations are, respectively, 3 g/L and 6 g/L). The results allowed the determination of the mass transfer coefficient (k). A similar evolution of permeate production at the start of the process was observed, and both plots showed a good agreement between the model and experiment. Figure 6b,c,e and f show for both cases the osmotic pressure modeling as well as the permeate flux over time and the feed pressure. Pressure plots show how the osmotic pressure tends to reach the pump pressure at the end of the experiment where the feed volume is low leading to high concentration variation. The discontinuities of flux are due to the sudden change in pump pressure since it is a staircase function, which causes the NDP to change suddenly as well. The permeate flux calculation confirms that even with a staircase function, the response is not a monotonic function. In fact, the staircase function leads to a wide permeate flux variation: for the case 1, permeate flux starts at 87 LMH, goes up to 140 LMH and decreases to 10 LMH at the end of process. Similarly, for the case 2, it starts at 60 LMH, goes up to 110 LMH and decreases to 20 LMH. Those variations are not in the favor of the membrane lifetime. The recovery ratio rate over time was not the same for both cases; it was higher for the case with a lower initial feed salinity. This was explained by the salinity increase rate in the feed tank. If the initial salinity is higher, then osmotic pressure would increase rapidly, and under the same pressure profile and feed tank volume, the production is lower as the NDP is lower.

Validation by Comparison with Wei et al.
The model developed in the present study was compared to the results of a previous model [14,18], validated by the experimental batch RO set-up with a pressurized feed tank. The same conditions displayed in Table 1 were considered except for a slight difference in the CPF, which was hard to adjust as the k value was not given. The energetic performances of both models were compared for fifteen cases, each with different permeate fluxes, initial feed concentrations and recovery ratios. SEC was computed according to Equation (19). The results are depicted in Table 2. The model comparison showed that the SEC estimations are in line with the reference model estimation [14,18] with a maximum error of 3.2% (Equation (21)): The present model indeed tended to slightly overestimate SEC in most cases compared to the reference model. For lower recovery ratios, there was less difference, while the error increased slightly when the recovery ratio increased. CPF was time dependent, and its mean value in time over the range of 0% to 60% was calculated. Its impact depended on permeate flux: The higher the permeate flux, the higher the value of CPF was.
This difference in energetic performance is mainly due to the difference in the models' equations and hypotheses. While the reference model [14,18] uses a finite elements method for calculations, we used an analytical approach with coupled differential equations in order to solve the equation step by step. Additionally, this approach considers CPF to be time dependent, and only the mean value is taken into consideration for comparison. Differences in CP values impact the results of the SEC, as Equation (19) uses wall concentration values at each step to compute SEC. Nevertheless, the whole approach tends to deliver energetic performance in good agreement with the reference model. Table 2. SEC predictions for batch RO, for different permeate fluxes and feed salinities at different recovery ratios, of the present model and of the model from [14,18]. Mean CPF for each case is computed, and the error between the two models is displayed.

Batch RO vs. Continuous RO: Energetic Comparison
In this part, a comparison between batch and continuous configurations from an energetic stand point is explored for seawater and brackish water. The comparison was based on the present validated model for batch RO and on the SEC expression for continuous RO [22]. The used parameters are depicted in Table 3. The feed pressure for the batch RO was calculated to work with a constant permeate flux (15 LMH for seawater and 25 LMH for brackish water). The SEC of batch RO and continuous RO, both using an ERD, over a wide range of recovery ratios are displayed in Figure 7. If batch RO was more energy efficient than continuous RO was at all recovery ratios for seawater, for brackish water the batch RO was more energy efficient only when the recovery ratios is higher than 50% which is always the case for brackish water. The energetic trends are in accordance with the work of Wei et al. [18], Werber et al. [3] and Warsinger et al. [14]. For seawater, at recovery ratios of 40%, 50% and 60%, batch RO used respectively 17%, 23% and 31% less energy than did continuous RO. For brackish water, at recovery ratios of 60%, 70% and 80%, batch RO used respectively 9%, 19% and 34% less energy than did continuous RO.
The SEC of batch RO and continuous RO, both using an ERD, over a wide range of recovery ratios are displayed in Figure 7. If batch RO was more energy efficient than continuous RO was at all recovery ratios for seawater, for brackish water the batch RO was more energy efficient only when the recovery ratios is higher than 50% which is always the case for brackish water. The energetic trends are in accordance with the work of Wei et al. [18], Werber et al. [3] and Warsinger et al. [14]. For seawater, at recovery ratios of 40%, 50% and 60%, batch RO used respectively 17%, 23% and 31% less energy than did continuous RO. For brackish water, at recovery ratios of 60%, 70% and 80%, batch RO used respectively 9%, 19% and 34% less energy than did continuous RO.

Batch RO and Pressure Profiles for Seawater
As stated in the introduction, batch RO can operate using any type of pressure profile as long as it remains higher than osmotic pressure during the process. For this part, batch RO pressure profiles were investigated. A linear pressure profile, pressure (t) = 35 + 30 t (where t is the operating time in hours), was compared to batch RO under a pressure profile that delivers a constant flux at 15 LMH and a constant pressure for continuous RO.

Batch RO and Pressure Profiles for Seawater
As stated in the introduction, batch RO can operate using any type of pressure profile as long as it remains higher than osmotic pressure during the process. For this part, batch RO pressure profiles were investigated. A linear pressure profile, pressure (t) = 35 + 30 t (where t is the operating time in hours), was compared to batch RO under a pressure profile that delivers a constant flux at 15 LMH and a constant pressure for continuous RO. The membrane parameters are the same as in Table 3. The membrane parameters are the same as in Table 3. Figure 8a shows pressure profile plots against time, while Figure 8b displays energetic responses over recovery ratios. Both batch RO pressure profiles used considerably less energy than continuous mode at all recoveries especially at high recovery values. Batch RO under the linear pressure profile performed well, especially at recoveries lower than 50% where its SEC was closed to batch RO under a constant flux pressure profile.
As shown in this example, batch RO energy consumption can increase and perhaps would also decrease with a different pressure profile. This proves that the batch RO still needs some improvement to minimize its SEC. Both batch RO pressure profiles used considerably less energy than continuous mode at all recoveries especially at high recovery values. Batch RO under the linear pressure profile performed well, especially at recoveries lower than 50% where its SEC was closed to batch RO under a constant flux pressure profile. As shown in this example, batch RO energy consumption can increase and perhaps would also decrease with a different pressure profile. This proves that the batch RO still needs some improvement to minimize its SEC.

Impact of Feed Salinity and Feed Volume
Initial feed salinity and feed volume variations that impact batch RO energetic behavior are analyzed in this part. Nine feed tanks (from 0.25 to 20 m 3 : 0.48 L/m 2 of membrane to 38.6 L/m 2 ) and four cases with different feed salinities (32.5 g/L, 35 g/L, 37.5 g/L and 40 g/L) were studied (see Figure 9). The membrane permeability was kept to 3 LMH/bar, and the feed pressure was adjusted to deliver a permeate flux of 15 LMH. The ERD efficiency and the pump efficiency were respectively 97% and 85%. The feed tank's draining and filling were not considered.
Both batch RO pressure profiles used considerably less energy than continuous mo at all recoveries especially at high recovery values. Batch RO under the linear pressu profile performed well, especially at recoveries lower than 50% where its SEC was clos to batch RO under a constant flux pressure profile.
As shown in this example, batch RO energy consumption can increase and perha would also decrease with a different pressure profile. This proves that the batch RO s needs some improvement to minimize its SEC.

Impact of Feed Salinity and Feed Volume
Initial feed salinity and feed volume variations that impact batch RO energetic b havior are analyzed in this part. Nine feed tanks (from 0.25 to 20 m 3 : 0.48 L/m 2 of me brane to 38.6 L/m 2 ) and four cases with different feed salinities (32.5 g/L, 35 g/L, 37.5 g and 40 g/L) were studied (see Figure 9). The membrane permeability was kept to LMH/bar, and the feed pressure was adjusted to deliver a permeate flux of 15 LMH. T ERD efficiency and the pump efficiency were respectively 97% and 85%. The feed tank draining and filling were not considered.  The batch RO process was also run under different feed volumes (Figure 9a). Surprisingly, feed volume seemed to impact batch RO energetics at recovery ratios lower than 50% and higher than 70%, and the feed volume curiously had a zone of zero impact between 55% and 70% recovery ratios. The impact was considerable at recovery ratios below 30% and between feed volumes of 0.25 and 2 m 3 . After a recovery ratio of 70%, the order of SEC plots was interestingly inversed.
The energetic response was directly linked to salinity variation. The higher the feed salinity is, the higher the SEC is. Additionally, for all recovery ratios, the difference between SECs was the same for all recovery ratios. It also seems that increasing salinity with a constant of 2.5 g/L causes an SEC increase with an almost constant value 0.15 kWh/m 3 , which increases with the recovery ratio. This behavior is probably unique to the pressure profile which delivers constant pressure, and it could be that, under a different pressure profile, the variation would have a different energy increase pattern.
Feed volume impact on batch RO is, however, unexpected. While we can explain why lower initial volumes cause SEC to increase (because it causes osmotic pressure to increase quickly while, at higher volumes, dilution slows its increase), it is not clear to us why in a specific interval energetic performance is the same for all volumes and why energy plots are inversed outside this interval.

Discussion
The energetic gain is mainly due to type of pump pressure profile. The variation of pressure in the batch RO mode, by adjusting the feed pressure according to the osmotic pressure increase in order to keep a constant NDP and also to produce the fixed flux, is the key advantage. In contrast, in the continuous configuration, the pump pressure remains high and constant for continuous RO, which causes SEC to be higher due to the high CPF value in the first module ( Figure 10). These promising energetic savings are the main reason behind the growing interest in the batch RO configuration.
why lower initial volumes cause SEC to increase (because it causes osmotic pressure to increase quickly while, at higher volumes, dilution slows its increase), it is not clear to us why in a specific interval energetic performance is the same for all volumes and why energy plots are inversed outside this interval.

Discussion
The energetic gain is mainly due to type of pump pressure profile. The variation of pressure in the batch RO mode, by adjusting the feed pressure according to the osmotic pressure increase in order to keep a constant NDP and also to produce the fixed flux, is the key advantage. In contrast, in the continuous configuration, the pump pressure remains high and constant for continuous RO, which causes SEC to be higher due to the high CPF value in the first module ( Figure 10). These promising energetic savings are the main reason behind the growing interest in the batch RO configuration. The concentration polarization factor represents a loss of driven forces. This loss of energy is more or less constant for batch experiment where a slight decline can be observed on high recovery ratio as the concentration in the permeate increases ( Figure 10). The extra power needed to overcome the CPF is for the batch mode whereas its value is ∫ ( ) ( ). As the permeat production for the continuous mode is mainly performed on the first pressure vessel modules, this mode is more impacted by the CPF. The concentration polarization factor represents a loss of driven forces. This loss of energy is more or less constant for batch experiment where a slight decline can be observed on high recovery ratio as the concentration in the permeate increases ( Figure 10). The extra power needed to overcome the CPF is ψ CPF J W for the batch mode whereas its value is ψ CPF(x)J w (x). As the permeat production for the continuous mode is mainly performed on the first pressure vessel modules, this mode is more impacted by the CPF.

Conclusions
A mathematical model was proposed to simulate the innovative Batch configuration RO. This model has been validated in accordance with experimental data but also with Wei batch model [18] results. Thus, it made it possible to explore the impact of operating and design parameters. As expected, energetic comparison between batch RO and continuous RO proved that the batch configuration is energy efficient especially at higher conversion rate reducing energy consumption of desalination and thus, its environmental impact and costs.
The better energetic gain was due mainly to the variable pressure, which was precisely adjusted to deliver needed energy to produce desired permeate flux and to control the CPF. The control of the CPF value is possible in Batch mode whereas the continuous mode is significantly affected by the CPF on the first pressure vessel modules. Moreover, the control of the CPF value allows the control of the water quality. Then, several parameters impacted batch RO were investigated. Salinity increase caused the SEC to increase in a steady pattern for a rate of 0.15 kwh/m 3 for every 2.5 g/L increase. On the other side, the increase of the feed volume has a positive impact but beyond 3.86 L/m 2 Membrane the energetic gain is negligible. Surprisingly, there was a recovery ratio interval (55-70%) where feed volume didn't impact SEC at all.
The next decade is likely to witness a rise in the development and investigation of batch processes, thanks to their promising energy efficiency. Further research prospects can include investigation of Batch RO fouling and CP behaviors, impact of stopping