1 Introduction

Clean water and energy are among the most important resources worldwide. Freshwater scarcity has become one of the most critical challenges of our time, posing a significant danger to water security, economic growth, and environmental health [1,2,3]. The provision of adequate and safe drinking water is complicated because it is an energy-intensive process, thus contributing to climate change, greenhouse gas emissions, and increasing demands for economic and industrial development [2]. RO process for desalting saewater is an interesting solution for drinking water production. However, it results with high volume rejected brine that is usually discharged futher into the seawater inducing a destructive environmental impact. Although the direct discharge of brine into surface water or the ocean using traditional methods, such as deep-well injection and evaporation ponds, remain the most common method of brine management and disposal, these methods negative impact marine life and ecosystems [4]. The current methods used for brine disposal are limited by high capital costs and unsustainable. Nowadays, many membrane-based technologies have been proposed for brine treatment such as high-pressure reverse osmosis, osmotically assisted reverse osmosis, forward osmosis, and membrane distillation [5,6,7,8,9,10]. The current study investigated the system of a solar-powered RO in an integrated VMD so as to reduce rejected brine volume. VMD process is an evaporative technology and is considered as a complementary process to RO to treat of RO rejected brines. In addition, owing to new regulations and enforcement of laws, over the past few years, the treatment of brine has expanded and also attempts to recover useful resources from the brine, known as brine mining [5].

Previous research demonstrated the application of photovoltaic reverse osmosis (PV-RO) systems as a case study for a city in Saudi Arabia [11]. However, there are no publications reporting on the brine treatment in PV-RO systems to reach zero liquid discharge (ZLD) or minimal liquid discharge (MLD). This study reveals the modelling and simulation of a full process, starting from the energy source, followed by powering of the desalination process, and ending with the brine treatment process to reach the MLD.

In this study, the power source for the desalination process was solar energy through PV cells. Using clean renewable energy for desalination will help reduce the dependence on fossil fuels and provide sustainability, considering that the Middle East is the largest region in the world in terms of water desalination capacity. Saudi Arabia has the greatest desalination capacity worldwide and will therefore benefit most from a shift in the driving power for desalination to renewable energy [12]. Seawater desalination has been implemented using RO, which is a pressure-driven membrane process that uses membranes under high operating pressures to overcome osmotic pressure. RO requires less energy than conventional distillation processes. Thus, RO is the preferred desalination method worldwide [13,14,15,16,17,18,19,20,21]. PV-powered RO systems have been the focus of several studies [22,23,24,25], which demonstrated their feasibility and performance. The desalination process results in the generation of a brine stream that requires treatment; vacuum membrane distillation (VMD), as the final part of the overall process, can be utilised for this purpose. VMD is an evaporative process that physically separates an aqueous liquid feed from a vapour permeate under vacuum. VMD is a promising technology for addressing the growing challenge of minimising the environmental impact of brine from existing desalination RO plants, providing an alternative for the treatment of RO concentrate, thus facilitating the achievement of MLD and possibly a step towards ZLD [26]. Other research [19, 27] conducted on hybrid RO-VMD systems have demonstrated their great capabilities for brine treatment. In summary, the overall process employs PV panels which provide electrical power to drive the high-pressure pump for the RO feed, and the brine produced is discharged to a tank for averaging throughout the day, allowing VMD to operate one day after starting the PV-RO system. However, VMD depends on both mass and heat transfer mechanisms [13, 28]; thus, a fixed constant flow is preferred to avoid any limitations, such as operating at low temperatures, which results in a low efficiency, or operating at high temperatures with low feed, which results in energy wasting [13]. From the tank, the feed is sent to a heater and thereafter to the VMD unit, where the concentrate undergoes further treatment and the permeate enters the vacuum created by the vacuum pump and is cooled inside the condenser. Because thermal energy dominates the energy consumption, where the VMD units are powered by an external source, the energy could be supplied by low-grade waste heat [29].

In this study, a fully dynamic process comprising an integrated PV-RO-VMD system is presented as an original base setup, and the flowchart for the suggested process is shown in Fig. 1.

Fig. 1
figure 1

Process flow diagram comprising the main units of PV-RO-VMD

