Numerical methodology and CFD simulations of a rotary vane energy recovery device for seawater reverse osmosis desalination systems

Abstract Energy recovery devices in Seawater Reverse Osmosis Systems (SWRO) reduce energy consumption and may facilitate the large-scale deployment of desalination systems. In this paper, a Rotary Vane Energy Recovery Device (RVERD) is analysed and optimised by aiming at weakening cavitation and improving the volumetric performance of the machine. An innovative analytical methodology based on user defined nodal displacement is proposed to address the need to discretise the rotating and deforming computational domain of double-acting vane machines. The generated grids are interfaced with the ANSYS FLUENT solver for multi-phase computational fluid dynamics simulations. The flow topology is analysed to reveal the flow and cavitation features especially in the blade tip regions. A port optimisation is then carried out followed by a sensitivity analysis on the design parameters to improve RVERD performance. The results show that delaying the discharge angle at the high-pressure outlet port by 3° and an optimal port to stator length ratio of 70% helped to prevent backflows and eliminate torque peaks. The sensitivity analysis has identified the rotational speed and the blade tip clearance as the two most influential factors affecting cavitation and, in turn, the volumetric efficiency of the machine. With respect to the baseline design configuration, at the optimal rotational speed of 1000 RPM and with a tip clearance gap of 50 μm, the volume-averaged vapour volume fraction in the core decreased from 20.6 × 10−3 to 0.6 × 10−3 while the volumetric efficiency increased from 85.7% to 91.6%. The axial clearance gap of 70 μm contributed to 2.9% of the volumetric losses.


Introduction
Rotary vane machines are widely employed as compressors [1,2], pumps [3,4], as well as expanders. This operational flexibility is owing to their simple geometry, low manufacturing complexity, compactness and competitive performance [5]. Among the energy recovery applications as expanders, vane machines have been developed for refrigeration [6,7], Organic Rankine Cycles [8,9] and as Energy Recovery Devices (ERDs) in Seawater Reverse Osmosis (SWRO) desalination systems [10,11]. In the latter case, the combination of ERDs with improved Reverse Osmosis (RO) membranes and high-efficiency pumps decreases the specific energy consumption of the SWRO system from 20 to 2 kWh/ m 3 [12,13]. The upscaling and deployment of Rotary Vane Energy Recovery Devices (RVERDs) in SWRO applications is, however, constrained by the occurrence of cavitation between the stator surface and the blade tip. Cavitation may lead to vibrations, noise and surface erosion and can further lower the volumetric efficiency [14], which may cause failures of the energy recovery.
The state of the art on sliding vane technology encompasses theoretical and experimental investigations. As concerns the theoretical aspect, zero or one-dimensional formulations have been primarily employed. Al-Hawaj [15] developed a thermodynamic model to analyse the leakage effects between adjacent cells in a double-acting vane compressor. Bianchi et al. [16] presented a one-dimensional model of a vane pump in the commercial software GT-SUITE, incorporating friction and leakage losses. Ye et al. [17] developed a theoretical model to calculate and analyse the energy recovery efficiency of a RVERD based on friction losses. Wang et al. [18] designed a novel vacuum pump with three chambers to improve suction volume. Battarra et al. [19,20] analysed the blade-stator kinematics in a vane pump and calculated its theoretical flow rate. Fatigati et al. [21] evaluated the dual-intake technology to enhance the operability and the performance of vane expanders, indicating that the dual intake port helped to decrease the friction losses. They also investigated the internal leakages inside the vane expander [22], which showed that leakages mainly occurred at the blade tips and sides. Vodicka et al. [23] studied the friction, leakage and heat balance of a vane expander, demonstrating that the radial clearance had the greatest influences on the expander performance. Gu et al. [1] conducted dynamic analysis on a novel vane compressor with a rotating cylinder, indicating that the friction loss at the blade tips and between rotor and cylinder can be reduced compared to the traditional compressors. The theoretical approach undoubtedly reduces the computational cost, but it may not wholly reflect the real complexity of the machine. Experimental research works on vane machines provided validation benchmarks [24,25], and allowed researchers to assess the performance of vane machines [26,27] and their systems [28,29]. The key drawback of experimental methodologies for positive displacement machines, including vane ones, is the low spatial resolution. To overcome this aspect, Particle Image Velocimetry (PIV) methods are being developed [30] for visualization experimental research.
The numerical simulation for research and design of vane machines was a breakthrough in this scientific field since it allowed researchers to resolve complex flow topologies and to gain insights towards optimised configurations. The main challenge for Computational Fluid Dynamics (CFD) studies on vane machines is the representation of the moving and deforming computational domain enclosed between stator, rotor and blades [31]. Limited CFD research is available on rotary vane machines; most of them relied on commercial meshing software. Montenegro et al. [32] simulated a vane expander with an elliptic stator in Organic Rankine Cycles with R245fa as working fluid. To reduce the simulation time, a Darcy-Forchheimer type source term was introduced to modify the momentum equation in the tiny blade tip clearance gap. Kolasiński and Błasiak [33] carried out numerical and experimental research on a vane expander in a micro Organic Rankine Cycle. In the numerical modelling, to avoid the negative volumes in the computational grids, they modified the geometry by reducing the blade thickness and increasing the blade tip clearance. Bianchi et al. [34] proposed an analytical grid generation approach based on the User Defined Nodal Displacement (UDND) for vane machines, which relied on algebraic algorithms with transfinite interpolation, post orthogonalisation and smoothing for internal nodes distribution. This method, only available for single-acting vane machines, was employed to evaluate the potential of the supercharging technology for increasing the power output of vane expanders for waste heat to power conversion applications [35]. Gu et al. [1,36] performed numerical investigations on a novel vane compressor with a rotating cylinder. They found that increasing pressure ratio would increase the outlet temperature, decrease the mass flow rate, volumetric and isentropic efficiency [1]. The outlet port configurations also had vital effects on the compressor performance. The coverage angles had greater effects on the compressor performance than the central position angle [36].
While the above CFD investigations all focused on the single-phase flow in vane machines, few researchers took cavitation into account to study two-phase flow characteristics. Zhang and Xu [37] studied a vane oil pump using the Star-CD solver and identified the impacts of blade tip radius on cavitation. Due to the grid deformation, the space conservation law developed by Demirdžić and Perić [38] needed to be satisfied with other conservation equations. They found that a smaller blade tip radius enhanced cavitation and slightly increased the mass flow rate. Lobsinger et al. [39] carried out two-dimensional CFD research on a double-acting vane oil pump. The rotor mesh was generated by the TwinMesh software. The cavitation and leakage characteristics, as well as the volumetric efficiency, were studied. However, the axial clearance gaps could not be considered in this two-dimensional case. In an earlier work by the authors of [40], the cavitation characteristics in a RVERD were simulated by ANSYS FLUENT with a User Defined Function (UDF) to control the blade movement. Cavitation would occur in the blade tip clearance, the downstream area of the rotational blade, and the blade slot bottom area. However, the unstructured mesh used for simulations had a disadvantage of a small number of grids (sometimes even one layer of the grid) in the blade tip clearance gap, which may result in inaccurate simulation results. The value of the blade tip clearance gap, 200 µm, was also too large and far away from the real condition. The current research overcomes the limitations of the state of the art by proposing a novel grid generation methodology that is fully customisable and applicable to both commercial and open source CFD solvers. The analytical approach which underpins the grid generation allows authors to investigate conventional and innovative rotary vane machine geometries, such as the double-acting RVERD one which cannot be handled by the existing UDND grid generation methods. Furthermore, the parametric nature of the approach allows authors to optimise the grid quality to comply with the strict numerical requirements of multi-phase simulations. From an application perspective, the investigation of RVERD flow topology improved the knowledge on the operation of these machines and provided guidelines and insights for the design of double-acting vane machinery for SWRO desalination systems.

