Design of a Solar Powered Reverse Osmosis System in Egypt

: Scarcity of fresh water forced many countries to get their water needs, or part of it, by means of saline water desalination. Reverse Osmosis (RO) systems are useful tools in this concern. In the case no grid electricity is available or it is costly, Photovoltaic (PV) power is necessary to derive RO systems. The present paper concerns providing a methodology for complete sizing and design of a Photovoltaic Reverse Osmosis (PVRO) system in Egypt. Egypt has very favorable solar energy conditions. A computer program was constructed to solve the mathematical equations of the model to obtain numerical values. The program is capable of calculating solar irradiation for any city in Egypt. Calculations and selection of the RO system with all the pumps connected, the peak PV power needed, and the actual PV area were performed for different water demands ranging from 1-100 m 3 /day, and various water Total Dissolved Solids (TDSs) of 5000, 15000, and 30000 mg/l. The cost of the complete PVRO system was also determined. It is seen that the concern of the paper is related to water and energy, which are responsible for our existence. The work also aims towards sustainable and clean environment via utilizing solar energy.


INTRODUCTION
Clean water is essential for our healthy and safe existence. There is an increasing demand for it as the world population is growing. Many countries lack soft water sources or have scarcity of such sources. Water disputes between countries already exist. Water wars could threaten the world's security. Seawater or brackish water purification through water desalination technologies become of growing use for both large and community scales applications. The latter applications are mostly suitable for remote areas with no conventional electricity facilities.
Desalination is a process for removing dissolved minerals from saline water. By the year 2030, it is anticipated that the global needs of water would increase to 6900 × 109 m 3 from the current of 4500 × 109 m 3 . Therefore, there is a ca. 53% increase in drinking water demand is projected by 2030 [1]. Other references reported that water demand will increase by 55% in 2050 [2]. Despite the differences in the percentage increase in the global water demand, the fact remains that there will be severe shortages in fresh water. The population under water scarcity increased from 0.24 billion (14% of global population) in the 1900s to 3.8 billion (58%) in the 2000s [3]. Ref. [3] showed that all the trajectories lead to an increasing trend in water scarcity. Fresh water is not essential for drinking only but also needed in other sectors. Consumption of potable water is 63, 26, and 6% in drinking, industry and power stations, respectively [4] The only available option to produce potable water, in the light of water scarcity and shortage, is water desalination. Many countries allocate large investments in water desalination. In 2013, Saudi Arabia, USA, China, Kuwait, India, Libya, Australia, Chili, and Qatar had the highest investments and the largest share in the desalination market. The USA and Qatar invested $ 7 and 3 billion, respectively. The USA and KSA each produced 7.5 million m 3 /d. China and Australia produced 3.79 and 1.9 million m 3 /d, respectively [4].
Feed water for desalination comes from different sources. Globally, 60% of feed water is seawater, 20% brackish ground water, 10% surface water, and 10% waste and fresh water [4]. Water can be characterized according to its Total Dissolved Solids (TDS) as [4]: − 500 TDS, water within the FDA standards, − 500-5000 TDS, brackish ground water and most surface water,  [5].
Desalination is carried out by means of two technologies: thermal and membrane technologies. Membrane desalination employs high pressure pumps to separate fresh water from seawater or brackish water. In thermal desalination, heat is utilized to vaporize fresh water. All desalination processes involve three liquid streams: saline feed water, low-salinity product water (permeate), and very saline concentrate (brine). Energy is the key component for producing clean water.
Most commonly used systems for membrane desalination include Reverse Osmosis (RO), Nanofiltration (NF), and Electro Dialysis (ED).
RO and NF: here the hydraulic pressure is used to force separating pure water from saline feed water through a semipermeable membrane.
ED: this is based on the ability of semipermeable membranes to pass selected ions in a solution of ionized salts, while blocking others. Salts are dissolved in solutions as ionized particles with positive or negative charges (e.g., sodium chloride as Na+ and C1-).
Commonly used thermal desalination technologies include Multi Stage Flash (MSF), Multi Effect Distillation (MED), and Vapor Compression (VC).
MSF: here the feed water is heated under sufficiently high pressure to prevent boiling, until it reaches the first flash chamber, where the pressure is released and sudden evaporation or "flashing" takes place. This flashing of a small portion of the feed continues in each successive stage, since the pressure is continuously decreased in each such stage.
MED: series of evaporator effects produce water at progressively slightly lower pressures. Because water boils at lower temperatures as pressure decreases, the water vapor of the first evaporator effect serves as the heating medium for the second evaporator effect, and so on.
VC: the vapor compression process compresses the vapor generated within the unit itself. Two methods of compression are employed: Mechanical Vapor Compression (MVC), and Steam Thermal Vapor Compression (STVC).
In phase change desalination, the primary energy is thermal. The most commonly used technologies in this category are MSF, MED and VC. In single phase desalination, the primary energy is electricity and hydraulic pressure. RO electro dialysis and Membrane Desalination (MD) are the ones that are most commonly used.
A review of RO and MD processes for desalination is provided [6]. Membrane treatment uses either pressure or electricity driven technologies. Pressure driven can be divided into RO, Nanofilteration (NF), Ultrafilteration (UF), and Microfiteration (MF). RO and NF are effective in salt removal [6].
A recent review is given on the global desalination processes with a focus on membrane desalination, such as RO, Membrane Desalination (MD), hybrid desalination technologies, and advanced plasmonic nonomaterials, for water desalination [2]. Currently, Multistage Flash Desalination (MSF), RO, and a combination of these (hybrid desalination) are the dominant technologies for water desalination [5]. The global shares for RO, MSF and hybrid systems are 63, 23, and 3%, respectively [5]. A combination of two or more energy sources in the desalination system is called a hybrid system. Hybrid desalination plants are located usually near power plants in order to use their waste heat energy for thermal desalination. A combination of MSF, MSD and RO can be used.
Desalination is an energy intensive process. 30 -50% of the cost of the fresh water produced in desalination is related to energy input [5]. Desalination consumes 0.4% of the global electricity [2]. Commercial desalination energy ranges from a minimum of 1.8 kWh/m 3 for RO technologies to a maximum of 12.5 kWh/m 3 for multistage flash technologies [5]. On average, desalinating 1000 m 3 of saline water by commercial technologies consumes about 37 barrels of oil and produces about 10 tons of CO2 [5].
There is a need to increase the efficiency of the current desalination processes from their low values of 10-15% [2]. This would help in reducing the water cost. Innovative membrane materials should be proposed [2]. Desalination costs are high in comparison to surface water treatment costs. However, desalination costs are expected to go down to 0.6 -1 $/m 3 by 2022, then to 0.3 -0.5 $/m 3 by 2035; the cost in 2016 was 0.8 -1.2 $/m 3 [2].
Conventional thermal desalination technologies are well proven. Further improvements are relatively limited. Innovation in RO is continuing, and this has led to reducing the energy consumption to 1.8 kWh/m 3 compared to the historical value of 3 -5.5 kWh/m 3 , which is close to the minimum energy required for water desalination [5].
RO systems are the most common desalination technologies in use with a share of 62% [2]. Solar driven RO systems constitute 70% of the market [2]. RO is currently the most important desalination technology; it is even growing more [7]. RO systems have a significant advantage over other technologies for small and medium scale systems, with a cost range from 0.6 -2.86 $/m 3 [5]. RO offers several advantages over other desalination technologies including high efficiency and selectivity, easy control and scale up, flexibility and sustainability for integrated applications [8]. Energy consumption differs from one process to another. Surface water treatment, indirect potable reuse and RO energy consumptions are 0.2-0.4, 1.5-2, and 3.5-4.5 kWh/m 3 , respectively [8]. The least energy consumption is for surface water treatment, and the highest by far is for RO. Therefore, there is a demanding need to reduce the energy consumption of RO systems via increasing the efficiency and recovery percentage in order to reduce the cost of watertreated.
An increase in the recovery ratio of the RO membrane increases the osmotic pressure in the feed side of the RO unit. This requires an increase in the feed pressure; therefore, the required feed flow and specific energy will decrease for the same specific product flux. The minimum energy required depends on the feed water salinity and a recovery of 50 -55% [2]. Research is toward increasing the recovery rate up to 90% compared to the current values of 50-60% through Zero Liquid Discharge [4].
Energy Recovery Devices (ERDs) are routinely used in RO systems for saving energy to decrease the total energy needed for the plant. These increase the system efficiency, hence reducing the output water cost.
However, salinity, temperature and biofouling of feed water are important factors for RO efficiency. They are not sensitive in thermal desalination [5].
RO process configurations are single pass, two pass, partial two pass and split two pass. For more details, refer to Ref. [8]. Hybrid systems are attracting more attention via forward osmosis and partial retarded osmosis [8].
To date, polymetric membranes are dominating the RO industry. Various nano-structured RO membranes have been proposed. Their development is still in early stages [7]. Two major difficulties are the cost and the difficulty in scaling up nano membrane manufacturing processes [7]. Advances in membrane material development are relatively slow. Membrane fouling remains a serious problem [7].
A simple schematic of a PVRO system is shown in Figure 1 [9].
The RO desalination plant consists of four major systems: − pre-treatment system: it prevents all the suspended parts to block the membranes and it also involves chemical feed followed by coagulation, flocculation, sedimentation and sand filtration, − high-pressure pumps: push water to enable it to pass through the membrane to get rid of salt in the feed water, − RO membranes: they are of many types; the most common commercially available membrane modules include flat sheet, tubular, spiral-wound, and hollow fiber elements, − post-treatment: it is often employed to ensure meeting health standards for drinking water as well as recommended aesthetic and anti-corrosive standards. Post-treatment consists of stabilizing the water (adjusting the pH and disinfection) and preparing it for public distribution. Pressures used in RO plants differ according to the type of water treated. It depends on the input water salinity. For brackish water, the pressure ranges from 17-27 bar [10]. For seawater, the pressures are much higher and they range from 55-80 bar [10]. Innovations are going on to design RO systems working under much higher pressures than current ones in order to treat waters of higher salinities, and for better efficiency. In this endeavor, a discussion is presented on the application of High Pressure RO (HPRO) systems operating above 100 bar [11]. They considered two pressure limits: 150 and 300 bar. The 300 bar pressure is meant for the treated water concentration of 250000 mg/l. The research needs for HPRO are discussed [11]. Fig. 1. Simple photovoltaic reverse osmosis system [9] In reverse osmosis systems, water is injected inside semi-permeable membranes with tiny pores (about 42 microns) by using high pressure pumps. These pores can prevent those molecules which are larger than water molecules from passing through, so the water that is almost pure flows from one side, and the high salinity water flows on the other. The positive difference in pressure creates a chemical potential difference (a concentration gradient) across the membrane that drives the liquid through the membrane against the natural direction of osmosis (the movement of water molecules from an area of high concentration to another of low concentration), while salts are retained and concentrated on the influent surface of the membrane [12].
The use of fossil fuels in conventional desalination produces greenhouse gas emissions. In 2015, Australia produced 1193 kt of CO2 from desalination processes [8]. The use of renewable energy to power desalination plants becomes the favorable available option for mitigating such harmful emissions.
Reference [5] reviewed the technological and economic trends as well as the environmental and social aspects of desalination systems. They emphasized the role of Renewable Energy (RE) technologies in future water systems with an increasing share in desalination [5]. Renewable Energies (REs) which are used in water desalination include Photovoltaic (PV), solar thermal, wind, geothermal, ocean energy and hydropower [5]. Information concerning renewables used in desalination is discussed [13]. Solar energy is the most important for hybrid systems [13]. It is a vital option for hybrid systems but wind energy has the best performance [13]. Geothermal energy has a very small contribution in the desalination process. However, due to the constant temperature at a certain depth, the output energy is more stable than in the case of other sources [13]. A methodology is exhibited to obtain the most cost-effective RE powered desalination systems [14]. Wind, PV, and solar thermal energies were studied in connection with RO systems [14].
PV is more appropriate to power RO systems over other renewables. Other RE sources may not be available everywhere, e.g. geothermal, wind and hydropower.
Photovoltaic powered reverse osmosis systems are suitable solutions to produce clean water for small communities, due to relatively low maintenance costs, low specific energy consumption and the economic viability for desalting small amounts of water. The total lifetime costs of PVRO plants vary substantially by location due to variations in solar resources, water types, demands and local governmental policies. It should be noted that the cost of clean water depends greatly on the salinity of water treated. The cost of desalinating brackish water is lower by about 35% than that for seawater [12].
A small PVRO plant was installed in Jordan with an output of 0.5 m 3 /d [15]. Feed water was brackish water of TDS of 1750 mg/l. A methodology was introduced for sizing the system, including estimating the PV capacity [15]. A larger PVRO desalination plant was designed in at a remote coastal site in Java, Indonesia, with a production of 100 m 3 /d using ultrafiltration [16]. The system recovery was 45%, the energy consumption was 7.2 kWh/m3, and the total land area occupied was 1070 m 2 [16].
Small-scale PVRO systems can have battery storage or they can be a directly coupled system. It was found that the battery-based system performed better with regards to permeate production and quality; however, the water production costs were in favor of the directly coupled system [17]. Recently, many medium and large-scale water treatment and desalination plants are partially powered with renewable energy: mainly wind turbines, PV cells or both.
The present work concerns establishing a proper and reliable comprehensive methodology for sizing and designing of a complete PVRO integrated system which uses RO technology for producing potable water with the energy needed supplied by means of PV cells. A mathematical model and performance evaluation of the solar water PVRO system for different supplied water salinity characteristics are provided. This is accomplished through a specially constructed simulation computer program, which is fed with proper solar energy data and mathematical model equations. The present results are for the capital of Egypt, Cairo. Egypt has very favorable climatic conditions for good potential exploitation of solar energy.