To demonstrate real dynamic integration between units, a case study was conducted to measure the power generated at the best location in Saudi Arabia for 100 solar panels with yearly and monthly optimal tilts and a sun-tracking device. The entire process of PV-powered RO for brine treatment via VMD was modelled, simulated, and validated with high accuracy and low error ranging from 0.33 to 1.76%. An in-depth analysis of one day was conducted to demonstrate that the hourly performance, which peaked at midday. In addition, a monthly and yearly analysis was conducted, revealing total yearly power generations of 35,005, 37,265, and 49,109 kW for the yearly tilt, monthly tilt, and tracking system, respectively.

2 Modelling and Simulation

2.1 Solar Model

The models used to evaluate the performance of PV solar cell including, cell temperature and output power are available in the literature [19][30,31,32,33,34,35,36,37,38][41, 42]. The scheme of the soler model is shown in Fig. 2, and the equations provided in litreture are combined in a simulation using MATLAB with the Simulink package to apply the model in Fig. 2.

Fig. 2
figure 2

Solar Simulink model

2.2 Reverse Osmosis Model

Spiral-wound membranes are modelled as flat crossflow separators for the filtration process [32].

Model assumptions:

  • The process is isothermal, and there is no heating or cooling involved.

  • Transport phenomena occur in components and neutral solutions with no electrical effects.

  • No chemical reactions occur.

  • The curvatures are negligible because the feed and permeate channels in the spiral-wound membrane module are considered flat because the thickness of the channels is much lower than the radius of the module.

  • Permeation through the membrane is a strongly influenced by the difference between the feed and osmotic pressures, as proposed by the solution–diffusion model.

Several models have been presented [30,31,32,33,34,35,36,37,38], and the model and equations have been described in detail by Ahmed et al. [11]. Freshwater production can be estimated using the following equation:

$$ \begin{array}{*{20}c} {Q_{p} = W_{p} \cdot S_{E} \cdot \left( {{\text{TCF}}} \right)\left( {{\text{FF}}} \right)\left( {P_{f} - \frac{{{\Delta }P_{fc} }}{2} - P_{p} - \pi + \pi_{p} } \right) } \\ \end{array} $$
(1)

where Qp, Wp, SE, TCF, FF, Pf, ΔPfc, Pp, π, and πp are the permeate flow rate, membrane water permeability, membrane effective area, temperature correction factor, fouling factor, feed pressure, concentrate-side pressure drop, permeate pressure, average concentrate-side osmotic pressure drop, and permeate-side osmotic pressure, respectively.

The average concentrate-side pressure can be calculated using the following equation:

$$ \begin{array}{*{20}c} {\pi = \pi_{f} \left( {{\text{CPF}}} \right)\left[ {0.5\left( {1 + \frac{{1 - Y\left( {1 - R} \right)}}{1 - Y}} \right)} \right] ,} \\ \end{array} $$
(2)

where πf, CPF, Y, and R are the feed osmotic pressure, concentration polarisation factor, recovery ratio of the permeate to the feed flow, and salt rejection, respectively.

The feed osmotic pressure (psi) can be calculated as follows:

$$ \begin{array}{*{20}c} {\pi_{f} = 1.12\left( {273 + T} \right)\sum m_{j} ,} \\ \end{array} $$
(3)

where T and mj are the temperature of the source water and molality of the ions, respectively. The salt rejection can be calculated using the following equation:

$$ \begin{array}{*{20}c} {R = \frac{{C_{f} - C_{p} }}{{C_{f} }}} \\ \end{array} $$
(4)

where Cf and Cp are the feed and permeate concentrations, respectively. The permeate concentration can be determined using the following equations:

$$ \begin{array}{*{20}c} {C_{p} = S_{p} \left( {{\text{CPF}}} \right)\left( {{\text{TCF}}} \right)\frac{{S_{E} }}{{Q_{p} }}\left[ {0.5C_{f} \left( {1 + \frac{{1 - Y\left( {1 - R} \right)}}{1 - Y}} \right)} \right] ,} \\ \end{array} $$
(5)

where Sp is the salt permeability.

The concentrate concentration can be calculated as follows:

$$ \begin{array}{*{20}c} {C_{c} = \frac{{C_{f} .Q_{f} - C_{p} .Q_{p} }}{{Q_{c} }} } \\ \end{array} $$
(6)