Case study
Energy Recovery Devices (ERDs) are vital components of the Seawater Reverse Osmosis (SWRO) desalination systems since they help to reduce the overall energy consumption of the desalination plant [12]. The scheme in Fig. 1 shows a typical SWRO plant with ERD. The brine rejected by the RO membrane flows into a RVERD and drives its rotation. The seawater supplied by a seawater supply pump is divided into two streams. One stream is pressurized by a RVERD and a booster pump successively, while the other one is pressurized by a High-Pressure (HP) pump. The two streams merge to feed the RO membrane. Finally, water leaves the SWRO process as permeate from the RO membranes, and the brine stream discharges from the system after depressurization. Within the RVERD, the pressure energy is transferred by the rotor and blades from the brine stream to the seawater stream. The reference operating conditions of the SWRO plant are listed in Table 1 and used as boundary conditions for the rest of the study.
Even though the use of ERDs help to reduce the carbon footprint of the desalination plant, these machines have a marginal impact on the product ratio, defined as the ratio of the fresh water mass flow rate to the total seawater stream mass flow rate. In fact, a study on 70 desalination plants [12] concluded that the product ratio, ranging from 35% to 60%, is influenced by the membrane performance, the osmotic pressure and the RO configuration.
Turbines were employed in the first ERD applications. Francis turbines were the earliest, followed by Pelton turbines. The turbine-type ERD is not quite efficient due to the double energy conversion, where hydraulic energy in the brine is converted to mechanical energy to rotate the shaft, and converted again to hydraulic energy in the seawater [41]. To further improve energy efficiency, isobaric ERDs, such as dual work exchangers or rotary pressure exchangers, were adopted. However, they can slightly increase seawater salinity during the energy recovery process due to the direct contact between brine and seawater streams [42].
The RVERD was proposed as a promising technology for SWRO applications since it showed higher efficiency than turbine ERDs and lower mixing than isobaric ERDs [10]. Past research has shown that the use of RVERDs decreased the specific energy consumption of the desalination plant by 55.4%. From a functional perspective, the RVERD is a positive displacement machine composed of a stator, a rotor and multiple blades. Fig. 2 displays the schematic of a four-blade RVERD. Unlike the conventional double-acting vane machines, the RVERD operates with two different working fluids, namely brine and seawater. Therefore, the interfaces between the machine and the SWRO plant occur through four different ports: High-Pressure (HP) brine inlet port, Low-Pressure (LP) brine outlet port, LP seawater inlet port and HP seawater outlet port.