MATHEMATICAL MODELING AND METHODOLOGY
PVRO sizing can be calculated based on determining these factors: − the amount of solar energy falling on the tilted surface, − the reverse osmosis system which comprises: 1. A computer program was specially constructed for designing and calculating all the PVRO system components as given above, the mathematical equations used for such purpose are discussed in the following sections.

COMPUTER SIMULATION PROGRAM
A computer simulation program was specially designed based on the mathematical model of the system components and according to the algorithm indicated in the flow chart contained in Figure 2. The program estimates all the parameters required for the design of the integrated PVRO system, in addition to the necessary solar radiation data. This computer program is fed with the necessary input data, and the output provides all the required design results for the PVRO system. The program is even capable of providing the recommended companies that can supply all the selected equipment of the system. The program is versatile enough as it may provide different solutions to choose from based on the input data and costumer requirements and the budget available. This software tool is difficult to construct, yet it is simple in use. It is a time saver, and can help the designer or customer to study, easily and quickly, different system design cases or proposals and perform several runs without any need to redesign again and again for each case. Also, it allows the designer to decide upon the main components of the system, like the PV module, the inverter, the charge controller, and pumps from different manufacturers. The present computer program acts as a solar energy recipe. The present computer program is general in the sense that it can be used anywhere in the world, as long as appropriate input data is used.

