Dynamic Simulation of a Trigeneration Scheme for Domestic Purposes Based on Hybrid Techniques

In this paper, the design of a system providing electricity by coupling photovoltaic/thermal (PVT) collectors and a wind turbine (WT), sanitary hot water (SHW) coming from the PVT and evacuated tube collectors (ETCs) and fresh water (FW) produced in two seawater desalting facilities (membrane distillation, MD, and reverse osmosis, RO), has been carefully analyzed by means of a dynamic model developed in TRNSYS®. This analysis is compulsory to operate a lab-scale pilot plant that is being erected at Zaragoza, Spain. A new model-type has been included in TRNSYS® in order to include the MD unit in the scheme. A sensitivity analysis of some free-design variables, such that the ETC surface, PVT and ETC tilt, water storage tank, batteries capacities, and mass flow rates delivered to the SHW service and/or feeding the MD unit has been performed in order to propose the definite design of the scheme. The proposed base case was able to produce up to 15,311 L per year in the MD system and cover an electric energy demand of 1890 kWh. Coverage of SHW, water (including RO and MD) and power is respectively 99.3%, 100% and 70%. However, daily and yearly assessment of FW, SHW and power produced with the optimized design gave a better coverage of water and energy demands for a typical single family home. The improved and definite design was able to increase its MD production in 35% and the electric energy in 7% compared with base case.


Introduction
The need of safe-clean energy and water, especially in isolated areas in which power and water networks incur extra economic and environmental costs, is one of the challenges of the 21st century.The search for innovative and sustainable solutions to provide secure energy and water in isolated areas by integrating existing technologies is a reliable solution that should be explored.This paper is one attempt to solve this problem, providing a preliminary design for further implementation.
Nowadays, most of the energy produced around the world is obtained by burning fossil fuels.These kinds of fuels contribute to local air pollution, a significant decrease of woodlands around the world, ozone layer problems and higher temperatures around the whole planet [1].For that reason, it is important to use alternative energy resources like solar and wind energy which could be sustainable options when mainly thermal and electric energy are required to produce sanitary hot water (SHW) or even fresh water (FW) [2].In Europe, the solar thermal capacity is expected to reach about 150 to 250 GW by the year 2030, which would equate to a 7%-11% share of global electricity production [3].With solar energy, both electricity and thermal energy can be obtained through the use of a photovoltaic/thermal (PVT) collector [4].This hybrid collector integrates features of single photovoltaic and solar thermal systems in one combined product.The hybrid system basically consists of one absorbing plate to remove waste heat (cell cooling) from a photovoltaic panel (PV) through the circulation of a heat transfer fluid behind the PV cells [5].This hybrid arrangement reduces the overall temperature losses on the collector and increases the global efficiency.In other words, the solar energy that is not transformed into electricity is converted into thermal energy that can be partially recovered and used for different purposes, such as SHW generation [6].The electric efficiency of a single PV collector is about 10% to 20%, while a common thermal collector can harvest up to 60% with the same available surface.The combination of both systems (PVT) has an overall efficiency in the range of 40%-70% for unglazed and glazed panel designs.It has been demonstrated through an experiment that the electric efficiency of a PVT (glazed) system is about 6% while a single PV module under same conditions has 6.2% efficiency.However, if thermal energy is considered in the analysis, the global efficiency of the PVT can be increased up to 42% [7].Similar results were found in Avellino, Italy, where a PVT module was proved to be more efficient than a single PV system.Besides, it was demonstrated that due to the electricity and thermal energy production of the PVT, the economic savings are twice the economic savings achievable utilizing the single PV module [8].It should be noted that when a PVT operates at high thermal efficiency, the electric conversion is decreased.On the other hand, the PV cells do not allow heating the absorbing plate [9].Other factors that could improve the overall PVT efficiency are the number of covers, the shape of the absorber plate and the operative design configurations such as connections and the operating flow rate.
To improve the electricity generation, wind turbines (WTs) are able to transform the kinetic energy of the wind into mechanical energy and then to electricity [10].This kind of energy, as in the case of solar energy, is also free and widely available, does not pollute the environment (zero greenhouse emissions) and contributes to sustainable development [11].Usually, wind energy can be used for pumping water, street lighting or as standalone generating power system.Nevertheless, it strongly depends on unpredictable weather or climatic changes [12].
Since it is not always is possible to have access to abundant wind or abundant solar irradiance, in isolated areas a wind-solar hybrid system is commonly utilized.In this way the electricity generated can greatly meet the load demand because one energy type can offset the shortfall of the other.For instance, during the day high solar irradiation and relatively low wind energy may occur, while by night the contrary occurs [11,12].
On the other hand, one of the major problems found in dry and/or isolated areas is water scarcity.The areas with the highest need of drinking water usually exhibit the highest solar energy availability [13].Since solar energy can supply almost unlimited energy, it can be an ideal solution for distilling water in isolated areas.Membrane distillation (MD) is a non-isothermal membrane separation process used in various applications such as desalination.The feed water (sea water) does not need chemical pre-treatments, it works at atmospheric pressure, operation is flexible (continuous or intermittent operation), the process can be carried out with temperatures between about 70 and 90 • C, and solar energy can also be utilized to produce distillate by heating seawater up to that range [14].The distillation process is based on the transport of vapor molecules through a hydrophobic micro-porous membrane [15].Due to tension forces at the membrane surface, liquid water and any other non-volatile components cannot pass through it.Heat supplied by an external (waste) source produces some vapor from the liquid state.The difference in temperature and pressure on both sides of the membrane is the driving force which leads to vapor passing through the membrane.Then, vapor is condensed by the aid of a coolant (normally a counter flow that preheats the MD feed water), and distillation process is completed.The vapor pressure difference across the membrane which drives the MD process can be established using different configurations [16][17][18][19]:

•
Direct contact membrane distillation (DCMD): is the simplest one.The membrane is in direct contact with both liquid phases (hot and cold).

•
Air gap membrane distillation (AGMD): To reduce heat losses, an air gap is set between the membrane and the condensation surface.Process energy efficiency is improved but reduced distillate flows are usually obtained.

•
Sweep gas membrane distillation (SGMD): Vapor is carried by a gas to an external condenser.It is usually applied to remove volatiles from the solution.

•
Vacuum membrane distillation (VMD): The permeate side remains at low pressures.In some cases, vapor is condensed at a separate device.