Geometry of the vane machine
The reference geometrical parameters of the RVERD are shown in Fig. 3 and listed in Table 2. Among them, a key assumption of the proposed methodology is the constant value for the clearance gap between the stator and the blade tip. This gap was selected as 50 µm based on previous studies, which analysed vane machines of similar overall dimensions [37,39].

Deforming grid generation of the vane
An essential step for CFD simulations in rotary vane machines is to develop algorithms for discretizing the deforming rotor fluid domain. In this work, a new analytical grid generation methodology has been developed based on a UDND approach. Computational node locations at each time step are externally calculated by MATLAB routines developed by the authors. This grid generation is the most crucial step for the simulation and it is executed before the CFD calculations. The method was successfully applied in Ref. [34] for circular-housing and singleacting vane compressors and expanders. However, it was not implemented for non-circular or double-acting vane machines. Hence, a new user code is developed and implemented for this work. Fig. 4 shows the workflow of the analytical grid generation algorithm proposed for general vane machines without limitations of the stator housing topology.
As shown in Fig. 4, the parameters for geometry generation, boundary distribution and node distribution are prescribed at the onset. Generation and discretisation of the inner and outer boundaries of the rotor profile are then performed to define the rotor domain. The next step is the mapping process between the inner and outer boundary nodes. After that, all mapping lines are respectively divided into equidistant radial divisions for interior node distribution, leading to an "O" structure for the rotor mesh which helps to avoid inaccuracies in the non-matching mesh connection between the core and the blade tip regions [34]. It should be noted that when the blade slides inside the rotor, the core region topology is no longer rectangular. Therefore, a small geometrical simplification must be introduced to convert the blade side wall into a short segment on the rotor surface, which helps to generate an "O" grid in the rotor fluid domain at every angular position. This geometrical simplification of the blade side wall does not affect leakage flow as the tip clearance gap does not change. After the two-dimensional mesh is generated for all the time steps, representing a full rotation of the rotor, the grids are assembled into a three-dimensional mesh for the     first position in the solver. The analytical grid generation procedure yields a grid database consisting of node coordinates for all time steps. For the ANSYS FLUENT solver, to interface this unstructured cell centred solver with customized grids, a UDF is required to read node coordinates stored in the database and then update the mesh at every time step. The UDF previously developed by the authors in Ref. [43] is employed here. Finally, the rotor domain is connected to the port domain by nonconformal interfaces.
The computational domain consists of five grid blocks: one for the core rotating part and four for the fixed ports. The core part mesh is produced by the proposed analytical grid generation methodology, while the port fluid domain is discretized by the ICEM CFD tool. Fig. 5 displays the computational mesh of the RVERD. The inflation layers are neglected in this paper to decrease the total cell count of the mesh and consequently reduce the calculating time. Another reason for neglecting the inflation layers is that the blade side walls are parallel surfaces that form a convex connection with the blade tips, and this convexity is a challenge for generating the rotor grid because the aspect ratio between the core and the gap changes by many orders of magnitude, which may lead to solver instability. Also, the main flow region rather than the boundary layer region is our interest [34].

Conservation of mass and momentum
With the assumption of a homogeneous multiphase flow, the liquid and vapour share the same velocity field. Neglecting the body forces and heat transfer of the fluid, the unsteady Reynolds-averaged Navier-Stokes equations can be written as: where where ρ m , ρ l , and ρ v are mixture, liquid and vapour densities respectively, t is time, u i and u j are velocities in i and j directions respectively, x i and x j are coordinates in i and j directions respectively, p is pressure, μ m is mixture laminar viscosity, μ t is turbulent viscosity, δ ij is Kronecker delta function, μ l and μ v are liquid and vapour dynamic viscosities respectively.
Considering that the compressibility of the liquid is very small, the Tait equation of state is used to develop a nonlinear relationship between pressure and density under isothermal conditions [44]. The treatment of compressible liquid helps to reduce artificial pressure spikes in such dynamic and moving mesh applications. The simplified Tait equation can be expressed as: where ρ l0 is the liquid density at the reference state which is 997.00 kg/ m 3 , Bu is Bulk modulus, Bu 0 is the Bulk modulus at the reference state which is 2.2 × 10 9 Pa, E is density exponent which is 7.15, p l is liquid pressure, p l0 is the reference liquid pressure which is 101325 Pa, ρ l /ρ l0 is liquid density ratio which is limited to the range between 0.9 and 1.1 [44].

Cavitation model
The condensation and vaporization process of cavitation within the RVERD are governed by the vapour transport equation, which can be expressed as: where ṁ + and ṁ − are the mass transfer source and sink terms respectively. The Zwart-Gerber-Belamri model [45] derived from the Rayleigh-Plesset equation is employed to calculate the interphase mass transfer. Without considering the surface tension and the second order terms, the Rayleigh-Plesset equation can be simplified as: where R b is bubble radius, p sat is vapour saturation pressure, p loc is local static pressure.
The vapour volume fraction α v can be written as: where N is bubble number per unit volume. Hence, the interphase mass transfer rate ṁ is expressed as: Considering that the nucleation site density decreases with the vapour volume fraction in the vaporisation process, the mass transfer terms can be further generalized as: (12) where the bubble radius R b is equal to 10 − 6 m; α nuc is nucleation site volume fraction which is 5 × 10 − 4 ; F vap is vaporization coefficient which is 1; F con is condensation coefficient which is 10 − 4 . A significantly low condensation coefficient has been specified to stabilise the flow solver as this parameter acts as a relaxation factor without losing accuracy in the cavitation zone.