The average concentrate-side osmotic pressure (psi) can be calculated using the following empirical equation:

$$ \begin{array}{*{20}c} {\Delta P_{fc} = 0.01\left( {\frac{{Q_{f} + Q_{c} }}{2}} \right)^{1.7} ,} \\ \end{array} $$
(7)

where Qc is the concentrate flow rate (gpm), which is calculated by subtracting the permeate flow rate from the feed flow rate. The average permeate-side osmotic pressure can be calculated using the following equation:

$$ \begin{array}{*{20}c} {\pi_{p} = \pi_{f} \left( {1 - R} \right) } \\ \end{array} $$
(8)

The TCF and CPF were calculated as follows:

$$ \begin{array}{*{20}c} {{\text{TCF}} = {\text{EXP}}\,\left[ {2640\left( {\frac{1}{298} - \frac{1}{273 + T}} \right)} \right];T < 25 ^\circ C ,} \\ \end{array} $$
(9)
$$ \begin{array}{*{20}c} {{\text{TCF}} = {\text{EXP}}\left[ {3020\left( {\frac{1}{298} - \frac{1}{273 + T}} \right)} \right];T > 25 ^\circ C ,} \\ \end{array} $$
(10)
$$ \begin{array}{*{20}c} {{\text{CPF}} = {\text{EXP}}\left( {0.7Y} \right) } \\ \end{array} $$
(11)

Electrical energy consumption is defined as the ratio of hydraulic power to pump efficiency ηp as shown in the following equation:

$$ \begin{array}{*{20}c} {{\text{Power}} = \frac{{Q_{f} .P_{f} }}{{\eta_{p} }}} \\ \end{array} $$
(12)

The scheme of the RO model is shown in Fig. 3, which is implemented by applying Eqs. (112).

Fig. 3
figure 3

RO Simulink model

2.3 Membrane Distillation Model

VMD is based on the use of a microporous hydrophobic membrane for separation, in which the driving force is maintained by applying a vacuum below the equilibrium vapour pressure to the permeate side.

Model Assumptions:

  • The process has extremely low conductive heat loss, mainly because the the applied vacuum insulates against conductive heat loss through the membrane. Thus, the boundary layer on the vacuum side is negligible, suggesting a decrease in the heat conducted through the membrane and enhanced VMD performance.

  • The resistance to heat transfer on the permeate side and by conduction through the membrane is generally neglected in the VMD configuration because diffusion inside the pores of the evaporated molecules at the liquid feed/membrane interface is favoured.

  • The resistance to molecular diffusion can be neglected because in most VMD systems, the membrane pores are extremely small compared to the mean free path of the diffusing molecules. Therefore, the number of molecule–molecule collisions is negligible compared to the number of molecule–pore wall collisions.

Under these conditions, the Knudsen diffusion mechanism dominates mass transfer through the membrane. This has been recognised and proven in previous studies [43,44,45,46,47,48,49,50].

The model and equations have been described in detail by Lovineh et al. [43]. Mass flux can be calculated using the following equation:

$$ \begin{array}{*{20}c} {J = K_{m} .\left( {P_{I} - P_{V} } \right) ,} \\ \end{array} $$
(13)

where Km is the net membrane distillation coefficient in the VMD system, and PI and PV are the interfacial partial pressure of water and downstream pressure maintained near vacuum, respectively.

Km can be calculated using the following equation:

$$ \begin{array}{*{20}c} {K_{m} = 1.064\frac{vf \cdot dp}{{X \cdot th}}\sqrt {\frac{M}{{R_{g} \cdot T_{i} }}} ,} \\ \end{array} $$
(14)

where vf, dp, X, th, M, Rg, and Ti are the void fraction, membrane pore-size distribution, tortuosity factor, membrane thickness, molecular weight, ideal gas constant, and interfacial temperature, respectively.

The interfacial partial pressure can be measured using the following equation for nonideal mixtures:

$$ \begin{array}{*{20}c} {P_{I} = \sum P_{i} .x_{i} .e_{i} } \\ \end{array} $$
(15)

where Pi, xi, and ei are the pure vapour pressure, liquid mole fraction, and activity coefficient of each substance, respectively. The vapour pressure can be calculated using the Antoine equation.