•
Permeate Gap Membrane Distillation (PGMD): Is similar to AGMD, but instead of using stagnant air, the condenser surface is full of water.The major advantage of PGMD is its energy efficiency, since an efficient heat recovery system [20,21] could be arranged.
The latter was the selected MD configuration for further modeling.Anyway, aside from the coincidence between water shortage and solar irradiation, and considering that MD is appropriate to be fed by solar energy for small capacities and isolated areas [16,[22][23][24][25], distillation techniques have usually higher energy consumptions than membrane techniques like reverse osmosis (RO) or electrodialysis (ED, for brackish waters), which only consume power.Of course, power to drive the high-pressure pump of a RO unit could also be obtained from a renewable source [26], thus increasing the FW production in a hybrid scheme for seawater desalination.At present, RO processes use selective membranes which can retain most of the salt and microorganisms, leaving more than the 99% of the salts behind [13].
The hybridization of Renewable Energy System (RES) technologies has been usually utilized to provide FW in remote and arid areas.For instance, in [27] the design of a PV + WT coupled with a seawater RO unit including an energy recovery device (ERD) for a small island was generalized.In [28], the same scheme (30.8 kW p of PV + 600 W of WT) was modeled and analyzed for desalting brackish water with RO (40 m 3 /day) at different locations in Tunisia.Experimental tests of the same arrangement in Israel (3.5 kW p + 600 W) for an average production in the stand-alone brackish RO unit of 3 m 3 /day, can be found in [29].If distillation units replace the RO, a multi-effect evaporator (MEE) supplied by solar and wind energy was also simulated and optimized depending on the solar collector area and system feasibility in Turkey [30].
However, hybridization in desalination is usually restricted to larger facilities.Concentrating solar power (CSP) was analyzed in the framework of a medium-scale research and development (R + D) European Project [31].Produced steam was sent to a steam turbine (1 MW e ) that both supplied the RO system (800 m 3 /day) and the MED (50 m 3 /day) with the rejected steam.A back-up energy system (gas turbine, 1.25 MW e ) was also projected for cloudy days.For larger capacities, hybrid water desalination systems (MED + RO) supplied by conventional energy sources were optimized in [32].A steam network with several turbines at different pressure levels was analyzed for a combined production of up to 126,300 m 3 /day.The same hybrid scheme supplied by a gas turbine (GT) and a combined cycle (CC) was also thermo-economically optimized in [33].
Apart from producing energy and water with hybrid techniques and RES (cogeneration schemes), there are very few examples of tri-generation or poly-generation schemes involving seawater desalination and RES.In [34,35], a poly-generation system based on PVTs, a LiBr-H 2 O chiller, and a MED distiller, with a back-up biomass heater was simulated and optimized in TRNSYS ® (http://www.trnsys.com/)with weather data from Naples, Italy.A similar scheme could be optimized in its design and operation if conventional energy sources are neglected [36].
From the previous analysis, it can be observed that the combination of hybrid techniques for both RES and desalination, which also includes SHW, has not been studied in detail yet.Thus, this paper presents the design analysis of a double hybrid scheme (wind/solar + MD/RO) which allows for providing power, SHW and FW at a much reduced demand scale in isolated areas.This hybridization is a technically possible solution and its profitability will depend on alternative costs to provide water and energy by a network or local transport.
Taking into account the variability of the renewable energy sources, a dynamic simulation is required in order to model and then to assess the performance of the transient processes occurring in that scheme.Dynamic simulation of this trigeneration scheme was performed in TRNSYS ® software (v16) [37].Its modular design easily permits to analyze main design parameters of each component but also the overall performance of the scheme proposed, according to the scheduled energy and water demands.

System Description
The system consists essentially of five main subsystems: (1) Solar loop.
The main subsystems included in the hybrid trigeneration scheme are shown in Figure 1.
Energies 2016, 9, 1013 4 of 24 (v16) [37].Its modular design easily permits to analyze main design parameters of each component but also the overall performance of the scheme proposed, according to the scheduled energy and water demands.

System Description
The system consists essentially of five main subsystems: (1) Solar loop.
The main subsystems included in the hybrid trigeneration scheme are shown in Figure 1.The study was carried out by using Meteonorm data base (http://www.meteonorm.com/) of a Typical Metrological Year (TMY) for the city of Zaragoza, Spain.The electric and water demand considered in this investigation were based on a single family home in Spain.The electric demand from this kind of home is about 2422.2 kWh per year [38].The system is connected to the grid to partially supply demand when the batteries power is not enough.On the other hand, the total FW demand is estimated in 106.4 cubic meters per year, and SHW demand in 37.2 cubic meters per year [39].Water demands are firstly covered through the storage tanks (hot water and FW), while tap water and an electrical resistance could supply the remaining demands.

Solar Loop
The solar loop consists of four PVT collectors (1.63 m 2 each) and one Evacuated Tube Collector (ETC) of 1.4 m 2 .The PVTs are divided in two sets connected in series to the ETC as seen in Figure 1.The study was carried out by using Meteonorm data base (http://www.meteonorm.com/) of a Typical Metrological Year (TMY) for the city of Zaragoza, Spain.The electric and water demand considered in this investigation were based on a single family home in Spain.The electric demand from this kind of home is about 2422.2 kWh per year [38].The system is connected to the grid to partially supply demand when the batteries power is not enough.On the other hand, the total FW demand is estimated in 106.4 cubic meters per year, and SHW demand in 37.2 cubic meters per year [39].Water demands are firstly covered through the storage tanks (hot water and FW), while tap water and an electrical resistance could supply the remaining demands.

Solar Loop
The solar loop consists of four PVT collectors (1.63 m 2 each) and one Evacuated Tube Collector (ETC) of 1.4 m 2 .The PVTs are divided in two sets connected in series to the ETC as seen in Figure 1.Each PVT set contains two collectors in parallel.PVTs are connected to a regulator-battery system.Solar energy not converted into electricity is then transformed into thermal energy.Inside the hydraulic circuit, the water-glycol (60%/40%) fluid is sent to the storage tank by means of a heat-exchanger/pump system.According to the supplier's recommendations, the flow rate in this circuit was set at 97.8 L/h.

Sanitary Hot Water (SHW) Loop
The hot water tank has a capacity of 325 L and is fed with tap-water.Hot water coming from the solar loop is sent to the heat exchanger inside of the tank.The tank temperature is raised to about 80 • C. Depending on that temperature and the SHW needs, two valves (V-SHW and diverter) should act to distribute the hot water flows to SHW or MD demand.Temperature of SHW served was set to 45 • C. The storage tank is also connected to a tempering valve, which regulates the final SHW temperature when hot water in the tank exceeds 45 • C. Table 1 shows the monthly water demand and the average consumption per day of FW and SHW for a typical single family home.Both demands, FW and SHW, were simulated in TRNSYS ® based on the study presented in reference [39].On the other hand, when the tank temperature is between 70 • C and 90 • C, part of that hot water could be derived to the heat exchanger feeding the MD unit, thus activating the distillation of seawater.The maximum allowed temperature in the tank is 90 • C.This value will be regulated by the direct outfall of SHW to the sanitary network, and the use of an 8 kW air cooled condenser to cool the solar loop (not included in Figure 1).

Membrane Distillation (MD) Loop
This subsystem is divided into two loops and the MD device.From the storage tank side (hot loop), there is a pump and a heat exchanger (tank-MD) that allows transferring the heat from the hot water tank to the PGMD unit.On the other side (cold loop), the MD sub-system is connected to the same heat exchanger by means of a pump.The heat exchanged allows maintaining the vapor pressure difference to vaporize and then distill some seawater in the MD module.
Since TRNSYS ® does not have a specific MD model, a new model-type was created in its library.It is based on the modeling and experimental tests of a commercial PGMD module presented by Winter et al. [20,21], which is almost the same as the projected one in our pilot unit.The PGMD contains a spiral wound desalination membrane with a total exchange area of 10 m 2 , a length channel of 3.5 m, a total height of 0.7 m, and a mean channel thickness of 3.2 mm.Design capacity of this MD module is 150 L/d, being its production peak around 20 L/h in the best thermal conditions.Operation of the PGMD module is presented in Figure 2 [20,40].
Energies 2016, 9, 1013 6 of 24 This subsystem is divided into two loops and the MD device.From the storage tank side (hot loop), there is a pump and a heat exchanger (tank-MD) that allows transferring the heat from the hot water tank to the PGMD unit.On the other side (cold loop), the MD sub-system is connected to the same heat exchanger by means of a pump.The heat exchanged allows maintaining the vapor pressure difference to vaporize and then distill some seawater in the MD module.
Since TRNSYS ® does not have a specific MD model, a new model-type was created in its library.It is based on the modeling and experimental tests of a commercial PGMD module presented by Winter et al. [20,21], which is almost the same as the projected one in our pilot unit.The PGMD contains a spiral wound desalination membrane with a total exchange area of 10 m 2 , a length channel of 3.5 m, a total height of 0.7 m, and a mean channel thickness of 3.2 mm.Design capacity of this MD module is 150 L/d, being its production peak around 20 L/h in the best thermal conditions.Operation of the PGMD module is presented in Figure 2 [20,40].

•
Cold sea water enters in the condenser (flow 3).

•
Through the condenser path, cold sea water increments its temperature due to the heat exchange with evaporator and distillate channels (flow 4).

•
Sea water is heated (flow 4) by an external heat exchanger (tank-MD, flows 1-2).• Hot sea water enters into the evaporator (flow 5).Here, some vapor is produced and the remaining liquid transfers the heat to the condenser side.

•
Vapor passes through the membrane and then it is condensed to obtain the distillate (flow 7).Salinity of the remaining seawater is then slightly increased (flow 6).

Reverse Osmosis (RO) Module
This module has not been simulated in detail as a new model-type in TRNSYS ® , according to its steady performance.Only the required DC power consumption (110 W, giving an estimated production of 35 L/h and thus leading to rather low specific energy consumption for such that small RO units due to its immersed ERD) was considered, if enough discharge level was found in the batteries.The technical characteristics of the modeled RO unit are presented in Table 2.  • Cold sea water enters in the condenser (flow 3).

•
Through the condenser path, cold sea water increments its temperature due to the heat exchange with evaporator and distillate channels (flow 4).

•
Hot sea water enters into the evaporator (flow 5).Here, some vapor is produced and the remaining liquid transfers the heat to the condenser side.

•
Vapor passes through the membrane and then it is condensed to obtain the distillate (flow 7).Salinity of the remaining seawater is then slightly increased (flow 6).

Reverse Osmosis (RO) Module
This module has not been simulated in detail as a new model-type in TRNSYS ® , according to its steady performance.Only the required DC power consumption (110 W, giving an estimated production of 35 L/h and thus leading to rather low specific energy consumption for such that small RO units due to its immersed ERD) was considered, if enough discharge level was found in the batteries.The technical characteristics of the modeled RO unit are presented in Table 2.

Power Loop
Power generated in the PVT subsystem (4 × 240 W p ) is driven to a regulator which is responsible for managing the charge and discharge of the battery.The WT was simulated in TRNSYS ® through a numerical model that adjusts the power-velocity curve of a commercial model (400 W p ) [42].This unit is also connected to the regulator.A set of two batteries (250 Ah and 12 V) connected in series accumulates that power for further needs.Electric demand consists of the power required by three 5 W AC pumps (pump 1 in the solar loop, pump 2 for the hot water to MD heat exchanger, and pump 3 for SHW), the 10 W DC pump used by the MD loop, and finally the power consumed by the RO (110 W, DC).Any remaining power could be used to partially cover the domestic power demand or stored in the batteries.Daily electric demand for a typical dwelling was simulated according to standards [38].Table 3 shows the monthly electric demands for a single family home as well as the average energy consumption per day implemented in TRNSYS ® simulation.

Month
Total (kWh/Month) Average (Wh/Day) The whole system has been divided in five subsystems.(1) The solar loop, where solar energy is collected and transformed into thermal energy and electricity; (2) SHW, where thermal energy is delivered to the tap water to increase its temperature; (3) MD; (4) RO; and (5) Power loop.Table 4 shows these five subsystems and the main units for the proposed design (base case).

Dynamic Model
By unifying all subsystems presented in Section 2, the complete dynamic simulation could be performed in TRNSYS ® .This allows not only to optimize the components and parameters, but also to find possible errors in the preliminary system design, according to the annual coverage rate of power, SHW and FW demands.

Dynamic Model
By unifying all subsystems presented in Section 2, the complete dynamic simulation could be performed in TRNSYS ® .This allows not only to optimize the components and parameters, but also to find possible errors in the preliminary system design, according to the annual coverage rate of power, SHW and FW demands.The TRNSYS ® project started with meteorological data from the place where the trigeneration system was established.In this case, Zaragoza city, located in the northeast of Spain, was the chosen one.As previously mentioned, data were obtained from Meteonorm data base and has been introduced in TRNSYS ® as a file-input.Figure 4 shows the behavior of solar radiation (40° tilt), wind velocity at WT height (13 m) and ambient temperature along the year at Zaragoza, Spain.

Project Creation
The simulation was carried out in a complete year having a time step of 12 min.To complete a simulation, 43,800 iterations were usually required.
PVT and ETC collectors were linked to the meteorological input data (solar radiation, ambient temperature and wind velocity).PVTs and ETC were physically interconnected by means of a pump to a heat exchanger, thereby transferring the recovered thermal energy to a stratified tank.A control system (control 1) was connected to the pump, the tank and the ETC collector to induce a hysteresis cycle which allows the adequate regulation of the tank temperature.
In order to adequately manage the SHW produced, hot water in the tank is sent to valve V-SHW through a diverter valve and a pump P3.The demand is managed by a tempering valve which splits two tap-water flows: The TRNSYS ® project started with meteorological data from the place where the trigeneration system was established.In this case, Zaragoza city, located in the northeast of Spain, was the chosen one.As previously mentioned, data were obtained from Meteonorm data base and has been introduced in TRNSYS ® as a file-input.Figure 4 shows the behavior of solar radiation (40 • tilt), wind velocity at WT height (13 m) and ambient temperature along the year at Zaragoza, Spain.
The simulation was carried out in a complete year having a time step of 12 min.To complete a simulation, 43,800 iterations were usually required.
PVT and ETC collectors were linked to the meteorological input data (solar radiation, ambient temperature and wind velocity).PVTs and ETC were physically interconnected by means of a pump to a heat exchanger, thereby transferring the recovered thermal energy to a stratified tank.A control system (control 1) was connected to the pump, the tank and the ETC collector to induce a hysteresis cycle which allows the adequate regulation of the tank temperature.
In order to adequately manage the SHW produced, hot water in the tank is sent to valve V-SHW through a diverter valve and a pump P3.The demand is managed by a tempering valve which splits two tap-water flows:  Apart from the SHW service, if the tank temperature is above 70 °C, this hot water is ready to feed the MD via its heat exchanger (tank-MD).In this service, hot water leaves the storage tank, then passes through the diverter zone, pump P2 and finally returns to the tank through valve 1.The pump and the MD system were controlled with the unit control 2 as it can be seen in Figure 3.
The MD module was then interconnected with the heat exchanger (tank-MD) by a pump P4.The MD type included a MD model aided by an external heat exchanger (HX-MD as can be seen in Figure 3).Therefore, in combination both MD and HX-MD operate as a unique MD unit.
On the other hand, electric energy produced by PVTs and WT was managed in a batteryregulator/inverter system.The micro-WT was also modeled from updated existing TYPE90.WT type was optimized by introducing the power production characteristic curve from manufacturer [42].Power demand was modeled including domestic and RO consumptions as external demands.

Standard TRNSYS ® Types
All units and their respective types used in the simulation are presented in Table 5. TYPE109-TMY2 reads and process weather data along the complete simulation.The energy from the solar loop is transferred to the stratified tank by means of TYPE91, which is a heat exchanger that operates to calculate the maximum possible heat transfer with a constant effectiveness of 0.9.The same model type has been used to simulate the heat transfer between the storage tank and the MD system.
TYPE40c is a stratified tank that consists of four fully-mixed equal volume segments.The total volume of this storage tank is 0.325 m 3 .The control system type utilized in the simulation is the TYPE2b which is an off/on differential controller, the value of this control type is defined by the difference of upper and lower temperatures of the tank-solar loop and for the temperatures between the storage tank and MD system.
The SHW demand is created by two types: TYPE14b that generates a time dependent forcing function for 24 h of the day, and TYPE21 that creates the SHW demand depending on the current time in the simulation.
Water flows are distributed (diverted or mixed flows) by means of TYPE11.This type has been used in different modes: h, f, and b.In all cases the type performs the mass balance and controls the thermal systems by means of an energy balance.Apart from the SHW service, if the tank temperature is above 70 • C, this hot water is ready to feed the MD via its heat exchanger (tank-MD).In this service, hot water leaves the storage tank, then passes through the diverter zone, pump P2 and finally returns to the tank through valve 1.The pump and the MD system were controlled with the unit control 2 as it can be seen in Figure 3.
The MD module was then interconnected with the heat exchanger (tank-MD) by a pump P4.The MD type included a MD model aided by an external heat exchanger (HX-MD as can be seen in Figure 3).Therefore, in combination both MD and HX-MD operate as a unique MD unit.
On the other hand, electric energy produced by PVTs and WT was managed in a battery-regulator/inverter system.The micro-WT was also modeled from updated existing TYPE90.WT type was optimized by introducing the power production characteristic curve from manufacturer [42].Power demand was modeled including domestic and RO consumptions as external demands.

Standard TRNSYS ® Types
All units and their respective types used in the simulation are presented in Table 5. TYPE109-TMY2 reads and process weather data along the complete simulation.The energy from the solar loop is transferred to the stratified tank by means of TYPE91, which is a heat exchanger that operates to calculate the maximum possible heat transfer with a constant effectiveness of 0.9.The same model type has been used to simulate the heat transfer between the storage tank and the MD system.
TYPE40c is a stratified tank that consists of four fully-mixed equal volume segments.The total volume of this storage tank is 0.325 m 3 .The control system type utilized in the simulation is the TYPE2b which is an off/on differential controller, the value of this control type is defined by the difference of upper and lower temperatures of the tank-solar loop and for the temperatures between the storage tank and MD system.
The SHW demand is created by two types: TYPE14b that generates a time dependent forcing function for 24 h of the day, and TYPE21 that creates the SHW demand depending on the current time in the simulation.Water flows are distributed (diverted or mixed flows) by means of TYPE11.This type has been used in different modes: h, f, and b.In all cases the type performs the mass balance and controls the thermal systems by means of an energy balance.
The electric simulation consists of four types.TYPE48b is a regulator/inverter which distributes DC power from the PVT array to and from battery.This type also converts DC power to AC and sends it to the load.Type47a models a lead-acid storage battery, it computes battery rate of charge and discharge.Finally the electric demand is created by TYPE14h which produce an electric demand forcing function along a single day (24 h) and TYPE41c that organizes the daily profiles generated by TYPE14h into an annual profile.PVT collectors were modeled with TYPE50b.In this type, the well-known Hottel-Whiller equation for thermal analysis of flat-plate collectors is extended to combine both, thermal and photovoltaic collector.The calculation performed by the type is a simple modification of the conventional parameters of the original model.This type assumes that the electrical conversion efficiency is a linear decreasing function of the local absorber temperature [43].
The model is divided in two parts [4], the photo-thermal and the photo-electric part.In the first part, the efficiency of the energy collected is estimated by applying the Hottel-Whillier equation: The first right side term is the effective product between the transparent cover transmittance and the absorption, where U L is the total heat loss coefficient (W/m 2 -K), T p and T a are the PVT rear panel temperature and the ambient temperature respectively, both in • C. Finally, G t is the solar radiation in W/m 2 .
Energies 2016, 9, 1013 11 of 25 On the other hand, the photovoltaic efficiency can be estimated by the ratio between the electric energy output (E in W) and the solar radiation (G t in W/m 2 ) over the PVT area (A PVT in m 2 ): where η o is the optical performance of the PVT, C 1 and C 2 are the thermal losses coefficients set as 2.59 W/m 2 -K and 0.012 W/m 2 -K 2 respectively [44].TRNSYS ® PVT model has been validated by Sardabaradi et al. [45].This validation was demonstrated by comparing predicted collector's outlet temperature changes and daily system efficiencies with measured data acquired from an experimental bench test at Ferdowsi University of Mashhad.It was found that there is less than 3% of uncertainty in all measured data and calculated parameters.The authors found differences of about 2.1% in electrical power output and only 1% in collector's outlet fluid temperatures when comparing TRNSYS ® simulation and the bench test.

Evacuated Tube Collector (ETC) Model
An ETC is a heat exchanger that transforms solar radiation energy into internal energy of the circulating water/glycol flow.It transfers energy from the incident and diffuse solar radiation to working fluid.The type selected to simulate this unit was TYPE1a.The efficiency of this type is based on the Hottel-Whiller-Bliss equation as presented next [46]: Here F R is the overall collector heat removal efficiency factor, which can be reformulated as: However, the most common method to define the performance of this kind of collectors is by computing the useful thermal energy (Q u ) transferred from the radiation to the fluid flow passing through the ETC in W (energy gain of the working fluid): .
where the subscript wg represents the working fluid (water/glycol), m the mass flow rate kg/s, C p the heat capacity (3572.5 J/kg-K) and T wg the temperature of the working fluid entering and leaving the ETC [44].
The ETC model has been validated in [47], where authors have demonstrated that the discrepancy in predicting collector outlet temperature is about 13% compared with experimental results.On the other hand, Ayompe et al. [48] have also computed a 13% in outlet temperature the found differences between simulation and real system.Finally, the error calculated in the accumulated collector energy was 12%.

Circulation Pumps Model
TRNSYS ® component TYPE114 is used to circulate water at three different stages of the complete cycle: solar loop, storage tank to MD heat exchanger, and fluid circulation inside the MD system.

•
Pump in the solar loop works at a flow rate of 0.027 kg/s of water/glycol.

•
Pump between the storage tank and the MD heat exchanger moves hot water at 0.055 kg/s.

•
Pump of the MD system has a flow rate of 0.055 kg/s of sea water.
This type computes the increment in the output temperature as: T in and T out are the entering and leaving the pump in • C, m f is the flow rate in kg/s, and Q f is the thermal energy transferred from the pump motor to the fluid flow passing through the pump in W. The energy transferred to the fluid is defined by Equation ( 7): .
where P s is the pumping shaft power in W, η p the efficiency of the pumping, P is the input power in W, and f m is the fraction of pump inefficiencies that contribute to a temperature rise of the working fluid [44].
On the other hand, a variable speed pump TYPE110 has been selected to serve the SHW.The fact that the SHW production is not constant along the whole day allows effective use of a variable speed pump.
Equation ( 6) of TYPE114 coincides with TYPE110.However, there is a simplification in the energy transferred from the pump to the fluid flow as shown in Equation ( 8): .

Membrane Distillation Model
PGMD system was simulated through new a type called TYPE154 [20,21].This type was generated following the information presented in   5 shows the comparison between the model obtained for TRNSYS ® TYPE154 and the model presented in references [20,21].where Ps is the pumping shaft power in W, ηp the efficiency of the pumping, P is the input power in W, and fm is the fraction of pump inefficiencies that contribute to a temperature rise of the working fluid [44].
On the other hand, a variable speed pump TYPE110 has been selected to serve the SHW.The fact that the SHW production is not constant along the whole day allows effective use of a variable speed pump.
Equation ( 6) of TYPE114 coincides with TYPE110.However, there is a simplification in the energy transferred from the pump to the fluid flow as shown in Equation ( 8):

Membrane Distillation Model
PGMD system was simulated through new a type called TYPE154 [20,21].This type was generated following the information presented in   Since there is a very similar behavior between the proposed TRNSYS ® type and the model from the reference, TYPE154 can be used to estimate the production of the specific MD system presented in Section 2.3.That is, it can be used to predict the PGMD FW production within Equation ( 9) and the next operating conditions: feed water range 0.055-0.13kg/s, Tci range 20-40 °C and Tei range 70-80 °C.
Figure 6 shows an example of typical PGMD production curves for different scenarios created: Since there is a very similar behavior between the proposed TRNSYS ® type and the model from the reference, TYPE154 can be used to estimate the production of the specific MD system presented in Section 2.3.That is, it can be used to predict the PGMD FW production within Equation ( 9

Pre-Design System Evaluation (Base Case)
In this section, some operational parameters such as temperatures and electricity, SHW and desalted water produced are analyzed for the preliminary design of the hybrid-trigeneration scheme.To facilitate the interpretation of those results, all graphics are presented in a monthly and daily basis.
The comparison between demand (red) and SHW production (blue) in Figure 7 shows that more than the 95% of the SHW demand can be covered along the whole year.Only in winter season the tank temperature does not reach the service temperature (45 °C) for SHW use until 10 a.m., as can be seen in the typical winter day graphic on Figure 7. Selected winter and summer days were respectively 18 December and 19 July (Figure 7).
Evolution of the tank temperature shows its minimum (35 °C) at the beginning and the end of the year, but averaged temperatures vary from 60 °C to 90 °C.On the other hand, and due to the efficient tempering valve included in the scheme, SHW temperature oscillates between 45 °C and 46 °C along the whole year except in December when, due to low temperatures and the lack of radiation, the SHW temperature decreases until 30 °C.Tank and SWH average temperatures are presented in Figure 8, as well as those ones for a typical winter day (18 December) and summer day (19 July).
FW distilled in the MD unit can be seen in Figure 9. Distillate is concentrated in summer season, when the storage tank temperature is usually below the threshold (70 °C) that activates the MD system.Figure 9 shows the yearly production and the detail for a typical winter and summer day.
Power coming from the PVT loop and the WT is firstly consumed by the internal demand (pumps and RO) and then external (home demand) should be partly covered.Nevertheless, in Figure 10 it is shown that the 70% of the total electric demand can be covered: this means that AC and DC pumps can operate in a standalone state during the whole year, but some energy has to be delivered

Pre-Design System Evaluation (Base Case)
In this section, some operational parameters such as temperatures and electricity, SHW and desalted water produced are analyzed for the preliminary design of the hybrid-trigeneration scheme.To facilitate the interpretation of those results, all graphics are presented in a monthly and daily basis.
The comparison between demand (red) and SHW production (blue) in Figure 7 shows that more than the 95% of the SHW demand can be covered along the whole year.Only in winter season the tank temperature does not reach the service temperature (45 • C) for SHW use until 10 a.m., as can be seen in the typical winter day graphic on Figure 7. Selected winter and summer days were respectively 18 December and 19 July (Figure 7).
Evolution of the tank temperature shows its minimum (35 • C) at the beginning and the end of the year, but averaged temperatures vary from 60 • C to 90 • C. On the other hand, and due to the efficient tempering valve included in the scheme, SHW temperature oscillates between 45 • C and 46 • C along the whole year except in December when, due to low temperatures and the lack of radiation, the SHW temperature decreases until 30 • C. Tank and SWH average temperatures are presented in Figure 8, as well as those ones for a typical winter day (18 December) and summer day (19 July).FW distilled in the MD unit can be seen in Figure 9. Distillate is concentrated in summer season, when the storage tank temperature is usually below the threshold (70 • C) that activates the MD system.Figure 9 shows the yearly production and the detail for a typical winter and summer day.
Power coming from the PVT loop and the WT is firstly consumed by the internal demand (pumps and RO) and then external (home demand) should be partly covered.Nevertheless, in Figure 10 it is shown that the 70% of the total electric demand can be covered: this means that AC and DC pumps can operate in a standalone state during the whole year, but some energy has to be delivered from the grid in order to fully cover the demand.The WT production highly depends on the wind velocity computed for each month.As can be seen in Figure 4, averaged wind velocity in Zaragoza, Spain is almost constant for the whole year (5 m/s) with small variations in April and October.Those variations are translated in the WT production (Figure 10) since April is the month with the highest production (28% more than the average) and October the month with the smallest production (34% less than the average).
On the other hand, Table 6 shows the annual production of SHW, FW and electricity for the base case of this preliminary design.Note that FW production is higher than the demand.Thus, the RO unit should be partly turned off at night, or alternatively some amount of water could be sold or stored for further peak demands.

Parametric Simulation
In order to improve the first design, production of SHW, FW (mainly the produced by the MD unit) and electricity is expected to rise up as much as possible.Six free-design variables of the first scheme were independently varied in the TRNSYS ® model.The unit capacities are only incremented in cases 2 (ETC area), 3 (storage tank capacity), and 6 (battery capacity): • Case 1 (Collector slope): the collectors tilt was analyzed for two additional cases, at 30° and 50°.The WT production highly depends on the wind velocity computed for each month.As can be seen in Figure 4, averaged wind velocity in Zaragoza, Spain is almost constant for the whole year (5 m/s) with small variations in April and October.Those variations are translated in the WT production (Figure 10) since April is the month with the highest production (28% more than the average) and October the month with the smallest production (34% less than the average).
On the other hand, Table 6 shows the annual production of SHW, FW and electricity for the base case of this preliminary design.Note that FW production is higher than the demand.Thus, the RO unit should be partly turned off at night, or alternatively some amount of water could be sold or stored for further peak demands.

Parametric Simulation
In order to improve the first design, production of SHW, FW (mainly the produced by the MD unit) and electricity is expected to rise up as much as possible.Six free-design variables of the first scheme were independently varied in the TRNSYS ® model.The unit capacities are only incremented in cases 2 (ETC area), 3 (storage tank capacity), and 6 (battery capacity):

•
Case 1 (Collector slope): the collectors tilt was analyzed for two additional cases, at 30 • and 50 • .

•
Case 2 (Evacuated tubes solar collector area): six vacuum tubes were added to the initial ETC composed by 14 vacuum tubes.The area was then increased up to 2 m 2 .

•
Case 3 (Storage tank capacity): was increased up to 0.45 m 3 and 0.5 m 3 respectively.

•
Case 4 (MD flow rates): flow to heat and internal flow of the MD were varied as presented in Table 7.

•
Case 5 (Use of SHW): SHW production was decreased by 60% and 80% respectively, in order to maximize FW production in the MD unit.

•
Case 6 (Battery capacity): it was varied up to 180 and 300 Ah.Table 7 presents the set of alternative design variables analyzed.
Results indicate that the electricity production is similar in all parametric simulations.The maximum increment (7%) was found in case 4-4.This can be seen in Figure 11.
The SHW production remains almost constant in all cases, except for case 5 where it was deliberately decreased.It can be observed in Figure 11 and Table 8 that if the SHW demand is not covered, distillate in the MD could be then increased.In case 5-1, an increment of 14% in the MD production was found when the SHW production decreased by 60%.The same happens in case 5-2, varying SHW production by 80% supposes an increment of 21% in the MD.However, similar effects can be found in cases 4-3 and 4-4, when the internal MD flow was set to 400 L/h or 500 L/h, since additional 18% and 19% of distillate were respectively found, with no significant impact on the SHW production: they correspond to a reduced flow delivered to the MD unit that also leaves to serve the SHW use.It should be noted that the increment of production by increasing the storage size for cases 3 and 6 is not significant compared with those results obtained in the base case.
varying SHW production by 80% supposes an increment of 21% in the MD.However, similar effects can be found in cases 4-3 and 4-4, when the internal MD flow was set to 400 L/h or 500 L/h, since additional 18% and 19% of distillate were respectively found, with no significant impact on the SHW production: they correspond to a reduced flow delivered to the MD unit that also leaves to serve the SHW use.It should be noted that the increment of production by increasing the storage size for cases 3 and 6 is not significant compared with those results obtained in the base case.

Production MD (L) RO (L) SHW (L) Electricity (kWh)
Finally, and as expected, increasing the ETC area from 1.4 to 2 m 2 (Case 2) would lead to a increase in the distillate by 11.4%, while keeping almost the same electricity and the SHW production.In the rest of parametric studies, no noteworthy production increments were found.
From these results, it can be inferred that the best design case (i.e., following the maximum MD distillation) could be made by increasing the ETC area and the MD internal flow.A definite scheme based on case 2 and case 4-4 is then proposed in Table 9 as the best design (case 2/4-4).Regarding the flow operating in the MD, the results obtained completely agree with the results presented in [21] under steady conditions in the range of 25-80 • C for 90 min.In that reference, the Energies 2016, 9, 1013 18 of 25 MD could continuously produce about 9 L/h with an inlet flow rate of 200 L/h, and when this flow rate was incremented to 500 L/h, the production was augmented up to 22 L/h.If similar conditions are selected in our transient model (i.e., similar time lapse, and the same temperatures for the seawater entering the MD condenser and evaporator sides), distillate flow obtained by the model is very close to the later, as it can be seen in Figure 12.Regarding the flow operating in the MD, the results obtained completely agree with the results presented in [21] under steady conditions in the range of 25-80 °C for 90 min.In that reference, the MD could continuously produce about 9 L/h with an inlet flow rate of 200 L/h, and when this flow rate was incremented to 500 L/h, the production was augmented up to 22 L/h.If similar conditions are selected in our transient model (i.e., similar time lapse, and the same temperatures for the seawater entering the MD condenser and evaporator sides), distillate flow obtained by the model is very close to the later, as it can be seen in Figure 12.If the yearly production is compared, in that case the overall production in the MD is incremented in 35.4% when the inlet MD flow increased from 200 L/h to 500 L/h, as seen in Figure 13.If the yearly production is compared, in that case the overall production in the MD is incremented in 35.4% when the inlet MD flow increased from 200 L/h to 500 L/h, as seen in Figure 13.Annual average distillate MD production of the optimal scheme is 56.8 L/d, being 41 L/d in the base case.Table 10 shows the main production gaps between the base and the optimum case.

Daily Analysis
This comparative analysis has now been focused on the averaged day of every month in the hybrid trigeneration system.
First, the SHW production is shown in Figure 14a.It can be observed that, in general, there are not significant differences between the base case and the case 2/4-4.The same happens with the electricity production Figure 14b.However, great differences are found in the FW production.
Contrary to the SHW and electricity productions, MD distillate is not continuously produced along the year.As it was restricted by the storage tank temperature (70 °C), in winter season thermal energy collected by the PVT and ETC is not usually enough to produce distillate.Table 11 shows the number of days per month in which the MD module was not activated in a typical year.
Between November and February, the MD system is not able to produce distillate in more than Annual average distillate MD production of the optimal scheme is 56.8 L/d, being 41 L/d in the base case.Table 10 shows the main production gaps between the base and the optimum case.

Daily Analysis
This comparative analysis has now been focused on the averaged day of every month in the hybrid trigeneration system.First, the SHW production is shown in Figure 14a.It can be observed that, in general, there are not significant differences between the base case and the case 2/4-4.The same happens with the electricity production Figure 14b.However, great differences are found in the FW production.not significant differences between the base case and the case 2/4-4.The same happens with the electricity production Figure 14b.However, great differences are found in the FW production.
Contrary to the SHW and electricity productions, MD distillate is not continuously produced along the year.As it was restricted the storage tank temperature (70 °C), in winter season thermal energy collected by the PVT and ETC is not usually enough to produce distillate.Table 11 shows the number of days per month in which the MD module was not activated in a typical year.
Between November and February, the MD system is not able to produce distillate in more than 20 days those months.Fortunately, in the rest of the months of the year, only on 2 days water will be produced merely by RO.It should be noted that averaged meteorological data are used in TRNSYS ® , but in a clear and sunny day higher irradiation than forecasted will surely occur.MD production is shown in Figure 15.During the winter season, distillate production per day is 27% higher in the best case with respect to the base one.In summer, the production is 47% higher per day.Some other alternatives to increase MD distillate should be to reduce the SHW demand, which were tested in cases 5, or operate the MD at even lower activation temperatures (e.g., 60 °C in the tank), besides of the low distillate flows predicted at those conditions by the models [18].Finally, Figure 16 shows the evolution of the MD production in one summer day (July) and in Contrary to the SHW and electricity productions, MD distillate is not continuously produced along the year.As it was restricted by the storage tank temperature (70 • C), in winter season thermal energy collected by the PVT and ETC is not usually enough to produce distillate.Table 11 shows the number of days per month in which the MD module was not activated in a typical year.Between November and February, the MD system is not able to produce distillate in more than 20 days those months.Fortunately, in the rest of the months of the year, only on 2 days water will be produced merely by RO.It should be noted that averaged meteorological data are used in TRNSYS ® , but in a clear and sunny day higher irradiation than forecasted will surely occur.
MD production is shown in Figure 15.During the winter season, distillate production per day is 27% higher in the best case with respect to the base one.In summer, the production is 47% higher per day.Some other alternatives to increase MD distillate should be to reduce the SHW demand, which were tested in cases 5, or operate the MD at even lower activation temperatures (e.g., 60 • C in the tank), besides of the low distillate flows predicted at those conditions by the models [18].MD production is shown in Figure 15.During the winter season, distillate production per day is 27% higher in the best case with respect to the base one.In summer, the production is 47% higher per day.Some other alternatives to increase MD distillate should be to reduce the SHW demand, which were tested in cases 5, or operate the MD at even lower activation temperatures (e.g., 60 °C in the tank), besides of the low distillate flows predicted at those conditions by the models [18].Finally, Figure 16 shows the evolution of the MD production in one summer day (July) and in one winter day (November).These results are also based on the averaged day of those months.It can be seen that during summer, the MD system operates continuously during 8 h (from 10 a.m. to 19 p.m.).
In winter, the FW production starts at noon and produces 3.5 h, later stops 10 min and then reoperates again for one hour more.This is provoked by the typical SHW demand at noon, which cools the water tank and does not allow feed the MD unit for a short period.Finally, Figure 16 shows the evolution of the MD production in one summer day (July) and in one winter day (November).These results are also based on the averaged day of those months.It can be seen that during summer, the MD system operates continuously during 8 h (from 10 a.m. to 19 p.m.).

Economic Analysis
A simple economic feasibility study of the hybrid plant is presented in this section.To assess the costs of desalted water, SHW and power, the investment costs of the devices associated to the generation of each product were taken into account.For instance, investment costs of the MD and RO units were used to estimate water costs.Regarding SHW, a portion of PVT, the ETC, water tank, pumps and regulation valves were considered.Finally, to account for the power costs, the investment required in PVT, WT, batteries and regulator-inverter was introduced.The life cycle assumed for all devices was 20 years.Table 12 shows those costs for the parametric study included in Section 4.2.
Economic optimum for all the products does not coincide with the optimum presented in Section 4.2 (case 2/4-4), since this case was defined as the highest water producer, especially by means of the MD unit.Thus, and it was expected, the lowest water cost was found in that case.Regarding power costs, the increase of ETC area allows operating the PVTs at lower temperatures and therefore higher efficiencies that gave major generation of power along the year.This is translated into a low generation cost in this option, but not the least.Finally, as ETC area increased the investment cost associated to SHW did so too, but no significant production was found in that case, taking into account that additional thermal energy is dedicated to produce more desalted water in the MD.In winter, the FW production starts at noon and produces 3.5 h, later stops 10 min and then re-operates again for one hour more.This is provoked by the typical SHW demand at noon, which cools the water tank and does not allow feed the MD unit for a short period.

Economic Analysis
A simple economic feasibility study of the hybrid plant is presented in this section.To assess the costs of desalted water, SHW and power, the investment costs of the devices associated to the generation of each product were taken into account.For instance, investment costs of the MD and RO units were used to estimate water costs.Regarding SHW, a portion of PVT, the ETC, water tank, pumps and regulation valves were considered.Finally, to account for the power costs, the investment required in PVT, WT, batteries and regulator-inverter was introduced.The life cycle assumed for all devices was 20 years.Table 12 shows those costs for the parametric study included in Section 4.2.
Economic optimum for all the products does not coincide with the optimum presented in Section 4.2 (case 2/4-4), since this case was defined as the highest water producer, especially by means of the MD unit.Thus, and it was expected, the lowest water cost was found in that case.Regarding power costs, the increase of ETC area allows operating the PVTs at lower temperatures and therefore higher efficiencies that gave major generation of power along the year.This is translated into a low generation cost in this option, but not the least.Finally, as ETC area increased the investment cost associated to SHW did so too, but no significant production was found in that case, taking into account that additional thermal energy is dedicated to produce more desalted water in the MD.

Conclusions
A small pilot plant consisting of two renewable energy devices (PVT and WT) providing power and SHW, as well as two FW desalting technologies (MD and RO), has been carefully modeled here.Only commercial devices were used in the design analysis.The case study was adapted for the city of Zaragoza, Spain.The transient simulation software TRNSYS ® version 16 was used for this purpose.This software has been proved as a powerful tool to simulate the trigeneration installation during the design stage, since it allows assessing the overall of the system along a complete year.As TRNSYS ® was not designed to model distillation or desalination processes, it was necessary to create a new type to achieve the complete simulation.The model presented here agreed with that one presented in reference [21] if operation is compared at similar steady conditions, which corresponds to the same commercial spiral-wound MD-module.
Results show that the optimum scheme found could provide most of the power, SHW and water demands for an isolated single family home as follows:

•
The base case analyzed is able to cover up to 70% of electric demand; this coverage ratio is incremented to 75% when the optimum case 2/4-4 is simulated.However, it has to be taken into account that the RO was scheduled to work continuously, thus exceeding by 200% the FW demand required.That is, some surplus energy is stored in form of desalted water, what is, at the end, the third way to manage the balance between the renewable energy availability and user demands.

•
Since the proposed WT increases in 30% the total power production, an additional WT of 400 W p could be the definite solution for the full coverage of the family home.

•
Sensitivity analysis of six free-design variables showed that SHW and electricity production remained almost constant in all parametric studies.Thus, the optimization was concentrated in the maximization of the MD distiller.This was found by varying the tank temperature or the flow rate operating in the MD.

•
SHW is the same in base case and optimum case.However, a 7% power production increment was found in optimum case with respect the base case.

•
The optimum case increased a lot the MD production.Distillate from the MD system was increased by 35% from 15,311 liters per year to 20,745 liters per year.

•
Water, SHW and power costs found in the optimum case are around 3.15 €/m 3 , 3.84 €/m 3 and 0.10 €/kWh respectively, making this scheme a feasible alternative for small isolated family homes.
This work is the first step in a more ambitious project including a small hybrid-trigeneration pilot plant, which has been erected at the University of Zaragoza based on the main results obtained in this paper.Specifically, a control temperature that splits the use of hot water to feed the MD or to cover the SHW demand will be carefully analyzed in the field tests, according to important variations found in the simulations performed.

Figure 1 .
Figure 1.General description of the hybrid trigeneration system.

Figure 1 .
Figure 1.General description of the hybrid trigeneration system.

Figure 2 .
Figure 2. MD basic principle of operation.

Figure 2 .
Figure 2. MD basic principle of operation.

Figure 3
Figure 3 shows the complete project created with TRNSYS ® .

Figure 3
Figure 3 shows the complete project created with TRNSYS ® .

( 1 ) 24 ( 1 )
Refilling storage tank water: If SHW is extracted from the storage tank, the same amount of water has to be replaced with cold tap-water.Water is recovered in storage tank through valve 1.(2) Tempering water: That second flow only exists if the tank temperature exceeds 45 • C. The tempering valve computes the energy and mass balance to serve SHW at that service temperature.Energies 2016, 9, 1013 9 of Refilling storage tank water: If SHW is extracted from the storage tank, the same amount of water has to be replaced with cold tap-water.Water is recovered in storage tank through valve 1.(2) Tempering water: That second flow only exists if the tank temperature exceeds 45 °C.The tempering valve computes the energy and mass balance to serve SHW at that service temperature.
[1-49], with the aid of G95 open source FORTRAN compiler [50].The model is based on empirical relation (1st order polynomial) for the distillate water production expressed as a function of the sea water flow rate (0.055 kg/s) and steady operation temperatures (salinity of 50 g/kg, condenser inlet temperature T ci = 25 • C and evaporator inlet temperature T ei = 80 • C).

Figure
[1-49], with the aid of G95 open source FORTRAN compiler [50].The model is based on empirical relation (1st order polynomial) for the distillate water production expressed as a function of the sea water flow rate (0.055 kg/s) and steady operation temperatures (salinity of 50 g/kg, condenser inlet temperature Tci = 25 °C and evaporator inlet temperature Tei = 80 °C).

Figure 5
shows the comparison between the model obtained for TRNSYS ® TYPE154 and the model presented in references[20,21].
) and the next operating conditions: feed water range 0.055-0.13kg/s, T ci range 20-40 • C and T ei range 70-80 • C.

Figure 6 .
Figure 6.TYPE154 model performance.(a) Condenser inlet temperature effect on fresh water production; (b) Mass inlet flow effect on fresh water production.

Figure 9 .
Figure 9. FW production by MD unit along the year.

Figure 9 .
Figure 9. FW production by MD unit along the year.

Figure 9 .
Figure 9. FW production by MD unit along the year.

Figure 13 .
Figure 13.MD production in the base and optimum design cases.

Figure 15 .
Figure 15.MD average production per month.

Figure 15 .
Figure 15.MD average production per month.

Figure 15 .
Figure 15.MD average production per month.

Figure 16 .
Figure 16.MD production in a typical day per season.

Figure 16 .
Figure 16.MD production in a typical day per season.

Table 1 .
Monthly water demand (Fresh water demand left, sanitary hot water demand right side).

Table 3 .
Electric demand from a single family home.

Table 4 .
Subsystems simulated in TRNSYS ® .* (RO was not modeled as a new model-type).
p One wind turbine, 400 W p Two batteries, 250 Ah and 24 V

Table 5 .
Units and Types simulated in TRNSYS ® .

Table 6 .
Allowed productions and covered demands in the base case.

Table 6 .
Allowed productions and covered demands in the base case.

Table 7 .
Parametric simulations of some free-design variables in the scheme.

Table 8 .
Yearly productions table in the sensitivity analysis.

Table 9 .
Best case design (maximum MD production).

Table 10 .
Results comparison between base and optimum (MD) case.

Table 10 .
Results comparison between base and optimum (MD) case.

Table 12 .
Cost estimation in the sensitivity analysis.

Table 12 .
Cost estimation in the sensitivity analysis.