Assumptions and limitations
As with any other mathematical model of a physical system, the proposed CFD model of the RVERD also involves assumptions. With regard to the geometry of the rotary vane machine, the clearances specified for the generation of the grids are exactly maintained at running conditions. In turn, a constant width of fluid layer between the blade tip and the stator is assumed during the whole vane revolution. This is a trade-off between the ideal geometrical tangency and real operating conditions, where the blade tip slides along a fluid layer that prevents a dry contact with the stator. The actual blade tip clearance gap depends on the operating conditions of the application, i.e. rotational speed and pressure ratio, as well as on the design parameters of the vane machine, namely blade tip profile, radial/tilted blade arrangement, blade material/lightening. Previous studies [24,28] have shown that the blade tip clearance gap experiences an angular variation and its magnitude is the result of a complex tribological problem that, in this study, would have required the use of fluid-structure simulation approaches including elastohydrodynamics. However, the aim of this research was to assess the thermofluid operation of the machine rather than its structural integrity.
For the same reason, the erosion effects due to cavitation have also not been taken into account, thus also the blade material. The simulation challenges that such studies would involve have led previous researchers to investigate the effect on the materials due to sliding surfaces in positive displacement machines only through experimental methodologies. These studies were able to assess the effects of viscosity of the working fluid in a rotary compressor [46], investigate the effects of hard coatings on the tribological characteristics in a rotary compressor [47], identify the best stator material of a vane pump in terms of wear and friction [48], reveal the influences of the blade materials and commercial lubricants on a vane compressor [49], study the wear and power dissipation of a vane expander [50].
Another key assumption of this study was to replace seawater and brine with pure water in terms of transport properties, saturation pressure, and applicability of the nucleation model used by the Rayleigh-Plesset equation and cavitation rate governing equations. This simplification allowed authors to discard the mixing between the two fluids and the resulting complexity of calculating the local saturation pressure of the mixture. In a SWRO system, the brine concentration primarily depends on the membrane performance, plant configuration, product ratio, seawater salinity. Typical concentrations of seawater and brine are 3.5% and 6.5% respectively. In the 70 desalination plants surveyed in [12], seawater concentration ranges from 3.16% to 4.70%. Among them, in the Middle East, the concentration is between 3.71% and 4.70%; while outside the Middle East, the value ranges from 3.16% to 4.18%. The comparison of the main thrmophisical properties of water, seawater and brine is presented in Table A.1, from which it can be concluded that density, viscosity and vapour saturation pressure do not change significantly with the concentration from 0% to 6.5%. Since the vapour saturation pressure of water is slightly higher than that of seawater and brine, the actual cavitation vapour volume fraction might be slightly lower than the obtained results. Hence, while the findings of this research are more applicable to low-salinity areas, for high-salinity applications a bit of correction may be needed in the cavitation models to account for heterogenous nucleation that will initiate at salt molecules and other impurities. The employed turbulence model, cavitation model and geometrical discretisation numerical schemes represent the full conservation of mass, momentum, energy, and species governed by equations presented in Section 4. Higher order turbulence models could better capture the transient flow structures in the machine.
All boundary conditions and rotational speed are constant, i.e. the fluctuations of speed, pressure and temperature imposed by the rest of the SWRO plant do not affect the operation of the RVERD. This is due to the lack of experimental boundary conditions and, for small fluctuations, this assumption is not expected to distort the results presented in Sections 7-9.
Despite these simplifications, the proposed methodology provides the exceptional capability to investigate details of the flow and cavitation mechanism that is practically very difficult to evaluate in actual apparatus. Thus, the proposed work is an advancement of technology that could be utilised during early design cycles followed by actual machine tests.

Simulation setup
The CFD simulations on the RVERD were performed in ANSYS FLUENT software. The detailed settings are shown in appendix Table A Leakage flows are sensitive to the grid resolution of the gaps and due to the dynamic nature of the RVERD's computational domain, a limited resolution could be achieved in the gaps. Within this context, a grid independence study has been reported for the reliability of the results. Simulation results with three different rotor mesh sizes are presented in appendix Table A.3. The difference of the mass flow rate at the HP outlet between the medium mesh and the fine mesh sizes was less than 0.5%, while the corresponding difference of the cavitation rate as the volumeaverage vapour volume fraction in the core part was close to 0.4%. Therefore, considering simulation accuracy and computational time, a rotor mesh of around 170,000 cells was adopted for all CFD calculations. The cell count for all the port domains was equal to 57,760. All CFD simulations ran on a PC with i7-6700 CPU at 3.40 GHz. Four cores of the CPU were employed while the RAM usage was 6.6 GB. The parallel simulations that were solved in double precision required around 36 h to complete three full revolutions of the RVERD.

