## 2 System Description and Modelling  
### System Description  
In this study, a mathematical modelling was elaborated and an energy analysis of the minimum liquid discharge (MLD) system for recovering freshwater from the brine was performed. A schematic diagram of the system is shown in Figure 1. The system is fed with brine water with a salinity in the order of 69,000 ppm. This brine concentration is typical of an RO unit with a recovery ratio of 40% supposed to treat seawater of 42,000 ppm and was calculated using ROSA software [21].  
The integrated brine treatment system consists of a heat pump and a flash evaporation tank. The brine from RO is led to the condenser of the heat pump (1-2), where its temperature rises up to 80 \({}^{\circ}\)C, before it is driven to the flash tank, using a recirculating pump (2-3). The flash tank is under a pressure difference of 0.7-0.8 bang compared to the atmospheric one, which is continually preserved by a suitable vacuum pump. When the brine at this temperature enters the flash tank, its pressure is decreased to the pressure of the tank. At this point, the brine is superheated in relation to the saturation temperature that corresponds to the flash tank pressure, while this abrupt depressurization of the feed liquid brine, in conjunction with the superheat of the brine, lead to a phase change in the liquid; thus, a fraction of its mass is vaporized. The void fraction development depends on this depressurization and the superheating, making the brine inlet temperature and the vacuum in the tank the decisive parameters for the fraction that is vaporized [22; 23]. Figure 2 illustrates the process using a pressure-composition diagram under a constant flash temperature. Therefore, the fluid is separated into a vapor and a liquid phase. The vapor is taken off from the upper part of the tank, while the liquid drains to the bottom of the tank. The vapor produced under these conditions flows out of the tank (3-4i) towards the heat pump's evaporator, where it is condensed by dissipating its enthalpy (4i-5). On the other hand, the liquid fraction of the process remains as brine with increased salinity and also flows out of the tank (3-4 ii). When the brine exits the flash tank, a fraction of the brine is rejected to the sea, while the rest flows back to the brine heater (4 ii-1) and the amount of  
Figure 1: Desalination unit for brine treatment.  
the rejected brine is balanced with the brine coming from the RO unit. Therefore, a large percentage of the brine with increased salinity recirculates, is heated up in the condenser and treated in the flash evaporation tank. The vapor is then driven to the heat pump's evaporator, which extracts the heat from the vapor that condensates (4i-5). The recovered freshwater is finally collected in a tank (5-6).  
The heat pump is used to supply heat to the brine, but also to condensate the vapor as it exits the flash tank. The operation of the heat pump is roughly described as follows: the refrigerant is compressed through a semi-hermetic screw compressor (R1-R2) and then, it is cooled to the unit's condenser by dissipating its heat to the brine (R2-R3). The subcooled fluid passes through a filter before it is expanded through an electronic expansion valve (R3-R4) and finally, it is heated through an evaporator to superheated vapor (R3-R4).  
For the modelling, R134a is selected as the working refrigerant of the heat pump as it is suitable for this temperature range, although a fourth generation substitute, such as R1234 ze(E), of ultra-low GWP could be preferably chosen for environmental purposes. However, the performance variables (i.e., power consumption and mass flow rate as a function of evaporation and condensation temperature) of the commercially available compressor that has been chosen are provided only by the manufacturer for R134a (see Section 2.2.2). The accuracy in the calculation of the performance of the compressor at varied conditions can be only assured if these variables are provided by the manufacturer.