CALCULATION OF AMOUNT OF SOLAR ENERGY FALLING ON HORIZONTAL AND TILTED SURFACES
All the following equations in this section are from Ref. [18].
The daily extraterrestrial radiation on a horizontal surface (Ho), for any day of the year, n (n = 1 for January 1 etc.), is calculated by: where Gsc is the solar constant equal to 1.367 W/m 2 , δ is the declination angle, ωs is the sunset hour angle ,and Φ is the latitude angle of the site.
The declination angle (δ) can be given from Cooper's equation: The solar hour angle is equal to zero at solar noon and varies by 15 degrees per hour from solar noon. It takes negative sign in the morning and positive sign in the afternoon.
The sunset hour angle (ωs) is an angle equal to the solar hour angle when the sun sets, and is determined from this equation: The extraterrestrial radiation on a horizontal surface for an hour period can be estimated by integrating Eq.
(1) for a period between hour angles ω1 and ω2 which define an hour (where ω2 is the larger): Clearness index: the monthly average clearness index, K ̅ T is the ratio between extraterrestrial radiation and solar radiation at the surface of the earth. Values of, K ̅ T depend on the climates condition and the time of year considered. It can be calculated from: where: H ̅ is the monthly average daily solar radiation on a horizontal surface, and H ̅ O is the monthly average extraterrestrial daily solar radiation on a horizontal surface.
The average radiation on a slope surface can be calculated considering the beam, diffuse, and reflected radiation components by using this equation: where: R ̅ b = reflection of radiation on the surface of the earth, ρ g = ground reflectivity, when the monthly average temperature is above 0 °C = 0.2 and when the monthly average temperature is below -5 °C = 0.7 [20], and β = slope of the collector, and is given by: .
The monthly average daily beam radiation H ̅ b is calculated from this formula: According to sunset hour angle, (ω s ) the monthly average diffuse radiation, H ̅ d can be calculated from these equations: For ω s ≥81.4°: For ω s < 81.4°: Due to the location of Egypt towards the equator in the northern hemisphere, the ratio between slope surface to the horizontal surface, R ̅ b , is given by: where ὼs is the sunset hour angle for tilted surface and is calculated by: ].