Overall flow structure
The four-blade configuration of RVERD results in a 90 • spacing for each cycle. Fig. 6 displays the pressure contours at mid-length over a full cycle. The core part presents a large pressure gradient, while the pressure in the four ports is uniform. On the left (corresponding to depressurization process), at 30 • , the fluid enters the cell, hits the blade's trailing edge, and then is reflected by the blade's side wall, leading to local pressure pulsation in the blade's trailing edge region. This matches with the findings from the authors' earlier work reported in Ref. [40]. The suction process is completed and the discharge process begins at 45 • . After 45 • , the pressure in the cell decreases rapidly due to its connection with the LP outlet port. On the other hand, on the right (corresponding to pressurization process), the cell completes the suction process at 45 • with compression taking place between 45 • and 48 • , and  starts the discharge process at 48 • . From 60 • to 75 • , the rotating blade with high rotational speeds leads to a local LP region in the blade's trailing edge section. Fig. 7 displays the velocity contours with superimposed streamlines. The inlet ports (HP inlet port and LP inlet port) present uniform flow fields, while the streamlines at the outlet ports (LP outlet port and HP outlet port) reveal unsteady flow features. Vortex structures form and develop at the outlet ports due to the sudden change of the flow crosssectional area. The vortices are very strong at 15 • , 30 • and 45 • , corresponding to the cell discharge process. While in the cell suction process, the vortex weakens, as shown at 60 • , 75 • and 90 • . At both inlet ports, there exists a "dead zone" in each port tip region near the interface between the core and the port. However, this "dead zone" is needed to avoid cavitation of the blade trailing edge region as the blade travels through this region. The area of the flow channel becomes narrow near the port opening angle, leading to locally high velocity field especially at the rotational angle of 15 • , 75 • and 90 • , as displayed in the red colour regions. This is because the instantaneous mass flow rate reaches its peak value at about 90 • .

Blade tip clearance flow
The blade tip clearance has significant impacts on the operational performance of the RVERD. It not only decreases the mass flow rate, but also leads to blade tip cavitation, both of which contribute to lower volumetric efficiency. Fig. 8 shows the flow velocity at the blade tip at different angular positions. The flow velocity at the blade tip is mainly influenced by the pressure difference between the two adjacent cells on both sides of the blade as well as the rotation of the blade tip wall. The blade tip clearance at mid-length disappears at 30 • , 150 • , 240 • and 330 • as the blade goes through the port, leading to the low value of the flow velocity at the blade tip. At 180 • and 360 • , the flow velocity at the blade tip is small due to the small pressure difference between the two adjacent cells. The pressure difference is close to 0 MPa at 180 • and 0.3 MPa at 360 • , respectively. Due to the unique features of this kind of rotary vane machine, the pressure difference and blade tip wall rotation have synergistic effects on the flow velocity at the blade tip in the depressurization process (from 0 • to 180 • ) and opposite effects on the flow velocity at the blade tip in the pressurization process (from 180 • to 360 • ). Therefore, the flow velocities at the blade tip at 60 • , 90 • , 120 • are larger than those at 240 • , 270 • , 300 • respectively.
The high velocity in the blade tip clearance, as well as the fluid filling process at blade trailing edge, leads to the formation of local LP region, which triggers cavitation. The vapour volume fraction in the blade tip clearance region is shown in Fig. 9.   those at the depressurization process (at 60 • , 90 • , and 120 • ) due to the fluid filling at the blade trailing edge. Although the size of the blade tip clearance is fixed at a value of 50 µm, the shape of the blade tip clearance changes at every rotational angle. A larger area of the outlet of the blade tip clearance contributes to a higher cavitation rate [38]. Therefore, the vapour volume fraction at 60 • and 90 • is higher than that at 120 • , and the vapour volume fraction at 270 • and 300 • is higher than that at 240 • . Fig. 10 shows the angular evolution process of the mass flow rate, the rotor torque, the average cell pressure and the core part cavitation rate of the RVERD. With reference to Fig. 10(a), the mass flow rates at the HP brine inlet port and the LP brine outlet port are higher than those at the LP seawater inlet and the HP seawater outlet port due to the internal leakages from HP cells to LP cells. For the LP brine outlet flow rate, when the cell starts discharging at 45 • , a high pressure difference between the cell and the LP outlet port leads to a sudden pulsation of flow rate. This sudden pulsation can also be seen at the HP seawater outlet flow rate as the cell starts discharging at about 48 • .