$$ \begin{array}{*{20}c} {P_{i} = exp\left[ {a - \frac{b}{{c + T_{i} }}} \right] ,} \\ \end{array} $$
(16)

where a, b, and c are constants determined by experiments.

Owing to the low pressure in the VMD process, heat transfer through conduction is negligible, and the primary mechanism is carried out by the latent heat of evaporation. The heat Qh can be calculated as follows:

$$ \begin{array}{*{20}c} {Q_{h} = h_{f} \left( {T_{b} - T_{i} } \right) = \sum J.\lambda ,} \\ \end{array} $$
(17)

where hf, Tb, and λ are the heat-transfer coefficient, bulk temperature, and molar latent heat of vapourisation, respectively.

The latent heat for the range of 273–373 K can be calculated using the following equation:

$$ \begin{array}{*{20}c} {\lambda = 1.7535T_{i} + 2024.3 ,} \\ \end{array} $$
(18)

where Ti is expressed in K and λ.

The heat transfer coefficient can be calculated as follows:

$$ \begin{array}{*{20}c} {h_{f} = \frac{{Nu.k_{l} }}{{d_{h} }} ,} \\ \end{array} $$
(19)

where Nu, kl, and dh denote the Nusselt number, thermal conductivity of the liquid, and hydraulic diameter of the module, respectively. These variables can be calculated using the following equations:

$$ \begin{array}{*{20}c} {Nu = 0.013Re^{0.64} .Pr^{0.38} \;\left( {Re < 2100} \right) ,} \\ \end{array} $$
(20)
$$ \begin{array}{*{20}c} {Nu = 0.023Re^{0.8} .Pr^{0.33} \;\left( {Re > 2100} \right) ,} \\ \end{array} $$
(21)
$$ \begin{array}{*{20}c} {Re = \frac{{\rho_{d} .\upsilon .d_{h} }}{\mu } ,} \\ \end{array} $$
(22)
$$ \begin{array}{*{20}c} {Pr = \frac{{C_{pw} .\mu }}{{k_{l} }} ,} \\ \end{array} $$
(23)

where Nu, Re, Pr, ρd, υ, μ, and Cpw denote the Nusselt number, Reynolds number, Prandtl number, density, average velocity, viscosity, and heat capacity, respectively.

$$ {\text{Electrical}} \;{\text{Power}} = E_{p} + E_{v} , $$
(24)
$$ \begin{array}{*{20}c} {{\text{Thermal }}\;{\text{Power}} = E_{h} .} \\ \end{array} $$
(25)

The power consumption and heat–duty input of this VMD setup mainly comprises a feed pump Ep, heater Eh, and vacuum pump Ev.

The feed-pump power can be calculated using Eq. (12), and the vacuum pump can be measured using the following equation:

$$ \begin{array}{*{20}c} {Ev = \frac{{m_{a} .R_{g} .T_{i} }}{{M_{a} .\eta_{v} }}.\frac{ae}{{ae - 1}}.\left[ {\left( {\frac{{P_{atm} }}{{P_{V} }}} \right)^{{\frac{ae - 1}{{ae}}}} - 1} \right],} \\ \end{array} $$
(26)

where ma, Ma, ηv, ae, and Patm are the mass flow rate of the air (approximated at 3 kg/h for every m3/h of feed to the pump [51]), molecular weight of the air, vacuum pump efficiency, adiabatic expansion coefficient, and exit atmospheric pressure, respectively.

The adiabatic expansion coefficient cab be calculated as follows:

$$ \begin{array}{*{20}c} {ae = \frac{{C_{pa} }}{{C_{va} }} ,} \\ \end{array} $$
(27)

where Cpa and Cva are the heat capacities of air at constant pressure and constant volume, respectively. The thermal energy consumption of the heater represents most of the power required for the process and can be calculated using the following equation:

$$ \begin{array}{*{20}c} {E_{h} = m_{f} .C_{pw} .\left( {T_{b} - T} \right) ,} \\ \end{array} $$
(28)

where mf is the mass flow rate of the feed into the heater. The temperature polarisation factor (TPC) could indicate the effect of the interfacial temperature and how far it deviates from the bulk temperature [52].