RO SYSTEM DESIGN MODELING AND PROCEDURE
An RO system is usually designed for continuous operation. The operating conditions of every membrane element in the plant are constant in time. In certain applications, a batch operation mode is used, e.g., in treating waste water or industrial process solutions, when relatively small volumes (batches) of feed water are discharged non-continuously. A permeate staged (double pass) system is a combination of two conventional RO systems where permeate of the first system (the first pass) becomes the feed for the second system (the second pass). Both RO systems may be of the single-stage or multi-stage type, either with plug flow or with concentrate recirculation. We may assume that the energy requirements for pretreatment, posttreatment, water transportation and brine disposal are relatively small compared to the energy for the reverse osmosis process.
A membrane system should be designed in such a way that each of its elements operates within a range of recommended operating conditions to minimize the fouling rate and to help avoid any mechanical damage possible. These operation conditions are limited by: the maximum recovery, the maximum permeate flow rate, the minimum concentrate flow rate and the maximum feed flow rate [19].
The goal of the designer of an RO/NF system for a certain required permeate flow is to minimize f the eed pressure and the membrane costs while maximizing the permeate quality and recovery.
Design of an OR systems requires the following: 1. Knowledge of feed water characteristics, such as the Total Dissolved Solid (TDS) and the Silt density index (SDI), and the required quality and specifications of output water, such as the quantity of water requirement (m 3 /h) and final TDS after desalination. 2. Selecting water configuration: plug flow is the standard RO system design. Concentrate recirculation is used when the number of elements is too small to achieve a sufficiently high system recovery with plug flow. 3. Selecting a membrane element type: elements are selected according to feed water salinity, fouling tendency, required rejection, and energy requirements. 4. Determination of the percentage of RO system recovery. 5. Selecting a membrane element type: elements are selected according to feed water salinity, fouling tendency, required rejection, and energy requirements. 6. Selecting an average membrane flux (l/m2h): this is chosen from tables according to the Feed Silt Density Index (FSDI) of the feed source.
7. Determination of the number of elements needed. 8. Getting the required number of pressure vessels. 9. Selecting the number of stages which defines how many pressure vessels in a series the feed will pass through until discharged as concentrate. Every stage consists of a certain number of pressure vessels in parallel. The number of stages is a function of the system recovery planned, the number of elements per vessel, and the feed water quality. The number of serial element positions is linked to the system recovery and the number of stages, and these are given for brackish water and seawater in Ref. [19]. 10. Estimating the staging ratio. The equations applicable for the design of the RO system are presented next. These are used in the construction of the computer software.
The membrane system is a complete plant with an inlet for feed water Qf and outlets for permeate, Qp and concentrate (brine), Qb. The mass balance of the system gives the following relations: where: Qf is the feed water flow rate, kg/s, Qp is the permeate flow rate, kg/s, Qb is the brine flow rate, kg/s, Xf is the feed salinity, kg/m 3 , Xp is the permeate salinity, kg/m 3 , and Xb is the brine salinity, kg/m 3 . Another important parameter in the design and operation of RO systems is the permeate recovery, Rrec. Recovery or conversion ratio of feed water to product (permeate) is defined by [19]: The following relation defines the rate of water passage through a semipermeable membrane [19]: where: Qp is the rate of water flow through the membrane, m 3 /s, ∆P is the hydraulic pressure differential across the membrane, kPa, ∆π is the osmotic pressure differential across the membrane, kPa, Kw is the water permeability coefficient, m 3 /m 2 s, and Amem is the membrane area, m 2 . The osmotic pressure π of a solution can be determined experimentally by measuring the concentration of salts dissolved in the solution. An approximation for π may be made by assuming that 1000 ppm of TDS equals to 75.84 kPa of osmotic pressure. The osmotic pressure is obtained from [19]: where: π is the osmotic pressure, kPa, T is the temperature, K, R is the universal gas constant = 8.314 m 3 /kg mol K, and ∑ is the concentration of all constituents in a solution, kg mol/m 3 .
In Eq. (16), the terms ∆P and ∆π are given by [19]: and Pp and π are the permeate hydraulic and osmotic pressures, respectively, and P ̅ and π ̅ are the average hydraulic and osmotic pressures, respectively, on the feed side and are given by [19]: where: Pf and πf are the hydraulic and osmotic pressures of the feed stream respectively, and Pb and πb, are the hydraulic and osmotic pressures of the reject stream respectively. The number of elements needed, NE is given by [19]: where: QP is the design permeate flow rate, m 3 /s, F is the design flux (l/m 2 h), and SE is the membrane surface area of the selected element (m 2 ). The required number of pressure vessels, NV is [19]: where: NEpV is the number of elements per pressure vessel. For large systems, 6-element vessels are standard, but vessels with up to 8 elements are available. For smaller and/or compact systems, shorter vessels may be selected. The staging ratio, Rs is calculated from [19]: where: n is the number of stages, and Y is system recovery.
The number of pressure vessels in the first stage for n=2 is: and the number of vessels in the second stage is then: (2) = (1) . .
Also the number of pressure vessels in the first stage for n= 3 is: The energy requirements for RO depend directly on the salt concentration in the feed water and to a lesser extent on the temperature of the feed water [20].
The important items of the RO system are the High Pressure Pump (HPP) that delivers the energy needed for salinity water to pass through the membrane, the membrane that takes off salt from water and the Energy Recovery Device (ERD) that saves energy in order to reduce the specific power consumption of the system. This is in addition to other auxiliary items.
The HPP supplies the pressure needed to enable the water to pass through the membrane and have the salts rejected. Positive displacement pumps are used in RO systems in their different forms, such as vane pumps, progressive cavity pumps, diaphragm pumps and piston pumps; all of them have similar operating characteristics.
In order to reduce the cost of RO, Energy Recovery Devices (ERDs) are used. The high pressure pumping required to overcome the osmotic pressure in the saline feed water results in a saline concentrate stream of a high pressure. ERDs are used to recover this hydraulic energy and transfer it to the feed stream, thus reducing the amount of energy required to run the High Pressure Pumps (HPPs), and reduce their size accordingly.
Early ERDs used in RO plants were centrifugal devices, such as the Pelton wheel, the Francis turbine and the turbocharger. These devices convert hydraulic energy into mechanical energy to derive a pump which transfers the hydraulic energy back into the feed water. Since 2000, isobaric chamber ERDs have been replacing centrifugal ones [8]. These transfer hydraulic energy from the concentrate directly into the feed, as the two streams come into direct contact (with minimum mixing|) [8]. Here, the energy conversion efficiency loss is reduced. There are two types of isobaric chamber devices: 1) rotary driven ERDs and 2) piston driven ERDs. For more details refer to Ref. [8]. The efficiency of ERD devise is given by [8]: ERD efficiency = change in feed pressure / change in concentrate pressure. The efficiency of different ERD devices for turbine, turbocharger, Pelton wheel, and isobaric chamber are 75, 80, 85, and 95-97%, respectively [8]. Very small ERDs are not efficient, and more research is needed [20].
A guidance is given for the design and selection of ERDs under different operating conditions [21]. Different ERDs are discussed and described [21].
Different types of ERDs and pressure control options were considered in the modular design approach. These devices consist of hydraulic motors coupled to electric generators, pressure exchangers and pressure control valves. In the RO system, the energy source powers a feed pump and a high-pressure pump to pressurize the incoming water. The water is then driven through the reverse osmosis membrane array at high pressure leaving high salt concentration brine on one side and low salt concentration water on the other side. The high pressure brine stream passes through a turbine to recover its energy before exiting the system.
The energy recovered by the ERD, ER is [20]: where: Pb is the brine pressure, N/m 2 , Qb is the brine flow rate, m 3 /s, and ηt is the turbine efficiency, %. The net specific energy consumption Esp, for the RO system, i.e. the energy consumption / m 3 of clean water produced is [20]: where: Esp is in kWh/m 3 , PHPP is the HPP energy consumption, kW, ER is the energy saved by the ERD, kW, and Qp is the permeate flow rate, m 3 /d. PHPP is calculated from [20]: where: Qf is the feed flow rate, m 3 /s, Pf is the feed pressure, N/m 2 , and ηHPP is the high pressure pump efficiency, %.
In case a booster pump is used in the system, then its energy consumption should be added to PHHP, and Eq. (30) becomes [20]: where PbP is the energy consumption of the booster pump, and is given by [20]: where: ρ is the feed water density at 25°C, kg/m 3 , g is the gravity acceleration, 9.81 m/s 2 , h is the pump manometric head, m, and ηbP is the booster pump efficiency, %.
In case other pumps are used, then equation (31), can be written as: where: Ppumps is the power required for all pumps, kW. After deciding on output water specifications and feeding the program with all the necessary data as per the above model and procedure, then RO system components to give a comprehensive recipe for the PVRO system should be selected quickly and correctly. Figure 3 is a computer screen to show the present RO system components and items. Three inputs are highlighted: arrow 1 for the selection of the characteristics of input water (TDS and SDI), arrow 2 for the selection of the characteristics of permeate water m 3 /h and final TDS), and arrow 3 for deciding on the system recovery percentage.
As for outputs: arrows 4, 6, and 9 indicate selected feed pumps (FD), HHP and the circulation pump (CP), respectively, arrow 5 depicts the specifications of brine to be removed, and arrows 7 and 8 show the selections of membrane and ERD, respectively.
After finishing with specifications and selection of RO components, the final results are then furnished as exhibited in Figure 6. The outputs include final information about membranes and their number, number of vessels and stages, HPPs and their total number, ERD, and other pumps. These are the ultimate data to be considered by the designer for execution.