RVERD performance
As mentioned above, the unique operational characteristics of the RVERD lead to more balanced rotor torques. The evolution process of the rotor torque is shown in Fig. 10(b). The torque contains positive and negative values due to the differences between the pressurization and depressurization processes. As the cell experiences the suction process from 0 • to 45 • , the rotor torque increases from 0 • to 20 • ; then, the rotor torque remains almost constant between 20 • and 40 • except for a small sudden decrease due to the geometrical simplification of the blade side walls; finally, the rotor torque decreases sharply from 40 • to 45 • due to the decrease of the mass flow rate. The compression of the fluid on the seawater side from 45 • to 48 • would also require a larger torque, leading to a significant increase. After 48 • , the cell experiences the discharge process, resulting in the fact that the torque decreases quickly to a negative value. Some fluctuations can also be noticed due to the blade side wall geometrical simplification and mass flow rate fluctuation. The energy recovery efficiency η is an important parameter of the RVERD. It is defined as the product of the hydraulic efficiency and the volumetric efficiency [10,17]: (13) where η h is hydraulic efficiency, η v is volumetric efficiency. The hydraulic efficiency of the RVERD is defined as the ratio of the pressure gain of the seawater stream to the pressure loss of the brine stream [10,17]: (14) where p hp-in , p hp-out , p lp-in and p lp-out are the pressure values at the HP brine inlet, HP seawater outlet, LP seawater inlet and LP brine outlet, respectively. Referring to Fig. 10(c), the four pressure values are respectively equal to 6.0, 5.7, 0.3 and 0.3 MPa, indicating that the hydraulic efficiency evaluates to 95.0%. Furthermore, the hydraulic efficiency almost does not change within the considered range of other parameters. Since the hydraulic efficiency can be considered as a constant value for the considered parameters, this work just focuses on the volumetric efficiency. It is defined as the ratio of the mass flow rate at the HP seawater outlet to that at the HP brine inlet [10,17]: (15) where Q hp-in and Q hp-out are the mass flow rate at the HP inlet port and the HP outlet port, respectively.
In the reference case, i.e. without considering the axial end face leakage, the RVERD achieves the volumetric efficiency of 90.3%. The impact of axial leakages is individually presented in Section 9.1. Fig. 10 (d) shows the cavitation rate in the core part of the reference case. The cavitation rate reaches its peak at the rotational angle of approximately 0 • , which is because the cavitation mainly occurs in the blade tip region, and the blade tip cavitation is very strong at about 0 • , as shown in Fig. 9. When the cell starts connecting to the HP outlet port at 48 • , a large pressure difference between the cell and HP outlet port results in high velocity, which leads to strong cavitation in the radial narrow crosssection in the core part. This results in a slight increase of the cavitation rate from 48 • , as shown in Fig. 10(d).

Port optimisation
Ports are crucial components of the RVERD and need to be optimally designed. The port to stator length ratio is considered as the first parameter for optimisation since it affects cavitation and the volumetric efficiency. The delayed discharge angle at the HP outlet port is proposed as the second parameter to further optimize the machine.

Port to stator length ratio
Three simulation cases with different ratios (50%, 60% and 70%) have been carried out to identify the effects on the device performance. Fig. 11 shows the influences of the ratio on the mass flow rates at the HP outlet, the rotor torque, cavitation and the volumetric efficiency. As displayed in Fig. 11(a), the mass flow rate at the HP outlet port is affected by the port to stator length ratio only at the beginning of the cell discharge process (between 45 • and 60 • ). For the 50% ratio case, strong backflow is evident when the cell volume begins discharging fluid. The backflow phenomenon disappears as the ratio increases to 60% and beyond. The variation of the rotor torque is shown in Fig. 11(b). The trends are similar for the three simulation cases apart from the 50% ratio case between 45 • and 60 • angle where the strong backflow causes a sharp increase in torque requirement. The port to stator length ratio also has important influences on cavitation and the volumetric efficiency of the RVERD, as shown in Fig. 11(c). As the ratio increases from 50% to 60%, the cavitation rate in the core part decreases from 20.6 × 10 − 3 to 4.0 × 10 − 3 , while the corresponding volumetric efficiency increases from 85.7% to 90.1%. With a further increase in the ratio from 60% to 70%, the cavitation rate in the core part decreases to approximately one fourth (from 4.0 × 10 − 3 to 1.1 × 10 − 3 ), while the volumetric efficiency remains almost constant at around 90.0%.
Comprehensively considering the mass flow rates at the HP outlet port, the rotor torque, cavitation and the volumetric efficiency, it could be concluded that the higher the port to stator length ratio is, the better the performance of the RVERD is. However, the blade needs to mechanically contact the stator inner surface at all the time, so the ratio cannot be set at 100%. As the performance is predicted to remain almost constant at the ratios of 70% and above, the choice of 70% ratio is appropriate for the further design and optimisation of the machine.

Delayed discharge angle at the HP outlet port
The delayed discharge angle γ at the HP outlet port is shown in Fig. 2. According to the geometrical design, the HP outlet port opening angle would be 315 • . However, for this angle cavitation is predicted to take place in the operation process. Hence, a delayed discharge angle at the HP outlet port is proposed to weaken cavitation. Fig. 12 shows the influences of the delayed discharge angle on cavitation, the volumetric efficiency and the cell pressure trace. As shown in Fig. 12(a), the cavitation rate in the core decreases as the delayed angle increases from 0 • to 3 • and then increases as the delayed angle increases from 3 • to 6 • , while the volumetric efficiency almost remains unchanged at around 90.0%. Considering both cavitation and the volumetric efficiency, a 3 • delayed discharge angle is best for the application. Since the compressibility of water (liquid) is small, it is also important to consider the effect of the delayed discharge angle on the cell pressure. Fig. 12(b) displays the cell pressure trace for the different delayed discharge angles. It can be seen that the cell pressure is affected by the delayed discharge angle only in the pressurization process. The peak value of the cell pressure almost remains unchanged as the delayed discharge angle increases from 0 • to 3 • , and then continuously increases with the delayed angle from 3 • to 6 • , reaching a value higher than 8 MPa at 6 • due to the over-compression of the liquid. From the results, a suitable delayed discharge angle to prevent over-compression is 3 • .