$$ \begin{array}{*{20}c} {TPC = \frac{{T_{i} - T_{v} }}{{T_{b} - T_{v} }} ,} \\ \end{array} $$
(29)

where Tv is the temperature on the vacuum side, and the specific energy consumption is defined as a unit of power consumed per unit of freshwater produced. The modelling and simulation using Eqs. (1329) are shown in Fig. 4.

Fig. 4
figure 4

VMD Simulink model

3 Validation of the Models

3.1 Solar Model Validation

The experimental results were recorded at King Saud University with coordinates of 24.722° N and 46.627° E located at an altitude of 0.66 km in Riyadh city, Saudi Arabia. Figure 5 shows that the irradiance results of the simulation exhibit high accuracy, with overall errors of 6%, 6.2%, 3.9%, and 1% for the first day of Spring (21 March), Summer (21 June), Autumn (23 September), and Winter (23 December), respectively.

Fig. 5
figure 5

Simulation and experimental solar global horizontal irradiance plots for the first day of a Spring on the 21st of March, b Summer on the 21st of June, c Autumn on the 23rd of September, and d Winter on the 23rd of December

The total overall error across all four seasons is 4.6%.

3.2 RO Model Validation

The output results were validated using software developed by DuPont of the parent company DOW Inc., which is one of the largest chemical companies worldwide. Water application value engine (WAVE) [51] is a modelling software programme that combines several technologies, including reverse osmosis, ultrafiltration, and ion exchange processes, into one comprehensive and integrated platform. The WAVE software is used to simulate and design the operation of water treatment systems, and its results are well received both academically and commercially. The results of this study were compared using WAVE (version 1.81.814), which is considered the successor of reverse osmosis system analysis (ROSA) software.

The results were obtained using a spiral-wound module from FilmTec [53]. The conditions were set for a single-stage single-pass with four elements inside a pressurised vessel. The feed flow rate was set at 4 m3/h and 60 bar, with a feed concentration of 35,000 ppm at 25 °C. Figure 6 shows that the permeate results exhibit high accuracy at each point and significantly high accuracy for the overall flow rate through all elements, with an error of 1.05%.

Fig. 6
figure 6

Simulation and WAVE RO permeate flow plots

3.3 VMD Model Validation

Experimental results for a capillary membrane with a shell-and-tube module, where the feed goes on the lumen side, were obtained from the literature [45].

Data were collected for a membrane with 40 capillaries, having a feed velocity of 0.8 m/s and water mole fraction and activity coefficient of 1, at multiple temperatures.

Figure 7 shows that the flux results exhibit high accuracy at each operating temperature and significantly high accuracy for the overall flux, with an error of 0.33%.

Fig. 7
figure 7

Simulation and experimental VMD flux plots

4 Location and Case Study Results

4.1 Best Location in Saudi Arabia

The first question asked when considering a case study on the solar energy and water desalination simulation was the best location for the process. To answer this question, certain criteria needed to be established for choosing the location. The criteria are summarised as follows:

  1. 1.

    Coastal area near the sea for easier seawater access.

  2. 2.

    Amount of solar radiation amounts for adequate energy generation.

The first criterion was selected because the main goal of the case study was water desalination; thus, choosing a location near the sea would reduce the transportation costs between the source and plant.

The second criterion concerns the available energy. Because solar radiation varies according to the coordinates and altitude, choosing a location with a high amount of available irradiance is important.

According to the Solar Atlas data registered between 1999 and 2018, as shown in Fig. 8, the beam (direct normal) irradiance, which represents the main and bulk radiation sources for the solar panels, clearly indicates the northwest area of the map to meet the two criteria of a coastal location with a high amount of radiation.

Fig. 8
figure 8

Saudi Arabia irradiation map [54]

4.2 In-Depth Specific Day Results

The results were obtained in northwest Saudi Arabia at 28.51° N and 34.80° W at an altitude of 10 m and an ambient temperature of 25 °C on the 21st of October. The specifications of the 100 solar panels used in this study are listed in Table 1.

Table 1 Process specifications for the modules

An analysis was performed to determine the optimal monthly and yearly tilts. Figure 9 shows that the optimal tilt angle for October is 38.1°. The yearly optimal tilt is similar to the latitude of 28.5°, and the optimum azimuth angle is set to 0° facing south because this is the optimum angle for all locations in the Northern Hemisphere.