Total area of PV modules
The size of the PV system in Wp for the peak load is obtained from [22]: where: Apv is the total area of the required photovoltaic modules, m 2 , EL is the peak daily electrical energy demand for the RO system, Wh/day, H is the daily global irradiation, Wh/m 2 /d, , , , and are efficiencies for photovoltaic, inverter, battery, and charge controller, respectively, and Tc is a temperature correction factor of the PV module.

Power, number, and total area of the PV modules
The required photovoltaic modules power P pv (W), to meet the electric load demand can be estimated as follows: where: Hsc = Standard solar irradiation, 1000 W/m 2 . After estimating the total area of PV panels (m 2 ), the number of total modules (N m ) can be determined based on the commercially available area of a single PV panel.
The number of modules can be defined by [23]: where: is the power of the single module, W. The actual area of all modules, , and the exact peak power for total modules, , are given by [23]: where: is the area of the single module, m 2 , and ′ is the corrected number of modules to the nearest integer number.

Sizing of inverter, battery bank, and charger
controller The amount of rough energy storage required is equal to the multiplication of the total power demand and the number of autonomy days. For safety, the result is divided by the maximum allowable level of discharge (MDOD). Now, a decision should be made regarding the rated voltage of each battery Vb to be used in the battery bank. Based on the defined capacity of the battery bank, another decision has to be made regarding the capacity Cb of each of the batteries of that bank. The total number of batteries is obtained from [23]: where: EL is the peak daily required electrical energy for the RO system, Wh/day, Db is number of autonomy days, day, MDOD is the maximum allowable level of discharge, Vb is the voltage of each battery, V, and Cb is the capacity per battery, Ah. The charge controllers have been developed a lot in recent years, and today some controllers have the capability to increase the power output from a solar panel. The number of controllers, Nc can be obtained by multiplying the short circuit current of the modules connected in parallel by a safety factor, Fsafe divided by the amperes for each controller, as follows [23]: where: Isc × NP is the total short circuit current of the modules connected in parallel, A, and Fsafe is a safety factor.