Sensitivity analysis
Since the desalination application constraints most of the operational parameters for the RVERD in terms of pressures and temperatures, to weaken cavitation and, in turn, improve the volumetric performance of the machine, the variables available for optimisation are the rotational speed and the machine blade geometry. As such, a sensitivity analysis is carried out with reference to the cavitation rate and the volumetric efficiency as dependent variables. The six independent variables are rotational speed, blade thickness, blade tip radius, blade tip clearance, blade eccentric angle and blade tip eccentric angle. All the other geometrical and operational parameters refer to Tables 1 and 2. The sensitivity study requires six batches of five simulation cases, listed in Table 3.  Table 3. Among the six parameters, the rotational speed (reported in the black line) significantly influences cavitation and the volumetric efficiency. As mentioned above, the rotation of the blade tip wall and the pressure difference between the two adjacent cells have synergistic effects on the flow velocity at the blade tip between 0 • to 180 • ; while the effects are opposite between 180 • to 360 • . At the rotational speed of 750 RPM, the pressure difference between two adjacent cells would offset part of the effect of the rotation of the blade tip wall, leading to a decrease of the cavitation rate from 500 to 750 RPM, as shown in Fig 13(a). As the rotational speed increases from 750 to 1500 RPM, the rotation of the blade tip wall dominates the main effects on cavitation, resulting in a sharp rise of the cavitation rate. The volumetric efficiency shown in Fig. 13(b) increases as the rotational speed increases from 500 to 1000 RPM, reaching its peak value of 90.3% at 1000 RPM, Fig. 11. Effects of the port to stator length ratio on: (a) mass flow rate at the HP outlet port, (b) rotor torque, (c) volumetric efficiency and cavitation rate.  and then decreases sharply to 74.5% at 1500 RPM. The aforementioned trends imply that the RVERD works closer to single-phase flow conditions at low rotational speeds while it operates closer to two-phase flow conditions at high rotational speeds. From the results, there exists an optimal rotational speed in terms of volumetric efficiency, and its optimal value is equal to 1000 RPM in this study. The corresponding cavitation rate is also small and could be acceptable. As for the blade thickness shown in the red line, the cavitation rate in the core part increases with the blade thickness, as shown in Fig. 13(a). This is because larger blade thickness leads to a longer leakage path in the blade tip region, which, in turn, provides a larger cavitation area. On the other hand, the volumetric efficiency does not continuously decline with the increasing blade thickness, as displayed in Fig. 13(b). This is because larger blade thickness decreases the mass flow rate at the HP inlet port and the HP outlet port at the same time. Due to the effects of the blade thickness on both the blade tip cavitation and the mass flow rate, the volumetric efficiency reaches its peak around 91.0% at the blade thickness of 7.5 mm. Taking both cavitation and the volumetric efficiency into account, 7.5 mm blade thickness is best for the RVERD.
The sensitivity analysis of the blade tip radius on cavitation and the volumetric efficiency is reported with the green line. Although the blade tip clearance gap size remains constant, the blade tip radius influences the shape of the blade tip clearance. A larger blade tip radius results in a smaller size of the inlet and outlet of the blade tip leakage channel and, consequently, in a smaller blade tip cavitation area. This is in agreement with the findings of a vane oil pump reported in Ref. [37]. Therefore, the cavitation rate shows a downward trend with the increasing blade tip radius ( Fig. 13(a)). Fig. 13(b) displays the influence of the blade tip radius on the volumetric efficiency. The volumetric efficiency increases slightly from 90.0% to 90.7% as the blade tip radius increases from 10.0 to 17.5 mm, and then slightly falls back to 90.6% at the blade tip radius of 20.0 mm. The volumetric efficiency does not continuously decrease with the increasing blade tip radius, because the larger blade tip radius also decreases the mass flow rate at both the HP inlet port and the HP outlet port. Considering both cavitation and the volumetric efficiency into account, the optimal blade tip radius of the RVERD is 17.5 mm.
The blade tip clearance (the golden line) ranging from 30 µm to 70 µm in the present study. The influence of the blade tip clearance on the cavitation rate in the core part is shown in Fig. 13(a). It can be seen that the cavitation rate continuously increases with the blade tip clearance gap due to the corresponding larger blade tip cavitation area. The blade tip clearance also has vital effects on the volumetric efficiency due to the blade tip cavitation and leakage. The volumetric efficiency shown in Fig. 13(b) decreases dramatically from 94.3% to 86.4% as the blade tip clearance gap increases from 30 to 70 µm, which indicates that the availability of the RVERD as an efficient ERD is highly dependent on the blade tip clearance size. It would be meaningful if the blade tip clearance could be controlled to be a smaller value by advanced technical approaches.
The blade eccentric angle (the blue line) and the blade tip eccentric angle (the purple line) both affect the shape of the blade tip clearance gap. The larger eccentric angles increase the inlet area of the blade tip gap and decrease the outlet area of the blade tip gap in the depressurization process, while in the pressurization process the larger eccentric angles decrease the inlet area of the blade tip gap and increase the outlet area of the blade tip gap. As a consequence, the cavitation rate decreases with both the blade eccentric angle and the blade tip eccentric angle, as displayed in Fig. 13(a). It reaches its bottom at the blade eccentric angle of 5 • and the blade tip eccentric angle of 5 • , respectively. While in Fig. 13(b), the volumetric efficiency fluctuates slightly both with the increasing blade eccentric angle and the increasing blade tip eccentric angle. From the results, 5 • blade eccentric angle and 5 • blade tip eccentric angle are recommended for the RVERD. Table 4 summarises the outcomes of the port optimisation and the sensitivity study, indicating that the port optimisation and the sensitivity analysis contribute to better performance of the RVERD. Specifically, the cavitation rate decreases significantly from 20.6 × 10 − 3 to 0.6 × 10 − 3 , while the corresponding volumetric efficiency increases obviously from 85.7% to 91.6%. As the energy recovery efficiency of the RVERD is proportional to its volumetric efficiency [10,17], the implication of the current research work contributes to improving the energy recovery efficiency by 6.9%. Considering the SWRO desalination system coupled with RVERDs, the system energy consumption can be reduced by around 6.9%. Moreover, the cavitation rate of the core decreases by 97.1% through the port optimisation and the sensitivity investigation,