Fig. 9
figure 9

Monthly optimal tilt and yearly average

Subsequently, the irradiance was measured on the tilted surface for the yearly optimal tilt, monthly optimal tilt, and dual-axis tracking, where the azimuth angle tracks the solar azimuth angle and the slope tilt angle tracks the zenith angle.

Figure 10a shows that the yearly and monthly tilts for October are relatively close, revealing similar radiation results; however, the tracking system shows a significant improvement, especially at non-midday hours. The monthly optimal tilt showed a 3.14% improvement in the overall radiation compared with the yearly tilt, whereas the tracking system achieved 30.35% more radiation.

Fig. 10
figure 10

Different tilt angles effects on, a global tilted solar radiation, b PV power generation, c RO feed flow rate, and d RO permeate flow rate

These results were translated into power generation, as shown in Fig. 10b. Power generation is observed to follow the radiation plot; however, the improvement percentage for the monthly optimal tilt and tracking system is less at 2.93% and 29%, respectively,

owing to the temperature co-effect, which causes higher radiation levels to increase the cell temperature and thus lower panel efficiency.

Operating with a high driving force is known to be the most efficient method in terms of specific energy consumption, requiring a constant high pressure for the pump and high temperature for the heater to drive the RO and VMD processes, respectively.

Electrical power from the PV system was used to drive a high-pressure pump at 60 bar as feed for the RO system. The feed flow rate peaks at approximately 6 m3/h, as shown in Fig. 10c, with the same profile and percentage improvement exhibited as for the power generation. This feed was directly pumped into the RO system using a setup based on the specifications listed in Table 1.

Figure 10d shows the permeate plots for each angle configuration. The overall water production of the RO system shows a monthly optimal tilt improvement of merely 2.22% over the yearly optimal tilt and 24.2% improvement by the tracking system; this reduction in the improvement percentage is expected because the increase in the feed flow rate of the RO performance tends to decline as the membrane area is fixed and permeability is limited. The annual optimal tilt, monthly optimal tilt, and tracking system achieved 45.63%, 45.32%, and 43.94% recoveries, respectively.

The concentrate from the RO system was accumulated in a tank and averaged throughout the day as feed for the VMD system (Table 1) with 10,000 capillaries. Compared to the yearly tilt, treatment with the monthly optimal tilt of the PV-RO system resulted in a 1.42% increase in the amount of freshwater, and the tracking system yielded an increase of 10.14%, as shown at Fig. 11a, as the VMD process is both mass- and heat-transfer dependent. This outcome was expected because evaporation rate limitations were present. The recoveries achieved were 26.31, 25.77, and 21.72% for the yearly optimal tilt, monthly optimal tilt, and tracking system, respectively, for the PV-RO brine treatment.

Fig. 11
figure 11

VMD performance for each PV-RO tilt angle: a permeate flow rate and b power consumption

Figure 11b clearly shows that thermal energy consumption dominates the scenario, and the electrical energy consumption of the feed and vacuum pumps are considerably low. Compared to the yearly optimal tilt, the monthly optimal tilt of the PV-RO system required 3.52% more energy to process the brine, whereas the tracking system required 33.31% more energy. This increase in energy consumption does not match the produced water in Fig. 11; for example, the 33.31% increase in energy consumption translated into only a 10.14% increase in permeate flow rate, which denotes the effect of temperature polarisation, thus indicating that the operating temperature is not high enough to justify the increase in the feed flow rate, resulting in more heat duty required to heat the feed compared to the lower feed flow rate supplied by the yearly optimal tilt of the PV-RO system.

Figure 12a shows the specific electrical energy consumption (SEEC) and specific thermal energy consumption (STEC) of both RO and VMD for a SEEC of 4.87, 4.9, and 5.06 kWh/m3 and STEC of 152.98, 156.16, and 185.16 kWh/m3 for the yearlytilt angle, monthly tilt angle, and tracking system, respectively. Figure 12b shows that the process achieves recoveries of 59.94%, 59.41%, and 56.11% for the yearly tilt angle, monthly tilt angle, and tracking system, respectively. Most of the recovery is obtained by the RO system, while the VMD contribution is smaller with more energy consumption; however, this outcome is expected from the brine treatment process because it is a secondary process after RO.