TOTAL COST OF THE INTEGRATED PVRO SYSTEM
The total cost of the complete PVRO system is estimated by the present simulation program considering the direct capital costs of prices of all the system constituents, such as RO membranes, HHP, ERD, and all the PV components, in addition to the cost of land and building, if any. The cost includes indirect costs, like land preparation, labor, taxes, levelized charges and any item if applicable.

RESULTS AND DISCUSSION
The first task in the design of a PVRO system is to find out the amount of solar radiation falling on PV modules to power the RO system. Several simulation runs were conducted for two different geographically distributed cities in Egypt, namely Cairo and Sharm Elshakh in south Sinai. The estimated solar radiation monthly average values for these cities are contained in Figures 7 and 8. The figures also include the data as obtained from the Meteonorm 7 software system [24]. The solar radiation monthly average values of the current model are 5.4 and 6.1 kWh/m 2 /day for Cairo and Sharm Elshakh cities, respectively, and the average values of Meteonorm 7 software are, respectively, 5.3 and 6.4 kWh/m 2 /day for the same cities. The values are very close. The present model was used to obtain results for other cities in Egypt and the same agreements were found [25]. This gives good confidence in the estimations of the present model. The current analysis considers only the energy required to power the RO system. The energy required for pretreatment, posttreatment and brine disposal is relatively small compared to the energy of RO process, therefore they are neglected. The following assumptions are considered: water is incompressible and is taken from the nearest possible seawater or brackish water source according to the geographical details for every plant, the total static and dynamic heads are 5 and 15 m, respectively, energy recovery for the system is 40%, and the PVRO systems will operate when the solar energy is available which means that there is no need for batteries for energy storage. In case there is need for such batteries, the program can deal with this according to the equations given above. For an average daily water demand from 1 -1000 m 3 /day, 40% recovery, and TDS of 5000, 15000, and 40000 mg/l, the power required for pumps including HPP, feed pumps, and circulated pumps, after subtracting the power recovered by the considered ERD, can be calculated, for Cairo, as given in Table 1.
The relation between water demand (ranged from 15 to100 m 3 /day) and pump power for different values for TDS is shown in Figure 9. It is seen that the power increases with increase in salinity and water demand. The increase jump in power starts at 50 m 3 /day for all salinities. However, the increase is more pronounced for a salinity of 40000 ppm. This will reflect on the cost of the system. Table 2 depicts the variation of calculated data of photovoltaic peak power (kW) with different water demands and TDS, for Cairo city. The PV power for operating the PVRO system is calculated based on the electrical power needs for the specified water demands and salinities. The variation of PV peak power with different salinities and daily water demands, up to 100 m 3 /day for Cairo, is illustrated in Figure 10. The peak PV power increases significantly at 100 m 3 /day, for all salinities but more obvious for the 40000 TDS. The peak powers are greater, by a good margin, than those required to operate the PVRO system as given in Table 1. Thus, the estimated PV area and capacity are safe and reliable.   Figure 11 shows the results, but for water demands ranging from 15-100 m 3 /day. The results follow the same trend as in previous ones in that the large increase in the area of PV panels occurs for 100 m 3 /day, for all salinities, but is more pronounced for the highest TDS. As expected, the area increases as the PV power goes up. For a TDS of 15000 ppm, Figure 12 gives a comparison between solar PV peak power variations for 4 Egyptian cities for different daily water demands, while Figure 13, exhibits comparison between actual areas of PV panels with different daily water demands. It is noticed that the PV peak power and area increase with increase in the water demand. However, the results indicate that values for Cairo and Mersa Matrouh are equal, due to that solar irradiation data are similar for the two cities. The same is almost observed for Aswan and Sharm Elshakh for water demands of 15, 30, and 50 m 3 /day. For 100 m 3 /day, the PV peak power for Sharm Elshakh is higher than that for Aswan, due to the higher solar irradiation in Sharm Elshakh. Thus, the PV panel area becomes less for Sharm Elshakh, as demonstrated in Figure 13. So, the results are consistent according to the present equations and model. It is also seen that PV powers and areas for Cairo and Marsa Matrouh are more than those for Aswan and Sharm Elshakh. This is because solar irradiations in the former two cities are less than that for the latter two. The lower solar irradiation in Cairo and Mersa Matrouh results in higher PV power, and hence the needed PV area being larger than that for Aswan and Sharm Elshakh, which have greater solar irradiation.
Any system cost is variable, since it depends on manufacturing country/company, brand name (for the main components like PV panel, pumps, and inverters), PV technology (mono-crystalline or polycrystalline silicon, thin film ,etc.), taxes, customs, and RO components. As a case study for Cairo city, several runs of the simulation model were performed to furnish the total cost of a PVRO system in Euro for different water demands and different TDS. The obtained results are indicated in Table 4 and Figure 14. The cost increases with an increase in water demand and salinity. It is interesting to note that the cost does not differ so much for TDS of 15000 and 40000 for all the water demands, but this is not so as one moves from TDS = 5000 to next higher values. A significant increase in cost is seen for water demand of 100 m 3 /day. The cost results could be taken as a guide rather than fixed values.

CONCLUSIONS
This research addresses two vital issues which are the cause of our very own existence: energy and water. In addition, this work adopts solar energy for sustainable energy and clean healthy environment. The present work provides a proper reliable comprehensive methodology for sizing and designing of a complete PVRO integrated system. The model was applied to the weather data of Cairo, Egypt, for desalinating water of different salinities (5000, 15000 and 40000 mg/l), and for water demands from 1-100 m 3 /d. This was done by means of a specially constructed simulation computer program, which is fed with the proper solar energy data and the mathematical model equations. The cost of the system for different water TDS and demands was calculated. The computer program is capable of providing quickly surplus data on the choice of equipment and their manufactures. It is a good time saving design tool for giving solution options quickly and reliably. The complete system design and cost are introduced with many options to the customer to decide. The present program is useful for both the designer and the customer.

Decalaration of conflict of interest
The authors declare that there is no conflict of interest in publishing this paper.

Funding statement
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Am
module area, m 2 Amemmembrane area, m 2 Apvtotal area of photovoltaic requirement, m 2 At total area of all modules, m 2 .