Min
Ref   which is conducive for the stable operation of the RVERD. This work is beneficial to improve the energy recovery potential of the RVERD and promote the practical application of the RVERD in the SWRO desalination plants.

Axial end face clearance gap
In addition to the above rotational speed and blade geometric parameters for sensitivity analysis, the axial end face clearance is also crucial for the structural design of the RVERD. Fig. 14 shows the vapour volume fraction distribution in the middle length of the axial end face clearance at different rotational angles with a clearance gap of 70 µm. All the other parameters are the baseline ones (Tables 1, 2 and 4). It can be seen that cavitation tends to occur between the blade end face wall and the end face plate due to the pressure difference between the two adjacent cells. The blade length out of the blade slot reaches its peak at the rotational angle of 90 • , leading to strong cavitation at 90 • . While at 45 • , a low pressure difference between the two adjacent cells results in a low cavitation rate. Comparing to the reference case without considering the axial clearance leakage, the axial clearance gap of 70 μm contributes to 2.9% of the volumetric losses.
The size of the axial clearance gap has a vital influence on cavitation and the volumetric efficiency of the RVERD. As displayed in Fig. 15, the cavitation rate in the core part increases from 0.9 × 10 − 3 to 1.7 × 10 − 3 as the axial clearance increases from 0 to 110 µm, while the corresponding volumetric efficiency decreases from 90.4% to 84.5%. Therefore, the axial clearance needs to be designed with a lower limiting value. Since, it is also necessary to ensure that the rotating rotor and blades do not collide with the end face wall due to the vibration.

Conclusions
This study presented a novel numerical methodology for Computational Fluid Dynamics (CFD) investigations applied to a Rotary Vane Energy Recovery Device (RVERD) for Seawater Reverse Osmosis Systems (SWRO) applications. The grid generation method has the advantage of being applicable to a broad range of rotary vane machine geometries, such as single-acting and double-acting devices with eccentric blades and non-circular housing. The simulation results provided insights on the RVERD operation. Port optimisation and sensitivity analysis on design parameters further improved the performance of the vane machine in terms of cavitation reduction and the volumetric efficiency increase. The flow topology of the RVERD is characterised by uniform flow fields at the inlet ports, while the discharge process of the cell leads to very strong vortices at the outlet ports. Cavitation mainly occurs in the blade tip clearance region due to the high local wall velocity leading to drop in local pressure and the high pressure differences between the two adjacent cells that each blade separates. Higher port to stator length ratios are beneficial to eliminate the backflow and consequently decrease the power consumption by smoothing the torque peaks. Optimising the discharge angle for the high-pressure outlet port helps to decrease the cavitation rate and increases the volumetric efficiency of the machine. The port to stator length ratio of 70% and the delayed discharge angle at the high-pressure outlet port of 3 • are suggested for the RVERD geometry investigated. The rotational speed and the blade tip clearance are the two most influencing factors affecting cavitation and the volumetric efficiency of the RVERD. Optimised values for rotational speed, blade thickness, blade tip radius, blade eccentric angle and blade tip eccentric angle are 1000 RPM, 7.5 mm, 17.5 mm, 5 • and 5 • , respectively. This optimisation led to a volumetric efficiency increase from 85.7% to 91.6%. The axial clearance gap has a significant effect on cavitation and the volumetric efficiency. In fact, a 70 μm axial clearance gap contributed to 2.9% of the volumetric losses.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.