Fig. 12
figure 12

Effects of different tilt angles on RO and VMD: a specific energy consumption where the RO range is SEEC and VMD range is STEC and b recovery ratio

4.3 Monthly and Yearly Results

An understanding of the difference between seasons is necessary to demonstrate that the available global horizontal radiation for four days out of the year can represent the shifts between seasons, as shown in Fig. 13. The difference is between summer and winter is significant; however, this difference shrinks when applying optimised angle because the horizontal (tilt angle of 0°) test favours June, as shown in Fig. 9.

Fig. 13
figure 13

Seasonal global horizontal radiation difference

More comprehensive results were obtained based on monthly radiation, which can be shown as monthly units or equalised as a continuous plot. Figure 14 shows dips in some of the months when plotting the results as monthly units because some months have 30 d instead of 31 d; this is especially obvious in February, which has only 28 d, leading to lower total permeate.

Fig. 14
figure 14

Data presentation as continuous and monthly units

Figure 15a shows the total yearly power generation from 100 PV panels are 35,005, 37,265, and 49,109 kW for the yearly tilt, monthly tilt, and tracking system, respectively. Compared to the yearly tilt, the tracking system and monthly tilt show increases of 40.3% and 6.46%, respectively. Figure 15b shows that the yearly RO permeates are 7595, 7966, and 9611 m3 for the yearly tilt, monthly tilt, and tracking system, respectively, showing an increase of 26.55% for the tracking system and 4.88% for the monthly tilt compared to the yearly tilt. Figure 15c shows that the yearly VMD thermal energy consumptions are 328,263, 354,202, and 502,069 kWh for the yearly tilt, monthly tilt, and the tracking systems, respectively, showing increases of 52.95% and 7.9% for the tracking system and monthly tilt, respectively, compared to the yearly tilt. Figure 15d shows that the yearly VMD permeates are 2149, 2208, and 2480 m3 for the yearly tilt, monthly tilt, and tracking system, respectively. Compared to the yearly tilt, the tracking system and monthly tilt show increases of 15.42% and 2.75%, respectively.

Fig. 15
figure 15

Monthly effects of different tilt angles: a PV power production, b RO permeate, c VMD thermal energy consumption, and d VMD permeate

The accumulated recoveries reach 61.9, 60.7, and 54.7% for the yearly tilt, monthly tilt, and tracking system, respectively. Most of the recovery is achieved by the RO system, whereas most of the energy is consumed by the VMD system in the form of thermal energy. The combined overall process permeates are 9744, 10,174, and 12,091 m3 for the yearly tilt, monthly tilt, and tracking system, respectively. SEEC is found to range from 4.61 to 5.11 kWh/m3 for the RO process, and STEC is found to range from 152 to 202.4 kWh/m3 for VMD.

5 Conclusions

The process of PV-powered RO for brine treatment via VMD was modelled, simulated, and validated with high accuracy and low error ranging from 0.33 to 1.76%. An in-depth analysis of one day was conducted to demonstrate that the hourly performance, which peaked at midday. In addition, a monthly and yearly analysis was conducted, revealing total yearly power generations of 35,005, 37,265, and 49,109 kW for the yearly tilt, monthly tilt, and tracking system, respectively. The gain was found to be a 40.3% and 6.46% for the tracking system and monthly optimal tilt, respectively, compared to the annual tilt. The power was transformed into a feed flow for the pumps driving the RO system, resulting in a total permeate ranging from 7595 to 9611 m3, recovery ranging from 43.5 to 48.2%, and SEEC ranging from 4.61 to 5.11 kWh/m3. Even though the tracking system generated more energy and desalinated water, it achieved the lowest recovery per cent, leading to higher SEEC. The brine produced via RO was transferred to the VMD unit, achieving a total permeate ranging from 2149 to 2480 m3, recovery ranging from 11.22 to 13.64% of the overall recovery, and power consumption ranging from 328,263 to 502,069 kW, resulting in a STEC ranging from 152 to 202.4 kWh/m3. The overall process produced a permeate ranging from 9744 to 12,091 m3, with total recovery ranging from 54.7 to 61.9%.